Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ForwardDiff Decapode Gradient Fail Example #182

Open
jClugstor opened this issue Oct 1, 2024 · 15 comments
Open

ForwardDiff Decapode Gradient Fail Example #182

jClugstor opened this issue Oct 1, 2024 · 15 comments

Comments

@jClugstor
Copy link
Collaborator

jClugstor commented Oct 1, 2024

using Pkg
Pkg.activate(".")
Pkg.instantiate()

# AlgebraicJulia Dependencies
using Catlab
using Catlab.Graphics
using CombinatorialSpaces
using Decapodes
using ComponentArrays
using ForwardDiff
using Zygote

# External Dependencies
using MLStyle
using MultiScaleArrays
using LinearAlgebra
using OrdinaryDiffEq
using JLD2
using SparseArrays
using Statistics
#using GLMakie # Just for visualization
using GeometryBasics: Point2, Point3
Point2D = Point2{Float64};
Point3D = Point3{Float64};

using DiagrammaticEquations
using DiagrammaticEquations.Deca

@info("Packages Loaded")

halfar_eq2 = @decapode begin
    h::Form0
    Γ::Form1
    n::Constant== ∂ₜ(h)
    ḣ == (, d, )(Γ * d(h) * avg₀₁(mag((d(h)))^(n - 1)) * avg₀₁(h^(n + 2)))
end

glens_law = @decapode begin
    Γ::Form1
    (A, ρ, g, n)::Constant

    Γ == (2 / (n + 2)) * A ** g)^n
end

@info("Decapodes Defined")

ice_dynamics_composition_diagram = @relation () begin
    dynamics(Γ, n)
    stress(Γ, n)
end

ice_dynamics_cospan = oapply(ice_dynamics_composition_diagram,
    [Open(halfar_eq2, [, :n]),
        Open(glens_law, [, :n])])
ice_dynamics = apex(ice_dynamics_cospan)
ice_dynamics1D = expand_operators(ice_dynamics)
infer_types!(ice_dynamics1D, op1_inf_rules_1D, op2_inf_rules_1D)
resolve_overloads!(ice_dynamics1D, op1_res_rules_1D, op2_res_rules_1D)

s_prime = EmbeddedDeltaSet1D{Bool,Point2D}()
add_vertices!(s_prime, 100, point=Point2D.(range(-2, 2, length=100), 0))
add_edges!(s_prime, 1:nv(s_prime)-1, 2:nv(s_prime))
orient!(s_prime)
s = EmbeddedDeltaDualComplex1D{Bool,Float64,Point2D}(s_prime)
subdivide_duals!(s, Circumcenter())

@info("Spaces Defined")

function generate(sd, my_symbol; hodge=GeometricHodge())
    op = @match my_symbol begin
        :♯ => x -> begin
            # This is an implementation of the "sharp" operator from the exterior
            # calculus, which takes co-vector fields to vector fields.
            # This could be up-streamed to the CombinatorialSpaces.jl library. (i.e.
            # this operation is not bespoke to this simulation.)
            e_vecs = map(edges(sd)) do e
                point(sd, sd[e, :∂v0]) - point(sd, sd[e, :∂v1])
            end
            neighbors = map(vertices(sd)) do v
                union(incident(sd, v, :∂v0), incident(sd, v, :∂v1))
            end
            n_vecs = map(neighbors) do es
                [e_vecs[e] for e in es]
            end
            map(neighbors, n_vecs) do es, nvs
                sum([nv * norm(nv) * x[e] for (e, nv) in zip(es, nvs)]) / sum(norm.(nvs))
            end
        end
        :mag => x -> norm.(x)
        x => error("Unmatched operator $my_symbol")
    end
    return (args...) -> op(args...)
end

decapode_code = gensim(ice_dynamics1D, dimension=1, preallocate=true)
file = open("ice_sheet1D_alloc.jl", "w")
write(file, string("decapode_f = ", decapode_code))
close(file)
include("ice_sheet1D_alloc.jl")

fₘ = decapode_f(s, generate)


function f(constants_and_parameters)
    prob = ODEProblem{true,SciMLBase.FullSpecialize}(fₘ, u₀, (0, tₑ), constants_and_parameters)
    @info("Solving")
    soln = solve(prob, FBDF(autdodiff=false))
    @info("Done")

    # return soln(tₑ)
    sum(last(soln)) # last, not soln(tₑ) because to avoid interpolation fails when AD fails.
end

h₀ = map(x -> exp(-2*x[1]^2), point(s_prime))

flow_rate, ice_density, u_init_arr = 1e-3, 910.0, h₀
n = 3
ρ = ice_density
g = 9.8101
A = fill(flow_rate, ne(s))
tₑ = 5e9

u₀ = ComponentArray(dynamics_h=u_init_arr)

# Note that this must be a ComponentArray to differentiate
constants_and_parameters = ComponentArray(
    n=n,
    stress_ρ=ρ,
    stress_g=g,
    stress_A=A)

y = f(constants_and_parameters)
zygote_dy = Zygote.gradient(f,constants_and_parameters)

If you do FBDF() the forwarddiff fails. The forwarddiff also fails if the sensealg uses autodiff = true.

ERROR: ArgumentError: cannot reinterpret an `ForwardDiff.Dual{nothing, Float64, 11}` array to `ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{true, ODEFunction{true, SciMLBase.FullSpecialize, var"#f#36"{PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 11}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 11}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 11}}}, SparseMatrixCSC{Float64, Int64}, var"#48#57"{var"#47#56"}, var"#48#57"{var"#40#49"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}}}, Decapodes.var"#37#38"{SparseMatrixCSC{Float64, Int32}}, SparseMatrixCSC{Int8, Int32}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, Float64, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(n = 1, stress_ρ = 2, stress_g = 3, stress_A = 4:102)}}}}, Float64}, Float64, 12}` whose first dimension has size `99`.
The resulting array would have non-integral first dimension.

Stacktrace:
  [1] (::Base.var"#thrownonint#336")(S::Type, T::Type, dim::Int64)
    @ Base ./reinterpretarray.jl:53
  [2] reinterpret
    @ ./reinterpretarray.jl:71 [inlined]
  [3] get_tmp(dc::PreallocationTools.FixedSizeDiffCache{…}, u::ComponentVector{…})
    @ PreallocationTools ~/.julia/packages/PreallocationTools/7dIFh/src/PreallocationTools.jl:59
  [4] (::var"#f#36"{})(du::ComponentVector{…}, u::ComponentVector{…}, p::ComponentVector{…}, t::Float64)
    @ Main ~/Documents/Work/dev/DecapodeCalibrateDemos/GlacialFlow/ice_sheet1D_alloc.jl:48
  [5] ODEFunction
    @ ~/.julia/packages/SciMLBase/EiBzT/src/scimlfunctions.jl:2335 [inlined]
  [6] UJacobianWrapper
    @ ~/.julia/packages/SciMLBase/EiBzT/src/function_wrappers.jl:32 [inlined]
  [7] chunk_mode_jacobian!(result::Matrix{…}, f!::SciMLBase.UJacobianWrapper{…}, y::ComponentVector{…}, x::ComponentVector{…}, cfg::ForwardDiff.JacobianConfig{…})
    @ ForwardDiff ~/.julia/packages/ForwardDiff/PcZ48/src/jacobian.jl:183
  [8] jacobian!
    @ ~/.julia/packages/ForwardDiff/PcZ48/src/jacobian.jl:80 [inlined]
  [9] jacobian!
    @ ~/.julia/packages/ForwardDiff/PcZ48/src/jacobian.jl:76 [inlined]
 [10] jacobian!
    @ ~/.julia/packages/SciMLSensitivity/HRhwU/src/derivative_wrappers.jl:155 [inlined]
 [11] _vecjacobian!(dλ::SubArray{…}, y::ComponentVector{…}, λ::SubArray{…}, p::ComponentVector{…}, t::Float64, S::SciMLSensitivity.ODEInterpolatingAdjointSensitivityFunction{…}, isautojacvec::Bool, dgrad::SubArray{…}, dy::Nothing, W::Nothing)
    @ SciMLSensitivity ~/.julia/packages/SciMLSensitivity/HRhwU/src/derivative_wrappers.jl:270
 [12] #vecjacobian!#18
    @ ~/.julia/packages/SciMLSensitivity/HRhwU/src/derivative_wrappers.jl:232 [inlined]
 [13] vecjacobian!
    @ ~/.julia/packages/SciMLSensitivity/HRhwU/src/derivative_wrappers.jl:229 [inlined]
 [14] (::SciMLSensitivity.ODEInterpolatingAdjointSensitivityFunction{…})(du::Vector{…}, u::Vector{…}, p::ComponentVector{…}, t::Float64)
    @ SciMLSensitivity ~/.julia/packages/SciMLSensitivity/HRhwU/src/interpolating_adjoint.jl:138
 [15] ODEFunction
    @ ~/.julia/packages/SciMLBase/EiBzT/src/scimlfunctions.jl:2335 [inlined]
 [16] initialize!
    @ ~/.julia/packages/OrdinaryDiffEqBDF/J0IGS/src/bdf_perform_step.jl:1220 [inlined]
 [17] __init(prob::ODEProblem{…}, alg::FBDF{…}, timeseries_init::Tuple{}, ts_init::Tuple{}, ks_init::Tuple{}, recompile::Type{…}; saveat::Vector{…}, tstops::Vector{…}, d_discontinuities::Tuple{}, save_idxs::Nothing, save_everystep::Bool, save_on::Bool, save_start::Bool, save_end::Nothing, callback::CallbackSet{…}, dense::Bool, calck::Bool, dt::Float64, dtmin::Float64, dtmax::Float64, force_dtmin::Bool, adaptive::Bool, gamma::Rational{…}, abstol::Float64, reltol::Float64, qmin::Rational{…}, qmax::Int64, qsteady_min::Rational{…}, qsteady_max::Rational{…}, beta1::Nothing, beta2::Nothing, qoldinit::Rational{…}, controller::Nothing, fullnormalize::Bool, failfactor::Int64, maxiters::Int64, internalnorm::typeof(DiffEqBase.ODE_DEFAULT_NORM), internalopnorm::typeof(opnorm), isoutofdomain::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), unstable_check::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), verbose::Bool, timeseries_errors::Bool, dense_errors::Bool, advance_to_tstop::Bool, stop_at_next_tstop::Bool, initialize_save::Bool, progress::Bool, progress_steps::Int64, progress_name::String, progress_message::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), progress_id::Symbol, userdata::Nothing, allow_extrapolation::Bool, initialize_integrator::Bool, alias_u0::Bool, alias_du0::Bool, initializealg::OrdinaryDiffEqCore.DefaultInit, kwargs::@Kwargs{})
    @ OrdinaryDiffEqCore ~/.julia/packages/OrdinaryDiffEqCore/55UVY/src/solve.jl:525
 [18] __init (repeats 5 times)
    @ ~/.julia/packages/OrdinaryDiffEqCore/55UVY/src/solve.jl:11 [inlined]
 [19] __solve(::ODEProblem{…}, ::FBDF{…}; kwargs::@Kwargs{})
    @ OrdinaryDiffEqCore ~/.julia/packages/OrdinaryDiffEqCore/55UVY/src/solve.jl:6
 [20] __solve
    @ ~/.julia/packages/OrdinaryDiffEqCore/55UVY/src/solve.jl:1 [inlined]
 [21] solve_call(_prob::ODEProblem{…}, args::FBDF{…}; merge_callbacks::Bool, kwargshandle::Nothing, kwargs::@Kwargs{})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/DdIeW/src/solve.jl:612
 [22] solve_call
    @ ~/.julia/packages/DiffEqBase/DdIeW/src/solve.jl:569 [inlined]
 [23] #solve_up#53
    @ ~/.julia/packages/DiffEqBase/DdIeW/src/solve.jl:1080 [inlined]
 [24] solve_up
    @ ~/.julia/packages/DiffEqBase/DdIeW/src/solve.jl:1066 [inlined]
 [25] #solve#51
    @ ~/.julia/packages/DiffEqBase/DdIeW/src/solve.jl:1003 [inlined]
 [26] _adjoint_sensitivities(sol::ODESolution{…}, sensealg::InterpolatingAdjoint{…}, alg::FBDF{…}; t::Vector{…}, dgdu_discrete::Function, dgdp_discrete::Nothing, dgdu_continuous::Nothing, dgdp_continuous::Nothing, g::Nothing, abstol::Float64, reltol::Float64, checkpoints::Vector{…}, corfunc_analytical::Nothing, callback::Nothing, kwargs::@Kwargs{})
    @ SciMLSensitivity ~/.julia/packages/SciMLSensitivity/HRhwU/src/sensitivity_interface.jl:448
 [27] _adjoint_sensitivities
    @ ~/.julia/packages/SciMLSensitivity/HRhwU/src/sensitivity_interface.jl:405 [inlined]
 [28] #adjoint_sensitivities#63
    @ ~/.julia/packages/SciMLSensitivity/HRhwU/src/sensitivity_interface.jl:401 [inlined]
 [29] (::SciMLSensitivity.var"#adjoint_sensitivity_backpass#313"{})(Δ::ODESolution{…})
    @ SciMLSensitivity ~/.julia/packages/SciMLSensitivity/HRhwU/src/concrete_solve.jl:627
 [30] ZBack
    @ ~/.julia/packages/Zygote/Tt5Gx/src/compiler/chainrules.jl:212 [inlined]
 [31] (::Zygote.var"#294#295"{})(Δ::ODESolution{…})
    @ Zygote ~/.julia/packages/Zygote/Tt5Gx/src/lib/lib.jl:206
 [32] (::Zygote.var"#2169#back#296"{})(Δ::ODESolution{…})
    @ Zygote ~/.julia/packages/ZygoteRules/M4xmc/src/adjoint.jl:72
 [33] #solve#51
    @ ~/.julia/packages/DiffEqBase/DdIeW/src/solve.jl:1003 [inlined]
 [34] (::Zygote.Pullback{…})(Δ::ODESolution{…})
    @ Zygote ~/.julia/packages/Zygote/Tt5Gx/src/compiler/interface2.jl:0
 [35] #294
    @ ~/.julia/packages/Zygote/Tt5Gx/src/lib/lib.jl:206 [inlined]
 [36] (::Zygote.var"#2169#back#296"{})(Δ::ODESolution{…})
    @ Zygote ~/.julia/packages/ZygoteRules/M4xmc/src/adjoint.jl:72
 [37] solve
    @ ~/.julia/packages/DiffEqBase/DdIeW/src/solve.jl:993 [inlined]
 [38] (::Zygote.Pullback{…})(Δ::ODESolution{…})
    @ Zygote ~/.julia/packages/Zygote/Tt5Gx/src/compiler/interface2.jl:0
 [39] f
    @ ~/Documents/Work/dev/DecapodeCalibrateDemos/GlacialFlow/glacialflow1D_calibrate_alloc.jl:119 [inlined]
 [40] (::Zygote.Pullback{Tuple{typeof(f), ComponentVector{Float64, Vector{Float64}, Tuple{Axis{}}}}, Any})(Δ::Float64)
    @ Zygote ~/.julia/packages/Zygote/Tt5Gx/src/compiler/interface2.jl:0
 [41] (::Zygote.var"#78#79"{Zygote.Pullback{Tuple{typeof(f), ComponentVector{}}, Any}})(Δ::Float64)
    @ Zygote ~/.julia/packages/Zygote/Tt5Gx/src/compiler/interface.jl:91
 [42] gradient(f::Function, args::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{…}}})
    @ Zygote ~/.julia/packages/Zygote/Tt5Gx/src/compiler/interface.jl:148
 [43] top-level scope
    @ ~/Documents/Work/dev/DecapodeCalibrateDemos/GlacialFlow/glacialflow1D_calibrate_alloc.jl:146
Some type information was truncated. Use `show(err)` to see complete types.
@jClugstor
Copy link
Collaborator Author

So Decapodes has two different code generation options, one that uses PreallocationTools and the DiffCaches, and one that doesn't.
The code that doesn't use PreallocationTools, we're able to do ForwardDiff through.

This is an example of code that does use PreallocationTools, and ForwardDiff doesn't work.

@jClugstor
Copy link
Collaborator Author

@ChrisRackauckas I think the next steps for Decapode calibration stuff is to make sure that ForwardDiff works in situations like this, and then making sure that sensealg = EnzymeVJP() works.

For context, I have a heat equation decapode example that uses PreallocationTools, ForwardDiff works, and sensealg = EnzymeVJP() works, but that example only has one parameter that I differentiate with respect to.

@jClugstor
Copy link
Collaborator Author

@ChrisRackauckas I think this is the most pared down I can get it while still getting the error.

using Catlab
using Catlab.Graphics
using CombinatorialSpaces
using Decapodes
using ComponentArrays
using ForwardDiff
using Zygote
using SciMLSensitivity

# External Dependencies
using MLStyle
using MultiScaleArrays
using LinearAlgebra
using OrdinaryDiffEq
using JLD2
using SparseArrays
using Statistics
using GeometryBasics: Point2, Point3
Point2D = Point2{Float64};
Point3D = Point3{Float64};

using DiagrammaticEquations
using DiagrammaticEquations.Deca


halfar_eq2 = @decapode begin
    h::Form0
    Γ::Form1
    n::Constant== ∂ₜ(h)
    ḣ == (, d, )(Γ * d(h) * avg₀₁(mag((d(h)))^(n - 1)) * avg₀₁(h^(n + 2)))
end

glens_law = @decapode begin
    Γ::Form1
    (A, ρ, g, n)::Constant

    Γ == (2.0 / (n + 2.0)) * A ** g)^n
end

@info("Decapodes Defined")

ice_dynamics_composition_diagram = @relation () begin
    dynamics(Γ, n)
    stress(Γ, n)
end

ice_dynamics_cospan = oapply(ice_dynamics_composition_diagram,
    [Open(halfar_eq2, [, :n]),
        Open(glens_law, [, :n])])
ice_dynamics = apex(ice_dynamics_cospan)
ice_dynamics1D = expand_operators(ice_dynamics)
infer_types!(ice_dynamics1D, op1_inf_rules_1D, op2_inf_rules_1D)
resolve_overloads!(ice_dynamics1D, op1_res_rules_1D, op2_res_rules_1D)

s_prime = EmbeddedDeltaSet1D{Bool,Point2D}()
add_vertices!(s_prime, 10, point=Point2D.(range(-2.0, 2.0, length= 10), 0.0))
add_edges!(s_prime, 1:nv(s_prime)-1, 2:nv(s_prime))
orient!(s_prime)
s = EmbeddedDeltaDualComplex1D{Bool,Float64,Point2D}(s_prime)
subdivide_duals!(s, Circumcenter())


function generate(sd, my_symbol; hodge=GeometricHodge())
    op = @match my_symbol begin
        :♯ => x -> begin
            # This is an implementation of the "sharp" operator from the exterior
            # calculus, which takes co-vector fields to vector fields.
            # This could be up-streamed to the CombinatorialSpaces.jl library. (i.e.
            # this operation is not bespoke to this simulation.)

            e_vecs = map(edges(sd)) do e
                point(sd, sd[e, :∂v0]) - point(sd, sd[e, :∂v1])
            end
           
            neighbors = map(vertices(sd)) do v
                union(incident(sd, v, :∂v0), incident(sd, v, :∂v1))
            end

           
            n_vecs = map(neighbors) do es
                [e_vecs[e] for e in es]
            end

            map(neighbors, n_vecs) do es, nvs
                sum([nv * norm(nv) * x[e] for (e, nv) in zip(es, nvs)]) / sum(norm.(nvs))
            end
        end
        :mag => x -> norm.(x)
        x => error("Unmatched operator $my_symbol")
    end
    return (args...) -> op(args...)
end


decapode_code = gensim(ice_dynamics1D, dimension=1, preallocate=true)
file = open("ice_sheet1D_alloc.jl", "w")
write(file, string("decapode_f = ", decapode_code))
close(file)
include("ice_sheet1D_alloc.jl")

fₘ = decapode_f(s, generate)


h₀ = map(x -> exp(-2 * x[1]^2), point(s_prime))

flow_rate, ice_density, u_init_arr = 1e-3, 910.0, h₀
n = 3.0
ρ = ice_density
g = 9.8101
A = fill(flow_rate, ne(s))
tₑ = 10.0

u₀ = ComponentArray(dynamics_h=u_init_arr)

constants_and_parameters = ComponentArray(
    n=n,
    stress_ρ=ρ,
    stress_g=g,
    stress_A=A)

data_prob = ODEProblem{true,SciMLBase.FullSpecialize}(fₘ, u₀, (0, tₑ), constants_and_parameters)
decapode_sol = solve(data_prob, Tsit5())
reference_dat = last(decapode_sol).dynamics_h

function loss(u) #only compares last time step
    newp = ComponentArray(n=n, stress_ρ=u[1], stress_g=g, stress_A=A)
    prob = remake(data_prob, p=newp)
    sol = solve(prob, Rodas4(autodiff=false), sensealg=GaussAdjoint())
    current_dat = last(sol).dynamics_h
    sum(abs2, reference_dat .- current_dat)
end

#loss([800.0])
Zygote.gradient(loss, [800.0])

@jClugstor
Copy link
Collaborator Author

The code generation gives something like this

decapode_f = begin
    #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:758 =#
    (mesh, operators, hodge = GeometricHodge())->begin
            #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:758 =#
            #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:759 =#
            begin
                #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:235 =#
                (var"GenSim-M_d₀", d₀) = default_dec_matrix_generate(mesh, :d₀, hodge)
                (var"GenSim-M_avg₀₁", avg₀₁) = default_dec_matrix_generate(mesh, :avg₀₁, hodge)
                (var"GenSim-M_⋆₁", ₁) = default_dec_matrix_generate(mesh, :₁, hodge)
                (var"GenSim-M_dual_d₀", dual_d₀) = default_dec_matrix_generate(mesh, :dual_d₀, hodge)
                (var"GenSim-M_⋆₀⁻¹", ₀⁻¹) = default_dec_matrix_generate(mesh, :₀⁻¹, hodge)
                ♯ = operators(mesh, :♯)
                mag = operators(mesh, :mag)
            end
            #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:760 =#
            begin
                #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:619 =#
                var"GenSim-M_GenSim-ConMat_1" = var"GenSim-M_⋆₀⁻¹" * var"GenSim-M_dual_d₀" * var"GenSim-M_⋆₁"
                var"GenSim-ConMat_1" = (x->var"GenSim-M_GenSim-ConMat_1" * x)
            end
            #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:761 =#
            begin
                #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:140 =#
                var"__dynamics_•1" = Decapodes.FixedSizeDiffCache(Vector{Float64}(undef, nparts(mesh, :E)))
                var"__dynamics_•6" = Decapodes.FixedSizeDiffCache(Vector{Float64}(undef, nparts(mesh, :E)))
                __dynamics_mult_3 = Decapodes.FixedSizeDiffCache(Vector{Float64}(undef, nparts(mesh, :E)))
                __dynamics_ḣ = Decapodes.FixedSizeDiffCache(Vector{Float64}(undef, nparts(mesh, :V)))
            end
            #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:762 =#
            f(du, u, p, t) = begin
                    #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:762 =#
                    #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:763 =#
                    begin
                        #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:297 =#
                        dynamics_h = u.dynamics_h
                        n = p.n
                        stress_A = p.stress_A
                        stress_ρ = p.stress_ρ
                        stress_g = p.stress_g
                        var"1" = 1.0
                        var"2" = 2.0
                        var"2.0" = 2.0
                    end
                    #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:764 =#
                    begin
                        #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:534 =#
                        var"dynamics_•1" = Decapodes.get_tmp(var"__dynamics_•1", u)
                        var"dynamics_•6" = Decapodes.get_tmp(var"__dynamics_•6", u)
                        dynamics_mult_3 = Decapodes.get_tmp(__dynamics_mult_3, u)
                        dynamics_ḣ = Decapodes.get_tmp(__dynamics_ḣ, u)
                    end
                    #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:765 =#
                    mul!(var"dynamics_•1", var"GenSim-M_d₀", dynamics_h)
                    mul!(var"dynamics_•6", var"GenSim-M_d₀", dynamics_h)
                    var"dynamics_•5" = (var"dynamics_•6")
                    var"dynamics_•4" = mag(var"dynamics_•5")
                    var"dynamics_•7" = n .- var"1"
                    var"dynamics_•3" = var"dynamics_•4" .^ var"dynamics_•7"
                    var"stress_•3" = stress_ρ .* stress_g
                    var"stress_•2" = var"stress_•3" .^ n
                    dynamics_sum_1 = (.+)(n, var"2")
                    stress_sum_1 = (.+)(n, var"2.0")
                    var"dynamics_•2" = avg₀₁(var"dynamics_•3")
                    var"dynamics_•9" = dynamics_h .^ dynamics_sum_1
                    var"stress_•1" = var"2.0" ./ stress_sum_1
                    stress_mult_1 = var"stress_•1" .* stress_A
                    Γ = stress_mult_1 .* var"stress_•2"
                    var"dynamics_•8" = avg₀₁(var"dynamics_•9")
                    dynamics_mult_3 .= Γ .* var"dynamics_•1"
                    dynamics_mult_1 = dynamics_mult_3 .* var"dynamics_•2"
                    dynamics_mult_2 = dynamics_mult_1 .* var"dynamics_•8"
                    mul!(dynamics_ḣ, var"GenSim-M_GenSim-ConMat_1", dynamics_mult_2)
                    #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:766 =#
                    begin
                        #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:338 =#
                        setproperty!(du, :dynamics_h, dynamics_ḣ)
                    end
                    #= /home/jadonclugston/.julia/packages/Decapodes/MGJA6/src/simulation.jl:767 =#
                    return nothing
                end
        end
end

where var"dynamics_•1" = Decapodes.get_tmp(var"__dynamics_•1", u) is the line that gives problems

@jClugstor
Copy link
Collaborator Author

jClugstor commented Oct 23, 2024

The issue comes from reinterpret

function reinterpret(::Type{T}, a::A) where {T,N,S,A<:AbstractArray{S, N}}
        function thrownonint(S::Type, T::Type, dim)
            @noinline
            throw(ArgumentError("""
                cannot reinterpret an `$(S)` array to `$(T)` whose first dimension has size `$(dim)`.
                The resulting array would have non-integral first dimension.
                """))
        end
        function throwaxes1(S::Type, T::Type, ax1)
            @noinline
            throw(ArgumentError("cannot reinterpret a `$(S)` array to `$(T)` when the first axis is $ax1. Try reshaping first."))
        end
        isbitstype(T) || throwbits(S, T, T)
        isbitstype(S) || throwbits(S, T, S)
        (N != 0 || sizeof(T) == sizeof(S)) || throwsize0(S, T, "different")
        if N != 0 && sizeof(S) != sizeof(T)
            ax1 = axes(a)[1]
            dim = length(ax1)
            if issingletontype(T)
                issingletontype(S) || throwsingleton(S, T)
            else
                rem(dim*sizeof(S),sizeof(T)) == 0 || thrownonint(S, T, dim)
            end
            first(ax1) == 1 || throwaxes1(S, T, ax1)
        end
        readable = array_subpadding(T, S)
        writable = array_subpadding(S, T)
        new{T, N, S, A, false}(a, readable, writable)
    end

this line is being triggered: rem(dim*sizeof(S),sizeof(T)) == 0 || thrownonint(S, T, dim)

~~but as far as I can tell from debugging, dim: 9, sizeof(S): 808, sizeof(T): 8, and rem(dim*sizeof(S),sizeof(T)): 0

so I'm not sure why the error should be triggering~~

actually I was doing something wrong, I think S is ForwardDiff.Dual{nothing, Float64, 9} and T is ForwardDiff.Dual{ForwardDiff.Tag{SciMLBase.UJacobianWrapper{true, ODEFunction{true, SciMLBase.FullSpecialize, var"#f#43"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}, typeof(generate), GeometricHodge, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 10}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 9}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 9}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 9}}}, var"#40#42"{SparseMatrixCSC{Float64, Int64}}, SparseMatrixCSC{Float64, Int64}, var"#22#31"{var"#21#30"}, var"#22#31"{var"#14#23"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}}}, Decapodes.var"#5#6"{Diagonal{Float64, Vector{Float64}}}, Diagonal{Float64, Vector{Float64}}, Decapodes.var"#17#18"{SparseMatrixCSC{Int8, Int32}}, SparseMatrixCSC{Int8, Int32}, Decapodes.var"#3#4"{Diagonal{Float64, Vector{Float64}}}, Diagonal{Float64, Vector{Float64}}, Decapodes.var"#37#38"{SparseMatrixCSC{Float64, Int32}}, SparseMatrixCSC{Float64, Int32}, Decapodes.var"#15#16"{SparseMatrixCSC{Int8, Int32}}, SparseMatrixCSC{Int8, Int32}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Float64, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(n = 1, stress_ρ = 2, stress_g = 3, stress_A = 4:12)}}}}, Float64}, Float64, 10}

so dim*sizeof(S) is 720 and sizeof(T) is 88, so

rem(dim*sizeof(S),sizeof(T) is 16

@ChrisRackauckas
Copy link
Contributor

1-element ExceptionStack:
LoadError: Enzyme compilation failed due to illegal type analysis.
Current scope: 
; Function Attrs: mustprogress willreturn
define internal fastcc void @preprocess_julia__671_425973([1 x [2 x double]]* noalias nocapture noundef nonnull writeonly sret([1 x [2 x double]]) align 8 dereferenceable(16) "enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}" %sret_return, [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* nocapture noundef nonnull readonly align 8 dereferenceable(312) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,-1]:Integer, [-1,16]:Pointer, [-1,16,-1]:Integer, [-1,24]:Pointer, [-1,24,-1]:Integer, [-1,32]:Pointer, [-1,32,-1]:Integer, [-1,40]:Pointer, [-1,40,-1]:Integer, [-1,48]:Pointer, [-1,48,-1]:Integer, [-1,56]:Pointer, [-1,56,0]:Pointer, [-1,56,0,-1]:Integer, [-1,56,8]:Pointer, [-1,56,8,0]:Integer, [-1,56,8,1]:Integer, [-1,56,8,2]:Integer, [-1,56,8,3]:Integer, [-1,56,8,4]:Integer, [-1,56,8,5]:Integer, [-1,56,8,6]:Integer, [-1,56,8,7]:Integer, [-1,56,8,8]:Pointer, [-1,56,8,8,-1]:Integer, [-1,56,16]:Integer, [-1,56,17]:Integer, [-1,56,18]:Integer, [-1,56,19]:Integer, [-1,56,20]:Integer, [-1,56,21]:Integer, [-1,56,22]:Integer, [-1,56,23]:Integer, [-1,64]:Pointer, [-1,64,0]:Pointer, [-1,64,0,0]:Pointer, [-1,64,0,0,-1]:Integer, [-1,64,0,8]:Pointer, [-1,64,0,8,0]:Integer, [-1,64,0,8,1]:Integer, [-1,64,0,8,2]:Integer, [-1,64,0,8,3]:Integer, [-1,64,0,8,4]:Integer, [-1,64,0,8,5]:Integer, [-1,64,0,8,6]:Integer, [-1,64,0,8,7]:Integer, [-1,64,0,8,8]:Pointer, [-1,64,0,8,8,-1]:Integer, [-1,64,0,16]:Integer, [-1,64,0,17]:Integer, [-1,64,0,18]:Integer, [-1,64,0,19]:Integer, [-1,64,0,20]:Integer, [-1,64,0,21]:Integer, [-1,64,0,22]:Integer, [-1,64,0,23]:Integer, [-1,64,8]:Integer, [-1,64,9]:Integer, [-1,64,10]:Integer, [-1,64,11]:Integer, [-1,64,12]:Integer, [-1,64,13]:Integer, [-1,64,14]:Integer, [-1,64,15]:Integer, [-1,72]:Pointer, [-1,72,0]:Pointer, [-1,72,0,-1]:Pointer, [-1,72,0,-1,0]:Pointer, [-1,72,0,-1,0,-1]:Integer, [-1,72,0,-1,8]:Pointer, [-1,72,0,-1,8,0]:Integer, [-1,72,0,-1,8,1]:Integer, [-1,72,0,-1,8,2]:Integer, [-1,72,0,-1,8,3]:Integer, [-1,72,0,-1,8,4]:Integer, [-1,72,0,-1,8,5]:Integer, [-1,72,0,-1,8,6]:Integer, [-1,72,0,-1,8,7]:Integer, [-1,72,0,-1,8,8]:Pointer, [-1,72,0,-1,16]:Integer, [-1,72,0,-1,17]:Integer, [-1,72,0,-1,18]:Integer, [-1,72,0,-1,19]:Integer, [-1,72,0,-1,20]:Integer, [-1,72,0,-1,21]:Integer, [-1,72,0,-1,22]:Integer, [-1,72,0,-1,23]:Integer, [-1,72,8]:Pointer, [-1,72,8,0]:Integer, [-1,72,8,1]:Integer, [-1,72,8,2]:Integer, [-1,72,8,3]:Integer, [-1,72,8,4]:Integer, [-1,72,8,5]:Integer, [-1,72,8,6]:Integer, [-1,72,8,7]:Integer, [-1,72,8,8]:Pointer, [-1,72,8,8,-1]:Pointer, [-1,72,8,8,-1,0]:Pointer, [-1,72,8,8,-1,8]:Pointer, [-1,72,8,8,-1,16]:Integer, [-1,72,8,8,-1,17]:Integer, [-1,72,8,8,-1,18]:Integer, [-1,72,8,8,-1,19]:Integer, [-1,72,8,8,-1,20]:Integer, [-1,72,8,8,-1,21]:Integer, [-1,72,8,8,-1,22]:Integer, [-1,72,8,8,-1,23]:Integer, [-1,72,16]:Integer, [-1,72,17]:Integer, [-1,72,18]:Integer, [-1,72,19]:Integer, [-1,72,20]:Integer, [-1,72,21]:Integer, [-1,72,22]:Integer, [-1,72,23]:Integer, [-1,80]:Pointer, [-1,80,0]:Pointer, [-1,80,0,0]:Pointer, [-1,80,0,0,-1]:Integer, [-1,80,0,8]:Pointer, [-1,80,0,8,0]:Integer, [-1,80,0,8,1]:Integer, [-1,80,0,8,2]:Integer, [-1,80,0,8,3]:Integer, [-1,80,0,8,4]:Integer, [-1,80,0,8,5]:Integer, [-1,80,0,8,6]:Integer, [-1,80,0,8,7]:Integer, [-1,80,0,8,8]:Pointer, [-1,80,0,8,8,-1]:Integer, [-1,80,0,16]:Integer, [-1,80,0,17]:Integer, [-1,80,0,18]:Integer, [-1,80,0,19]:Integer, [-1,80,0,20]:Integer, [-1,80,0,21]:Integer, [-1,80,0,22]:Integer, [-1,80,0,23]:Integer, [-1,80,8]:Integer, [-1,80,9]:Integer, [-1,80,10]:Integer, [-1,80,11]:Integer, [-1,80,12]:Integer, [-1,80,13]:Integer, [-1,80,14]:Integer, [-1,80,15]:Integer, [-1,88]:Pointer, [-1,88,0]:Pointer, [-1,88,0,-1]:Integer, [-1,88,8]:Pointer, [-1,88,8,0]:Integer, [-1,88,8,1]:Integer, [-1,88,8,2]:Integer, [-1,88,8,3]:Integer, [-1,88,8,4]:Integer, [-1,88,8,5]:Integer, [-1,88,8,6]:Integer, [-1,88,8,7]:Integer, [-1,88,8,8]:Pointer, [-1,88,8,8,-1]:Integer, [-1,88,16]:Integer, [-1,88,17]:Integer, [-1,88,18]:Integer, [-1,88,19]:Integer, [-1,88,20]:Integer, [-1,88,21]:Integer, [-1,88,22]:Integer, [-1,88,23]:Integer, [-1,96]:Pointer, [-1,96,0]:Pointer, [-1,96,0,0]:Pointer, [-1,96,0,0,-1]:Integer, [-1,96,0,8]:Pointer, [-1,96,0,8,0]:Integer, [-1,96,0,8,1]:Integer, [-1,96,0,8,2]:Integer, [-1,96,0,8,3]:Integer, [-1,96,0,8,4]:Integer, [-1,96,0,8,5]:Integer, [-1,96,0,8,6]:Integer, [-1,96,0,8,7]:Integer, [-1,96,0,8,8]:Pointer, [-1,96,0,8,8,-1]:Integer, [-1,96,0,16]:Integer, [-1,96,0,17]:Integer, [-1,96,0,18]:Integer, [-1,96,0,19]:Integer, [-1,96,0,20]:Integer, [-1,96,0,21]:Integer, [-1,96,0,22]:Integer, [-1,96,0,23]:Integer, [-1,96,8]:Integer, [-1,96,9]:Integer, [-1,96,10]:Integer, [-1,96,11]:Integer, [-1,96,12]:Integer, [-1,96,13]:Integer, [-1,96,14]:Integer, [-1,96,15]:Integer, [-1,104]:Pointer, [-1,104,0]:Pointer, [-1,104,0,-1]:Pointer, [-1,104,0,-1,0]:Pointer, [-1,104,0,-1,0,-1]:Integer, [-1,104,0,-1,8]:Pointer, [-1,104,0,-1,8,0]:Integer, [-1,104,0,-1,8,1]:Integer, [-1,104,0,-1,8,2]:Integer, [-1,104,0,-1,8,3]:Integer, [-1,104,0,-1,8,4]:Integer, [-1,104,0,-1,8,5]:Integer, [-1,104,0,-1,8,6]:Integer, [-1,104,0,-1,8,7]:Integer, [-1,104,0,-1,8,8]:Pointer, [-1,104,0,-1,16]:Integer, [-1,104,0,-1,17]:Integer, [-1,104,0,-1,18]:Integer, [-1,104,0,-1,19]:Integer, [-1,104,0,-1,20]:Integer, [-1,104,0,-1,21]:Integer, [-1,104,0,-1,22]:Integer, [-1,104,0,-1,23]:Integer, [-1,104,8]:Pointer, [-1,104,8,0]:Integer, [-1,104,8,1]:Integer, [-1,104,8,2]:Integer, [-1,104,8,3]:Integer, [-1,104,8,4]:Integer, [-1,104,8,5]:Integer, [-1,104,8,6]:Integer, [-1,104,8,7]:Integer, [-1,104,8,8]:Pointer, [-1,104,8,8,-1]:Pointer, [-1,104,8,8,-1,0]:Pointer, [-1,104,8,8,-1,8]:Pointer, [-1,104,8,8,-1,16]:Integer, [-1,104,8,8,-1,17]:Integer, [-1,104,8,8,-1,18]:Integer, [-1,104,8,8,-1,19]:Integer, [-1,104,8,8,-1,20]:Integer, [-1,104,8,8,-1,21]:Integer, [-1,104,8,8,-1,22]:Integer, [-1,104,8,8,-1,23]:Integer, [-1,104,16]:Integer, [-1,104,17]:Integer, [-1,104,18]:Integer, [-1,104,19]:Integer, [-1,104,20]:Integer, [-1,104,21]:Integer, [-1,104,22]:Integer, [-1,104,23]:Integer, [-1,112]:Pointer, [-1,112,0]:Pointer, [-1,112,0,0]:Pointer, [-1,112,0,0,-1]:Integer, [-1,112,0,8]:Pointer, [-1,112,0,8,0]:Integer, [-1,112,0,8,1]:Integer, [-1,112,0,8,2]:Integer, [-1,112,0,8,3]:Integer, [-1,112,0,8,4]:Integer, [-1,112,0,8,5]:Integer, [-1,112,0,8,6]:Integer, [-1,112,0,8,7]:Integer, [-1,112,0,8,8]:Pointer, [-1,112,0,8,8,-1]:Integer, [-1,112,0,16]:Integer, [-1,112,0,17]:Integer, [-1,112,0,18]:Integer, [-1,112,0,19]:Integer, [-1,112,0,20]:Integer, [-1,112,0,21]:Integer, [-1,112,0,22]:Integer, [-1,112,0,23]:Integer, [-1,112,8]:Integer, [-1,112,9]:Integer, [-1,112,10]:Integer, [-1,112,11]:Integer, [-1,112,12]:Integer, [-1,112,13]:Integer, [-1,112,14]:Integer, [-1,112,15]:Integer, [-1,120]:Pointer, [-1,120,0]:Pointer, [-1,120,0,-1]:Integer, [-1,120,8]:Pointer, [-1,120,8,0]:Integer, [-1,120,8,1]:Integer, [-1,120,8,2]:Integer, [-1,120,8,3]:Integer, [-1,120,8,4]:Integer, [-1,120,8,5]:Integer, [-1,120,8,6]:Integer, [-1,120,8,7]:Integer, [-1,120,8,8]:Pointer, [-1,120,8,8,-1]:Integer, [-1,120,16]:Integer, [-1,120,17]:Integer, [-1,120,18]:Integer, [-1,120,19]:Integer, [-1,120,20]:Integer, [-1,120,21]:Integer, [-1,120,22]:Integer, [-1,120,23]:Integer, [-1,128]:Pointer, [-1,128,0]:Pointer, [-1,128,0,0]:Pointer, [-1,128,0,0,-1]:Integer, [-1,128,0,8]:Pointer, [-1,128,0,8,0]:Integer, [-1,128,0,8,1]:Integer, [-1,128,0,8,2]:Integer, [-1,128,0,8,3]:Integer, [-1,128,0,8,4]:Integer, [-1,128,0,8,5]:Integer, [-1,128,0,8,6]:Integer, [-1,128,0,8,7]:Integer, [-1,128,0,8,8]:Pointer, [-1,128,0,8,8,-1]:Integer, [-1,128,0,16]:Integer, [-1,128,0,17]:Integer, [-1,128,0,18]:Integer, [-1,128,0,19]:Integer, [-1,128,0,20]:Integer, [-1,128,0,21]:Integer, [-1,128,0,22]:Integer, [-1,128,0,23]:Integer, [-1,128,8]:Integer, [-1,128,9]:Integer, [-1,128,10]:Integer, [-1,128,11]:Integer, [-1,128,12]:Integer, [-1,128,13]:Integer, [-1,128,14]:Integer, [-1,128,15]:Integer, [-1,136]:Pointer, [-1,136,0]:Pointer, [-1,136,0,-1]:Pointer, [-1,136,0,-1,0]:Pointer, [-1,136,0,-1,0,-1]:Integer, [-1,136,0,-1,8]:Pointer, [-1,136,0,-1,8,0]:Integer, [-1,136,0,-1,8,1]:Integer, [-1,136,0,-1,8,2]:Integer, [-1,136,0,-1,8,3]:Integer, [-1,136,0,-1,8,4]:Integer, [-1,136,0,-1,8,5]:Integer, [-1,136,0,-1,8,6]:Integer, [-1,136,0,-1,8,7]:Integer, [-1,136,0,-1,8,8]:Pointer, [-1,136,0,-1,16]:Integer, [-1,136,0,-1,17]:Integer, [-1,136,0,-1,18]:Integer, [-1,136,0,-1,19]:Integer, [-1,136,0,-1,20]:Integer, [-1,136,0,-1,21]:Integer, [-1,136,0,-1,22]:Integer, [-1,136,0,-1,23]:Integer, [-1,136,8]:Pointer, [-1,136,8,0]:Integer, [-1,136,8,1]:Integer, [-1,136,8,2]:Integer, [-1,136,8,3]:Integer, [-1,136,8,4]:Integer, [-1,136,8,5]:Integer, [-1,136,8,6]:Integer, [-1,136,8,7]:Integer, [-1,136,8,8]:Pointer, [-1,136,8,8,-1]:Pointer, [-1,136,8,8,-1,0]:Pointer, [-1,136,8,8,-1,8]:Pointer, [-1,136,8,8,-1,16]:Integer, [-1,136,8,8,-1,17]:Integer, [-1,136,8,8,-1,18]:Integer, [-1,136,8,8,-1,19]:Integer, [-1,136,8,8,-1,20]:Integer, [-1,136,8,8,-1,21]:Integer, [-1,136,8,8,-1,22]:Integer, [-1,136,8,8,-1,23]:Integer, [-1,136,16]:Integer, [-1,136,17]:Integer, [-1,136,18]:Integer, [-1,136,19]:Integer, [-1,136,20]:Integer, [-1,136,21]:Integer, [-1,136,22]:Integer, [-1,136,23]:Integer, [-1,144]:Pointer, [-1,144,0]:Pointer, [-1,144,0,0]:Pointer, [-1,144,0,0,-1]:Integer, [-1,144,0,8]:Pointer, [-1,144,0,8,0]:Integer, [-1,144,0,8,1]:Integer, [-1,144,0,8,2]:Integer, [-1,144,0,8,3]:Integer, [-1,144,0,8,4]:Integer, [-1,144,0,8,5]:Integer, [-1,144,0,8,6]:Integer, [-1,144,0,8,7]:Integer, [-1,144,0,8,8]:Pointer, [-1,144,0,8,8,-1]:Integer, [-1,144,0,16]:Integer, [-1,144,0,17]:Integer, [-1,144,0,18]:Integer, [-1,144,0,19]:Integer, [-1,144,0,20]:Integer, [-1,144,0,21]:Integer, [-1,144,0,22]:Integer, [-1,144,0,23]:Integer, [-1,144,8]:Integer, [-1,144,9]:Integer, [-1,144,10]:Integer, [-1,144,11]:Integer, [-1,144,12]:Integer, [-1,144,13]:Integer, [-1,144,14]:Integer, [-1,144,15]:Integer, [-1,152]:Pointer, [-1,152,0]:Pointer, [-1,152,0,-1]:Integer, [-1,152,8]:Pointer, [-1,152,8,0]:Integer, [-1,152,8,1]:Integer, [-1,152,8,2]:Integer, [-1,152,8,3]:Integer, [-1,152,8,4]:Integer, [-1,152,8,5]:Integer, [-1,152,8,6]:Integer, [-1,152,8,7]:Integer, [-1,152,8,8]:Pointer, [-1,152,8,8,-1]:Integer, [-1,152,16]:Integer, [-1,152,17]:Integer, [-1,152,18]:Integer, [-1,152,19]:Integer, [-1,152,20]:Integer, [-1,152,21]:Integer, [-1,152,22]:Integer, [-1,152,23]:Integer, [-1,160]:Pointer, [-1,160,0]:Pointer, [-1,160,0,0]:Pointer, [-1,160,0,0,-1]:Integer, [-1,160,0,8]:Pointer, [-1,160,0,8,0]:Integer, [-1,160,0,8,1]:Integer, [-1,160,0,8,2]:Integer, [-1,160,0,8,3]:Integer, [-1,160,0,8,4]:Integer, [-1,160,0,8,5]:Integer, [-1,160,0,8,6]:Integer, [-1,160,0,8,7]:Integer, [-1,160,0,8,8]:Pointer, [-1,160,0,8,8,-1]:Integer, [-1,160,0,16]:Integer, [-1,160,0,17]:Integer, [-1,160,0,18]:Integer, [-1,160,0,19]:Integer, [-1,160,0,20]:Integer, [-1,160,0,21]:Integer, [-1,160,0,22]:Integer, [-1,160,0,23]:Integer, [-1,160,8]:Integer, [-1,160,9]:Integer, [-1,160,10]:Integer, [-1,160,11]:Integer, [-1,160,12]:Integer, [-1,160,13]:Integer, [-1,160,14]:Integer, [-1,160,15]:Integer, [-1,168]:Pointer, [-1,168,0]:Pointer, [-1,168,0,-1]:Pointer, [-1,168,0,-1,0]:Pointer, [-1,168,0,-1,0,-1]:Integer, [-1,168,0,-1,8]:Pointer, [-1,168,0,-1,8,0]:Integer, [-1,168,0,-1,8,1]:Integer, [-1,168,0,-1,8,2]:Integer, [-1,168,0,-1,8,3]:Integer, [-1,168,0,-1,8,4]:Integer, [-1,168,0,-1,8,5]:Integer, [-1,168,0,-1,8,6]:Integer, [-1,168,0,-1,8,7]:Integer, [-1,168,0,-1,8,8]:Pointer, [-1,168,0,-1,16]:Integer, [-1,168,0,-1,17]:Integer, [-1,168,0,-1,18]:Integer, [-1,168,0,-1,19]:Integer, [-1,168,0,-1,20]:Integer, [-1,168,0,-1,21]:Integer, [-1,168,0,-1,22]:Integer, [-1,168,0,-1,23]:Integer, [-1,168,8]:Pointer, [-1,168,8,0]:Integer, [-1,168,8,1]:Integer, [-1,168,8,2]:Integer, [-1,168,8,3]:Integer, [-1,168,8,4]:Integer, [-1,168,8,5]:Integer, [-1,168,8,6]:Integer, [-1,168,8,7]:Integer, [-1,168,8,8]:Pointer, [-1,168,8,8,-1]:Pointer, [-1,168,8,8,-1,0]:Pointer, [-1,168,8,8,-1,8]:Pointer, [-1,168,8,8,-1,16]:Integer, [-1,168,8,8,-1,17]:Integer, [-1,168,8,8,-1,18]:Integer, [-1,168,8,8,-1,19]:Integer, [-1,168,8,8,-1,20]:Integer, [-1,168,8,8,-1,21]:Integer, [-1,168,8,8,-1,22]:Integer, [-1,168,8,8,-1,23]:Integer, [-1,168,16]:Integer, [-1,168,17]:Integer, [-1,168,18]:Integer, [-1,168,19]:Integer, [-1,168,20]:Integer, [-1,168,21]:Integer, [-1,168,22]:Integer, [-1,168,23]:Integer, [-1,176]:Pointer, [-1,176,0]:Pointer, [-1,176,0,0]:Pointer, [-1,176,0,0,-1]:Integer, [-1,176,0,8]:Pointer, [-1,176,0,8,0]:Integer, [-1,176,0,8,1]:Integer, [-1,176,0,8,2]:Integer, [-1,176,0,8,3]:Integer, [-1,176,0,8,4]:Integer, [-1,176,0,8,5]:Integer, [-1,176,0,8,6]:Integer, [-1,176,0,8,7]:Integer, [-1,176,0,8,8]:Pointer, [-1,176,0,8,8,-1]:Integer, [-1,176,0,16]:Integer, [-1,176,0,17]:Integer, [-1,176,0,18]:Integer, [-1,176,0,19]:Integer, [-1,176,0,20]:Integer, [-1,176,0,21]:Integer, [-1,176,0,22]:Integer, [-1,176,0,23]:Integer, [-1,176,8]:Integer, [-1,176,9]:Integer, [-1,176,10]:Integer, [-1,176,11]:Integer, [-1,176,12]:Integer, [-1,176,13]:Integer, [-1,176,14]:Integer, [-1,176,15]:Integer, [-1,184]:Pointer, [-1,184,0]:Pointer, [-1,184,0,-1]:Integer, [-1,184,8]:Pointer, [-1,184,8,0]:Integer, [-1,184,8,1]:Integer, [-1,184,8,2]:Integer, [-1,184,8,3]:Integer, [-1,184,8,4]:Integer, [-1,184,8,5]:Integer, [-1,184,8,6]:Integer, [-1,184,8,7]:Integer, [-1,184,8,8]:Pointer, [-1,184,8,8,-1]:Integer, [-1,184,16]:Integer, [-1,184,17]:Integer, [-1,184,18]:Integer, [-1,184,19]:Integer, [-1,184,20]:Integer, [-1,184,21]:Integer, [-1,184,22]:Integer, [-1,184,23]:Integer, [-1,192]:Pointer, [-1,192,0]:Pointer, [-1,192,0,0]:Pointer, [-1,192,0,0,-1]:Integer, [-1,192,0,8]:Pointer, [-1,192,0,8,0]:Integer, [-1,192,0,8,1]:Integer, [-1,192,0,8,2]:Integer, [-1,192,0,8,3]:Integer, [-1,192,0,8,4]:Integer, [-1,192,0,8,5]:Integer, [-1,192,0,8,6]:Integer, [-1,192,0,8,7]:Integer, [-1,192,0,8,8]:Pointer, [-1,192,0,8,8,-1]:Integer, [-1,192,0,16]:Integer, [-1,192,0,17]:Integer, [-1,192,0,18]:Integer, [-1,192,0,19]:Integer, [-1,192,0,20]:Integer, [-1,192,0,21]:Integer, [-1,192,0,22]:Integer, [-1,192,0,23]:Integer, [-1,192,8]:Integer, [-1,192,9]:Integer, [-1,192,10]:Integer, [-1,192,11]:Integer, [-1,192,12]:Integer, [-1,192,13]:Integer, [-1,192,14]:Integer, [-1,192,15]:Integer, [-1,200]:Pointer, [-1,200,0]:Pointer, [-1,200,0,-1]:Integer, [-1,200,8]:Pointer, [-1,200,8,0]:Integer, [-1,200,8,1]:Integer, [-1,200,8,2]:Integer, [-1,200,8,3]:Integer, [-1,200,8,4]:Integer, [-1,200,8,5]:Integer, [-1,200,8,6]:Integer, [-1,200,8,7]:Integer, [-1,200,8,8]:Pointer, [-1,200,8,8,-1]:Integer, [-1,200,16]:Integer, [-1,200,17]:Integer, [-1,200,18]:Integer, [-1,200,19]:Integer, [-1,200,20]:Integer, [-1,200,21]:Integer, [-1,200,22]:Integer, [-1,200,23]:Integer, [-1,208]:Pointer, [-1,208,0]:Pointer, [-1,208,0,0]:Pointer, [-1,208,0,0,-1]:Integer, [-1,208,0,8]:Pointer, [-1,208,0,8,0]:Integer, [-1,208,0,8,1]:Integer, [-1,208,0,8,2]:Integer, [-1,208,0,8,3]:Integer, [-1,208,0,8,4]:Integer, [-1,208,0,8,5]:Integer, [-1,208,0,8,6]:Integer, [-1,208,0,8,7]:Integer, [-1,208,0,8,8]:Pointer, [-1,208,0,8,8,-1]:Integer, [-1,208,0,16]:Integer, [-1,208,0,17]:Integer, [-1,208,0,18]:Integer, [-1,208,0,19]:Integer, [-1,208,0,20]:Integer, [-1,208,0,21]:Integer, [-1,208,0,22]:Integer, [-1,208,0,23]:Integer, [-1,208,8]:Integer, [-1,208,9]:Integer, [-1,208,10]:Integer, [-1,208,11]:Integer, [-1,208,12]:Integer, [-1,208,13]:Integer, [-1,208,14]:Integer, [-1,208,15]:Integer, [-1,216]:Pointer, [-1,216,0]:Pointer, [-1,216,8]:Pointer, [-1,216,8,0]:Integer, [-1,216,8,1]:Integer, [-1,216,8,2]:Integer, [-1,216,8,3]:Integer, [-1,216,8,4]:Integer, [-1,216,8,5]:Integer, [-1,216,8,6]:Integer, [-1,216,8,7]:Integer, [-1,216,8,8]:Pointer, [-1,216,16]:Integer, [-1,216,17]:Integer, [-1,216,18]:Integer, [-1,216,19]:Integer, [-1,216,20]:Integer, [-1,216,21]:Integer, [-1,216,22]:Integer, [-1,216,23]:Integer, [-1,224]:Pointer, [-1,224,0]:Pointer, [-1,224,0,0]:Pointer, [-1,224,0,0,-1]:Integer, [-1,224,0,8]:Pointer, [-1,224,0,8,0]:Integer, [-1,224,0,8,1]:Integer, [-1,224,0,8,2]:Integer, [-1,224,0,8,3]:Integer, [-1,224,0,8,4]:Integer, [-1,224,0,8,5]:Integer, [-1,224,0,8,6]:Integer, [-1,224,0,8,7]:Integer, [-1,224,0,8,8]:Pointer, [-1,224,0,8,8,-1]:Integer, [-1,224,0,16]:Integer, [-1,224,0,17]:Integer, [-1,224,0,18]:Integer, [-1,224,0,19]:Integer, [-1,224,0,20]:Integer, [-1,224,0,21]:Integer, [-1,224,0,22]:Integer, [-1,224,0,23]:Integer, [-1,224,8]:Integer, [-1,224,9]:Integer, [-1,224,10]:Integer, [-1,224,11]:Integer, [-1,224,12]:Integer, [-1,224,13]:Integer, [-1,224,14]:Integer, [-1,224,15]:Integer, [-1,232]:Pointer, [-1,232,0]:Pointer, [-1,232,8]:Pointer, [-1,232,8,0]:Integer, [-1,232,8,1]:Integer, [-1,232,8,2]:Integer, [-1,232,8,3]:Integer, [-1,232,8,4]:Integer, [-1,232,8,5]:Integer, [-1,232,8,6]:Integer, [-1,232,8,7]:Integer, [-1,232,8,8]:Pointer, [-1,232,16]:Integer, [-1,232,17]:Integer, [-1,232,18]:Integer, [-1,232,19]:Integer, [-1,232,20]:Integer, [-1,232,21]:Integer, [-1,232,22]:Integer, [-1,232,23]:Integer, [-1,240]:Pointer, [-1,240,0]:Pointer, [-1,240,0,0]:Pointer, [-1,240,0,0,-1]:Integer, [-1,240,0,8]:Pointer, [-1,240,0,8,0]:Integer, [-1,240,0,8,1]:Integer, [-1,240,0,8,2]:Integer, [-1,240,0,8,3]:Integer, [-1,240,0,8,4]:Integer, [-1,240,0,8,5]:Integer, [-1,240,0,8,6]:Integer, [-1,240,0,8,7]:Integer, [-1,240,0,8,8]:Pointer, [-1,240,0,8,8,-1]:Integer, [-1,240,0,16]:Integer, [-1,240,0,17]:Integer, [-1,240,0,18]:Integer, [-1,240,0,19]:Integer, [-1,240,0,20]:Integer, [-1,240,0,21]:Integer, [-1,240,0,22]:Integer, [-1,240,0,23]:Integer, [-1,240,8]:Integer, [-1,240,9]:Integer, [-1,240,10]:Integer, [-1,240,11]:Integer, [-1,240,12]:Integer, [-1,240,13]:Integer, [-1,240,14]:Integer, [-1,240,15]:Integer, [-1,248]:Pointer, [-1,248,0]:Pointer, [-1,248,8]:Pointer, [-1,248,8,0]:Integer, [-1,248,8,1]:Integer, [-1,248,8,2]:Integer, [-1,248,8,3]:Integer, [-1,248,8,4]:Integer, [-1,248,8,5]:Integer, [-1,248,8,6]:Integer, [-1,248,8,7]:Integer, [-1,248,8,8]:Pointer, [-1,248,16]:Integer, [-1,248,17]:Integer, [-1,248,18]:Integer, [-1,248,19]:Integer, [-1,248,20]:Integer, [-1,248,21]:Integer, [-1,248,22]:Integer, [-1,248,23]:Integer, [-1,256]:Pointer, [-1,256,0]:Pointer, [-1,256,0,0]:Pointer, [-1,256,0,0,-1]:Integer, [-1,256,0,8]:Pointer, [-1,256,0,8,0]:Integer, [-1,256,0,8,1]:Integer, [-1,256,0,8,2]:Integer, [-1,256,0,8,3]:Integer, [-1,256,0,8,4]:Integer, [-1,256,0,8,5]:Integer, [-1,256,0,8,6]:Integer, [-1,256,0,8,7]:Integer, [-1,256,0,8,8]:Pointer, [-1,256,0,8,8,-1]:Integer, [-1,256,0,16]:Integer, [-1,256,0,17]:Integer, [-1,256,0,18]:Integer, [-1,256,0,19]:Integer, [-1,256,0,20]:Integer, [-1,256,0,21]:Integer, [-1,256,0,22]:Integer, [-1,256,0,23]:Integer, [-1,256,8]:Integer, [-1,256,9]:Integer, [-1,256,10]:Integer, [-1,256,11]:Integer, [-1,256,12]:Integer, [-1,256,13]:Integer, [-1,256,14]:Integer, [-1,256,15]:Integer, [-1,264]:Pointer, [-1,264,0]:Pointer, [-1,264,8]:Pointer, [-1,264,8,0]:Integer, [-1,264,8,1]:Integer, [-1,264,8,2]:Integer, [-1,264,8,3]:Integer, [-1,264,8,4]:Integer, [-1,264,8,5]:Integer, [-1,264,8,6]:Integer, [-1,264,8,7]:Integer, [-1,264,8,8]:Pointer, [-1,264,16]:Integer, [-1,264,17]:Integer, [-1,264,18]:Integer, [-1,264,19]:Integer, [-1,264,20]:Integer, [-1,264,21]:Integer, [-1,264,22]:Integer, [-1,264,23]:Integer, [-1,272]:Pointer, [-1,272,0]:Pointer, [-1,272,0,0]:Pointer, [-1,272,0,0,-1]:Integer, [-1,272,0,8]:Pointer, [-1,272,0,8,0]:Integer, [-1,272,0,8,1]:Integer, [-1,272,0,8,2]:Integer, [-1,272,0,8,3]:Integer, [-1,272,0,8,4]:Integer, [-1,272,0,8,5]:Integer, [-1,272,0,8,6]:Integer, [-1,272,0,8,7]:Integer, [-1,272,0,8,8]:Pointer, [-1,272,0,8,8,-1]:Integer, [-1,272,0,16]:Integer, [-1,272,0,17]:Integer, [-1,272,0,18]:Integer, [-1,272,0,19]:Integer, [-1,272,0,20]:Integer, [-1,272,0,21]:Integer, [-1,272,0,22]:Integer, [-1,272,0,23]:Integer, [-1,272,8]:Integer, [-1,272,9]:Integer, [-1,272,10]:Integer, [-1,272,11]:Integer, [-1,272,12]:Integer, [-1,272,13]:Integer, [-1,272,14]:Integer, [-1,272,15]:Integer, [-1,280]:Pointer, [-1,280,0]:Pointer, [-1,280,8]:Pointer, [-1,280,8,0]:Integer, [-1,280,8,1]:Integer, [-1,280,8,2]:Integer, [-1,280,8,3]:Integer, [-1,280,8,4]:Integer, [-1,280,8,5]:Integer, [-1,280,8,6]:Integer, [-1,280,8,7]:Integer, [-1,280,8,8]:Pointer, [-1,280,16]:Integer, [-1,280,17]:Integer, [-1,280,18]:Integer, [-1,280,19]:Integer, [-1,280,20]:Integer, [-1,280,21]:Integer, [-1,280,22]:Integer, [-1,280,23]:Integer, [-1,288]:Pointer, [-1,288,0]:Pointer, [-1,288,0,0]:Pointer, [-1,288,0,0,-1]:Integer, [-1,288,0,8]:Pointer, [-1,288,0,8,0]:Integer, [-1,288,0,8,1]:Integer, [-1,288,0,8,2]:Integer, [-1,288,0,8,3]:Integer, [-1,288,0,8,4]:Integer, [-1,288,0,8,5]:Integer, [-1,288,0,8,6]:Integer, [-1,288,0,8,7]:Integer, [-1,288,0,8,8]:Pointer, [-1,288,0,8,8,-1]:Integer, [-1,288,0,16]:Integer, [-1,288,0,17]:Integer, [-1,288,0,18]:Integer, [-1,288,0,19]:Integer, [-1,288,0,20]:Integer, [-1,288,0,21]:Integer, [-1,288,0,22]:Integer, [-1,288,0,23]:Integer, [-1,288,8]:Integer, [-1,288,9]:Integer, [-1,288,10]:Integer, [-1,288,11]:Integer, [-1,288,12]:Integer, [-1,288,13]:Integer, [-1,288,14]:Integer, [-1,288,15]:Integer, [-1,296]:Pointer, [-1,296,0]:Pointer, [-1,296,8]:Pointer, [-1,296,8,0]:Integer, [-1,296,8,1]:Integer, [-1,296,8,2]:Integer, [-1,296,8,3]:Integer, [-1,296,8,4]:Integer, [-1,296,8,5]:Integer, [-1,296,8,6]:Integer, [-1,296,8,7]:Integer, [-1,296,8,8]:Pointer, [-1,296,16]:Integer, [-1,296,17]:Integer, [-1,296,18]:Integer, [-1,296,19]:Integer, [-1,296,20]:Integer, [-1,296,21]:Integer, [-1,296,22]:Integer, [-1,296,23]:Integer, [-1,304]:Pointer, [-1,304,0]:Pointer, [-1,304,0,0]:Pointer, [-1,304,0,0,-1]:Integer, [-1,304,0,8]:Pointer, [-1,304,0,8,0]:Integer, [-1,304,0,8,1]:Integer, [-1,304,0,8,2]:Integer, [-1,304,0,8,3]:Integer, [-1,304,0,8,4]:Integer, [-1,304,0,8,5]:Integer, [-1,304,0,8,6]:Integer, [-1,304,0,8,7]:Integer, [-1,304,0,8,8]:Pointer, [-1,304,0,8,8,-1]:Integer, [-1,304,0,16]:Integer, [-1,304,0,17]:Integer, [-1,304,0,18]:Integer, [-1,304,0,19]:Integer, [-1,304,0,20]:Integer, [-1,304,0,21]:Integer, [-1,304,0,22]:Integer, [-1,304,0,23]:Integer, [-1,304,8]:Integer, [-1,304,9]:Integer, [-1,304,10]:Integer, [-1,304,11]:Integer, [-1,304,12]:Integer, [-1,304,13]:Integer, [-1,304,14]:Integer, [-1,304,15]:Integer}" "enzymejl_parmtype"="15962233872" "enzymejl_parmtype_ref"="1" %0, i64 signext "enzyme_inactive" "enzyme_type"="{[-1]:Integer}" "enzymejl_parmtype"="4757150800" "enzymejl_parmtype_ref"="0" %1) unnamed_addr #73 !dbg !5587 {
top:
  %pgcstack = call {}*** @julia.get_pgcstack() #74
  %current_task1151 = getelementptr inbounds {}**, {}*** %pgcstack, i64 -14
  %2 = bitcast {}*** %current_task1151 to {}*
  %ptls_field152 = getelementptr inbounds {}**, {}*** %pgcstack, i64 2
  %3 = bitcast {}*** %ptls_field152 to i64***
  %ptls_load153154 = load i64**, i64*** %3, align 8, !tbaa !62
  %4 = getelementptr inbounds i64*, i64** %ptls_load153154, i64 2
  %safepoint = load i64*, i64** %4, align 8, !tbaa !66
  fence syncscope("singlethread") seq_cst
  call void @julia.safepoint(i64* %safepoint) #74, !dbg !5588
  fence syncscope("singlethread") seq_cst
  %5 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 0, i32 0, i64 1, !dbg !5589
  %6 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %5 unordered, align 8, !dbg !5589, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !dereferenceable !119, !align !647, !enzyme_type !1534, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_BitSet !0
  %7 = bitcast {} addrspace(10)* %6 to {} addrspace(10)* addrspace(10)*, !dbg !5595, !enzyme_inactive !0
  %8 = addrspacecast {} addrspace(10)* addrspace(10)* %7 to {} addrspace(10)* addrspace(11)*, !dbg !5595, !enzyme_inactive !0
  %9 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %8 unordered, align 8, !dbg !5595, !tbaa !179, !alias.scope !127, !noalias !128, !nonnull !0, !dereferenceable !1419, !align !647, !enzyme_type !1532, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUInt64\7D !0
  %10 = bitcast {} addrspace(10)* %6 to i8 addrspace(10)*, !dbg !5595, !enzyme_inactive !0
  %11 = addrspacecast i8 addrspace(10)* %10 to i8 addrspace(11)*, !dbg !5595, !enzyme_inactive !0
  %12 = getelementptr inbounds i8, i8 addrspace(11)* %11, i64 8, !dbg !5595
  %13 = bitcast i8 addrspace(11)* %12 to i64 addrspace(11)*, !dbg !5595
  %14 = load i64, i64 addrspace(11)* %13, align 8, !dbg !5595, !tbaa !179, !alias.scope !127, !noalias !128, !enzyme_type !170, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0
  %15 = ashr i64 %1, 6, !dbg !5598
  %16 = sub i64 %15, %14, !dbg !5602
  %17 = icmp ult i64 %16, 9223372036854775807, !dbg !5603
  %18 = add i64 %16, 1, !dbg !5604
  %19 = bitcast {} addrspace(10)* %9 to i8 addrspace(10)*, !dbg !5604, !enzyme_inactive !0
  %20 = addrspacecast i8 addrspace(10)* %19 to i8 addrspace(11)*, !dbg !5604, !enzyme_inactive !0
  %21 = getelementptr inbounds i8, i8 addrspace(11)* %20, i64 16, !dbg !5604
  %22 = bitcast i8 addrspace(11)* %21 to i64 addrspace(11)*, !dbg !5604
  %23 = load i64, i64 addrspace(11)* %22, align 8, !dbg !5604, !enzyme_type !170, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0
  %24 = icmp sle i64 %18, %23, !dbg !5604
  %value_phi.off0 = select i1 %17, i1 %24, i1 false, !dbg !5604
  br i1 %value_phi.off0, label %L44, label %L88, !dbg !5604

L44:                                              ; preds = %top
  %25 = bitcast {} addrspace(10)* %9 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !5605, !enzyme_inactive !0
  %26 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %25 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !5605, !enzyme_inactive !0
  %27 = bitcast {} addrspace(10)* %9 to {} addrspace(10)** addrspace(10)*, !dbg !5605, !enzyme_inactive !0
  %28 = addrspacecast {} addrspace(10)** addrspace(10)* %27 to {} addrspace(10)** addrspace(11)*, !dbg !5605, !enzyme_inactive !0
  %29 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %28, align 8, !dbg !5605, !tbaa !1396, !alias.scope !168, !noalias !169, !enzyme_type !757, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUInt64\7D !0, !enzyme_nocache !0
  %30 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %26, i64 0, i32 1, !dbg !5605
  %31 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %30, align 8, !dbg !5605, !tbaa !1396, !alias.scope !168, !noalias !169, !dereferenceable_or_null !119, !align !647, !enzyme_type !133, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUInt64\7D !0
  %32 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %31, {} addrspace(10)** %29) #74, !dbg !5605
  %33 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %32, i64 %16, !dbg !5605
  %34 = bitcast {} addrspace(10)* addrspace(13)* %33 to i64 addrspace(13)*, !dbg !5605
  %35 = load i64, i64 addrspace(13)* %34, align 8, !dbg !5605, !tbaa !762, !alias.scope !127, !noalias !128
  %36 = and i64 %1, 63, !dbg !5607
  %37 = shl nuw i64 1, %36, !dbg !5609
  %38 = and i64 %35, %37, !dbg !5611
  %.not182 = icmp eq i64 %38, 0, !dbg !5612
  br i1 %.not182, label %L88, label %L68, !dbg !5590

L68:                                              ; preds = %L44
  %39 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 0, i32 0, i64 0, !dbg !5615
  %40 = bitcast {} addrspace(10)* addrspace(11)* %39 to { i8*, {} addrspace(10)* } addrspace(10)* addrspace(11)*, !dbg !5615
  %41 = load atomic { i8*, {} addrspace(10)* } addrspace(10)*, { i8*, {} addrspace(10)* } addrspace(10)* addrspace(11)* %40 unordered, align 8, !dbg !5615, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !dereferenceable !1419, !align !647, !enzyme_type !1532, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BInt64\7D !0
  %42 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %41 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !5617, !enzyme_inactive !0
  %43 = bitcast { i8*, {} addrspace(10)* } addrspace(10)* %41 to {} addrspace(10)** addrspace(10)*, !dbg !5617, !enzyme_inactive !0
  %44 = addrspacecast {} addrspace(10)** addrspace(10)* %43 to {} addrspace(10)** addrspace(11)*, !dbg !5617, !enzyme_inactive !0
  %45 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %44, align 8, !dbg !5617, !tbaa !1396, !alias.scope !168, !noalias !169, !enzyme_type !757, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BInt64\7D !0, !enzyme_nocache !0
  %46 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %42, i64 0, i32 1, !dbg !5617
  %47 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %46, align 8, !dbg !5617, !tbaa !1396, !alias.scope !168, !noalias !169, !dereferenceable_or_null !119, !align !647, !enzyme_type !133, !enzyme_inactive !0, !enzymejl_source_type_Memory\7BInt64\7D !0, !enzymejl_byref_MUT_REF !0
  %48 = add i64 %1, -1, !dbg !5617
  %49 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %47, {} addrspace(10)** %45) #74, !dbg !5617
  %50 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %49, i64 %48, !dbg !5617
  %51 = bitcast {} addrspace(10)* addrspace(13)* %50 to i64 addrspace(13)*, !dbg !5617
  %52 = load i64, i64 addrspace(13)* %51, align 8, !dbg !5617, !tbaa !762, !alias.scope !127, !noalias !128
  br label %L88, !dbg !5617

L88:                                              ; preds = %L68, %L44, %top
  %value_phi6 = phi i64 [ 0, %L44 ], [ %52, %L68 ], [ 0, %top ]
  %53 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 8, i32 0, !dbg !5618
  %54 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 8, i32 0, i64 1, !dbg !5623
  %55 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %54 unordered, align 8, !dbg !5623, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !dereferenceable !119, !align !647, !enzyme_type !1534, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_BitSet !0
  %56 = bitcast {} addrspace(10)* %55 to {} addrspace(10)* addrspace(10)*, !dbg !5626, !enzyme_inactive !0
  %57 = addrspacecast {} addrspace(10)* addrspace(10)* %56 to {} addrspace(10)* addrspace(11)*, !dbg !5626, !enzyme_inactive !0
  %58 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %57 unordered, align 8, !dbg !5626, !tbaa !179, !alias.scope !127, !noalias !128, !nonnull !0, !dereferenceable !1419, !align !647, !enzyme_type !1532, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUInt64\7D !0
  %59 = bitcast {} addrspace(10)* %55 to i8 addrspace(10)*, !dbg !5626, !enzyme_inactive !0
  %60 = addrspacecast i8 addrspace(10)* %59 to i8 addrspace(11)*, !dbg !5626, !enzyme_inactive !0
  %61 = getelementptr inbounds i8, i8 addrspace(11)* %60, i64 8, !dbg !5626
  %62 = bitcast i8 addrspace(11)* %61 to i64 addrspace(11)*, !dbg !5626
  %63 = load i64, i64 addrspace(11)* %62, align 8, !dbg !5626, !tbaa !179, !alias.scope !127, !noalias !128, !enzyme_type !170, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0
  %64 = ashr i64 %value_phi6, 6, !dbg !5629
  %65 = sub i64 %64, %63, !dbg !5633
  %66 = icmp ult i64 %65, 9223372036854775807, !dbg !5634
  %67 = add i64 %65, 1, !dbg !5635
  %68 = bitcast {} addrspace(10)* %58 to i8 addrspace(10)*, !dbg !5635, !enzyme_inactive !0
  %69 = addrspacecast i8 addrspace(10)* %68 to i8 addrspace(11)*, !dbg !5635, !enzyme_inactive !0
  %70 = getelementptr inbounds i8, i8 addrspace(11)* %69, i64 16, !dbg !5635
  %71 = bitcast i8 addrspace(11)* %70 to i64 addrspace(11)*, !dbg !5635
  %72 = load i64, i64 addrspace(11)* %71, align 8, !dbg !5635, !enzyme_type !170, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0
  %73 = icmp sle i64 %67, %72, !dbg !5635
  %value_phi7.off0 = select i1 %66, i1 %73, i1 false, !dbg !5635
  br i1 %value_phi7.off0, label %L162, label %L199, !dbg !5635

L162:                                             ; preds = %L88
  %74 = bitcast {} addrspace(10)* %58 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !5636, !enzyme_inactive !0
  %75 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %74 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !5636, !enzyme_inactive !0
  %76 = bitcast {} addrspace(10)* %58 to {} addrspace(10)** addrspace(10)*, !dbg !5636, !enzyme_inactive !0
  %77 = addrspacecast {} addrspace(10)** addrspace(10)* %76 to {} addrspace(10)** addrspace(11)*, !dbg !5636, !enzyme_inactive !0
  %78 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %77, align 8, !dbg !5636, !tbaa !1396, !alias.scope !168, !noalias !169, !enzyme_type !757, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUInt64\7D !0, !enzyme_nocache !0
  %79 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %75, i64 0, i32 1, !dbg !5636
  %80 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %79, align 8, !dbg !5636, !tbaa !1396, !alias.scope !168, !noalias !169, !dereferenceable_or_null !119, !align !647, !enzyme_type !133, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUInt64\7D !0
  %81 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %80, {} addrspace(10)** %78) #74, !dbg !5636
  %82 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %81, i64 %65, !dbg !5636
  %83 = bitcast {} addrspace(10)* addrspace(13)* %82 to i64 addrspace(13)*, !dbg !5636
  %84 = load i64, i64 addrspace(13)* %83, align 8, !dbg !5636, !tbaa !762, !alias.scope !127, !noalias !128
  %85 = and i64 %value_phi6, 63, !dbg !5638
  %86 = shl nuw i64 1, %85, !dbg !5640
  %87 = and i64 %84, %86, !dbg !5642
  %.not206 = icmp eq i64 %87, 0, !dbg !5643
  br i1 %.not206, label %L199, label %L166, !dbg !5624

L166:                                             ; preds = %L162
  %88 = bitcast [2 x {} addrspace(10)*] addrspace(11)* %53 to { i64, {} addrspace(10)* } addrspace(10)* addrspace(11)*, !dbg !5646
  %89 = load atomic { i64, {} addrspace(10)* } addrspace(10)*, { i64, {} addrspace(10)* } addrspace(10)* addrspace(11)* %88 unordered, align 8, !dbg !5646, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !dereferenceable !1419, !align !647, !enzyme_type !1542, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0
  %90 = addrspacecast { i64, {} addrspace(10)* } addrspace(10)* %89 to { i64, {} addrspace(10)* } addrspace(11)*, !dbg !5648
  %91 = getelementptr inbounds { i64, {} addrspace(10)* }, { i64, {} addrspace(10)* } addrspace(11)* %90, i64 0, i32 0, !dbg !5648
  %92 = load i64, i64 addrspace(11)* %91, align 8, !dbg !5648, !tbaa !1396, !alias.scope !168, !noalias !169, !enzyme_type !129, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0
  %93 = getelementptr inbounds { i64, {} addrspace(10)* }, { i64, {} addrspace(10)* } addrspace(11)* %90, i64 0, i32 1, !dbg !5648
  %94 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %93, align 8, !dbg !5648, !tbaa !1396, !alias.scope !168, !noalias !169, !dereferenceable_or_null !119, !align !647, !enzyme_type !94, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0
  %95 = add i64 %value_phi6, -1, !dbg !5648
  %96 = add i64 %95, %92, !dbg !5648
  %97 = bitcast {} addrspace(10)* %94 to i64 addrspace(10)*, !dbg !5648
  %98 = addrspacecast i64 addrspace(10)* %97 to i64 addrspace(11)*, !dbg !5648
  %99 = load i64, i64 addrspace(11)* %98, align 8, !dbg !5648, !tbaa !165, !range !1852, !alias.scope !168, !noalias !169, !enzyme_type !170, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0
  %100 = bitcast {} addrspace(10)* %94 to { i64, {} addrspace(10)** } addrspace(10)*, !dbg !5648
  %101 = addrspacecast { i64, {} addrspace(10)** } addrspace(10)* %100 to { i64, {} addrspace(10)** } addrspace(11)*, !dbg !5648
  %102 = getelementptr inbounds { i64, {} addrspace(10)** }, { i64, {} addrspace(10)** } addrspace(11)* %101, i64 0, i32 1, !dbg !5648
  %103 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %102, align 8, !dbg !5648, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !enzyme_type !129, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0, !enzyme_nocache !0
  %104 = call "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %94, {} addrspace(10)** %103) #74, !dbg !5648
  %105 = bitcast {} addrspace(10)* addrspace(13)* %104 to [2 x i64] addrspace(13)*, !dbg !5648
  %106 = getelementptr inbounds [2 x i64], [2 x i64] addrspace(13)* %105, i64 %99, !dbg !5648
  %107 = bitcast [2 x i64] addrspace(13)* %106 to i8 addrspace(13)*, !dbg !5648
  %108 = getelementptr inbounds i8, i8 addrspace(13)* %107, i64 %96, !dbg !5648
  %109 = load i8, i8 addrspace(13)* %108, align 1, !dbg !5648, !tbaa !1853, !range !1855, !alias.scope !168, !noalias !169
  %.sroa.0144.0..sroa_idx = getelementptr inbounds [2 x i64], [2 x i64] addrspace(13)* %105, i64 %96, i64 0, !dbg !5648
  %.sroa.0144.0.copyload = load i64, i64 addrspace(13)* %.sroa.0144.0..sroa_idx, align 8, !dbg !5648, !tbaa !762, !alias.scope !127, !noalias !5649
  %.not164.not.not = icmp eq i8 %109, 0, !dbg !5652
  br i1 %.not164.not.not, label %L199, label %union_move46, !dbg !5652

L199:                                             ; preds = %union_move46, %L166, %L162, %L88
  %110 = phi double [ undef, %L162 ], [ undef, %L88 ], [ %.sroa.3145.0.copyload211, %union_move46 ], [ undef, %L166 ]
  %.sroa.0135.0189 = phi i64 [ undef, %L162 ], [ undef, %L88 ], [ %.sroa.0144.0.copyload, %union_move46 ], [ %.sroa.0144.0.copyload, %L166 ]
  %111 = phi i1 [ true, %L162 ], [ true, %L88 ], [ false, %union_move46 ], [ true, %L166 ]
  %tindex_phi11 = phi i8 [ 1, %L162 ], [ 1, %L88 ], [ 3, %union_move46 ], [ 2, %L166 ]
  %112 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 1, i32 0, i64 1, !dbg !5589
  %113 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %112 unordered, align 8, !dbg !5589, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !dereferenceable !119, !align !647, !enzyme_type !1534, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_BitSet !0
  %114 = bitcast {} addrspace(10)* %113 to {} addrspace(10)* addrspace(10)*, !dbg !5595, !enzyme_inactive !0
  %115 = addrspacecast {} addrspace(10)* addrspace(10)* %114 to {} addrspace(10)* addrspace(11)*, !dbg !5595, !enzyme_inactive !0
  %116 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %115 unordered, align 8, !dbg !5595, !tbaa !179, !alias.scope !127, !noalias !128, !nonnull !0, !dereferenceable !1419, !align !647, !enzyme_type !1532, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUInt64\7D !0
  %117 = bitcast {} addrspace(10)* %113 to i8 addrspace(10)*, !dbg !5595, !enzyme_inactive !0
  %118 = addrspacecast i8 addrspace(10)* %117 to i8 addrspace(11)*, !dbg !5595, !enzyme_inactive !0
  %119 = getelementptr inbounds i8, i8 addrspace(11)* %118, i64 8, !dbg !5595
  %120 = bitcast i8 addrspace(11)* %119 to i64 addrspace(11)*, !dbg !5595
  %121 = load i64, i64 addrspace(11)* %120, align 8, !dbg !5595, !tbaa !179, !alias.scope !127, !noalias !128, !enzyme_type !170, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0
  %122 = sub i64 %15, %121, !dbg !5602
  %123 = icmp ult i64 %122, 9223372036854775807, !dbg !5603
  %124 = add i64 %122, 1, !dbg !5604
  %125 = bitcast {} addrspace(10)* %116 to i8 addrspace(10)*, !dbg !5604, !enzyme_inactive !0
  %126 = addrspacecast i8 addrspace(10)* %125 to i8 addrspace(11)*, !dbg !5604, !enzyme_inactive !0
  %127 = getelementptr inbounds i8, i8 addrspace(11)* %126, i64 16, !dbg !5604
  %128 = bitcast i8 addrspace(11)* %127 to i64 addrspace(11)*, !dbg !5604
  %129 = load i64, i64 addrspace(11)* %128, align 8, !dbg !5604, !enzyme_type !170, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0
  %130 = icmp sle i64 %124, %129, !dbg !5604
  %value_phi13.off0 = select i1 %123, i1 %130, i1 false, !dbg !5604
  br i1 %value_phi13.off0, label %L247, label %L291, !dbg !5604

L247:                                             ; preds = %L199
  %131 = bitcast {} addrspace(10)* %116 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !5605, !enzyme_inactive !0
  %132 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %131 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !5605, !enzyme_inactive !0
  %133 = bitcast {} addrspace(10)* %116 to {} addrspace(10)** addrspace(10)*, !dbg !5605, !enzyme_inactive !0
  %134 = addrspacecast {} addrspace(10)** addrspace(10)* %133 to {} addrspace(10)** addrspace(11)*, !dbg !5605, !enzyme_inactive !0
  %135 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %134, align 8, !dbg !5605, !tbaa !1396, !alias.scope !168, !noalias !169, !enzyme_type !757, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUInt64\7D !0, !enzyme_nocache !0
  %136 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %132, i64 0, i32 1, !dbg !5605
  %137 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %136, align 8, !dbg !5605, !tbaa !1396, !alias.scope !168, !noalias !169, !dereferenceable_or_null !119, !align !647, !enzyme_type !133, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUInt64\7D !0
  %138 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %137, {} addrspace(10)** %135) #74, !dbg !5605
  %139 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %138, i64 %122, !dbg !5605
  %140 = bitcast {} addrspace(10)* addrspace(13)* %139 to i64 addrspace(13)*, !dbg !5605
  %141 = load i64, i64 addrspace(13)* %140, align 8, !dbg !5605, !tbaa !762, !alias.scope !127, !noalias !128
  %142 = and i64 %1, 63, !dbg !5607
  %143 = shl nuw i64 1, %142, !dbg !5609
  %144 = and i64 %141, %143, !dbg !5611
  %.not = icmp eq i64 %144, 0, !dbg !5612
  br i1 %.not, label %L291, label %L271, !dbg !5590

L271:                                             ; preds = %L247
  %145 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 1, i32 0, i64 0, !dbg !5615
  %146 = bitcast {} addrspace(10)* addrspace(11)* %145 to { i8*, {} addrspace(10)* } addrspace(10)* addrspace(11)*, !dbg !5615
  %147 = load atomic { i8*, {} addrspace(10)* } addrspace(10)*, { i8*, {} addrspace(10)* } addrspace(10)* addrspace(11)* %146 unordered, align 8, !dbg !5615, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !dereferenceable !1419, !align !647, !enzyme_type !1532, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BInt64\7D !0
  %148 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %147 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !5617, !enzyme_inactive !0
  %149 = bitcast { i8*, {} addrspace(10)* } addrspace(10)* %147 to {} addrspace(10)** addrspace(10)*, !dbg !5617, !enzyme_inactive !0
  %150 = addrspacecast {} addrspace(10)** addrspace(10)* %149 to {} addrspace(10)** addrspace(11)*, !dbg !5617, !enzyme_inactive !0
  %151 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %150, align 8, !dbg !5617, !tbaa !1396, !alias.scope !168, !noalias !169, !enzyme_type !757, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BInt64\7D !0, !enzyme_nocache !0
  %152 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %148, i64 0, i32 1, !dbg !5617
  %153 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %152, align 8, !dbg !5617, !tbaa !1396, !alias.scope !168, !noalias !169, !dereferenceable_or_null !119, !align !647, !enzyme_type !133, !enzyme_inactive !0, !enzymejl_source_type_Memory\7BInt64\7D !0, !enzymejl_byref_MUT_REF !0
  %154 = add i64 %1, -1, !dbg !5617
  %155 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %153, {} addrspace(10)** %151) #74, !dbg !5617
  %156 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %155, i64 %154, !dbg !5617
  %157 = bitcast {} addrspace(10)* addrspace(13)* %156 to i64 addrspace(13)*, !dbg !5617
  %158 = load i64, i64 addrspace(13)* %157, align 8, !dbg !5617, !tbaa !762, !alias.scope !127, !noalias !128
  br label %L291, !dbg !5652

L291:                                             ; preds = %L271, %L247, %L199
  %value_phi18 = phi i64 [ 0, %L247 ], [ %158, %L271 ], [ 0, %L199 ]
  %159 = ashr i64 %value_phi18, 6, !dbg !5629
  %160 = sub i64 %159, %63, !dbg !5633
  %161 = icmp ult i64 %160, 9223372036854775807, !dbg !5634
  %162 = add i64 %160, 1, !dbg !5635
  %163 = icmp sle i64 %162, %72, !dbg !5635
  %value_phi19.off0 = select i1 %161, i1 %163, i1 false, !dbg !5635
  br i1 %value_phi19.off0, label %L365, label %L430, !dbg !5635

L365:                                             ; preds = %L291
  %164 = bitcast {} addrspace(10)* %58 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !5636, !enzyme_inactive !0
  %165 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %164 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !5636, !enzyme_inactive !0
  %166 = bitcast {} addrspace(10)* %58 to {} addrspace(10)** addrspace(10)*, !dbg !5636, !enzyme_inactive !0
  %167 = addrspacecast {} addrspace(10)** addrspace(10)* %166 to {} addrspace(10)** addrspace(11)*, !dbg !5636, !enzyme_inactive !0
  %168 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %167, align 8, !dbg !5636, !tbaa !1396, !alias.scope !168, !noalias !169, !enzyme_type !757, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUInt64\7D !0, !enzyme_nocache !0
  %169 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %165, i64 0, i32 1, !dbg !5636
  %170 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %169, align 8, !dbg !5636, !tbaa !1396, !alias.scope !168, !noalias !169, !dereferenceable_or_null !119, !align !647, !enzyme_type !133, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUInt64\7D !0
  %171 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %170, {} addrspace(10)** %168) #74, !dbg !5636
  %172 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %171, i64 %160, !dbg !5636
  %173 = bitcast {} addrspace(10)* addrspace(13)* %172 to i64 addrspace(13)*, !dbg !5636
  %174 = load i64, i64 addrspace(13)* %173, align 8, !dbg !5636, !tbaa !762, !alias.scope !127, !noalias !128
  %175 = and i64 %value_phi18, 63, !dbg !5638
  %176 = shl nuw i64 1, %175, !dbg !5640
  %177 = and i64 %174, %176, !dbg !5642
  %.not205 = icmp eq i64 %177, 0, !dbg !5643
  br i1 %.not205, label %L430, label %L369, !dbg !5624

L369:                                             ; preds = %L365
  %178 = bitcast [2 x {} addrspace(10)*] addrspace(11)* %53 to { i64, {} addrspace(10)* } addrspace(10)* addrspace(11)*, !dbg !5646
  %179 = load atomic { i64, {} addrspace(10)* } addrspace(10)*, { i64, {} addrspace(10)* } addrspace(10)* addrspace(11)* %178 unordered, align 8, !dbg !5646, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !dereferenceable !1419, !align !647, !enzyme_type !1542, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0
  %180 = addrspacecast { i64, {} addrspace(10)* } addrspace(10)* %179 to { i64, {} addrspace(10)* } addrspace(11)*, !dbg !5648
  %181 = getelementptr inbounds { i64, {} addrspace(10)* }, { i64, {} addrspace(10)* } addrspace(11)* %180, i64 0, i32 0, !dbg !5648
  %182 = load i64, i64 addrspace(11)* %181, align 8, !dbg !5648, !tbaa !1396, !alias.scope !168, !noalias !169, !enzyme_type !129, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0
  %183 = getelementptr inbounds { i64, {} addrspace(10)* }, { i64, {} addrspace(10)* } addrspace(11)* %180, i64 0, i32 1, !dbg !5648
  %184 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %183, align 8, !dbg !5648, !tbaa !1396, !alias.scope !168, !noalias !169, !dereferenceable_or_null !119, !align !647, !enzyme_type !94, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0
  %185 = add i64 %value_phi18, -1, !dbg !5648
  %186 = add i64 %185, %182, !dbg !5648
  %187 = bitcast {} addrspace(10)* %184 to i64 addrspace(10)*, !dbg !5648
  %188 = addrspacecast i64 addrspace(10)* %187 to i64 addrspace(11)*, !dbg !5648
  %189 = load i64, i64 addrspace(11)* %188, align 8, !dbg !5648, !tbaa !165, !range !1852, !alias.scope !168, !noalias !169, !enzyme_type !170, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0
  %190 = bitcast {} addrspace(10)* %184 to { i64, {} addrspace(10)** } addrspace(10)*, !dbg !5648
  %191 = addrspacecast { i64, {} addrspace(10)** } addrspace(10)* %190 to { i64, {} addrspace(10)** } addrspace(11)*, !dbg !5648
  %192 = getelementptr inbounds { i64, {} addrspace(10)** }, { i64, {} addrspace(10)** } addrspace(11)* %191, i64 0, i32 1, !dbg !5648
  %193 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %192, align 8, !dbg !5648, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !enzyme_type !129, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0, !enzyme_nocache !0
  %194 = call "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %184, {} addrspace(10)** %193) #74, !dbg !5648
  %195 = bitcast {} addrspace(10)* addrspace(13)* %194 to [2 x i64] addrspace(13)*, !dbg !5648
  %196 = getelementptr inbounds [2 x i64], [2 x i64] addrspace(13)* %195, i64 %189, !dbg !5648
  %197 = bitcast [2 x i64] addrspace(13)* %196 to i8 addrspace(13)*, !dbg !5648
  %198 = getelementptr inbounds i8, i8 addrspace(13)* %197, i64 %186, !dbg !5648
  %199 = load i8, i8 addrspace(13)* %198, align 1, !dbg !5648, !tbaa !1853, !range !1855, !alias.scope !168, !noalias !169
  %.sroa.0112.0..sroa_idx = getelementptr inbounds [2 x i64], [2 x i64] addrspace(13)* %195, i64 %186, i64 0, !dbg !5648
  %.sroa.0112.0.copyload = load i64, i64 addrspace(13)* %.sroa.0112.0..sroa_idx, align 8, !dbg !5648, !tbaa !762, !alias.scope !127, !noalias !5649
  %.not162.not.not = icmp eq i8 %199, 0, !dbg !5652
  br i1 %.not162.not.not, label %L430, label %L402, !dbg !5652

L402:                                             ; preds = %L369
  %.sroa.3.0..sroa_idx113 = getelementptr inbounds [2 x i64], [2 x i64] addrspace(13)* %195, i64 %186, i64 1, !dbg !5648
  %200 = bitcast i64 addrspace(13)* %.sroa.3.0..sroa_idx113 to double addrspace(13)*, !dbg !5648
  %.sroa.3.0.copyload212 = load double, double addrspace(13)* %200, align 8, !dbg !5648, !tbaa !762, !alias.scope !127, !noalias !5649
  br i1 %111, label %L430, label %L411, !dbg !5588

L411:                                             ; preds = %L402
  %201 = bitcast i64 %.sroa.0135.0189 to double, !dbg !5653
  %202 = bitcast i64 %.sroa.0112.0.copyload to double, !dbg !5653
  %203 = fsub double %201, %202, !dbg !5653
  %204 = fsub double %110, %.sroa.3.0.copyload212, !dbg !5653
  br label %L432, !dbg !5652

L430:                                             ; preds = %L402, %L369, %L365, %L291
  %tindex_phi25217 = phi i8 [ 3, %L402 ], [ 2, %L369 ], [ 1, %L291 ], [ 1, %L365 ]
  %205 = phi double [ %.sroa.3.0.copyload212, %L402 ], [ undef, %L369 ], [ undef, %L291 ], [ undef, %L365 ]
  %.sroa.0103.0202216 = phi i64 [ %.sroa.0112.0.copyload, %L402 ], [ %.sroa.0112.0.copyload, %L369 ], [ undef, %L291 ], [ undef, %L365 ]
  switch i8 %tindex_phi11, label %post_box_union [
    i8 1, label %box_union
    i8 2, label %box_union27
    i8 3, label %box_union29
  ], !dbg !5588

L432:                                             ; preds = %post_box_union32, %L411
  %.sroa.078.sroa.0.0 = phi double [ %.sroa.078.sroa.0.0.copyload, %post_box_union32 ], [ %203, %L411 ], !dbg !5652
  %.sroa.078.sroa.6.0 = phi double [ %.sroa.078.sroa.6.0.copyload, %post_box_union32 ], [ %204, %L411 ], !dbg !5652
  %.sroa.078.sroa.0.0.sret_return149150.sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %sret_return, i64 0, i64 0, i64 0, !dbg !5588
  store double %.sroa.078.sroa.0.0, double* %.sroa.078.sroa.0.0.sret_return149150.sroa_idx, align 8, !dbg !5588, !noalias !5658
  %.sroa.078.sroa.6.0.sret_return149150.sroa_idx172 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %sret_return, i64 0, i64 0, i64 1, !dbg !5588
  store double %.sroa.078.sroa.6.0, double* %.sroa.078.sroa.6.0.sret_return149150.sroa_idx172, align 8, !dbg !5588, !noalias !5658
  ret void, !dbg !5588

post_box_union:                                   ; preds = %box_union29, %box_union27, %box_union, %L430
  %206 = phi {} addrspace(10)* [ %208, %box_union ], [ %209, %box_union27 ], [ %211, %box_union29 ], [ null, %L430 ], !dbg !5588
  switch i8 %tindex_phi25217, label %post_box_union32 [
    i8 1, label %box_union33
    i8 2, label %box_union34
    i8 3, label %box_union36
  ], !dbg !5588

box_union:                                        ; preds = %L430
  %207 = load {}*, {}** @jl_nothing, align 8, !dbg !5588, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !enzyme_type !129, !enzyme_inactive !0, !enzymejl_byref_BITS_REF !0, !enzymejl_source_type_Nothing !0
  %208 = addrspacecast {}* %207 to {} addrspace(10)*, !dbg !5588, !enzyme_inactive !0
  br label %post_box_union, !dbg !5588

box_union27:                                      ; preds = %L430
  %209 = call noalias nonnull align 8 dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %2, i64 8, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 13368310256 to {}*) to {} addrspace(10)*)) #75, !dbg !5588
  %210 = bitcast {} addrspace(10)* %209 to i64 addrspace(10)*, !dbg !5588, !enzyme_inactive !0
  store i64 %.sroa.0135.0189, i64 addrspace(10)* %210, align 8, !dbg !5588, !tbaa !124, !alias.scope !127, !noalias !5649
  br label %post_box_union, !dbg !5588

box_union29:                                      ; preds = %L430
  %211 = call noalias nonnull align 8 dereferenceable(16) "enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %2, i64 16, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 13568798288 to {}*) to {} addrspace(10)*)) #75, !dbg !5588
  %212 = bitcast {} addrspace(10)* %211 to i8 addrspace(10)*, !dbg !5588
  %.sroa.0208.0..sroa_cast = bitcast {} addrspace(10)* %211 to i64 addrspace(10)*, !dbg !5588
  store i64 %.sroa.0135.0189, i64 addrspace(10)* %.sroa.0208.0..sroa_cast, align 8, !dbg !5588, !tbaa !124, !alias.scope !127, !noalias !5649
  %.sroa.4210.0..sroa_idx = getelementptr inbounds i8, i8 addrspace(10)* %212, i64 8, !dbg !5588
  %213 = bitcast i8 addrspace(10)* %.sroa.4210.0..sroa_idx to double addrspace(10)*, !dbg !5588
  store double %110, double addrspace(10)* %213, align 8, !dbg !5588, !tbaa !124, !alias.scope !127, !noalias !5649
  br label %post_box_union, !dbg !5588

post_box_union32:                                 ; preds = %box_union36, %box_union34, %box_union33, %post_box_union
  %214 = phi {} addrspace(10)* [ %219, %box_union33 ], [ %220, %box_union34 ], [ %222, %box_union36 ], [ null, %post_box_union ], !dbg !5588
  %215 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* nonnull @ijl_apply_generic, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 4705057072 to {}*) to {} addrspace(10)*), {} addrspace(10)* %206, {} addrspace(10)* %214) #76, !dbg !5588
  %216 = bitcast {} addrspace(10)* %215 to i8 addrspace(10)*, !dbg !5652
  %.sroa.078.0..sroa_cast82 = addrspacecast i8 addrspace(10)* %216 to i8 addrspace(11)*, !dbg !5652
  %217 = bitcast {} addrspace(10)* %215 to double addrspace(10)*, !dbg !5652
  %.sroa.078.sroa.0.0..sroa.078.0..sroa_cast82.sroa_cast = addrspacecast double addrspace(10)* %217 to double addrspace(11)*, !dbg !5652
  %.sroa.078.sroa.0.0.copyload = load double, double addrspace(11)* %.sroa.078.sroa.0.0..sroa.078.0..sroa_cast82.sroa_cast, align 8, !dbg !5652, !tbaa !69, !alias.scope !1869, !noalias !5659
  %.sroa.078.sroa.6.0..sroa.078.0..sroa_cast82.sroa_idx = getelementptr inbounds i8, i8 addrspace(11)* %.sroa.078.0..sroa_cast82, i64 8, !dbg !5652
  %.sroa.078.sroa.6.0..sroa.078.0..sroa_cast82.sroa_cast = bitcast i8 addrspace(11)* %.sroa.078.sroa.6.0..sroa.078.0..sroa_cast82.sroa_idx to double addrspace(11)*, !dbg !5652
  %.sroa.078.sroa.6.0.copyload = load double, double addrspace(11)* %.sroa.078.sroa.6.0..sroa.078.0..sroa_cast82.sroa_cast, align 8, !dbg !5652, !tbaa !69, !alias.scope !1869, !noalias !5659
  br label %L432, !dbg !5652

box_union33:                                      ; preds = %post_box_union
  %218 = load {}*, {}** @jl_nothing, align 8, !dbg !5588, !tbaa !66, !alias.scope !98, !noalias !99, !nonnull !0, !enzyme_type !129, !enzyme_inactive !0, !enzymejl_byref_BITS_REF !0, !enzymejl_source_type_Nothing !0
  %219 = addrspacecast {}* %218 to {} addrspace(10)*, !dbg !5588, !enzyme_inactive !0
  br label %post_box_union32, !dbg !5588

box_union34:                                      ; preds = %post_box_union
  %220 = call noalias nonnull align 8 dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %2, i64 8, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 13368310256 to {}*) to {} addrspace(10)*)) #75, !dbg !5588
  %221 = bitcast {} addrspace(10)* %220 to i64 addrspace(10)*, !dbg !5588, !enzyme_inactive !0
  store i64 %.sroa.0103.0202216, i64 addrspace(10)* %221, align 8, !dbg !5588, !tbaa !124, !alias.scope !127, !noalias !5649
  br label %post_box_union32, !dbg !5588

box_union36:                                      ; preds = %post_box_union
  %222 = call noalias nonnull align 8 dereferenceable(16) "enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %2, i64 16, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 13568798288 to {}*) to {} addrspace(10)*)) #75, !dbg !5588
  %223 = bitcast {} addrspace(10)* %222 to i8 addrspace(10)*, !dbg !5588
  %.sroa.0.0..sroa_cast = bitcast {} addrspace(10)* %222 to i64 addrspace(10)*, !dbg !5588
  store i64 %.sroa.0103.0202216, i64 addrspace(10)* %.sroa.0.0..sroa_cast, align 8, !dbg !5588, !tbaa !124, !alias.scope !127, !noalias !5649
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, i8 addrspace(10)* %223, i64 8, !dbg !5588
  %224 = bitcast i8 addrspace(10)* %.sroa.4.0..sroa_idx to double addrspace(10)*, !dbg !5588
  store double %205, double addrspace(10)* %224, align 8, !dbg !5588, !tbaa !124, !alias.scope !127, !noalias !5649
  br label %post_box_union32, !dbg !5588

union_move46:                                     ; preds = %L166
  %.sroa.3145.0..sroa_idx146 = getelementptr inbounds [2 x i64], [2 x i64] addrspace(13)* %105, i64 %96, i64 1, !dbg !5648
  %225 = bitcast i64 addrspace(13)* %.sroa.3145.0..sroa_idx146 to double addrspace(13)*, !dbg !5648
  %.sroa.3145.0.copyload211 = load double, double addrspace(13)* %225, align 8, !dbg !5648, !tbaa !762, !alias.scope !127, !noalias !5649
  br label %L199, !dbg !5652
}

 Type analysis state: 
<analysis>
i64 0: {[-1]:Anything}, intvals: {0,}
i64 1: {[-1]:Integer}, intvals: {1,}
i64 -1: {[-1]:Anything}, intvals: {-1,}
i64 6: {[-1]:Integer}, intvals: {6,}
i64 9223372036854775807: {[-1]:Anything}, intvals: {9223372036854775807,}
i64 63: {[-1]:Integer}, intvals: {63,}
  %pgcstack = call {}*** @julia.get_pgcstack() #74: {}, intvals: {}
[1 x [2 x double]]* %sret_return: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
[1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,-1]:Integer, [-1,16]:Pointer, [-1,16,-1]:Integer, [-1,24]:Pointer, [-1,24,-1]:Integer, [-1,32]:Pointer, [-1,32,-1]:Integer, [-1,40]:Pointer, [-1,40,-1]:Integer, [-1,48]:Pointer, [-1,48,-1]:Integer, [-1,56]:Pointer, [-1,56,0]:Pointer, [-1,56,0,-1]:Integer, [-1,56,8]:Pointer, [-1,56,8,0]:Integer, [-1,56,8,1]:Integer, [-1,56,8,2]:Integer, [-1,56,8,3]:Integer, [-1,56,8,4]:Integer, [-1,56,8,5]:Integer, [-1,56,8,6]:Integer, [-1,56,8,7]:Integer, [-1,56,8,8]:Pointer, [-1,56,8,8,-1]:Integer, [-1,56,16]:Integer, [-1,56,17]:Integer, [-1,56,18]:Integer, [-1,56,19]:Integer, [-1,56,20]:Integer, [-1,56,21]:Integer, [-1,56,22]:Integer, [-1,56,23]:Integer, [-1,64]:Pointer, [-1,64,0]:Pointer, [-1,64,0,0]:Pointer, [-1,64,0,0,-1]:Integer, [-1,64,0,8]:Pointer, [-1,64,0,8,0]:Integer, [-1,64,0,8,1]:Integer, [-1,64,0,8,2]:Integer, [-1,64,0,8,3]:Integer, [-1,64,0,8,4]:Integer, [-1,64,0,8,5]:Integer, [-1,64,0,8,6]:Integer, [-1,64,0,8,7]:Integer, [-1,64,0,8,8]:Pointer, [-1,64,0,8,8,-1]:Integer, [-1,64,0,16]:Integer, [-1,64,0,17]:Integer, [-1,64,0,18]:Integer, [-1,64,0,19]:Integer, [-1,64,0,20]:Integer, [-1,64,0,21]:Integer, [-1,64,0,22]:Integer, [-1,64,0,23]:Integer, [-1,64,8]:Integer, [-1,64,9]:Integer, [-1,64,10]:Integer, [-1,64,11]:Integer, [-1,64,12]:Integer, [-1,64,13]:Integer, [-1,64,14]:Integer, [-1,64,15]:Integer, [-1,72]:Pointer, [-1,72,0]:Pointer, [-1,72,0,-1]:Pointer, [-1,72,0,-1,0]:Pointer, [-1,72,0,-1,0,-1]:Integer, [-1,72,0,-1,8]:Pointer, [-1,72,0,-1,8,0]:Integer, [-1,72,0,-1,8,1]:Integer, [-1,72,0,-1,8,2]:Integer, [-1,72,0,-1,8,3]:Integer, [-1,72,0,-1,8,4]:Integer, [-1,72,0,-1,8,5]:Integer, [-1,72,0,-1,8,6]:Integer, [-1,72,0,-1,8,7]:Integer, [-1,72,0,-1,8,8]:Pointer, [-1,72,0,-1,16]:Integer, [-1,72,0,-1,17]:Integer, [-1,72,0,-1,18]:Integer, [-1,72,0,-1,19]:Integer, [-1,72,0,-1,20]:Integer, [-1,72,0,-1,21]:Integer, [-1,72,0,-1,22]:Integer, [-1,72,0,-1,23]:Integer, [-1,72,8]:Pointer, [-1,72,8,0]:Integer, [-1,72,8,1]:Integer, [-1,72,8,2]:Integer, [-1,72,8,3]:Integer, [-1,72,8,4]:Integer, [-1,72,8,5]:Integer, [-1,72,8,6]:Integer, [-1,72,8,7]:Integer, [-1,72,8,8]:Pointer, [-1,72,8,8,-1]:Pointer, [-1,72,8,8,-1,0]:Pointer, [-1,72,8,8,-1,8]:Pointer, [-1,72,8,8,-1,16]:Integer, [-1,72,8,8,-1,17]:Integer, [-1,72,8,8,-1,18]:Integer, [-1,72,8,8,-1,19]:Integer, [-1,72,8,8,-1,20]:Integer, [-1,72,8,8,-1,21]:Integer, [-1,72,8,8,-1,22]:Integer, [-1,72,8,8,-1,23]:Integer, [-1,72,16]:Integer, [-1,72,17]:Integer, [-1,72,18]:Integer, [-1,72,19]:Integer, [-1,72,20]:Integer, [-1,72,21]:Integer, [-1,72,22]:Integer, [-1,72,23]:Integer, [-1,80]:Pointer, [-1,80,0]:Pointer, [-1,80,0,0]:Pointer, [-1,80,0,0,-1]:Integer, [-1,80,0,8]:Pointer, [-1,80,0,8,0]:Integer, [-1,80,0,8,1]:Integer, [-1,80,0,8,2]:Integer, [-1,80,0,8,3]:Integer, [-1,80,0,8,4]:Integer, [-1,80,0,8,5]:Integer, [-1,80,0,8,6]:Integer, [-1,80,0,8,7]:Integer, [-1,80,0,8,8]:Pointer, [-1,80,0,8,8,-1]:Integer, [-1,80,0,16]:Integer, [-1,80,0,17]:Integer, [-1,80,0,18]:Integer, [-1,80,0,19]:Integer, [-1,80,0,20]:Integer, [-1,80,0,21]:Integer, [-1,80,0,22]:Integer, [-1,80,0,23]:Integer, [-1,80,8]:Integer, [-1,80,9]:Integer, [-1,80,10]:Integer, [-1,80,11]:Integer, [-1,80,12]:Integer, [-1,80,13]:Integer, [-1,80,14]:Integer, [-1,80,15]:Integer, [-1,88]:Pointer, [-1,88,0]:Pointer, [-1,88,0,-1]:Integer, [-1,88,8]:Pointer, [-1,88,8,0]:Integer, [-1,88,8,1]:Integer, [-1,88,8,2]:Integer, [-1,88,8,3]:Integer, [-1,88,8,4]:Integer, [-1,88,8,5]:Integer, [-1,88,8,6]:Integer, [-1,88,8,7]:Integer, [-1,88,8,8]:Pointer, [-1,88,8,8,-1]:Integer, [-1,88,16]:Integer, [-1,88,17]:Integer, [-1,88,18]:Integer, [-1,88,19]:Integer, [-1,88,20]:Integer, [-1,88,21]:Integer, [-1,88,22]:Integer, [-1,88,23]:Integer, [-1,96]:Pointer, [-1,96,0]:Pointer, [-1,96,0,0]:Pointer, [-1,96,0,0,-1]:Integer, [-1,96,0,8]:Pointer, [-1,96,0,8,0]:Integer, [-1,96,0,8,1]:Integer, [-1,96,0,8,2]:Integer, [-1,96,0,8,3]:Integer, [-1,96,0,8,4]:Integer, [-1,96,0,8,5]:Integer, [-1,96,0,8,6]:Integer, [-1,96,0,8,7]:Integer, [-1,96,0,8,8]:Pointer, [-1,96,0,8,8,-1]:Integer, [-1,96,0,16]:Integer, [-1,96,0,17]:Integer, [-1,96,0,18]:Integer, [-1,96,0,19]:Integer, [-1,96,0,20]:Integer, [-1,96,0,21]:Integer, [-1,96,0,22]:Integer, [-1,96,0,23]:Integer, [-1,96,8]:Integer, [-1,96,9]:Integer, [-1,96,10]:Integer, [-1,96,11]:Integer, [-1,96,12]:Integer, [-1,96,13]:Integer, [-1,96,14]:Integer, [-1,96,15]:Integer, [-1,104]:Pointer, [-1,104,0]:Pointer, [-1,104,0,-1]:Pointer, [-1,104,0,-1,0]:Pointer, [-1,104,0,-1,0,-1]:Integer, [-1,104,0,-1,8]:Pointer, [-1,104,0,-1,8,0]:Integer, [-1,104,0,-1,8,1]:Integer, [-1,104,0,-1,8,2]:Integer, [-1,104,0,-1,8,3]:Integer, [-1,104,0,-1,8,4]:Integer, [-1,104,0,-1,8,5]:Integer, [-1,104,0,-1,8,6]:Integer, [-1,104,0,-1,8,7]:Integer, [-1,104,0,-1,8,8]:Pointer, [-1,104,0,-1,16]:Integer, [-1,104,0,-1,17]:Integer, [-1,104,0,-1,18]:Integer, [-1,104,0,-1,19]:Integer, [-1,104,0,-1,20]:Integer, [-1,104,0,-1,21]:Integer, [-1,104,0,-1,22]:Integer, [-1,104,0,-1,23]:Integer, [-1,104,8]:Pointer, [-1,104,8,0]:Integer, [-1,104,8,1]:Integer, [-1,104,8,2]:Integer, [-1,104,8,3]:Integer, [-1,104,8,4]:Integer, [-1,104,8,5]:Integer, [-1,104,8,6]:Integer, [-1,104,8,7]:Integer, [-1,104,8,8]:Pointer, [-1,104,8,8,-1]:Pointer, [-1,104,8,8,-1,0]:Pointer, [-1,104,8,8,-1,8]:Pointer, [-1,104,8,8,-1,16]:Integer, [-1,104,8,8,-1,17]:Integer, [-1,104,8,8,-1,18]:Integer, [-1,104,8,8,-1,19]:Integer, [-1,104,8,8,-1,20]:Integer, [-1,104,8,8,-1,21]:Integer, [-1,104,8,8,-1,22]:Integer, [-1,104,8,8,-1,23]:Integer, [-1,104,16]:Integer, [-1,104,17]:Integer, [-1,104,18]:Integer, [-1,104,19]:Integer, [-1,104,20]:Integer, [-1,104,21]:Integer, [-1,104,22]:Integer, [-1,104,23]:Integer, [-1,112]:Pointer, [-1,112,0]:Pointer, [-1,112,0,0]:Pointer, [-1,112,0,0,-1]:Integer, [-1,112,0,8]:Pointer, [-1,112,0,8,0]:Integer, [-1,112,0,8,1]:Integer, [-1,112,0,8,2]:Integer, [-1,112,0,8,3]:Integer, [-1,112,0,8,4]:Integer, [-1,112,0,8,5]:Integer, [-1,112,0,8,6]:Integer, [-1,112,0,8,7]:Integer, [-1,112,0,8,8]:Pointer, [-1,112,0,8,8,-1]:Integer, [-1,112,0,16]:Integer, [-1,112,0,17]:Integer, [-1,112,0,18]:Integer, [-1,112,0,19]:Integer, [-1,112,0,20]:Integer, [-1,112,0,21]:Integer, [-1,112,0,22]:Integer, [-1,112,0,23]:Integer, [-1,112,8]:Integer, [-1,112,9]:Integer, [-1,112,10]:Integer, [-1,112,11]:Integer, [-1,112,12]:Integer, [-1,112,13]:Integer, [-1,112,14]:Integer, [-1,112,15]:Integer, [-1,120]:Pointer, [-1,120,0]:Pointer, [-1,120,0,-1]:Integer, [-1,120,8]:Pointer, [-1,120,8,0]:Integer, [-1,120,8,1]:Integer, [-1,120,8,2]:Integer, [-1,120,8,3]:Integer, [-1,120,8,4]:Integer, [-1,120,8,5]:Integer, [-1,120,8,6]:Integer, [-1,120,8,7]:Integer, [-1,120,8,8]:Pointer, [-1,120,8,8,-1]:Integer, [-1,120,16]:Integer, [-1,120,17]:Integer, [-1,120,18]:Integer, [-1,120,19]:Integer, [-1,120,20]:Integer, [-1,120,21]:Integer, [-1,120,22]:Integer, [-1,120,23]:Integer, [-1,128]:Pointer, [-1,128,0]:Pointer, [-1,128,0,0]:Pointer, [-1,128,0,0,-1]:Integer, [-1,128,0,8]:Pointer, [-1,128,0,8,0]:Integer, [-1,128,0,8,1]:Integer, [-1,128,0,8,2]:Integer, [-1,128,0,8,3]:Integer, [-1,128,0,8,4]:Integer, [-1,128,0,8,5]:Integer, [-1,128,0,8,6]:Integer, [-1,128,0,8,7]:Integer, [-1,128,0,8,8]:Pointer, [-1,128,0,8,8,-1]:Integer, [-1,128,0,16]:Integer, [-1,128,0,17]:Integer, [-1,128,0,18]:Integer, [-1,128,0,19]:Integer, [-1,128,0,20]:Integer, [-1,128,0,21]:Integer, [-1,128,0,22]:Integer, [-1,128,0,23]:Integer, [-1,128,8]:Integer, [-1,128,9]:Integer, [-1,128,10]:Integer, [-1,128,11]:Integer, [-1,128,12]:Integer, [-1,128,13]:Integer, [-1,128,14]:Integer, [-1,128,15]:Integer, [-1,136]:Pointer, [-1,136,0]:Pointer, [-1,136,0,-1]:Pointer, [-1,136,0,-1,0]:Pointer, [-1,136,0,-1,0,-1]:Integer, [-1,136,0,-1,8]:Pointer, [-1,136,0,-1,8,0]:Integer, [-1,136,0,-1,8,1]:Integer, [-1,136,0,-1,8,2]:Integer, [-1,136,0,-1,8,3]:Integer, [-1,136,0,-1,8,4]:Integer, [-1,136,0,-1,8,5]:Integer, [-1,136,0,-1,8,6]:Integer, [-1,136,0,-1,8,7]:Integer, [-1,136,0,-1,8,8]:Pointer, [-1,136,0,-1,16]:Integer, [-1,136,0,-1,17]:Integer, [-1,136,0,-1,18]:Integer, [-1,136,0,-1,19]:Integer, [-1,136,0,-1,20]:Integer, [-1,136,0,-1,21]:Integer, [-1,136,0,-1,22]:Integer, [-1,136,0,-1,23]:Integer, [-1,136,8]:Pointer, [-1,136,8,0]:Integer, [-1,136,8,1]:Integer, [-1,136,8,2]:Integer, [-1,136,8,3]:Integer, [-1,136,8,4]:Integer, [-1,136,8,5]:Integer, [-1,136,8,6]:Integer, [-1,136,8,7]:Integer, [-1,136,8,8]:Pointer, [-1,136,8,8,-1]:Pointer, [-1,136,8,8,-1,0]:Pointer, [-1,136,8,8,-1,8]:Pointer, [-1,136,8,8,-1,16]:Integer, [-1,136,8,8,-1,17]:Integer, [-1,136,8,8,-1,18]:Integer, [-1,136,8,8,-1,19]:Integer, [-1,136,8,8,-1,20]:Integer, [-1,136,8,8,-1,21]:Integer, [-1,136,8,8,-1,22]:Integer, [-1,136,8,8,-1,23]:Integer, [-1,136,16]:Integer, [-1,136,17]:Integer, [-1,136,18]:Integer, [-1,136,19]:Integer, [-1,136,20]:Integer, [-1,136,21]:Integer, [-1,136,22]:Integer, [-1,136,23]:Integer, [-1,144]:Pointer, [-1,144,0]:Pointer, [-1,144,0,0]:Pointer, [-1,144,0,0,-1]:Integer, [-1,144,0,8]:Pointer, [-1,144,0,8,0]:Integer, [-1,144,0,8,1]:Integer, [-1,144,0,8,2]:Integer, [-1,144,0,8,3]:Integer, [-1,144,0,8,4]:Integer, [-1,144,0,8,5]:Integer, [-1,144,0,8,6]:Integer, [-1,144,0,8,7]:Integer, [-1,144,0,8,8]:Pointer, [-1,144,0,8,8,-1]:Integer, [-1,144,0,16]:Integer, [-1,144,0,17]:Integer, [-1,144,0,18]:Integer, [-1,144,0,19]:Integer, [-1,144,0,20]:Integer, [-1,144,0,21]:Integer, [-1,144,0,22]:Integer, [-1,144,0,23]:Integer, [-1,144,8]:Integer, [-1,144,9]:Integer, [-1,144,10]:Integer, [-1,144,11]:Integer, [-1,144,12]:Integer, [-1,144,13]:Integer, [-1,144,14]:Integer, [-1,144,15]:Integer, [-1,152]:Pointer, [-1,152,0]:Pointer, [-1,152,0,-1]:Integer, [-1,152,8]:Pointer, [-1,152,8,0]:Integer, [-1,152,8,1]:Integer, [-1,152,8,2]:Integer, [-1,152,8,3]:Integer, [-1,152,8,4]:Integer, [-1,152,8,5]:Integer, [-1,152,8,6]:Integer, [-1,152,8,7]:Integer, [-1,152,8,8]:Pointer, [-1,152,8,8,-1]:Integer, [-1,152,16]:Integer, [-1,152,17]:Integer, [-1,152,18]:Integer, [-1,152,19]:Integer, [-1,152,20]:Integer, [-1,152,21]:Integer, [-1,152,22]:Integer, [-1,152,23]:Integer, [-1,160]:Pointer, [-1,160,0]:Pointer, [-1,160,0,0]:Pointer, [-1,160,0,0,-1]:Integer, [-1,160,0,8]:Pointer, [-1,160,0,8,0]:Integer, [-1,160,0,8,1]:Integer, [-1,160,0,8,2]:Integer, [-1,160,0,8,3]:Integer, [-1,160,0,8,4]:Integer, [-1,160,0,8,5]:Integer, [-1,160,0,8,6]:Integer, [-1,160,0,8,7]:Integer, [-1,160,0,8,8]:Pointer, [-1,160,0,8,8,-1]:Integer, [-1,160,0,16]:Integer, [-1,160,0,17]:Integer, [-1,160,0,18]:Integer, [-1,160,0,19]:Integer, [-1,160,0,20]:Integer, [-1,160,0,21]:Integer, [-1,160,0,22]:Integer, [-1,160,0,23]:Integer, [-1,160,8]:Integer, [-1,160,9]:Integer, [-1,160,10]:Integer, [-1,160,11]:Integer, [-1,160,12]:Integer, [-1,160,13]:Integer, [-1,160,14]:Integer, [-1,160,15]:Integer, [-1,168]:Pointer, [-1,168,0]:Pointer, [-1,168,0,-1]:Pointer, [-1,168,0,-1,0]:Pointer, [-1,168,0,-1,0,-1]:Integer, [-1,168,0,-1,8]:Pointer, [-1,168,0,-1,8,0]:Integer, [-1,168,0,-1,8,1]:Integer, [-1,168,0,-1,8,2]:Integer, [-1,168,0,-1,8,3]:Integer, [-1,168,0,-1,8,4]:Integer, [-1,168,0,-1,8,5]:Integer, [-1,168,0,-1,8,6]:Integer, [-1,168,0,-1,8,7]:Integer, [-1,168,0,-1,8,8]:Pointer, [-1,168,0,-1,16]:Integer, [-1,168,0,-1,17]:Integer, [-1,168,0,-1,18]:Integer, [-1,168,0,-1,19]:Integer, [-1,168,0,-1,20]:Integer, [-1,168,0,-1,21]:Integer, [-1,168,0,-1,22]:Integer, [-1,168,0,-1,23]:Integer, [-1,168,8]:Pointer, [-1,168,8,0]:Integer, [-1,168,8,1]:Integer, [-1,168,8,2]:Integer, [-1,168,8,3]:Integer, [-1,168,8,4]:Integer, [-1,168,8,5]:Integer, [-1,168,8,6]:Integer, [-1,168,8,7]:Integer, [-1,168,8,8]:Pointer, [-1,168,8,8,-1]:Pointer, [-1,168,8,8,-1,0]:Pointer, [-1,168,8,8,-1,8]:Pointer, [-1,168,8,8,-1,16]:Integer, [-1,168,8,8,-1,17]:Integer, [-1,168,8,8,-1,18]:Integer, [-1,168,8,8,-1,19]:Integer, [-1,168,8,8,-1,20]:Integer, [-1,168,8,8,-1,21]:Integer, [-1,168,8,8,-1,22]:Integer, [-1,168,8,8,-1,23]:Integer, [-1,168,16]:Integer, [-1,168,17]:Integer, [-1,168,18]:Integer, [-1,168,19]:Integer, [-1,168,20]:Integer, [-1,168,21]:Integer, [-1,168,22]:Integer, [-1,168,23]:Integer, [-1,176]:Pointer, [-1,176,0]:Pointer, [-1,176,0,0]:Pointer, [-1,176,0,0,-1]:Integer, [-1,176,0,8]:Pointer, [-1,176,0,8,0]:Integer, [-1,176,0,8,1]:Integer, [-1,176,0,8,2]:Integer, [-1,176,0,8,3]:Integer, [-1,176,0,8,4]:Integer, [-1,176,0,8,5]:Integer, [-1,176,0,8,6]:Integer, [-1,176,0,8,7]:Integer, [-1,176,0,8,8]:Pointer, [-1,176,0,8,8,-1]:Integer, [-1,176,0,16]:Integer, [-1,176,0,17]:Integer, [-1,176,0,18]:Integer, [-1,176,0,19]:Integer, [-1,176,0,20]:Integer, [-1,176,0,21]:Integer, [-1,176,0,22]:Integer, [-1,176,0,23]:Integer, [-1,176,8]:Integer, [-1,176,9]:Integer, [-1,176,10]:Integer, [-1,176,11]:Integer, [-1,176,12]:Integer, [-1,176,13]:Integer, [-1,176,14]:Integer, [-1,176,15]:Integer, [-1,184]:Pointer, [-1,184,0]:Pointer, [-1,184,0,-1]:Integer, [-1,184,8]:Pointer, [-1,184,8,0]:Integer, [-1,184,8,1]:Integer, [-1,184,8,2]:Integer, [-1,184,8,3]:Integer, [-1,184,8,4]:Integer, [-1,184,8,5]:Integer, [-1,184,8,6]:Integer, [-1,184,8,7]:Integer, [-1,184,8,8]:Pointer, [-1,184,8,8,-1]:Integer, [-1,184,16]:Integer, [-1,184,17]:Integer, [-1,184,18]:Integer, [-1,184,19]:Integer, [-1,184,20]:Integer, [-1,184,21]:Integer, [-1,184,22]:Integer, [-1,184,23]:Integer, [-1,192]:Pointer, [-1,192,0]:Pointer, [-1,192,0,0]:Pointer, [-1,192,0,0,-1]:Integer, [-1,192,0,8]:Pointer, [-1,192,0,8,0]:Integer, [-1,192,0,8,1]:Integer, [-1,192,0,8,2]:Integer, [-1,192,0,8,3]:Integer, [-1,192,0,8,4]:Integer, [-1,192,0,8,5]:Integer, [-1,192,0,8,6]:Integer, [-1,192,0,8,7]:Integer, [-1,192,0,8,8]:Pointer, [-1,192,0,8,8,-1]:Integer, [-1,192,0,16]:Integer, [-1,192,0,17]:Integer, [-1,192,0,18]:Integer, [-1,192,0,19]:Integer, [-1,192,0,20]:Integer, [-1,192,0,21]:Integer, [-1,192,0,22]:Integer, [-1,192,0,23]:Integer, [-1,192,8]:Integer, [-1,192,9]:Integer, [-1,192,10]:Integer, [-1,192,11]:Integer, [-1,192,12]:Integer, [-1,192,13]:Integer, [-1,192,14]:Integer, [-1,192,15]:Integer, [-1,200]:Pointer, [-1,200,0]:Pointer, [-1,200,0,-1]:Integer, [-1,200,8]:Pointer, [-1,200,8,0]:Integer, [-1,200,8,1]:Integer, [-1,200,8,2]:Integer, [-1,200,8,3]:Integer, [-1,200,8,4]:Integer, [-1,200,8,5]:Integer, [-1,200,8,6]:Integer, [-1,200,8,7]:Integer, [-1,200,8,8]:Pointer, [-1,200,8,8,-1]:Integer, [-1,200,16]:Integer, [-1,200,17]:Integer, [-1,200,18]:Integer, [-1,200,19]:Integer, [-1,200,20]:Integer, [-1,200,21]:Integer, [-1,200,22]:Integer, [-1,200,23]:Integer, [-1,208]:Pointer, [-1,208,0]:Pointer, [-1,208,0,0]:Pointer, [-1,208,0,0,-1]:Integer, [-1,208,0,8]:Pointer, [-1,208,0,8,0]:Integer, [-1,208,0,8,1]:Integer, [-1,208,0,8,2]:Integer, [-1,208,0,8,3]:Integer, [-1,208,0,8,4]:Integer, [-1,208,0,8,5]:Integer, [-1,208,0,8,6]:Integer, [-1,208,0,8,7]:Integer, [-1,208,0,8,8]:Pointer, [-1,208,0,8,8,-1]:Integer, [-1,208,0,16]:Integer, [-1,208,0,17]:Integer, [-1,208,0,18]:Integer, [-1,208,0,19]:Integer, [-1,208,0,20]:Integer, [-1,208,0,21]:Integer, [-1,208,0,22]:Integer, [-1,208,0,23]:Integer, [-1,208,8]:Integer, [-1,208,9]:Integer, [-1,208,10]:Integer, [-1,208,11]:Integer, [-1,208,12]:Integer, [-1,208,13]:Integer, [-1,208,14]:Integer, [-1,208,15]:Integer, [-1,216]:Pointer, [-1,216,0]:Pointer, [-1,216,8]:Pointer, [-1,216,8,0]:Integer, [-1,216,8,1]:Integer, [-1,216,8,2]:Integer, [-1,216,8,3]:Integer, [-1,216,8,4]:Integer, [-1,216,8,5]:Integer, [-1,216,8,6]:Integer, [-1,216,8,7]:Integer, [-1,216,8,8]:Pointer, [-1,216,16]:Integer, [-1,216,17]:Integer, [-1,216,18]:Integer, [-1,216,19]:Integer, [-1,216,20]:Integer, [-1,216,21]:Integer, [-1,216,22]:Integer, [-1,216,23]:Integer, [-1,224]:Pointer, [-1,224,0]:Pointer, [-1,224,0,0]:Pointer, [-1,224,0,0,-1]:Integer, [-1,224,0,8]:Pointer, [-1,224,0,8,0]:Integer, [-1,224,0,8,1]:Integer, [-1,224,0,8,2]:Integer, [-1,224,0,8,3]:Integer, [-1,224,0,8,4]:Integer, [-1,224,0,8,5]:Integer, [-1,224,0,8,6]:Integer, [-1,224,0,8,7]:Integer, [-1,224,0,8,8]:Pointer, [-1,224,0,8,8,-1]:Integer, [-1,224,0,16]:Integer, [-1,224,0,17]:Integer, [-1,224,0,18]:Integer, [-1,224,0,19]:Integer, [-1,224,0,20]:Integer, [-1,224,0,21]:Integer, [-1,224,0,22]:Integer, [-1,224,0,23]:Integer, [-1,224,8]:Integer, [-1,224,9]:Integer, [-1,224,10]:Integer, [-1,224,11]:Integer, [-1,224,12]:Integer, [-1,224,13]:Integer, [-1,224,14]:Integer, [-1,224,15]:Integer, [-1,232]:Pointer, [-1,232,0]:Pointer, [-1,232,8]:Pointer, [-1,232,8,0]:Integer, [-1,232,8,1]:Integer, [-1,232,8,2]:Integer, [-1,232,8,3]:Integer, [-1,232,8,4]:Integer, [-1,232,8,5]:Integer, [-1,232,8,6]:Integer, [-1,232,8,7]:Integer, [-1,232,8,8]:Pointer, [-1,232,16]:Integer, [-1,232,17]:Integer, [-1,232,18]:Integer, [-1,232,19]:Integer, [-1,232,20]:Integer, [-1,232,21]:Integer, [-1,232,22]:Integer, [-1,232,23]:Integer, [-1,240]:Pointer, [-1,240,0]:Pointer, [-1,240,0,0]:Pointer, [-1,240,0,0,-1]:Integer, [-1,240,0,8]:Pointer, [-1,240,0,8,0]:Integer, [-1,240,0,8,1]:Integer, [-1,240,0,8,2]:Integer, [-1,240,0,8,3]:Integer, [-1,240,0,8,4]:Integer, [-1,240,0,8,5]:Integer, [-1,240,0,8,6]:Integer, [-1,240,0,8,7]:Integer, [-1,240,0,8,8]:Pointer, [-1,240,0,8,8,-1]:Integer, [-1,240,0,16]:Integer, [-1,240,0,17]:Integer, [-1,240,0,18]:Integer, [-1,240,0,19]:Integer, [-1,240,0,20]:Integer, [-1,240,0,21]:Integer, [-1,240,0,22]:Integer, [-1,240,0,23]:Integer, [-1,240,8]:Integer, [-1,240,9]:Integer, [-1,240,10]:Integer, [-1,240,11]:Integer, [-1,240,12]:Integer, [-1,240,13]:Integer, [-1,240,14]:Integer, [-1,240,15]:Integer, [-1,248]:Pointer, [-1,248,0]:Pointer, [-1,248,8]:Pointer, [-1,248,8,0]:Integer, [-1,248,8,1]:Integer, [-1,248,8,2]:Integer, [-1,248,8,3]:Integer, [-1,248,8,4]:Integer, [-1,248,8,5]:Integer, [-1,248,8,6]:Integer, [-1,248,8,7]:Integer, [-1,248,8,8]:Pointer, [-1,248,16]:Integer, [-1,248,17]:Integer, [-1,248,18]:Integer, [-1,248,19]:Integer, [-1,248,20]:Integer, [-1,248,21]:Integer, [-1,248,22]:Integer, [-1,248,23]:Integer, [-1,256]:Pointer, [-1,256,0]:Pointer, [-1,256,0,0]:Pointer, [-1,256,0,0,-1]:Integer, [-1,256,0,8]:Pointer, [-1,256,0,8,0]:Integer, [-1,256,0,8,1]:Integer, [-1,256,0,8,2]:Integer, [-1,256,0,8,3]:Integer, [-1,256,0,8,4]:Integer, [-1,256,0,8,5]:Integer, [-1,256,0,8,6]:Integer, [-1,256,0,8,7]:Integer, [-1,256,0,8,8]:Pointer, [-1,256,0,8,8,-1]:Integer, [-1,256,0,16]:Integer, [-1,256,0,17]:Integer, [-1,256,0,18]:Integer, [-1,256,0,19]:Integer, [-1,256,0,20]:Integer, [-1,256,0,21]:Integer, [-1,256,0,22]:Integer, [-1,256,0,23]:Integer, [-1,256,8]:Integer, [-1,256,9]:Integer, [-1,256,10]:Integer, [-1,256,11]:Integer, [-1,256,12]:Integer, [-1,256,13]:Integer, [-1,256,14]:Integer, [-1,256,15]:Integer, [-1,264]:Pointer, [-1,264,0]:Pointer, [-1,264,8]:Pointer, [-1,264,8,0]:Integer, [-1,264,8,1]:Integer, [-1,264,8,2]:Integer, [-1,264,8,3]:Integer, [-1,264,8,4]:Integer, [-1,264,8,5]:Integer, [-1,264,8,6]:Integer, [-1,264,8,7]:Integer, [-1,264,8,8]:Pointer, [-1,264,16]:Integer, [-1,264,17]:Integer, [-1,264,18]:Integer, [-1,264,19]:Integer, [-1,264,20]:Integer, [-1,264,21]:Integer, [-1,264,22]:Integer, [-1,264,23]:Integer, [-1,272]:Pointer, [-1,272,0]:Pointer, [-1,272,0,0]:Pointer, [-1,272,0,0,-1]:Integer, [-1,272,0,8]:Pointer, [-1,272,0,8,0]:Integer, [-1,272,0,8,1]:Integer, [-1,272,0,8,2]:Integer, [-1,272,0,8,3]:Integer, [-1,272,0,8,4]:Integer, [-1,272,0,8,5]:Integer, [-1,272,0,8,6]:Integer, [-1,272,0,8,7]:Integer, [-1,272,0,8,8]:Pointer, [-1,272,0,8,8,-1]:Integer, [-1,272,0,16]:Integer, [-1,272,0,17]:Integer, [-1,272,0,18]:Integer, [-1,272,0,19]:Integer, [-1,272,0,20]:Integer, [-1,272,0,21]:Integer, [-1,272,0,22]:Integer, [-1,272,0,23]:Integer, [-1,272,8]:Integer, [-1,272,9]:Integer, [-1,272,10]:Integer, [-1,272,11]:Integer, [-1,272,12]:Integer, [-1,272,13]:Integer, [-1,272,14]:Integer, [-1,272,15]:Integer, [-1,280]:Pointer, [-1,280,0]:Pointer, [-1,280,8]:Pointer, [-1,280,8,0]:Integer, [-1,280,8,1]:Integer, [-1,280,8,2]:Integer, [-1,280,8,3]:Integer, [-1,280,8,4]:Integer, [-1,280,8,5]:Integer, [-1,280,8,6]:Integer, [-1,280,8,7]:Integer, [-1,280,8,8]:Pointer, [-1,280,16]:Integer, [-1,280,17]:Integer, [-1,280,18]:Integer, [-1,280,19]:Integer, [-1,280,20]:Integer, [-1,280,21]:Integer, [-1,280,22]:Integer, [-1,280,23]:Integer, [-1,288]:Pointer, [-1,288,0]:Pointer, [-1,288,0,0]:Pointer, [-1,288,0,0,-1]:Integer, [-1,288,0,8]:Pointer, [-1,288,0,8,0]:Integer, [-1,288,0,8,1]:Integer, [-1,288,0,8,2]:Integer, [-1,288,0,8,3]:Integer, [-1,288,0,8,4]:Integer, [-1,288,0,8,5]:Integer, [-1,288,0,8,6]:Integer, [-1,288,0,8,7]:Integer, [-1,288,0,8,8]:Pointer, [-1,288,0,8,8,-1]:Integer, [-1,288,0,16]:Integer, [-1,288,0,17]:Integer, [-1,288,0,18]:Integer, [-1,288,0,19]:Integer, [-1,288,0,20]:Integer, [-1,288,0,21]:Integer, [-1,288,0,22]:Integer, [-1,288,0,23]:Integer, [-1,288,8]:Integer, [-1,288,9]:Integer, [-1,288,10]:Integer, [-1,288,11]:Integer, [-1,288,12]:Integer, [-1,288,13]:Integer, [-1,288,14]:Integer, [-1,288,15]:Integer, [-1,296]:Pointer, [-1,296,0]:Pointer, [-1,296,8]:Pointer, [-1,296,8,0]:Integer, [-1,296,8,1]:Integer, [-1,296,8,2]:Integer, [-1,296,8,3]:Integer, [-1,296,8,4]:Integer, [-1,296,8,5]:Integer, [-1,296,8,6]:Integer, [-1,296,8,7]:Integer, [-1,296,8,8]:Pointer, [-1,296,16]:Integer, [-1,296,17]:Integer, [-1,296,18]:Integer, [-1,296,19]:Integer, [-1,296,20]:Integer, [-1,296,21]:Integer, [-1,296,22]:Integer, [-1,296,23]:Integer, [-1,304]:Pointer, [-1,304,0]:Pointer, [-1,304,0,0]:Pointer, [-1,304,0,0,-1]:Integer, [-1,304,0,8]:Pointer, [-1,304,0,8,0]:Integer, [-1,304,0,8,1]:Integer, [-1,304,0,8,2]:Integer, [-1,304,0,8,3]:Integer, [-1,304,0,8,4]:Integer, [-1,304,0,8,5]:Integer, [-1,304,0,8,6]:Integer, [-1,304,0,8,7]:Integer, [-1,304,0,8,8]:Pointer, [-1,304,0,8,8,-1]:Integer, [-1,304,0,16]:Integer, [-1,304,0,17]:Integer, [-1,304,0,18]:Integer, [-1,304,0,19]:Integer, [-1,304,0,20]:Integer, [-1,304,0,21]:Integer, [-1,304,0,22]:Integer, [-1,304,0,23]:Integer, [-1,304,8]:Integer, [-1,304,9]:Integer, [-1,304,10]:Integer, [-1,304,11]:Integer, [-1,304,12]:Integer, [-1,304,13]:Integer, [-1,304,14]:Integer, [-1,304,15]:Integer}, intvals: {}
i64 %1: {[-1]:Integer}, intvals: {}
  %current_task1151 = getelementptr inbounds {}**, {}*** %pgcstack, i64 -14: {}, intvals: {}
  %2 = bitcast {}*** %current_task1151 to {}*: {}, intvals: {}
  %ptls_field152 = getelementptr inbounds {}**, {}*** %pgcstack, i64 2: {}, intvals: {}
  %3 = bitcast {}*** %ptls_field152 to i64***: {[-1]:Pointer}, intvals: {}
  %ptls_load153154 = load i64**, i64*** %3, align 8, !tbaa !62: {}, intvals: {}
  %4 = getelementptr inbounds i64*, i64** %ptls_load153154, i64 2: {[-1]:Pointer}, intvals: {}
  %safepoint = load i64*, i64** %4, align 8, !tbaa !66: {}, intvals: {}
  %5 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 0, i32 0, i64 1, !dbg !69: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,0]:Pointer, [-1,0,0,0,-1]:Integer, [-1,0,0,8]:Pointer, [-1,0,0,8,0]:Integer, [-1,0,0,8,1]:Integer, [-1,0,0,8,2]:Integer, [-1,0,0,8,3]:Integer, [-1,0,0,8,4]:Integer, [-1,0,0,8,5]:Integer, [-1,0,0,8,6]:Integer, [-1,0,0,8,7]:Integer, [-1,0,0,8,8]:Pointer, [-1,0,0,8,8,-1]:Integer, [-1,0,0,16]:Integer, [-1,0,0,17]:Integer, [-1,0,0,18]:Integer, [-1,0,0,19]:Integer, [-1,0,0,20]:Integer, [-1,0,0,21]:Integer, [-1,0,0,22]:Integer, [-1,0,0,23]:Integer, [-1,0,8]:Integer, [-1,0,9]:Integer, [-1,0,10]:Integer, [-1,0,11]:Integer, [-1,0,12]:Integer, [-1,0,13]:Integer, [-1,0,14]:Integer, [-1,0,15]:Integer}, intvals: {}
  %6 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %5 unordered, align 8, !dbg !69, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !dereferenceable !94, !align !95, !enzyme_type !96, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_BitSet !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %42 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %41 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !162, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %7 = bitcast {} addrspace(10)* %6 to {} addrspace(10)* addrspace(10)*, !dbg !102, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %8 = addrspacecast {} addrspace(10)* addrspace(10)* %7 to {} addrspace(10)* addrspace(11)*, !dbg !102, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %9 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %8 unordered, align 8, !dbg !102, !tbaa !109, !alias.scope !113, !noalias !114, !nonnull !0, !dereferenceable !115, !align !95, !enzyme_type !116, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUInt64\7D !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %10 = bitcast {} addrspace(10)* %6 to i8 addrspace(10)*, !dbg !102, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %11 = addrspacecast i8 addrspace(10)* %10 to i8 addrspace(11)*, !dbg !102, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %13 = bitcast i8 addrspace(11)* %12 to i64 addrspace(11)*, !dbg !102: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer}, intvals: {}
  %12 = getelementptr inbounds i8, i8 addrspace(11)* %11, i64 8, !dbg !102: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer}, intvals: {}
  %14 = load i64, i64 addrspace(11)* %13, align 8, !dbg !102, !tbaa !109, !alias.scope !113, !noalias !114, !enzyme_type !117, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0: {[-1]:Integer}, intvals: {}
  %15 = ashr i64 %1, 6, !dbg !118: {[-1]:Integer}, intvals: {}
  %16 = sub i64 %15, %14, !dbg !127: {[-1]:Integer}, intvals: {}
  %17 = icmp ult i64 %16, 9223372036854775807, !dbg !129: {[-1]:Integer}, intvals: {}
  %18 = add i64 %16, 1, !dbg !131: {[-1]:Integer}, intvals: {}
  %19 = bitcast {} addrspace(10)* %9 to i8 addrspace(10)*, !dbg !131, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %20 = addrspacecast i8 addrspace(10)* %19 to i8 addrspace(11)*, !dbg !131, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %21 = getelementptr inbounds i8, i8 addrspace(11)* %20, i64 16, !dbg !131: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer}, intvals: {}
  %22 = bitcast i8 addrspace(11)* %21 to i64 addrspace(11)*, !dbg !131: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer}, intvals: {}
  %23 = load i64, i64 addrspace(11)* %22, align 8, !dbg !131, !enzyme_type !117, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0: {[-1]:Integer}, intvals: {}
  %24 = icmp sle i64 %18, %23, !dbg !131: {[-1]:Integer}, intvals: {}
  %value_phi.off0 = select i1 %17, i1 %24, i1 false, !dbg !131: {[-1]:Integer}, intvals: {}
  %25 = bitcast {} addrspace(10)* %9 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !132, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %26 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %25 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !132, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %27 = bitcast {} addrspace(10)* %9 to {} addrspace(10)** addrspace(10)*, !dbg !132, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %28 = addrspacecast {} addrspace(10)** addrspace(10)* %27 to {} addrspace(10)** addrspace(11)*, !dbg !132, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %29 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %28, align 8, !dbg !132, !tbaa !136, !alias.scope !139, !noalias !140, !enzyme_type !141, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUInt64\7D !0, !enzyme_nocache !0: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %33 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %32, i64 %16, !dbg !132: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %30 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %26, i64 0, i32 1, !dbg !132: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Integer, [-1,0,1]:Integer, [-1,0,2]:Integer, [-1,0,3]:Integer, [-1,0,4]:Integer, [-1,0,5]:Integer, [-1,0,6]:Integer, [-1,0,7]:Integer, [-1,0,8]:Pointer, [-1,0,8,-1]:Integer}, intvals: {}
  %31 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %30, align 8, !dbg !132, !tbaa !136, !alias.scope !139, !noalias !140, !dereferenceable_or_null !94, !align !95, !enzyme_type !142, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUInt64\7D !0: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,-1]:Integer}, intvals: {}
  %32 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %31, {} addrspace(10)** %29) #74, !dbg !132: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %34 = bitcast {} addrspace(10)* addrspace(13)* %33 to i64 addrspace(13)*, !dbg !132: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %35 = load i64, i64 addrspace(13)* %34, align 8, !dbg !132, !tbaa !143, !alias.scope !113, !noalias !114: {[-1]:Integer}, intvals: {}
  %36 = and i64 %1, 63, !dbg !145: {[-1]:Integer}, intvals: {}
  %37 = shl nuw i64 1, %36, !dbg !149: {[-1]:Integer}, intvals: {}
  %38 = and i64 %35, %37, !dbg !152: {[-1]:Integer}, intvals: {}
  %.not182 = icmp eq i64 %38, 0, !dbg !153: {[-1]:Integer}, intvals: {}
  %39 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 0, i32 0, i64 0, !dbg !160: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer}, intvals: {}
  %40 = bitcast {} addrspace(10)* addrspace(11)* %39 to { i8*, {} addrspace(10)* } addrspace(10)* addrspace(11)*, !dbg !160: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer}, intvals: {}
  %41 = load atomic { i8*, {} addrspace(10)* } addrspace(10)*, { i8*, {} addrspace(10)* } addrspace(10)* addrspace(11)* %40 unordered, align 8, !dbg !160, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !dereferenceable !115, !align !95, !enzyme_type !116, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BInt64\7D !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %43 = bitcast { i8*, {} addrspace(10)* } addrspace(10)* %41 to {} addrspace(10)** addrspace(10)*, !dbg !162, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %44 = addrspacecast {} addrspace(10)** addrspace(10)* %43 to {} addrspace(10)** addrspace(11)*, !dbg !162, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %45 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %44, align 8, !dbg !162, !tbaa !136, !alias.scope !139, !noalias !140, !enzyme_type !141, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BInt64\7D !0, !enzyme_nocache !0: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %50 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %49, i64 %48, !dbg !162: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %47 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %46, align 8, !dbg !162, !tbaa !136, !alias.scope !139, !noalias !140, !dereferenceable_or_null !94, !align !95, !enzyme_type !142, !enzyme_inactive !0, !enzymejl_source_type_Memory\7BInt64\7D !0, !enzymejl_byref_MUT_REF !0: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,-1]:Integer}, intvals: {}
  %46 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %42, i64 0, i32 1, !dbg !162: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Integer, [-1,0,1]:Integer, [-1,0,2]:Integer, [-1,0,3]:Integer, [-1,0,4]:Integer, [-1,0,5]:Integer, [-1,0,6]:Integer, [-1,0,7]:Integer, [-1,0,8]:Pointer, [-1,0,8,-1]:Integer}, intvals: {}
  %48 = add i64 %1, -1, !dbg !162: {[-1]:Integer}, intvals: {}
  %51 = bitcast {} addrspace(10)* addrspace(13)* %50 to i64 addrspace(13)*, !dbg !162: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %49 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %47, {} addrspace(10)** %45) #74, !dbg !162: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %52 = load i64, i64 addrspace(13)* %51, align 8, !dbg !162, !tbaa !143, !alias.scope !113, !noalias !114: {[-1]:Integer}, intvals: {}
  %value_phi6 = phi i64 [ 0, %L44 ], [ %52, %L68 ], [ 0, %top ]: {[-1]:Integer}, intvals: {0,}
  %134 = addrspacecast {} addrspace(10)** addrspace(10)* %133 to {} addrspace(10)** addrspace(11)*, !dbg !132, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %53 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 8, i32 0, !dbg !163: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,0]:Pointer, [-1,8,0,0,-1]:Integer, [-1,8,0,8]:Pointer, [-1,8,0,8,0]:Integer, [-1,8,0,8,1]:Integer, [-1,8,0,8,2]:Integer, [-1,8,0,8,3]:Integer, [-1,8,0,8,4]:Integer, [-1,8,0,8,5]:Integer, [-1,8,0,8,6]:Integer, [-1,8,0,8,7]:Integer, [-1,8,0,8,8]:Pointer, [-1,8,0,8,8,-1]:Integer, [-1,8,0,16]:Integer, [-1,8,0,17]:Integer, [-1,8,0,18]:Integer, [-1,8,0,19]:Integer, [-1,8,0,20]:Integer, [-1,8,0,21]:Integer, [-1,8,0,22]:Integer, [-1,8,0,23]:Integer, [-1,8,8]:Integer, [-1,8,9]:Integer, [-1,8,10]:Integer, [-1,8,11]:Integer, [-1,8,12]:Integer, [-1,8,13]:Integer, [-1,8,14]:Integer, [-1,8,15]:Integer}, intvals: {}
  %54 = getelementptr inbounds [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }], [1 x { [7 x {} addrspace(10)*], { { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] }, { [2 x {} addrspace(10)*] } } }] addrspace(11)* %0, i64 0, i64 0, i32 1, i32 8, i32 0, i64 1, !dbg !170: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,0]:Pointer, [-1,0,0,0,-1]:Integer, [-1,0,0,8]:Pointer, [-1,0,0,8,0]:Integer, [-1,0,0,8,1]:Integer, [-1,0,0,8,2]:Integer, [-1,0,0,8,3]:Integer, [-1,0,0,8,4]:Integer, [-1,0,0,8,5]:Integer, [-1,0,0,8,6]:Integer, [-1,0,0,8,7]:Integer, [-1,0,0,8,8]:Pointer, [-1,0,0,8,8,-1]:Integer, [-1,0,0,16]:Integer, [-1,0,0,17]:Integer, [-1,0,0,18]:Integer, [-1,0,0,19]:Integer, [-1,0,0,20]:Integer, [-1,0,0,21]:Integer, [-1,0,0,22]:Integer, [-1,0,0,23]:Integer, [-1,0,8]:Integer, [-1,0,9]:Integer, [-1,0,10]:Integer, [-1,0,11]:Integer, [-1,0,12]:Integer, [-1,0,13]:Integer, [-1,0,14]:Integer, [-1,0,15]:Integer}, intvals: {}
  %55 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %54 unordered, align 8, !dbg !170, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !dereferenceable !94, !align !95, !enzyme_type !96, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_BitSet !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %56 = bitcast {} addrspace(10)* %55 to {} addrspace(10)* addrspace(10)*, !dbg !173, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %57 = addrspacecast {} addrspace(10)* addrspace(10)* %56 to {} addrspace(10)* addrspace(11)*, !dbg !173, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %58 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %57 unordered, align 8, !dbg !173, !tbaa !109, !alias.scope !113, !noalias !114, !nonnull !0, !dereferenceable !115, !align !95, !enzyme_type !116, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUInt64\7D !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %59 = bitcast {} addrspace(10)* %55 to i8 addrspace(10)*, !dbg !173, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %60 = addrspacecast i8 addrspace(10)* %59 to i8 addrspace(11)*, !dbg !173, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %62 = bitcast i8 addrspace(11)* %61 to i64 addrspace(11)*, !dbg !173: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer}, intvals: {}
  %61 = getelementptr inbounds i8, i8 addrspace(11)* %60, i64 8, !dbg !173: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer}, intvals: {}
  %63 = load i64, i64 addrspace(11)* %62, align 8, !dbg !173, !tbaa !109, !alias.scope !113, !noalias !114, !enzyme_type !117, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0: {[-1]:Integer}, intvals: {}
  %70 = getelementptr inbounds i8, i8 addrspace(11)* %69, i64 16, !dbg !182: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer}, intvals: {}
  %64 = ashr i64 %value_phi6, 6, !dbg !176: {[-1]:Integer}, intvals: {0,}
  %65 = sub i64 %64, %63, !dbg !180: {[-1]:Integer}, intvals: {}
  %66 = icmp ult i64 %65, 9223372036854775807, !dbg !181: {[-1]:Integer}, intvals: {}
  %67 = add i64 %65, 1, !dbg !182: {[-1]:Integer}, intvals: {}
  %68 = bitcast {} addrspace(10)* %58 to i8 addrspace(10)*, !dbg !182, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %69 = addrspacecast i8 addrspace(10)* %68 to i8 addrspace(11)*, !dbg !182, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %71 = bitcast i8 addrspace(11)* %70 to i64 addrspace(11)*, !dbg !182: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer}, intvals: {}
  %72 = load i64, i64 addrspace(11)* %71, align 8, !dbg !182, !enzyme_type !117, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0: {[-1]:Integer}, intvals: {}
  %73 = icmp sle i64 %67, %72, !dbg !182: {[-1]:Integer}, intvals: {}
  %value_phi7.off0 = select i1 %66, i1 %73, i1 false, !dbg !182: {[-1]:Integer}, intvals: {}
  %74 = bitcast {} addrspace(10)* %58 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !183, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %75 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %74 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !183, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %76 = bitcast {} addrspace(10)* %58 to {} addrspace(10)** addrspace(10)*, !dbg !183, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %77 = addrspacecast {} addrspace(10)** addrspace(10)* %76 to {} addrspace(10)** addrspace(11)*, !dbg !183, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %78 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %77, align 8, !dbg !183, !tbaa !136, !alias.scope !139, !noalias !140, !enzyme_type !141, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUInt64\7D !0, !enzyme_nocache !0: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %82 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %81, i64 %65, !dbg !183: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %79 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %75, i64 0, i32 1, !dbg !183: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Integer, [-1,0,1]:Integer, [-1,0,2]:Integer, [-1,0,3]:Integer, [-1,0,4]:Integer, [-1,0,5]:Integer, [-1,0,6]:Integer, [-1,0,7]:Integer, [-1,0,8]:Pointer, [-1,0,8,-1]:Integer}, intvals: {}
  %80 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %79, align 8, !dbg !183, !tbaa !136, !alias.scope !139, !noalias !140, !dereferenceable_or_null !94, !align !95, !enzyme_type !142, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUInt64\7D !0: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,-1]:Integer}, intvals: {}
  %81 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %80, {} addrspace(10)** %78) #74, !dbg !183: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %83 = bitcast {} addrspace(10)* addrspace(13)* %82 to i64 addrspace(13)*, !dbg !183: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %84 = load i64, i64 addrspace(13)* %83, align 8, !dbg !183, !tbaa !143, !alias.scope !113, !noalias !114: {[-1]:Integer}, intvals: {}
  %85 = and i64 %value_phi6, 63, !dbg !185: {[-1]:Integer}, intvals: {}
  %86 = shl nuw i64 1, %85, !dbg !187: {[-1]:Integer}, intvals: {}
  %87 = and i64 %84, %86, !dbg !189: {[-1]:Integer}, intvals: {}
  %.not206 = icmp eq i64 %87, 0, !dbg !190: {[-1]:Integer}, intvals: {}
  %88 = bitcast [2 x {} addrspace(10)*] addrspace(11)* %53 to { i64, {} addrspace(10)* } addrspace(10)* addrspace(11)*, !dbg !193: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,0]:Pointer, [-1,8,0,0,-1]:Integer, [-1,8,0,8]:Pointer, [-1,8,0,8,0]:Integer, [-1,8,0,8,1]:Integer, [-1,8,0,8,2]:Integer, [-1,8,0,8,3]:Integer, [-1,8,0,8,4]:Integer, [-1,8,0,8,5]:Integer, [-1,8,0,8,6]:Integer, [-1,8,0,8,7]:Integer, [-1,8,0,8,8]:Pointer, [-1,8,0,8,8,-1]:Integer, [-1,8,0,16]:Integer, [-1,8,0,17]:Integer, [-1,8,0,18]:Integer, [-1,8,0,19]:Integer, [-1,8,0,20]:Integer, [-1,8,0,21]:Integer, [-1,8,0,22]:Integer, [-1,8,0,23]:Integer, [-1,8,8]:Integer, [-1,8,9]:Integer, [-1,8,10]:Integer, [-1,8,11]:Integer, [-1,8,12]:Integer, [-1,8,13]:Integer, [-1,8,14]:Integer, [-1,8,15]:Integer}, intvals: {}
  %89 = load atomic { i64, {} addrspace(10)* } addrspace(10)*, { i64, {} addrspace(10)* } addrspace(10)* addrspace(11)* %88 unordered, align 8, !dbg !193, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !dereferenceable !115, !align !95, !enzyme_type !195, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %106 = getelementptr inbounds [2 x i64], [2 x i64] addrspace(13)* %105, i64 %99, !dbg !199: {[-1]:Pointer}, intvals: {}
  %90 = addrspacecast { i64, {} addrspace(10)* } addrspace(10)* %89 to { i64, {} addrspace(10)* } addrspace(11)*, !dbg !199: {[-1]:Pointer, [-1,0]:Pointer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %91 = getelementptr inbounds { i64, {} addrspace(10)* }, { i64, {} addrspace(10)* } addrspace(11)* %90, i64 0, i32 0, !dbg !199: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %92 = load i64, i64 addrspace(11)* %91, align 8, !dbg !199, !tbaa !136, !alias.scope !139, !noalias !140, !enzyme_type !200, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0: {[-1]:Pointer}, intvals: {}
  %94 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %93, align 8, !dbg !199, !tbaa !136, !alias.scope !139, !noalias !140, !dereferenceable_or_null !94, !align !95, !enzyme_type !201, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer}, intvals: {}
  %93 = getelementptr inbounds { i64, {} addrspace(10)* }, { i64, {} addrspace(10)* } addrspace(11)* %90, i64 0, i32 1, !dbg !199: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Integer, [-1,0,1]:Integer, [-1,0,2]:Integer, [-1,0,3]:Integer, [-1,0,4]:Integer, [-1,0,5]:Integer, [-1,0,6]:Integer, [-1,0,7]:Integer, [-1,0,8]:Pointer}, intvals: {}
  %95 = add i64 %value_phi6, -1, !dbg !199: {[-1]:Integer}, intvals: {-1,}
  %97 = bitcast {} addrspace(10)* %94 to i64 addrspace(10)*, !dbg !199: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer}, intvals: {}
  %96 = add i64 %95, %92, !dbg !199: {[-1]:Pointer}, intvals: {}
  %98 = addrspacecast i64 addrspace(10)* %97 to i64 addrspace(11)*, !dbg !199: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer}, intvals: {}
  %99 = load i64, i64 addrspace(11)* %98, align 8, !dbg !199, !tbaa !202, !range !204, !alias.scope !139, !noalias !140, !enzyme_type !117, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0: {[-1]:Integer}, intvals: {}
  %100 = bitcast {} addrspace(10)* %94 to { i64, {} addrspace(10)** } addrspace(10)*, !dbg !199: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer}, intvals: {}
  %101 = addrspacecast { i64, {} addrspace(10)** } addrspace(10)* %100 to { i64, {} addrspace(10)** } addrspace(11)*, !dbg !199: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer}, intvals: {}
  %102 = getelementptr inbounds { i64, {} addrspace(10)** }, { i64, {} addrspace(10)** } addrspace(11)* %101, i64 0, i32 1, !dbg !199: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %103 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %102, align 8, !dbg !199, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !enzyme_type !200, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0, !enzyme_nocache !0: {[-1]:Pointer}, intvals: {}
  %104 = call "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %94, {} addrspace(10)** %103) #74, !dbg !199: {[-1]:Pointer}, intvals: {}
  %105 = bitcast {} addrspace(10)* addrspace(13)* %104 to [2 x i64] addrspace(13)*, !dbg !199: {[-1]:Pointer}, intvals: {}
  %107 = bitcast [2 x i64] addrspace(13)* %106 to i8 addrspace(13)*, !dbg !199: {[-1]:Pointer}, intvals: {}
  %113 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %112 unordered, align 8, !dbg !69, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !dereferenceable !94, !align !95, !enzyme_type !96, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_BitSet !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer}, intvals: {}
  %116 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %115 unordered, align 8, !dbg !102, !tbaa !109, !alias.scope !113, !noalias !114, !nonnull !0, !dereferenceable !115, !align !95, !enzyme_type !116, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUInt64\7D !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %121 = load i64, i64 addrspace(11)* %120, align 8, !dbg !102, !tbaa !109, !alias.scope !113, !noalias !114, !enzyme_type !117, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0: {[-1]:Integer}, intvals: {}
  %129 = load i64, i64 addrspace(11)* %128, align 8, !dbg !131, !enzyme_type !117, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0: {[-1]:Integer}, intvals: {}
  %207 = load {}*, {}** @jl_nothing, align 8, !dbg !68, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !enzyme_type !200, !enzyme_inactive !0, !enzymejl_byref_BITS_REF !0, !enzymejl_source_type_Nothing !0: {[-1]:Pointer}, intvals: {}
  %135 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %134, align 8, !dbg !132, !tbaa !136, !alias.scope !139, !noalias !140, !enzyme_type !141, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUInt64\7D !0, !enzyme_nocache !0: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %136 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %132, i64 0, i32 1, !dbg !132: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %137 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %136, align 8, !dbg !132, !tbaa !136, !alias.scope !139, !noalias !140, !dereferenceable_or_null !94, !align !95, !enzyme_type !142, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUInt64\7D !0: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,-1]:Integer}, intvals: {}
  %138 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %137, {} addrspace(10)** %135) #74, !dbg !132: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %147 = load atomic { i8*, {} addrspace(10)* } addrspace(10)*, { i8*, {} addrspace(10)* } addrspace(10)* addrspace(11)* %146 unordered, align 8, !dbg !160, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !dereferenceable !115, !align !95, !enzyme_type !116, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BInt64\7D !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %150 = addrspacecast {} addrspace(10)** addrspace(10)* %149 to {} addrspace(10)** addrspace(11)*, !dbg !162, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %151 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %150, align 8, !dbg !162, !tbaa !136, !alias.scope !139, !noalias !140, !enzyme_type !141, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BInt64\7D !0, !enzyme_nocache !0: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %152 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %148, i64 0, i32 1, !dbg !162: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %153 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %152, align 8, !dbg !162, !tbaa !136, !alias.scope !139, !noalias !140, !dereferenceable_or_null !94, !align !95, !enzyme_type !142, !enzyme_inactive !0, !enzymejl_source_type_Memory\7BInt64\7D !0, !enzymejl_byref_MUT_REF !0: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,-1]:Integer}, intvals: {}
  %155 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %153, {} addrspace(10)** %151) #74, !dbg !162: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %167 = addrspacecast {} addrspace(10)** addrspace(10)* %166 to {} addrspace(10)** addrspace(11)*, !dbg !183, !enzyme_inactive !0: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %168 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %167, align 8, !dbg !183, !tbaa !136, !alias.scope !139, !noalias !140, !enzyme_type !141, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUInt64\7D !0, !enzyme_nocache !0: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %169 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %165, i64 0, i32 1, !dbg !183: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %170 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %169, align 8, !dbg !183, !tbaa !136, !alias.scope !139, !noalias !140, !dereferenceable_or_null !94, !align !95, !enzyme_type !142, !enzyme_inactive !0, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUInt64\7D !0: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,-1]:Integer}, intvals: {}
  %171 = call "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %170, {} addrspace(10)** %168) #74, !dbg !183: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %179 = load atomic { i64, {} addrspace(10)* } addrspace(10)*, { i64, {} addrspace(10)* } addrspace(10)* addrspace(11)* %178 unordered, align 8, !dbg !193, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !dereferenceable !115, !align !95, !enzyme_type !195, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}, intvals: {}
  %181 = getelementptr inbounds { i64, {} addrspace(10)* }, { i64, {} addrspace(10)* } addrspace(11)* %180, i64 0, i32 0, !dbg !199: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %182 = load i64, i64 addrspace(11)* %181, align 8, !dbg !199, !tbaa !136, !alias.scope !139, !noalias !140, !enzyme_type !200, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0: {[-1]:Pointer}, intvals: {}
  %184 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %183, align 8, !dbg !199, !tbaa !136, !alias.scope !139, !noalias !140, !dereferenceable_or_null !94, !align !95, !enzyme_type !201, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Memory\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer}, intvals: {}
  %183 = getelementptr inbounds { i64, {} addrspace(10)* }, { i64, {} addrspace(10)* } addrspace(11)* %180, i64 0, i32 1, !dbg !199: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %189 = load i64, i64 addrspace(11)* %188, align 8, !dbg !199, !tbaa !202, !range !204, !alias.scope !139, !noalias !140, !enzyme_type !117, !enzyme_inactive !0, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0: {[-1]:Integer}, intvals: {}
  %193 = load {} addrspace(10)**, {} addrspace(10)** addrspace(11)* %192, align 8, !dbg !199, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !enzyme_type !200, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BUnion\7BAttrVar\2C\20GeometryBasics.Point2d\2C\20Point2\7BFloat64\7D\7D\7D !0, !enzyme_nocache !0: {[-1]:Pointer}, intvals: {}
  %194 = call "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* addrspace(13)* @julia.gc_loaded({} addrspace(10)* %184, {} addrspace(10)** %193) #74, !dbg !199: {[-1]:Pointer}, intvals: {}
  %209 = call noalias nonnull align 8 dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %2, i64 8, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 13368310256 to {}*) to {} addrspace(10)*)) #75, !dbg !68: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %211 = call noalias nonnull align 8 dereferenceable(16) "enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %2, i64 16, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 13568798288 to {}*) to {} addrspace(10)*)) #75, !dbg !68: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %215 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* nonnull @ijl_apply_generic, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 4705057072 to {}*) to {} addrspace(10)*), {} addrspace(10)* %206, {} addrspace(10)* %214) #76, !dbg !68: {[-1]:Pointer}, intvals: {}
  %218 = load {}*, {}** @jl_nothing, align 8, !dbg !68, !tbaa !66, !alias.scope !86, !noalias !89, !nonnull !0, !enzyme_type !200, !enzyme_inactive !0, !enzymejl_byref_BITS_REF !0, !enzymejl_source_type_Nothing !0: {[-1]:Pointer}, intvals: {}
  %220 = call noalias nonnull align 8 dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %2, i64 8, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 13368310256 to {}*) to {} addrspace(10)*)) #75, !dbg !68: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
  %222 = call noalias nonnull align 8 dereferenceable(16) "enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %2, i64 16, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 13568798288 to {}*) to {} addrspace(10)*)) #75, !dbg !68: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
</analysis>

Illegal updateAnalysis prev:{[-1]:Pointer} new: {[-1]:Integer}
val:   %96 = add i64 %95, %92, !dbg !199 origin=  %108 = getelementptr inbounds i8, i8 addrspace(13)* %107, i64 %96, !dbg !199
MethodInstance for (::var"#671#681"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}})(::Int64)


Caused by:
Stacktrace:
 [1] getindex
   @ ./essentials.jl:917
 [2] _get_or_nothing
   @ ~/.julia/packages/ACSets/7LOk7/src/Mappings.jl:79
 [3] get
   @ ~/.julia/packages/ACSets/7LOk7/src/Mappings.jl:92
 [4] get
   @ ~/.julia/packages/ACSets/7LOk7/src/Columns.jl:48
 [5] subpart
   @ ~/.julia/packages/ACSets/7LOk7/src/DenseACSets.jl:522
 [6] getindex
   @ ~/.julia/packages/ACSets/7LOk7/src/ACSetInterface.jl:173
 [7] point
   @ ~/.julia/packages/CombinatorialSpaces/Mc84P/src/SimplicialSets.jl:186
 [8] #671
   @ ~/Desktop/askem/ice_sheet1D_alloc.jl:20

Stacktrace:
  [1] julia_error(cstr::Cstring, val::Ptr{LLVM.API.LLVMOpaqueValue}, errtype::Enzyme.API.ErrorType, data::Ptr{Nothing}, data2::Ptr{LLVM.API.LLVMOpaqueValue}, B::Ptr{LLVM.API.LLVMOpaqueBuilder})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:1543
  [2] EnzymeCreateAugmentedPrimal(logic::Enzyme.Logic, todiff::LLVM.Function, retType::Enzyme.API.CDIFFE_TYPE, constant_args::Vector{Enzyme.API.CDIFFE_TYPE}, TA::Enzyme.TypeAnalysis, returnUsed::Bool, shadowReturnUsed::Bool, typeInfo::Enzyme.FnTypeInfo, uncacheable_args::Vector{Bool}, forceAnonymousTape::Bool, runtimeActivity::Bool, width::Int64, atomicAdd::Bool)
    @ Enzyme.API ~/.julia/packages/Enzyme/RvNgp/src/api.jl:389
  [3] enzyme!(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, mod::LLVM.Module, primalf::LLVM.Function, TT::Type, mode::Enzyme.API.CDerivativeMode, width::Int64, parallel::Bool, actualRetType::Type, wrap::Bool, modifiedBetween::NTuple{5, Bool}, returnPrimal::Bool, expectedTapeType::Type, loweredArgs::Set{Int64}, boxedArgs::Set{Int64})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:4039
  [4] codegen(output::Symbol, job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, toplevel::Bool, strip::Bool, validate::Bool, only_entry::Bool, parent_job::Nothing)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:7264
  [5] codegen
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:6072 [inlined]
  [6] _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:8375
  [7] _thunk
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:8375 [inlined]
  [8] cached_compilation
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:8416 [inlined]
  [9] thunkbase(ctx::LLVM.Context, mi::Core.MethodInstance, ::Val{0x0000000000006b65}, ::Type{Duplicated{ODEFunction{true, SciMLBase.FullSpecialize, var"#f#689"{var"#678#688"{SparseMatrixCSC{Float64, Int64}}, Decapodes.var"#37#38"{SparseMatrixCSC{Float64, Int32}}, Decapodes.var"#15#16"{SparseMatrixCSC{Int8, Int32}}, var"#670#680"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}}, var"#677#687"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}}}, ::Type{Const{Nothing}}, tt::Type{Tuple{Duplicated{ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}}, Duplicated{ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}}, Duplicated{ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(n = 1, stress_ρ = 2, stress_g = 3, stress_A = 4:12)}}}}, Active{Float64}}}, ::Val{Enzyme.API.DEM_ReverseModePrimal}, ::Val{1}, ::Val{(true, true, true, true, true)}, ::Val{true}, ::Val{false}, ::Type{FFIABI}, ::Val{false}, ::Val{false})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:8548
 [10] #s2104#19135
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:8685 [inlined]
 [11] var"#s2104#19135"(FA::Any, A::Any, TT::Any, Mode::Any, ModifiedBetween::Any, width::Any, ReturnPrimal::Any, ShadowInit::Any, World::Any, ABI::Any, ErrIfFuncWritten::Any, RuntimeActivity::Any, ::Any, ::Any, ::Any, ::Any, tt::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)
    @ Enzyme.Compiler ./none:0
 [12] (::Core.GeneratedFunctionStub)(::UInt64, ::LineNumberNode, ::Any, ::Vararg{Any})
    @ Core ./boot.jl:707
 [13] runtime_generic_augfwd(activity::Type{Val{(true, true, true, true, true)}}, runtimeActivity::Val{false}, width::Val{1}, ModifiedBetween::Val{(true, true, true, true, true)}, RT::Val{@NamedTuple{1, 2, 3}}, f::ODEFunction{true, SciMLBase.FullSpecialize, var"#f#689"{var"#678#688"{SparseMatrixCSC{Float64, Int64}}, Decapodes.var"#37#38"{SparseMatrixCSC{Float64, Int32}}, Decapodes.var"#15#16"{SparseMatrixCSC{Int8, Int32}}, var"#670#680"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}}, var"#677#687"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, df::ODEFunction{true, SciMLBase.FullSpecialize, var"#f#689"{var"#678#688"{SparseMatrixCSC{Float64, Int64}}, Decapodes.var"#37#38"{SparseMatrixCSC{Float64, Int32}}, Decapodes.var"#15#16"{SparseMatrixCSC{Int8, Int32}}, var"#670#680"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}}, var"#677#687"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, primal_1::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}, shadow_1_1::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}, primal_2::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}, shadow_2_1::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}, primal_3::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(n = 1, stress_ρ = 2, stress_g = 3, stress_A = 4:12)}}}, shadow_3_1::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(n = 1, stress_ρ = 2, stress_g = 3, stress_A = 4:12)}}}, primal_4::Float64, shadow_4_1::Base.RefValue{Float64})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/RvNgp/src/rules/jitrules.jl:468
 [14] steploss
    @ ~/Desktop/askem/mwe.jl:139 [inlined]
 [15] steploss
    @ ~/Desktop/askem/mwe.jl:0 [inlined]
 [16] diffejulia_steploss_396458_inner_1wrap
    @ ~/Desktop/askem/mwe.jl:0
 [17] macro expansion
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:8305 [inlined]
 [18] enzyme_call
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:7868 [inlined]
 [19] CombinedAdjointThunk
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:7641 [inlined]
 [20] autodiff
    @ ~/.julia/packages/Enzyme/RvNgp/src/Enzyme.jl:491 [inlined]
 [21] autodiff
    @ ~/.julia/packages/Enzyme/RvNgp/src/Enzyme.jl:537 [inlined]
 [22] autodiff(::ReverseMode{false, false, FFIABI, false, false}, ::typeof(steploss), ::Duplicated{ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}}, ::Duplicated{ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}})
    @ Enzyme ~/.julia/packages/Enzyme/RvNgp/src/Enzyme.jl:504
 [23] top-level scope
    @ ~/Desktop/askem/mwe.jl:148
 [24] eval
    @ ./boot.jl:430 [inlined]
 [25] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2643
 [26] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Base ./essentials.jl:1055
 [27] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base ./essentials.jl:1052
 [28] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:271
 [29] (::VSCodeServer.var"#69#74"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:181
 [30] withpath(f::VSCodeServer.var"#69#74"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/repl.jl:276
 [31] (::VSCodeServer.var"#68#73"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:179
 [32] hideprompt(f::VSCodeServer.var"#68#73"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/repl.jl:38
 [33] #67
    @ ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:150 [inlined]
 [34] with_logstate(f::VSCodeServer.var"#67#72"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, logstate::Base.CoreLogging.LogState)
    @ Base.CoreLogging ./logging/logging.jl:522
 [35] with_logger
    @ ./logging/logging.jl:632 [inlined]
 [36] (::VSCodeServer.var"#66#71"{VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:263
 [37] #invokelatest#2
    @ ./essentials.jl:1055 [inlined]
 [38] invokelatest(::Any)
    @ Base ./essentials.jl:1052
 [39] (::VSCodeServer.var"#64#65")()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:34
in expression starting at /Users/chrisrackauckas/Desktop/askem/mwe.jl:148

@ChrisRackauckas
Copy link
Contributor

More direct:

using Catlab
using Catlab.Graphics
using CombinatorialSpaces
using Decapodes
using ComponentArrays
using ForwardDiff
using Zygote
using SciMLSensitivity

# External Dependencies
using MLStyle
using MultiScaleArrays
using LinearAlgebra
using OrdinaryDiffEq
using JLD2
using SparseArrays
using Statistics
using GeometryBasics: Point2, Point3
Point2D = Point2{Float64};
Point3D = Point3{Float64};

using DiagrammaticEquations
using DiagrammaticEquations.Deca


halfar_eq2 = @decapode begin
    h::Form0
    Γ::Form1
    n::Constant== ∂ₜ(h)
    ḣ == (, d, )(Γ * d(h) * avg₀₁(mag((d(h)))^(n - 1)) * avg₀₁(h^(n + 2)))
end

glens_law = @decapode begin
    Γ::Form1
    (A, ρ, g, n)::Constant

    Γ == (2.0 / (n + 2.0)) * A ** g)^n
end

@info("Decapodes Defined")

ice_dynamics_composition_diagram = @relation () begin
    dynamics(Γ, n)
    stress(Γ, n)
end

ice_dynamics_cospan = oapply(ice_dynamics_composition_diagram,
    [Open(halfar_eq2, [, :n]),
        Open(glens_law, [, :n])])
ice_dynamics = apex(ice_dynamics_cospan)
ice_dynamics1D = expand_operators(ice_dynamics)
infer_types!(ice_dynamics1D, op1_inf_rules_1D, op2_inf_rules_1D)
resolve_overloads!(ice_dynamics1D, op1_res_rules_1D, op2_res_rules_1D)

s_prime = EmbeddedDeltaSet1D{Bool,Point2D}()
add_vertices!(s_prime, 10, point=Point2D.(range(-2.0, 2.0, length= 10), 0.0))
add_edges!(s_prime, 1:nv(s_prime)-1, 2:nv(s_prime))
orient!(s_prime)
s = EmbeddedDeltaDualComplex1D{Bool,Float64,Point2D}(s_prime)
subdivide_duals!(s, Circumcenter())


function generate(sd, my_symbol; hodge=GeometricHodge())
    op = @match my_symbol begin
        :♯ => x -> begin
            # This is an implementation of the "sharp" operator from the exterior
            # calculus, which takes co-vector fields to vector fields.
            # This could be up-streamed to the CombinatorialSpaces.jl library. (i.e.
            # this operation is not bespoke to this simulation.)

            e_vecs = map(edges(sd)) do e
                point(sd, sd[e, :∂v0]) - point(sd, sd[e, :∂v1])
            end
           
            neighbors = map(vertices(sd)) do v
                union(incident(sd, v, :∂v0), incident(sd, v, :∂v1))
            end

           
            n_vecs = map(neighbors) do es
                [e_vecs[e] for e in es]
            end

            map(neighbors, n_vecs) do es, nvs
                sum([nv * norm(nv) * x[e] for (e, nv) in zip(es, nvs)]) / sum(norm.(nvs))
            end
        end
        :mag => x -> norm.(x)
        x => error("Unmatched operator $my_symbol")
    end
    return (args...) -> op(args...)
end


decapode_code = gensim(ice_dynamics1D, dimension=1, preallocate=false)
#file = open("ice_sheet1D_alloc.jl", "w")
#write(file, string("decapode_f = ", decapode_code))
#close(file)
include("ice_sheet1D_alloc.jl")

fₘ = decapode_f(s, generate)


h₀ = map(x -> exp(-2 * x[1]^2), point(s_prime))

flow_rate, ice_density, u_init_arr = 1e-3, 910.0, h₀
n = 3.0
ρ = ice_density
g = 9.8101
A = fill(flow_rate, ne(s))
tₑ = 10.0

u₀ = ComponentArray(dynamics_h=u_init_arr)

constants_and_parameters = ComponentArray(
    n=n,
    stress_ρ=ρ,
    stress_g=g,
    stress_A=A)

data_prob = ODEProblem{true,SciMLBase.FullSpecialize}(fₘ, u₀, (0, tₑ), constants_and_parameters)

function steploss(du,u) #only compares last time step
    data_prob.f(du,u,data_prob.p,data_prob.tspan[1])
    nothing
end

u = copy(data_prob.u0)
du = zero(u)
d_u = zero(u)
d_du = zero(u)
using Enzyme
Enzyme.autodiff(Reverse, steploss, Duplicated(du, d_du), Duplicated(u,d_u))

using Cthulhu
@descend data_prob.f(du,u,data_prob.p,data_prob.tspan[1])

@ChrisRackauckas
Copy link
Contributor

Image

@ChrisRackauckas
Copy link
Contributor

@wsmoses it seems the sharp function here gives Enzyme some issues.

        :♯ => x -> begin
            # This is an implementation of the "sharp" operator from the exterior
            # calculus, which takes co-vector fields to vector fields.
            # This could be up-streamed to the CombinatorialSpaces.jl library. (i.e.
            # this operation is not bespoke to this simulation.)

            e_vecs = map(edges(sd)) do e
                point(sd, sd[e, :∂v0]) - point(sd, sd[e, :∂v1])
            end
           
            neighbors = map(vertices(sd)) do v
                union(incident(sd, v, :∂v0), incident(sd, v, :∂v1))
            end

           
            n_vecs = map(neighbors) do es
                [e_vecs[e] for e in es]
            end

            map(neighbors, n_vecs) do es, nvs
                sum([nv * norm(nv) * x[e] for (e, nv) in zip(es, nvs)]) / sum(norm.(nvs))
            end
        end

@jpfairbanks if I understand correctly, sd[e, :∂v0] and incident(sd, v, :∂v0) are doing symbol-based runtime dispatching for what function to call? This seems to be causing inference to fail since there are differences in the returned anonymous function based on runtime values and Enzyme seems to be specializing on the functions more than is generally allowed in multiple dispatch?

@ChrisRackauckas
Copy link
Contributor

For debugging I started manually modifying the generated function:

decapode_f = begin
    #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:758 =#
    (mesh, operators, hodge = GeometricHodge())->begin
            #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:758 =#
            #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:759 =#
            begin
                #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:235 =#
                (var"GenSim-M_d₀", d₀) = default_dec_matrix_generate(mesh, :d₀, hodge)
                (var"GenSim-M_avg₀₁", avg₀₁) = default_dec_matrix_generate(mesh, :avg₀₁, hodge)
                (var"GenSim-M_⋆₁", ₁) = default_dec_matrix_generate(mesh, :₁, hodge)
                (var"GenSim-M_dual_d₀", dual_d₀) = default_dec_matrix_generate(mesh, :dual_d₀, hodge)
                (var"GenSim-M_⋆₀⁻¹", ₀⁻¹) = default_dec_matrix_generate(mesh, :₀⁻¹, hodge)
                ♯ = x -> begin
                    # This is an implementation of the "sharp" operator from the exterior
                    # calculus, which takes co-vector fields to vector fields.
                    # This could be up-streamed to the CombinatorialSpaces.jl library. (i.e.
                    # this operation is not bespoke to this simulation.)
        
                    e_vecs = map(edges(mesh)) do e
                        point(mesh, mesh[e, :∂v0]) - point(mesh, mesh[e, :∂v1])
                    end
                   
                    neighbors = map(vertices(mesh)) do v
                        union(incident(mesh, v, :∂v0), incident(mesh, v, :∂v1))
                    end
        
                   
                    n_vecs = map(neighbors) do es
                        [e_vecs[e] for e in es]
                    end

                    res = zeros(Point2D, length(n_vecs))
        
                    map!(res, neighbors, n_vecs) do es, nvs
                        sum([nv * norm(nv) * x[e] for (e, nv) in zip(es, nvs)]) / sum(norm.(nvs))
                    end
                    res
                end
                mag = x -> norm.(x)
            end
            #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:760 =#
            begin
                #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:619 =#
                var"GenSim-M_GenSim-ConMat_1" = var"GenSim-M_⋆₀⁻¹" * var"GenSim-M_dual_d₀" * var"GenSim-M_⋆₁"
                var"GenSim-ConMat_1" = (x->var"GenSim-M_GenSim-ConMat_1" * x)
            end
            #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:761 =#
            begin
                #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:140 =#
            end
            #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:762 =#
            let=♯, mag=mag
                f(du, u, p, t) = begin
                        #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:762 =#
                        #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:763 =#
                        begin
                            #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:297 =#
                            dynamics_h = u.dynamics_h
                            n = p.n
                            stress_A = p.stress_A
                            stress_ρ = p.stress_ρ
                            stress_g = p.stress_g
                            var"1" = 1.0
                            var"2" = 2.0
                            var"2.0" = 2.0
                        end
                        #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:764 =#
                        begin
                            #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:534 =#
                        end
                        #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:765 =#
                        var"dynamics_•1" = d₀(dynamics_h)
                        var"dynamics_•6" = d₀(dynamics_h)
                        var"dynamics_•5" = (var"dynamics_•6")
                        var"dynamics_•4" = mag(var"dynamics_•5")
                        var"dynamics_•7" = n .- var"1"
                        var"dynamics_•3" = var"dynamics_•4" .^ var"dynamics_•7"
                        var"stress_•3" = stress_ρ .* stress_g
                        var"stress_•2" = var"stress_•3" .^ n
                        dynamics_sum_1 = (.+)(n, var"2")
                        stress_sum_1 = (.+)(n, var"2.0")
                        var"dynamics_•2" = avg₀₁(var"dynamics_•3")
                        var"dynamics_•9" = dynamics_h .^ dynamics_sum_1
                        var"stress_•1" = var"2.0" ./ stress_sum_1
                        stress_mult_1 = var"stress_•1" .* stress_A
                        Γ = stress_mult_1 .* var"stress_•2"
                        var"dynamics_•8" = avg₀₁(var"dynamics_•9")
                        dynamics_mult_3 = Γ .* var"dynamics_•1"
                        dynamics_mult_1 = dynamics_mult_3 .* var"dynamics_•2"
                        dynamics_mult_2 = dynamics_mult_1 .* var"dynamics_•8"
                        dynamics_ḣ = var"GenSim-ConMat_1"(dynamics_mult_2)
                        #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:766 =#
                        begin
                            #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:338 =#
                            setproperty!(du, :dynamics_h, dynamics_ḣ)
                        end
                        #= /Users/chrisrackauckas/.julia/packages/Decapodes/MGJA6/src/simulation.jl:767 =#
                        return nothing
                    end
                end
        end
end

This is what is being differentiated and giving Enzyme the type analysis error. let ♯=♯, mag=mag is one addition for more inference, but it still errors the same.

                    res = zeros(Point2D, length(n_vecs))
        
                    map!(res, neighbors, n_vecs) do es, nvs
                        sum([nv * norm(nv) * x[e] for (e, nv) in zip(es, nvs)]) / sum(norm.(nvs))
                    end
                    res

In-place map forces the return value, but that still errors the same. This means it's pretty isolated down to the constructs sd[e, :∂v0] and incident(sd, v, :∂v0) being the weird ones, so I'm pretty sure however they are working is something Enzyme disagrees with.

@ChrisRackauckas
Copy link
Contributor

@wsmoses I think it's a missing BLAS rule?

ERROR: MethodError: no method matching augmented_primal(::EnzymeCore.EnzymeRules.RevConfigWidth{…}, ::Const{…}, ::Type{…}, ::Duplicated{…}, ::Duplicated{…}, ::Duplicated{…}, ::Const{…}, ::Const{…})

Closest candidates are:
  augmented_primal(::EnzymeCore.EnzymeRules.RevConfig, ::Const{typeof(mul!)}, ::Type{RT}, ::Annotation{<:StridedVecOrMat}, ::Const{<:Union{SparseArrays.AbstractSparseMatrixCSC{Tv, Ti}, SubArray{Tv, 2, <:SparseArrays.AbstractSparseMatrixCSC{Tv, Ti}, Tuple{Base.Slice{Base.OneTo{Int64}}, I}} where I<:AbstractUnitRange} where {Tv, Ti}}, ::Annotation{<:StridedVecOrMat}, ::Annotation{<:Number}, ::Annotation{<:Number}) where RT
   @ Enzyme ~/.julia/packages/Enzyme/azJki/src/internal_rules.jl:732
  augmented_primal(::EnzymeCore.EnzymeRules.RevConfig, ::Const{Type{BigFloat}}, ::Type{<:Union{BatchDuplicated, BatchDuplicatedNoNeed, Duplicated, DuplicatedNoNeed}}, ::Any...)
   @ Enzyme ~/.julia/packages/Enzyme/azJki/src/internal_rules.jl:1404
  augmented_primal(::Any, ::Const{typeof(QuadGK.quadgk)}, ::Type{RT}, ::Any, ::Annotation{T}...; kws...) where {RT, T}
   @ QuadGKEnzymeExt ~/.julia/packages/QuadGK/BjmU0/ext/QuadGKEnzymeExt.jl:6
  ...

Stacktrace:
  [1] custom_rule_method_error
    @ ~/.julia/packages/Enzyme/azJki/src/rules/customrules.jl:452 [inlined]
  [2] mul!
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/LinearAlgebra/src/matmul.jl:237 [inlined]
  [3] *
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/LinearAlgebra/src/matmul.jl:57 [inlined]
  [4] #15
    @ ~/.julia/packages/Decapodes/MGJA6/src/operators.jl:99 [inlined]
  [5] f
    @ ~/Desktop/askem/ice_sheet1D_alloc.jl:72
  [6] ODEFunction
    @ ~/.julia/packages/SciMLBase/BWkqx/src/scimlfunctions.jl:2362 [inlined]
  [7] ODEFunction
    @ ~/.julia/packages/SciMLBase/BWkqx/src/scimlfunctions.jl:0 [inlined]
  [8] augmented_julia_ODEFunction_16361_inner_1wrap
    @ ~/.julia/packages/SciMLBase/BWkqx/src/scimlfunctions.jl:0
  [9] macro expansion
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:8369 [inlined]
 [10] enzyme_call
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:7932 [inlined]
 [11] AugmentedForwardThunk
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:7769 [inlined]
 [12] runtime_generic_augfwd(activity::Type{…}, runtimeActivity::Val{…}, width::Val{…}, ModifiedBetween::Val{…}, RT::Val{…}, f::ODEFunction{…}, df::ODEFunction{…}, primal_1::ComponentVector{…}, shadow_1_1::ComponentVector{…}, primal_2::ComponentVector{…}, shadow_2_1::ComponentVector{…}, primal_3::ComponentVector{…}, shadow_3_1::ComponentVector{…}, primal_4::Float64, shadow_4_1::Base.RefValue{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/azJki/src/rules/jitrules.jl:483
 [13] steploss
    @ ~/Desktop/askem/mwe.jl:126 [inlined]
 [14] steploss
    @ ~/Desktop/askem/mwe.jl:0 [inlined]
 [15] diffejulia_steploss_11669_inner_1wrap
    @ ~/Desktop/askem/mwe.jl:0
 [16] macro expansion
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:8369 [inlined]
 [17] enzyme_call
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:7932 [inlined]
 [18] CombinedAdjointThunk
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:7705 [inlined]
 [19] autodiff
    @ ~/.julia/packages/Enzyme/azJki/src/Enzyme.jl:491 [inlined]
 [20] autodiff
    @ ~/.julia/packages/Enzyme/azJki/src/Enzyme.jl:537 [inlined]
 [21] autodiff(::ReverseMode{…}, ::typeof(steploss), ::Duplicated{…}, ::Duplicated{…})
    @ Enzyme ~/.julia/packages/Enzyme/azJki/src/Enzyme.jl:504
 [22] top-level scope
    @ ~/Desktop/askem/mwe.jl:138
Some type information was truncated. Use `show(err)` to see complete types.

Got this by adding:

using Enzyme
Enzyme.API.strictAliasing!(false)
Enzyme.autodiff(Reverse, steploss, Duplicated(du, d_du), Duplicated(u,d_u))

https://github.com/JuliaLang/julia/blob/v1.10.6/stdlib/LinearAlgebra/src/matmul.jl#L237

@wsmoses
Copy link

wsmoses commented Nov 17, 2024

Can you show the full types of the MethodError?

@jClugstor
Copy link
Collaborator Author

@ChrisRackauckas
Copy link
Contributor

julia> show(err)
1-element ExceptionStack:
LoadError: MethodError: no method matching augmented_primal(::EnzymeCore.EnzymeRules.RevConfigWidth{1, true, true, (false, true, true, false, false, false), false}, ::Const{typeof(mul!)}, ::Type{Duplicated{Vector{Float64}}}, ::Duplicated{Vector{Float64}}, ::Duplicated{SparseMatrixCSC{Int8, Int32}}, ::Duplicated{SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}}, ::Const{Bool}, ::Const{Bool})

Closest candidates are:
  augmented_primal(::EnzymeCore.EnzymeRules.RevConfig, ::Const{typeof(mul!)}, ::Type{RT}, ::Annotation{<:StridedVecOrMat}, ::Const{<:Union{SparseArrays.AbstractSparseMatrixCSC{Tv, Ti}, SubArray{Tv, 2, <:SparseArrays.AbstractSparseMatrixCSC{Tv, Ti}, Tuple{Base.Slice{Base.OneTo{Int64}}, I}} where I<:AbstractUnitRange} where {Tv, Ti}}, ::Annotation{<:StridedVecOrMat}, ::Annotation{<:Number}, ::Annotation{<:Number}) where RT
   @ Enzyme ~/.julia/packages/Enzyme/azJki/src/internal_rules.jl:732
  augmented_primal(::EnzymeCore.EnzymeRules.RevConfig, ::Const{Type{BigFloat}}, ::Type{<:Union{BatchDuplicated, BatchDuplicatedNoNeed, Duplicated, DuplicatedNoNeed}}, ::Any...)
   @ Enzyme ~/.julia/packages/Enzyme/azJki/src/internal_rules.jl:1404
  augmented_primal(::Any, ::Const{typeof(QuadGK.quadgk)}, ::Type{RT}, ::Any, ::Annotation{T}...; kws...) where {RT, T}
   @ QuadGKEnzymeExt ~/.julia/packages/QuadGK/BjmU0/ext/QuadGKEnzymeExt.jl:6
  ...

Stacktrace:
  [1] custom_rule_method_error
    @ ~/.julia/packages/Enzyme/azJki/src/rules/customrules.jl:452 [inlined]
  [2] mul!
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/LinearAlgebra/src/matmul.jl:237 [inlined]
  [3] *
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/LinearAlgebra/src/matmul.jl:57 [inlined]
  [4] #15
    @ ~/.julia/packages/Decapodes/MGJA6/src/operators.jl:99 [inlined]
  [5] f
    @ ~/Desktop/askem/ice_sheet1D_alloc.jl:72
  [6] ODEFunction
    @ ~/.julia/packages/SciMLBase/BWkqx/src/scimlfunctions.jl:2362 [inlined]
  [7] ODEFunction
    @ ~/.julia/packages/SciMLBase/BWkqx/src/scimlfunctions.jl:0 [inlined]
  [8] augmented_julia_ODEFunction_17737_inner_1wrap
    @ ~/.julia/packages/SciMLBase/BWkqx/src/scimlfunctions.jl:0
  [9] macro expansion
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:8369 [inlined]
 [10] enzyme_call
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:7932 [inlined]
 [11] AugmentedForwardThunk
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:7769 [inlined]
 [12] runtime_generic_augfwd(activity::Type{Val{(true, true, true, true, true)}}, runtimeActivity::Val{false}, width::Val{1}, ModifiedBetween::Val{(true, true, true, true, true)}, RT::Val{@NamedTuple{1, 2, 3}}, f::ODEFunction{true, SciMLBase.FullSpecialize, var"#f#53"{var"#42#52"{SparseMatrixCSC{Float64, Int64}}, Decapodes.var"#37#38"{SparseMatrixCSC{Float64, Int32}}, Decapodes.var"#15#16"{SparseMatrixCSC{Int8, Int32}}, var"#34#44"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}}, var"#41#51"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, df::ODEFunction{true, SciMLBase.FullSpecialize, var"#f#53"{var"#42#52"{SparseMatrixCSC{Float64, Int64}}, Decapodes.var"#37#38"{SparseMatrixCSC{Float64, Int32}}, Decapodes.var"#15#16"{SparseMatrixCSC{Int8, Int32}}, var"#34#44"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}}, var"#41#51"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, primal_1::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}, shadow_1_1::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}, primal_2::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}, shadow_2_1::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}, primal_3::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(n = 1, stress_ρ = 2, stress_g = 3, stress_A = 4:12)}}}, shadow_3_1::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(n = 1, stress_ρ = 2, stress_g = 3, stress_A = 4:12)}}}, primal_4::Float64, shadow_4_1::Base.RefValue{Float64})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/azJki/src/rules/jitrules.jl:483
 [13] steploss
    @ ~/Desktop/askem/mwe.jl:126 [inlined]
 [14] steploss
    @ ~/Desktop/askem/mwe.jl:0 [inlined]
 [15] diffejulia_steploss_13475_inner_1wrap
    @ ~/Desktop/askem/mwe.jl:0
 [16] macro expansion
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:8369 [inlined]
 [17] enzyme_call
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:7932 [inlined]
 [18] CombinedAdjointThunk
    @ ~/.julia/packages/Enzyme/azJki/src/compiler.jl:7705 [inlined]
 [19] autodiff
    @ ~/.julia/packages/Enzyme/azJki/src/Enzyme.jl:491 [inlined]
 [20] autodiff
    @ ~/.julia/packages/Enzyme/azJki/src/Enzyme.jl:537 [inlined]
 [21] autodiff(::ReverseMode{false, false, FFIABI, false, false}, ::typeof(steploss), ::Duplicated{ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}}, ::Duplicated{ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(dynamics_h = 1:10,)}}}})
    @ Enzyme ~/.julia/packages/Enzyme/azJki/src/Enzyme.jl:504
 [22] top-level scope
    @ ~/Desktop/askem/mwe.jl:138
 [23] eval
    @ ./boot.jl:385 [inlined]
 [24] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2076
 [25] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Base ./essentials.jl:892
 [26] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base ./essentials.jl:889
 [27] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:271
 [28] (::VSCodeServer.var"#69#74"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:181
 [29] withpath(f::VSCodeServer.var"#69#74"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/repl.jl:276
 [30] (::VSCodeServer.var"#68#73"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:179
 [31] hideprompt(f::VSCodeServer.var"#68#73"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/repl.jl:38
 [32] (::VSCodeServer.var"#67#72"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:150
 [33] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:515
 [34] with_logger
    @ ./logging.jl:627 [inlined]
 [35] (::VSCodeServer.var"#66#71"{VSCodeServer.ReplRunCodeRequestParams})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:263
 [36] #invokelatest#2
    @ ./essentials.jl:892 [inlined]
 [37] invokelatest(::Any)
    @ Base ./essentials.jl:889
 [38] (::VSCodeServer.var"#64#65")()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeServer/src/eval.jl:34
in expression starting at /Users/chrisrackauckas/Desktop/askem/mwe.jl:138

Looks like it is due to SparseMatrixCSC, so missing a rule for SuiteSparse.

@ChrisRackauckas
Copy link
Contributor

@jpfairbanks Can you highlight where the sparse matrix is used here? It looks like it's a missing rule in Enzyme EnzymeAD/Enzyme.jl#2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants