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 · 26 comments
Open

ForwardDiff Decapode Gradient Fail Example #182

jClugstor opened this issue Oct 1, 2024 · 26 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

@wsmoses
Copy link

wsmoses commented Nov 20, 2024

what's the full types of the method match failure? And what version of enzyme are you using (it is the latest)?

@ChrisRackauckas
Copy link
Contributor

I gave the full types above

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})

and I'm using master. @jpfairbanks will need to pitch in to find out where it is in the code here though.

@wsmoses
Copy link

wsmoses commented Nov 20, 2024

Hm is there a way to see the matched vs not matched types ? I don’t know why that’s not in your log.

In any case an example of what’s not hit would be useful

@ChrisRackauckas
Copy link
Contributor

@jClugstor can you try EnzymeAD/Enzyme.jl#2109 on here?

@jClugstor
Copy link
Collaborator Author

Will do.

@jClugstor
Copy link
Collaborator Author

This is the result of Enzyme.autodiff(Reverse, steploss, Duplicated(du, d_du), Duplicated(u,d_u))
on that PR

ERROR: Constant memory is stored (or returned) to a differentiable variable.
As a result, Enzyme cannot provably ensure correctness and throws this error.
This might be due to the use of a constant variable as temporary storage for active memory (https://enzyme.mit.edu/julia/stable/faq/#Runtime-Activity).
If Enzyme should be able to prove this use non-differentable, open an issue!
To work around this issue, either:
 a) rewrite this variable to not be conditionally active (fastest, but requires a code change), or
 b) set the Enzyme mode to turn on runtime activity (e.g. autodiff(set_runtime_activity(Reverse), ...) ). This will maintain correctness, but may slightly reduce performance.
Mismatched activity for:   store {} addrspace(10)* %unbox.unpack.unpack, {} addrspace(10)* addrspace(10)* %.fca.0.0.0.0.gep317, align 8, !dbg !527, !noalias !468 const val:   %unbox.unpack.unpack = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox.unpack.elt, align 8, !dbg !504, !tbaa !63, !alias.scope !78, !noalias !81, !enzyme_type !453
 value=Unknown object of type var"#f#36"{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}}}, SparseMatrixCSC{Float64, Int64}, var"#22#31"{var"#21#30"}, var"#22#31"{var"#14#23"{EmbeddedDeltaDualComplex1D{Bool, Float64, GeometryBasics.Point{2, Float64}}}}, Decapodes.var"#37#38"{SparseMatrixCSC{Float64, Int32}}, SparseMatrixCSC{Int8, Int32}}
 llvalue={ [3 x {} addrspace(10)*], [3 x {} addrspace(10)*], [3 x {} addrspace(10)*], [3 x {} addrspace(10)*], { i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }, [1 x [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 { i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }], { i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* } } addrspace(11)* %0

Stacktrace:
 [1] collect_similar
   @ ./array.jl:763
 [2] map
   @ ./abstractarray.jl:3285
 [3] #14
   @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:74
 [4] #22
   @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:94
 [5] f
   @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/ice_sheet1D_alloc.jl:56

Stacktrace:
  [1] collect_similar
    @ ./array.jl:763 [inlined]
  [2] map
    @ ./abstractarray.jl:3285 [inlined]
  [3] #14
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:74 [inlined]
  [4] #22
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:94 [inlined]
  [5] f
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/ice_sheet1D_alloc.jl:56
  [6] ODEFunction
    @ ~/.julia/packages/SciMLBase/NtgCQ/src/scimlfunctions.jl:2358 [inlined]
  [7] ODEFunction
    @ ~/.julia/packages/SciMLBase/NtgCQ/src/scimlfunctions.jl:0 [inlined]
  [8] augmented_julia_ODEFunction_20458_inner_1wrap
    @ ~/.julia/packages/SciMLBase/NtgCQ/src/scimlfunctions.jl:0
  [9] macro expansion
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:8398 [inlined]
 [10] enzyme_call
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:7950 [inlined]
 [11] AugmentedForwardThunk
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:7787 [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 ~/Documents/Work/dev/Enzyme.jl/src/rules/jitrules.jl:484
 [13] steploss
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:127 [inlined]
 [14] steploss
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:0 [inlined]
 [15] diffejulia_steploss_15586_inner_1wrap
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:0
 [16] macro expansion
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:8398 [inlined]
 [17] enzyme_call
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:7950 [inlined]
 [18] CombinedAdjointThunk
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:7723 [inlined]
 [19] autodiff
    @ ~/Documents/Work/dev/Enzyme.jl/src/Enzyme.jl:491 [inlined]
 [20] autodiff
    @ ~/Documents/Work/dev/Enzyme.jl/src/Enzyme.jl:537 [inlined]
 [21] autodiff(::ReverseMode{…}, ::typeof(steploss), ::Duplicated{…}, ::Duplicated{…})
    @ Enzyme ~/Documents/Work/dev/Enzyme.jl/src/Enzyme.jl:504
 [22] top-level scope
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:137
Some type information was truncated. Use `show(err)` to see complete types.

@jpfairbanks
Copy link

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.

We have had performance problems regarding the Val{Symbol} and constant propagation in incident and getindex like that before. We can replace that dispatch on symbol with a dispatch on singleton structs to make that more robust, but it would be a fairly large change to ACSets.jl to make that work with the existing system.

Sparse matrices are used throughout each of the component operators are based on generating a sparse matrix at while constructing the closure and then just using mul! during the closure.

@ChrisRackauckas
Copy link
Contributor

ChrisRackauckas commented Nov 21, 2024

@jClugstor try setting runtime activity and see what we're at.

Enzyme.autodiff(set_runtime_activity(Reverse), steploss, Duplicated(du, d_du), Duplicated(u,d_u))

@ChrisRackauckas
Copy link
Contributor

We have had performance problems regarding the Val{Symbol} and constant propagation in incident and getindex like that before.

If it's type stable it shouldn't be an issue? Dispatch on singleton structs and dispatch on Val{Symbol} should be the same. You mean Val{Symbol}() though right? Since otherwise you have to force specialize ::Type{Val{Symbol}} in each function?

@jClugstor
Copy link
Collaborator Author

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

ERROR: Enzyme cannot deduce type
Current scope: 
; Function Attrs: mustprogress willreturn
define internal fastcc void @preprocess_julia__19_20402([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}" %0, [1 x {} addrspace(10)*] addrspace(11)* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Float@double, [-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, [-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,0,24]:Integer, [-1,0,25]:Integer, [-1,0,26]:Integer, [-1,0,27]:Integer, [-1,0,28]:Integer, [-1,0,29]:Integer, [-1,0,30]:Integer, [-1,0,31]:Integer, [-1,0,32]:Integer, [-1,0,33]:Integer, [-1,0,34]:Integer, [-1,0,35]:Integer, [-1,0,36]:Integer, [-1,0,37]:Integer, [-1,0,38]:Integer, [-1,0,39]:Integer}" "enzymejl_parmtype"="130277337214864" "enzymejl_parmtype_ref"="1" %1, {} addrspace(10)* nocapture noundef nonnull readonly align 16 dereferenceable(40) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]: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, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" "enzymejl_parmtype"="130282548130944" "enzymejl_parmtype_ref"="2" %2, {} addrspace(10)* noundef nonnull align 16 dereferenceable(40) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" "enzymejl_parmtype"="130278794734512" "enzymejl_parmtype_ref"="2" %3) unnamed_addr #80 !dbg !4712 {
top:
  %4 = call {}*** @julia.get_pgcstack()
  %5 = bitcast {}*** %4 to {}**
  %6 = getelementptr inbounds {}*, {}** %5, i64 -14
  %7 = getelementptr inbounds {}*, {}** %6, i64 16
  %8 = bitcast {}** %7 to i8**
  %9 = load i8*, i8** %8, align 8
  %10 = call noalias nonnull dereferenceable(24) dereferenceable_or_null(24) {} addrspace(10)* @jl_gc_alloc_typed(i8* %9, i64 24, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 130277802531216 to {}*) to {} addrspace(10)*)), !enzyme_fromstack !322
  call void @zeroType.26({} addrspace(10)* %10, i8 0, i64 24), !enzyme_zerostack !0
  %11 = bitcast {} addrspace(10)* %10 to { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)*, !enzyme_caststack !0
  %12 = call noalias nonnull dereferenceable(16) dereferenceable_or_null(16) i8* @malloc(i64 16), !enzyme_fromstack !322
  %13 = bitcast i8* %12 to [1 x [2 x double]]*, !enzyme_caststack !0
  %14 = call {}*** @julia.get_pgcstack() #126
  %ptls_field199 = getelementptr inbounds {}**, {}*** %14, i64 2
  %15 = bitcast {}*** %ptls_field199 to i64***
  %ptls_load200201 = load i64**, i64*** %15, align 8, !tbaa !84
  %16 = getelementptr inbounds i64*, i64** %ptls_load200201, i64 2
  %safepoint = load i64*, i64** %16, align 8, !tbaa !88
  fence syncscope("singlethread") seq_cst
  call void @julia.safepoint(i64* %safepoint) #126, !dbg !4713
  fence syncscope("singlethread") seq_cst
  %getfield_addr = getelementptr inbounds [1 x {} addrspace(10)*], [1 x {} addrspace(10)*] addrspace(11)* %1, i64 0, i64 0, !dbg !4713
  %getfield = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %getfield_addr unordered, align 8, !dbg !4713, !tbaa !88, !alias.scope !106, !noalias !109, !nonnull !0, !dereferenceable !156, !align !157, !enzyme_type !158, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BFloat64\7D !0
  %.fca.0.0.gep = getelementptr { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)* %11, i64 0, i32 0, i64 0, !dbg !4713
  store {} addrspace(10)* %getfield, {} addrspace(10)* addrspace(10)* %.fca.0.0.gep, align 8, !dbg !4713, !noalias !4714
  call void ({} addrspace(10)*, ...) @julia.write_barrier({} addrspace(10)* %10, {} addrspace(10)* %getfield), !dbg !4713
  %.fca.1.0.0.gep = getelementptr { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)* %11, i64 0, i32 1, i64 0, i64 0, !dbg !4713
  store {} addrspace(10)* %2, {} addrspace(10)* addrspace(10)* %.fca.1.0.0.gep, align 8, !dbg !4713, !noalias !4714
  call void ({} addrspace(10)*, ...) @julia.write_barrier({} addrspace(10)* %10, {} addrspace(10)* %2), !dbg !4713
  %.fca.1.0.1.gep = getelementptr { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)* %11, i64 0, i32 1, i64 0, i64 1, !dbg !4713
  store {} addrspace(10)* %3, {} addrspace(10)* addrspace(10)* %.fca.1.0.1.gep, align 8, !dbg !4713, !noalias !4714
  call void ({} addrspace(10)*, ...) @julia.write_barrier({} addrspace(10)* %10, {} addrspace(10)* %3), !dbg !4713
  %17 = addrspacecast { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)* %11 to { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(11)*, !dbg !4713
  %18 = call fastcc nonnull {} addrspace(10)* @julia_collect_20415({ [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(11)* nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) %17) #126, !dbg !4713
  %19 = addrspacecast {} addrspace(10)* %18 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*, !dbg !4717
  %arraylen_ptr = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %19, i64 0, i32 1, !dbg !4717
  %arraylen = load i64, i64 addrspace(11)* %arraylen_ptr, align 8, !dbg !4717, !tbaa !122, !range !125, !alias.scope !126, !noalias !127
  switch i64 %arraylen, label %L19 [
    i64 0, label %L59
    i64 1, label %idxend85
  ], !dbg !4730

L19:                                              ; preds = %top
  %20 = icmp ugt i64 %arraylen, 15, !dbg !4731
  br i1 %20, label %L55, label %idxend103, !dbg !4732

L55:                                              ; preds = %L19
  call fastcc void @julia_mapreduce_impl_20409([1 x [2 x double]]* noalias nocapture nofree noundef nonnull writeonly sret([1 x [2 x double]]) align 8 dereferenceable(16) %13, {} addrspace(10)* noundef nonnull align 16 dereferenceable(40) %18, i64 noundef signext 1, i64 signext %arraylen) #126, !dbg !4733
  %.sroa.0175.0..sroa_idx183 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %13, i64 0, i64 0, i64 0, !dbg !4713
  %.sroa.0175.0.copyload184 = load double, double* %.sroa.0175.0..sroa_idx183, align 8, !dbg !4713, !tbaa !480, !alias.scope !482, !noalias !4735
  %.sroa.10.0..sroa_idx193 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %13, i64 0, i64 0, i64 1, !dbg !4713
  %.sroa.10.0.copyload194 = load double, double* %.sroa.10.0..sroa_idx193, align 8, !dbg !4713, !tbaa !480, !alias.scope !482, !noalias !4735
  br label %L59

L59.loopexit.unr-lcssa.loopexit:                  ; preds = %idxend122
  br label %L59.loopexit.unr-lcssa, !dbg !4736

L59.loopexit.unr-lcssa:                           ; preds = %L59.loopexit.unr-lcssa.loopexit, %idxend122.preheader
  %.lcssa262.ph = phi double [ undef, %idxend122.preheader ], [ %130, %L59.loopexit.unr-lcssa.loopexit ]
  %.lcssa261.ph = phi double [ undef, %idxend122.preheader ], [ %131, %L59.loopexit.unr-lcssa.loopexit ]
  %value_phi115240.unr = phi i64 [ 2, %idxend122.preheader ], [ %129, %L59.loopexit.unr-lcssa.loopexit ]
  %value_phi114239.unr = phi double [ %101, %idxend122.preheader ], [ %131, %L59.loopexit.unr-lcssa.loopexit ]
  %value_phi113238.unr = phi double [ %100, %idxend122.preheader ], [ %130, %L59.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod266.not = icmp eq i64 %xtraiter264, 0, !dbg !4736
  br i1 %lcmp.mod266.not, label %L59, label %idxend122.epil.preheader, !dbg !4736

idxend122.epil.preheader:                         ; preds = %L59.loopexit.unr-lcssa
  br label %idxend122.epil, !dbg !4736

idxend122.epil:                                   ; preds = %idxend122.epil.preheader, %idxend122.epil
  %iv1 = phi i64 [ 0, %idxend122.epil.preheader ], [ %iv.next2, %idxend122.epil ]
  %value_phi114239.epil = phi double [ %24, %idxend122.epil ], [ %value_phi114239.unr, %idxend122.epil.preheader ]
  %value_phi113238.epil = phi double [ %23, %idxend122.epil ], [ %value_phi113238.unr, %idxend122.epil.preheader ]
  %21 = add nuw nsw i64 %value_phi115240.unr, %iv1, !dbg !4737
  %iv.next2 = add nuw nsw i64 %iv1, 1, !dbg !4737
  %22 = add nuw nsw i64 %21, 1, !dbg !4737
  %arrayref125.sroa.0.0..sroa_idx.epil = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %21, i64 0, i64 0, !dbg !4739
  %arrayref125.sroa.0.0.copyload.epil = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.epil, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref125.sroa.2.0..sroa_idx158.epil = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %21, i64 0, i64 1, !dbg !4739
  %arrayref125.sroa.2.0.copyload.epil = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.epil, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %23 = fadd double %value_phi113238.epil, %arrayref125.sroa.0.0.copyload.epil, !dbg !4741
  %24 = fadd double %value_phi114239.epil, %arrayref125.sroa.2.0.copyload.epil, !dbg !4741
  %epil.iter265.cmp.not = icmp eq i64 %iv.next2, %xtraiter264, !dbg !4736
  br i1 %epil.iter265.cmp.not, label %L59.loopexit, label %idxend122.epil, !dbg !4736, !llvm.loop !4748

L59.loopexit:                                     ; preds = %idxend122.epil
  br label %L59, !dbg !4749

L59:                                              ; preds = %L59.loopexit, %idxend103, %idxend85, %L59.loopexit.unr-lcssa, %L55, %top
  %.sroa.0175.0 = phi double [ %.sroa.0175.0.copyload184, %L55 ], [ %arrayref88.sroa.0.0.copyload, %idxend85 ], [ 0.000000e+00, %top ], [ %100, %idxend103 ], [ %.lcssa262.ph, %L59.loopexit.unr-lcssa ], [ %23, %L59.loopexit ]
  %.sroa.10.0 = phi double [ %.sroa.10.0.copyload194, %L55 ], [ %arrayref88.sroa.2.0.copyload, %idxend85 ], [ 0.000000e+00, %top ], [ %101, %idxend103 ], [ %.lcssa261.ph, %L59.loopexit.unr-lcssa ], [ %24, %L59.loopexit ]
  %25 = addrspacecast {} addrspace(10)* %3 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*, !dbg !4749
  %arraylen_ptr2 = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %25, i64 0, i32 1, !dbg !4749
  %arraylen3 = load i64, i64 addrspace(11)* %arraylen_ptr2, align 8, !dbg !4749, !tbaa !122, !range !125, !alias.scope !126, !noalias !127, !enzyme_type !128, !enzyme_inactive !0, !enzymejl_source_type_UInt64 !0, !enzymejl_byref_BITS_VALUE !0
  %26 = call noalias nonnull "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" {} addrspace(10)* @ijl_alloc_array_1d({} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 130282549281632 to {}*) to {} addrspace(10)*), i64 %arraylen3) #127, !dbg !4756
  %.not203 = icmp eq i64 %arraylen3, 0, !dbg !4762
  br i1 %.not203, label %L59.L180_crit_edge, label %L95.lr.ph, !dbg !4763

L59.L180_crit_edge:                               ; preds = %L59
  %.phi.trans.insert = addrspacecast {} addrspace(10)* %26 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*
  %arraylen_ptr32.phi.trans.insert = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %.phi.trans.insert, i64 0, i32 1
  %arraylen33.pre = load i64, i64 addrspace(11)* %arraylen_ptr32.phi.trans.insert, align 8, !dbg !4717, !tbaa !122, !range !125, !alias.scope !126, !noalias !127, !enzyme_type !128, !enzyme_inactive !0, !enzymejl_source_type_UInt64 !0, !enzymejl_byref_BITS_VALUE !0
  br label %L180, !dbg !4763

L95.lr.ph:                                        ; preds = %L59
  %27 = addrspacecast {} addrspace(10)* %3 to [1 x [2 x double]] addrspace(13)* addrspace(11)*
  %arrayptr206 = load [1 x [2 x double]] addrspace(13)*, [1 x [2 x double]] addrspace(13)* addrspace(11)* %27, align 16, !tbaa !141, !alias.scope !4765, !noalias !127, !nonnull !0, !enzyme_type !174, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BGeometryBasics.Point\7B2\2C\20Float64\7D\7D !0
  %28 = addrspacecast {} addrspace(10)* %26 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*
  %arraylen_ptr16 = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %28, i64 0, i32 1
  %29 = addrspacecast {} addrspace(10)* %26 to double addrspace(13)* addrspace(11)*
  br label %idxend, !dbg !4766

L131:                                             ; preds = %idxend
  %30 = call double @llvm.fabs.f64(double %arrayref.sroa.0.0.copyload) #126, !dbg !4767
  %31 = call double @llvm.fabs.f64(double %arrayref.sroa.5.0.copyload) #126, !dbg !4778
  %32 = fsub double %30, %31, !dbg !4781
  %bitcast_coercion = bitcast double %32 to i64, !dbg !4783
  %33 = icmp slt i64 %bitcast_coercion, 0, !dbg !4785
  %34 = select i1 %33, double %31, double %30, !dbg !4785
  %35 = fcmp ord double %arrayref.sroa.0.0.copyload, %arrayref.sroa.5.0.copyload, !dbg !4786
  %36 = select i1 %35, double %34, double %32, !dbg !4788
  %37 = fsub double %36, %36, !dbg !4790
  %38 = fcmp ord double %37, 0.000000e+00, !dbg !4793
  br i1 %38, label %L154, label %L174, !dbg !4792

L154:                                             ; preds = %L131
  %39 = fcmp une double %36, 0.000000e+00, !dbg !4795
  br i1 %39, label %L157, label %L174, !dbg !4797

L157:                                             ; preds = %L154
  %40 = fdiv double %arrayref.sroa.0.0.copyload, %36, !dbg !4798
  %41 = fmul double %40, %40, !dbg !4800
  %42 = fdiv double %arrayref.sroa.5.0.copyload, %36, !dbg !4798
  %43 = fmul double %42, %42, !dbg !4800
  %44 = fadd double %41, %43, !dbg !4803
  %45 = call double @julia_sqrt_20345(double %44) #128, !dbg !4799
  %46 = fmul double %36, %45, !dbg !4804
  br label %L174, !dbg !4799

L174:                                             ; preds = %idxend, %L157, %L154, %L131
  %value_phi15 = phi double [ %46, %L157 ], [ %36, %L131 ], [ 0.000000e+00, %L154 ], [ %58, %idxend ]
  %arraylen17 = load i64, i64 addrspace(11)* %arraylen_ptr16, align 8, !dbg !4805, !tbaa !122, !range !125, !alias.scope !126, !noalias !127, !enzyme_type !128, !enzyme_inactive !0, !enzymejl_source_type_UInt64 !0, !enzymejl_byref_BITS_VALUE !0
  %inbounds18 = icmp ult i64 %iv3, %arraylen17, !dbg !4805
  br i1 %inbounds18, label %idxend21, label %oob19, !dbg !4805

L180.loopexit:                                    ; preds = %idxend21
  br label %L180, !dbg !4730

L180:                                             ; preds = %L180.loopexit, %L59.L180_crit_edge
  %arraylen33 = phi i64 [ %arraylen33.pre, %L59.L180_crit_edge ], [ %arraylen17, %L180.loopexit ], !dbg !4717, !enzyme_inactive !0
  switch i64 %arraylen33, label %L192 [
    i64 0, label %L222
    i64 1, label %idxend45
  ], !dbg !4730

L192:                                             ; preds = %L180
  %47 = icmp ugt i64 %arraylen33, 15, !dbg !4731
  br i1 %47, label %L208, label %idxend63, !dbg !4732

L208:                                             ; preds = %L192
  %48 = call fastcc double @julia_mapreduce_impl_20412({} addrspace(10)* noundef nonnull align 16 dereferenceable(40) %26, i64 noundef signext 1, i64 signext %arraylen33) #126, !dbg !4733
  br label %L222, !dbg !4734

L222.loopexit.unr-lcssa.loopexit:                 ; preds = %idxend75
  br label %L222.loopexit.unr-lcssa, !dbg !4736

L222.loopexit.unr-lcssa:                          ; preds = %L222.loopexit.unr-lcssa.loopexit, %idxend75.preheader
  %.lcssa.ph = phi double [ undef, %idxend75.preheader ], [ %97, %L222.loopexit.unr-lcssa.loopexit ]
  %value_phi68234.unr = phi i64 [ 2, %idxend75.preheader ], [ %95, %L222.loopexit.unr-lcssa.loopexit ]
  %value_phi67233.unr = phi double [ %67, %idxend75.preheader ], [ %97, %L222.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0, !dbg !4736
  br i1 %lcmp.mod.not, label %L222, label %idxend75.epil.preheader, !dbg !4736

idxend75.epil.preheader:                          ; preds = %L222.loopexit.unr-lcssa
  br label %idxend75.epil, !dbg !4736

idxend75.epil:                                    ; preds = %idxend75.epil.preheader, %idxend75.epil
  %iv7 = phi i64 [ 0, %idxend75.epil.preheader ], [ %iv.next8, %idxend75.epil ]
  %value_phi67233.epil = phi double [ %52, %idxend75.epil ], [ %value_phi67233.unr, %idxend75.epil.preheader ]
  %49 = add nuw nsw i64 %value_phi68234.unr, %iv7, !dbg !4737
  %iv.next8 = add nuw nsw i64 %iv7, 1, !dbg !4737
  %50 = add nuw nsw i64 %49, 1, !dbg !4737
  %51 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %49, !dbg !4739
  %arrayref78.epil = load double, double addrspace(13)* %51, align 8, !dbg !4739, !tbaa !147, !alias.scope !150, !noalias !151
  %52 = fadd double %value_phi67233.epil, %arrayref78.epil, !dbg !4807
  %epil.iter.cmp.not = icmp eq i64 %iv.next8, %xtraiter, !dbg !4736
  br i1 %epil.iter.cmp.not, label %L222.loopexit, label %idxend75.epil, !dbg !4736, !llvm.loop !4809

L222.loopexit:                                    ; preds = %idxend75.epil
  br label %L222, !dbg !4810

L222:                                             ; preds = %L222.loopexit, %idxend63, %idxend45, %L222.loopexit.unr-lcssa, %L208, %L180
  %value_phi35 = phi double [ %arrayref48, %idxend45 ], [ %48, %L208 ], [ 0.000000e+00, %L180 ], [ %67, %idxend63 ], [ %.lcssa.ph, %L222.loopexit.unr-lcssa ], [ %52, %L222.loopexit ]
  %53 = fdiv double %.sroa.0175.0, %value_phi35, !dbg !4810
  %54 = fdiv double %.sroa.10.0, %value_phi35, !dbg !4810
  %newstruct39.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %0, i64 0, i64 0, i64 0, !dbg !4812
  store double %53, double* %newstruct39.sroa.0.0..sroa_idx, align 8, !dbg !4812, !noalias !4714
  %newstruct39.sroa.2.0..sroa_idx171 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %0, i64 0, i64 0, i64 1, !dbg !4812
  store double %54, double* %newstruct39.sroa.2.0..sroa_idx171, align 8, !dbg !4812, !noalias !4714
  ret void, !dbg !4812

idxend:                                           ; preds = %idxend21, %L95.lr.ph
  %iv3 = phi i64 [ %iv.next4, %idxend21 ], [ 0, %L95.lr.ph ]
  %iv.next4 = add nuw nsw i64 %iv3, 1, !dbg !4816
  %arrayref.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr206, i64 %iv3, i64 0, i64 0, !dbg !4819
  %arrayref.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref.sroa.0.0..sroa_idx, align 1, !dbg !4819, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref.sroa.5.0..sroa_idx172 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr206, i64 %iv3, i64 0, i64 1, !dbg !4819
  %arrayref.sroa.5.0.copyload = load double, double addrspace(13)* %arrayref.sroa.5.0..sroa_idx172, align 1, !dbg !4819, !tbaa !611, !alias.scope !919, !noalias !4740
  %55 = fmul double %arrayref.sroa.0.0.copyload, %arrayref.sroa.0.0.copyload, !dbg !4823
  %56 = fmul double %arrayref.sroa.5.0.copyload, %arrayref.sroa.5.0.copyload, !dbg !4823
  %57 = fadd double %55, %56, !dbg !4827
  %58 = call double @julia_sqrt_20345(double %57) #128, !dbg !4826
  %59 = fcmp ule double %58, 0.000000e+00, !dbg !4828
  %60 = fsub double %58, %58
  %61 = fcmp uno double %60, 0.000000e+00
  %or.cond = or i1 %59, %61, !dbg !4829
  br i1 %or.cond, label %L131, label %L174, !dbg !4829

oob19:                                            ; preds = %L174
  %errorbox20 = alloca i64, align 8, !dbg !4805
  store i64 %iv.next4, i64* %errorbox20, align 8, !dbg !4805, !noalias !4714
  %62 = addrspacecast {} addrspace(10)* %26 to {} addrspace(12)*, !dbg !4805
  call void @ijl_bounds_error_ints({} addrspace(12)* %62, i64* nonnull align 8 %errorbox20, i64 1) #126, !dbg !4805
  unreachable, !dbg !4805

idxend21:                                         ; preds = %L174
  %arrayptr23207 = load double addrspace(13)*, double addrspace(13)* addrspace(11)* %29, align 8, !dbg !4805, !tbaa !141, !alias.scope !4765, !noalias !127, !nonnull !0, !enzyme_type !174, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BFloat64\7D !0
  %63 = getelementptr inbounds double, double addrspace(13)* %arrayptr23207, i64 %iv3, !dbg !4805
  store double %value_phi15, double addrspace(13)* %63, align 8, !dbg !4805, !tbaa !147, !alias.scope !150, !noalias !4830
  %exitcond249.not = icmp eq i64 %iv.next4, %arraylen3, !dbg !4831
  br i1 %exitcond249.not, label %L180.loopexit, label %idxend, !dbg !4766, !llvm.loop !4832

idxend45:                                         ; preds = %L180
  %64 = addrspacecast {} addrspace(10)* %26 to double addrspace(13)* addrspace(11)*, !dbg !4833
  %arrayptr47210 = load double addrspace(13)*, double addrspace(13)* addrspace(11)* %64, align 8, !dbg !4833, !tbaa !141, !alias.scope !4765, !noalias !127, !nonnull !0, !enzyme_type !174, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BFloat64\7D !0
  %arrayref48 = load double, double addrspace(13)* %arrayptr47210, align 8, !dbg !4833, !tbaa !147, !alias.scope !150, !noalias !151, !enzyme_type !1062, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Float64 !0
  br label %L222, !dbg !4835

idxend63:                                         ; preds = %L192
  %65 = addrspacecast {} addrspace(10)* %26 to double addrspace(13)* addrspace(11)*, !dbg !4836
  %arrayptr56211 = load double addrspace(13)*, double addrspace(13)* addrspace(11)* %65, align 8, !dbg !4836, !tbaa !141, !alias.scope !4765, !noalias !127, !nonnull !0, !enzyme_type !174, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BFloat64\7D !0
  %arrayref57 = load double, double addrspace(13)* %arrayptr56211, align 8, !dbg !4836, !tbaa !147, !alias.scope !150, !noalias !151, !enzyme_type !1062, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Float64 !0
  %66 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 1, !dbg !4838
  %arrayref66 = load double, double addrspace(13)* %66, align 8, !dbg !4838, !tbaa !147, !alias.scope !150, !noalias !151, !enzyme_type !1062, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Float64 !0
  %67 = fadd double %arrayref57, %arrayref66, !dbg !4840
  %.not212232 = icmp ugt i64 %arraylen33, 2, !dbg !4843
  br i1 %.not212232, label %idxend75.preheader, label %L222, !dbg !4736

idxend75.preheader:                               ; preds = %idxend63
  %68 = add nsw i64 %arraylen33, -2, !dbg !4736
  %69 = add nsw i64 %arraylen33, -3, !dbg !4736
  %xtraiter = and i64 %68, 7, !dbg !4736
  %70 = icmp ult i64 %69, 7, !dbg !4736
  br i1 %70, label %L222.loopexit.unr-lcssa, label %idxend75.preheader.new, !dbg !4736

idxend75.preheader.new:                           ; preds = %idxend75.preheader
  %unroll_iter = and i64 %68, -8, !dbg !4736
  br label %idxend75, !dbg !4736

idxend75:                                         ; preds = %idxend75, %idxend75.preheader.new
  %iv5 = phi i64 [ %iv.next6, %idxend75 ], [ 0, %idxend75.preheader.new ]
  %value_phi67233 = phi double [ %67, %idxend75.preheader.new ], [ %97, %idxend75 ]
  %71 = shl nuw i64 %iv5, 3, !dbg !4737
  %iv.next6 = add nuw nsw i64 %iv5, 1, !dbg !4737
  %72 = shl i64 %iv5, 3, !dbg !4737
  %73 = add nuw nsw i64 %72, 2, !dbg !4737
  %74 = or i64 %73, 1, !dbg !4737
  %75 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %73, !dbg !4739
  %arrayref78 = load double, double addrspace(13)* %75, align 8, !dbg !4739, !tbaa !147, !alias.scope !150, !noalias !151
  %76 = fadd double %value_phi67233, %arrayref78, !dbg !4807
  %77 = add nuw nsw i64 %73, 2, !dbg !4737
  %78 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %74, !dbg !4739
  %arrayref78.1 = load double, double addrspace(13)* %78, align 8, !dbg !4739, !tbaa !147, !alias.scope !150, !noalias !151
  %79 = fadd double %76, %arrayref78.1, !dbg !4807
  %80 = add nuw nsw i64 %73, 3, !dbg !4737
  %81 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %77, !dbg !4739
  %arrayref78.2 = load double, double addrspace(13)* %81, align 8, !dbg !4739, !tbaa !147, !alias.scope !150, !noalias !151
  %82 = fadd double %79, %arrayref78.2, !dbg !4807
  %83 = add nuw nsw i64 %73, 4, !dbg !4737
  %84 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %80, !dbg !4739
  %arrayref78.3 = load double, double addrspace(13)* %84, align 8, !dbg !4739, !tbaa !147, !alias.scope !150, !noalias !151
  %85 = fadd double %82, %arrayref78.3, !dbg !4807
  %86 = add nuw nsw i64 %73, 5, !dbg !4737
  %87 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %83, !dbg !4739
  %arrayref78.4 = load double, double addrspace(13)* %87, align 8, !dbg !4739, !tbaa !147, !alias.scope !150, !noalias !151
  %88 = fadd double %85, %arrayref78.4, !dbg !4807
  %89 = add nuw nsw i64 %73, 6, !dbg !4737
  %90 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %86, !dbg !4739
  %arrayref78.5 = load double, double addrspace(13)* %90, align 8, !dbg !4739, !tbaa !147, !alias.scope !150, !noalias !151
  %91 = fadd double %88, %arrayref78.5, !dbg !4807
  %92 = add nuw nsw i64 %73, 7, !dbg !4737
  %93 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %89, !dbg !4739
  %arrayref78.6 = load double, double addrspace(13)* %93, align 8, !dbg !4739, !tbaa !147, !alias.scope !150, !noalias !151
  %94 = fadd double %91, %arrayref78.6, !dbg !4807
  %95 = add nuw nsw i64 %73, 8, !dbg !4737
  %96 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %92, !dbg !4739
  %arrayref78.7 = load double, double addrspace(13)* %96, align 8, !dbg !4739, !tbaa !147, !alias.scope !150, !noalias !151
  %97 = fadd double %94, %arrayref78.7, !dbg !4807
  %niter.next.7 = add i64 %71, 8, !dbg !4736
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter, !dbg !4736
  br i1 %niter.ncmp.7, label %L222.loopexit.unr-lcssa.loopexit, label %idxend75, !dbg !4736

idxend85:                                         ; preds = %top
  %98 = addrspacecast {} addrspace(10)* %18 to i8 addrspace(13)* addrspace(11)*, !dbg !4833
  %arrayptr87214215 = load i8 addrspace(13)*, i8 addrspace(13)* addrspace(11)* %98, align 8, !dbg !4833, !tbaa !141, !alias.scope !4765, !noalias !127, !nonnull !0
  %arrayref88.sroa.0.0.arrayptr87214215.sroa_cast = bitcast i8 addrspace(13)* %arrayptr87214215 to double addrspace(13)*, !dbg !4833
  %arrayref88.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref88.sroa.0.0.arrayptr87214215.sroa_cast, align 1, !dbg !4833, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref88.sroa.2.0.arrayptr87214215.sroa_idx = getelementptr inbounds i8, i8 addrspace(13)* %arrayptr87214215, i64 8, !dbg !4833
  %arrayref88.sroa.2.0.arrayptr87214215.sroa_cast = bitcast i8 addrspace(13)* %arrayref88.sroa.2.0.arrayptr87214215.sroa_idx to double addrspace(13)*, !dbg !4833
  %arrayref88.sroa.2.0.copyload = load double, double addrspace(13)* %arrayref88.sroa.2.0.arrayptr87214215.sroa_cast, align 1, !dbg !4833, !tbaa !611, !alias.scope !919, !noalias !4740
  br label %L59

idxend103:                                        ; preds = %L19
  %99 = addrspacecast {} addrspace(10)* %18 to [1 x [2 x double]] addrspace(13)* addrspace(11)*, !dbg !4836
  %arrayptr96216 = load [1 x [2 x double]] addrspace(13)*, [1 x [2 x double]] addrspace(13)* addrspace(11)* %99, align 8, !dbg !4836, !tbaa !141, !alias.scope !4765, !noalias !127, !nonnull !0
  %arrayref97.sroa.2.0..sroa_idx170 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 0, i64 0, i64 1, !dbg !4836
  %arrayref97.sroa.2.0.copyload = load double, double addrspace(13)* %arrayref97.sroa.2.0..sroa_idx170, align 1, !dbg !4836, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref97.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 0, i64 0, i64 0, !dbg !4836
  %arrayref97.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref97.sroa.0.0..sroa_idx, align 1, !dbg !4836, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref106.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 1, i64 0, i64 0, !dbg !4838
  %arrayref106.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref106.sroa.0.0..sroa_idx, align 1, !dbg !4838, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref106.sroa.2.0..sroa_idx169 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 1, i64 0, i64 1, !dbg !4838
  %arrayref106.sroa.2.0.copyload = load double, double addrspace(13)* %arrayref106.sroa.2.0..sroa_idx169, align 1, !dbg !4838, !tbaa !611, !alias.scope !919, !noalias !4740
  %100 = fadd double %arrayref97.sroa.0.0.copyload, %arrayref106.sroa.0.0.copyload, !dbg !4844
  %101 = fadd double %arrayref97.sroa.2.0.copyload, %arrayref106.sroa.2.0.copyload, !dbg !4844
  %.not217237 = icmp ugt i64 %arraylen, 2, !dbg !4843
  br i1 %.not217237, label %idxend122.preheader, label %L59, !dbg !4736

idxend122.preheader:                              ; preds = %idxend103
  %102 = add nsw i64 %arraylen, -2, !dbg !4736
  %103 = add nsw i64 %arraylen, -3, !dbg !4736
  %xtraiter264 = and i64 %102, 7, !dbg !4736
  %104 = icmp ult i64 %103, 7, !dbg !4736
  br i1 %104, label %L59.loopexit.unr-lcssa, label %idxend122.preheader.new, !dbg !4736

idxend122.preheader.new:                          ; preds = %idxend122.preheader
  %unroll_iter269 = and i64 %102, -8, !dbg !4736
  br label %idxend122, !dbg !4736

idxend122:                                        ; preds = %idxend122, %idxend122.preheader.new
  %iv = phi i64 [ %iv.next, %idxend122 ], [ 0, %idxend122.preheader.new ]
  %value_phi114239 = phi double [ %101, %idxend122.preheader.new ], [ %131, %idxend122 ]
  %value_phi113238 = phi double [ %100, %idxend122.preheader.new ], [ %130, %idxend122 ]
  %105 = shl nuw i64 %iv, 3, !dbg !4737
  %iv.next = add nuw nsw i64 %iv, 1, !dbg !4737
  %106 = shl i64 %iv, 3, !dbg !4737
  %107 = add nuw nsw i64 %106, 2, !dbg !4737
  %108 = or i64 %107, 1, !dbg !4737
  %arrayref125.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %107, i64 0, i64 0, !dbg !4739
  %arrayref125.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref125.sroa.2.0..sroa_idx158 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %107, i64 0, i64 1, !dbg !4739
  %arrayref125.sroa.2.0.copyload = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %109 = fadd double %value_phi113238, %arrayref125.sroa.0.0.copyload, !dbg !4741
  %110 = fadd double %value_phi114239, %arrayref125.sroa.2.0.copyload, !dbg !4741
  %111 = add nuw nsw i64 %107, 2, !dbg !4737
  %arrayref125.sroa.0.0..sroa_idx.1 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %108, i64 0, i64 0, !dbg !4739
  %arrayref125.sroa.0.0.copyload.1 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.1, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref125.sroa.2.0..sroa_idx158.1 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %108, i64 0, i64 1, !dbg !4739
  %arrayref125.sroa.2.0.copyload.1 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.1, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %112 = fadd double %109, %arrayref125.sroa.0.0.copyload.1, !dbg !4741
  %113 = fadd double %110, %arrayref125.sroa.2.0.copyload.1, !dbg !4741
  %114 = add nuw nsw i64 %107, 3, !dbg !4737
  %arrayref125.sroa.0.0..sroa_idx.2 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %111, i64 0, i64 0, !dbg !4739
  %arrayref125.sroa.0.0.copyload.2 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.2, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref125.sroa.2.0..sroa_idx158.2 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %111, i64 0, i64 1, !dbg !4739
  %arrayref125.sroa.2.0.copyload.2 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.2, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %115 = fadd double %112, %arrayref125.sroa.0.0.copyload.2, !dbg !4741
  %116 = fadd double %113, %arrayref125.sroa.2.0.copyload.2, !dbg !4741
  %117 = add nuw nsw i64 %107, 4, !dbg !4737
  %arrayref125.sroa.0.0..sroa_idx.3 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %114, i64 0, i64 0, !dbg !4739
  %arrayref125.sroa.0.0.copyload.3 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.3, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref125.sroa.2.0..sroa_idx158.3 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %114, i64 0, i64 1, !dbg !4739
  %arrayref125.sroa.2.0.copyload.3 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.3, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %118 = fadd double %115, %arrayref125.sroa.0.0.copyload.3, !dbg !4741
  %119 = fadd double %116, %arrayref125.sroa.2.0.copyload.3, !dbg !4741
  %120 = add nuw nsw i64 %107, 5, !dbg !4737
  %arrayref125.sroa.0.0..sroa_idx.4 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %117, i64 0, i64 0, !dbg !4739
  %arrayref125.sroa.0.0.copyload.4 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.4, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref125.sroa.2.0..sroa_idx158.4 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %117, i64 0, i64 1, !dbg !4739
  %arrayref125.sroa.2.0.copyload.4 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.4, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %121 = fadd double %118, %arrayref125.sroa.0.0.copyload.4, !dbg !4741
  %122 = fadd double %119, %arrayref125.sroa.2.0.copyload.4, !dbg !4741
  %123 = add nuw nsw i64 %107, 6, !dbg !4737
  %arrayref125.sroa.0.0..sroa_idx.5 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %120, i64 0, i64 0, !dbg !4739
  %arrayref125.sroa.0.0.copyload.5 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.5, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref125.sroa.2.0..sroa_idx158.5 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %120, i64 0, i64 1, !dbg !4739
  %arrayref125.sroa.2.0.copyload.5 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.5, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %124 = fadd double %121, %arrayref125.sroa.0.0.copyload.5, !dbg !4741
  %125 = fadd double %122, %arrayref125.sroa.2.0.copyload.5, !dbg !4741
  %126 = add nuw nsw i64 %107, 7, !dbg !4737
  %arrayref125.sroa.0.0..sroa_idx.6 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %123, i64 0, i64 0, !dbg !4739
  %arrayref125.sroa.0.0.copyload.6 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.6, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref125.sroa.2.0..sroa_idx158.6 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %123, i64 0, i64 1, !dbg !4739
  %arrayref125.sroa.2.0.copyload.6 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.6, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %127 = fadd double %124, %arrayref125.sroa.0.0.copyload.6, !dbg !4741
  %128 = fadd double %125, %arrayref125.sroa.2.0.copyload.6, !dbg !4741
  %129 = add nuw nsw i64 %107, 8, !dbg !4737
  %arrayref125.sroa.0.0..sroa_idx.7 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %126, i64 0, i64 0, !dbg !4739
  %arrayref125.sroa.0.0.copyload.7 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.7, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %arrayref125.sroa.2.0..sroa_idx158.7 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %126, i64 0, i64 1, !dbg !4739
  %arrayref125.sroa.2.0.copyload.7 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.7, align 1, !dbg !4739, !tbaa !611, !alias.scope !919, !noalias !4740
  %130 = fadd double %127, %arrayref125.sroa.0.0.copyload.7, !dbg !4741
  %131 = fadd double %128, %arrayref125.sroa.2.0.copyload.7, !dbg !4741
  %niter270.next.7 = add i64 %105, 8, !dbg !4736
  %niter270.ncmp.7 = icmp eq i64 %niter270.next.7, %unroll_iter269, !dbg !4736
  br i1 %niter270.ncmp.7, label %L59.loopexit.unr-lcssa.loopexit, label %idxend122, !dbg !4736
}

 Type analysis state: 
<analysis>
  %arraylen_ptr2 = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %25, i64 0, i32 1, !dbg !186: {[-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: {}
i64 0: {[-1]:Anything}, intvals: {0,}
  %arrayref125.sroa.0.0..sroa_idx.5 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %120, i64 0, i64 0, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.0.0.copyload.5 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.5, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0..sroa_idx158.5 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %120, i64 0, i64 1, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0.copyload.5 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.5, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %124 = fadd double %121, %arrayref125.sroa.0.0.copyload.5, !dbg !168: {[-1]:Float@double}, intvals: {}
  %125 = fadd double %122, %arrayref125.sroa.2.0.copyload.5, !dbg !168: {[-1]:Float@double}, intvals: {}
  %126 = add nuw nsw i64 %107, 7, !dbg !159: {[-1]:Integer}, intvals: {9,}
  %arrayref125.sroa.0.0..sroa_idx.6 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %123, i64 0, i64 0, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.0.0.copyload.6 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.6, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0..sroa_idx158.6 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %123, i64 0, i64 1, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0.copyload.6 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.6, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %127 = fadd double %124, %arrayref125.sroa.0.0.copyload.6, !dbg !168: {[-1]:Float@double}, intvals: {}
  %128 = fadd double %125, %arrayref125.sroa.2.0.copyload.6, !dbg !168: {[-1]:Float@double}, intvals: {}
  %129 = add nuw nsw i64 %107, 8, !dbg !159: {[-1]:Integer}, intvals: {10,}
  %arrayref125.sroa.0.0..sroa_idx.7 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %126, i64 0, i64 0, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.0.0.copyload.7 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.7, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
{}* inttoptr (i64 130277802531216 to {}*): {[-1]:Anything}, intvals: {}
  %arrayref66 = load double, double addrspace(13)* %66, align 8, !dbg !334, !tbaa !288, !alias.scope !291, !noalias !292, !enzyme_type !330, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Float64 !0: {[-1]:Float@double}, intvals: {}
  %75 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %73, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %67 = fadd double %arrayref57, %arrayref66, !dbg !336: {[-1]:Float@double}, intvals: {}
  %.not212232 = icmp ugt i64 %arraylen33, 2, !dbg !339: {[-1]:Integer}, intvals: {}
  %arrayref78 = load double, double addrspace(13)* %75, align 8, !dbg !162, !tbaa !288, !alias.scope !291, !noalias !292: {[-1]:Float@double}, intvals: {}
  %76 = fadd double %value_phi67233, %arrayref78, !dbg !293: {[-1]:Float@double}, intvals: {}
  %77 = add nuw nsw i64 %73, 2, !dbg !159: {[-1]:Integer}, intvals: {4,}
  %78 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %74, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref78.1 = load double, double addrspace(13)* %78, align 8, !dbg !162, !tbaa !288, !alias.scope !291, !noalias !292: {[-1]:Float@double}, intvals: {}
  %79 = fadd double %76, %arrayref78.1, !dbg !293: {[-1]:Float@double}, intvals: {}
  %80 = add nuw nsw i64 %73, 3, !dbg !159: {[-1]:Integer}, intvals: {5,}
  %81 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %77, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref78.2 = load double, double addrspace(13)* %81, align 8, !dbg !162, !tbaa !288, !alias.scope !291, !noalias !292: {[-1]:Float@double}, intvals: {}
  %82 = fadd double %79, %arrayref78.2, !dbg !293: {[-1]:Float@double}, intvals: {}
  %83 = add nuw nsw i64 %73, 4, !dbg !159: {[-1]:Integer}, intvals: {6,}
  %84 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %80, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref78.3 = load double, double addrspace(13)* %84, align 8, !dbg !162, !tbaa !288, !alias.scope !291, !noalias !292: {[-1]:Float@double}, intvals: {}
  %85 = fadd double %82, %arrayref78.3, !dbg !293: {[-1]:Float@double}, intvals: {}
  %.sroa.0175.0..sroa_idx183 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %13, i64 0, i64 0, i64 0, !dbg !91: {[-1]:Pointer}, intvals: {}
  %15 = bitcast {}*** %ptls_field199 to i64***: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %ptls_load200201 = load i64**, i64*** %15, align 8, !tbaa !85: {[-1]:Pointer}, intvals: {}
  %safepoint = load i64*, i64** %16, align 8, !tbaa !89: {}, intvals: {}
  %getfield = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %getfield_addr unordered, align 8, !dbg !91, !tbaa !89, !alias.scope !92, !noalias !95, !nonnull !0, !dereferenceable !100, !align !101, !enzyme_type !102, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BFloat64\7D !0: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %18 = call fastcc nonnull {} addrspace(10)* @julia_collect_20415({ [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(11)* nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) %17) #126, !dbg !91: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %30 = call double @llvm.fabs.f64(double %arrayref.sroa.0.0.copyload) #126, !dbg !220: {[-1]:Float@double}, intvals: {}
  switch i64 %arraylen, label %L19 [
    i64 0, label %L59
    i64 1, label %idxend85
  ], !dbg !146: {}, intvals: {}
  %.sroa.10.0..sroa_idx193 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %13, i64 0, i64 0, i64 1, !dbg !91: {[-1]:Pointer}, intvals: {}
  %arrayref125.sroa.2.0..sroa_idx158.epil = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %21, i64 0, i64 1, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %4 = call {}*** @julia.get_pgcstack(): {[-1]:Pointer}, intvals: {}
i64 7: {[-1]:Integer}, intvals: {7,}
i64 -8: {[-1]:Integer}, intvals: {-8,}
  %49 = add nuw nsw i64 %value_phi68234.unr, %iv7, !dbg !159: {[-1]:Integer}, intvals: {2,10,}
  %arrayref88.sroa.0.0.arrayptr87214215.sroa_cast = bitcast i8 addrspace(13)* %arrayptr87214215 to double addrspace(13)*, !dbg !328: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref88.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref88.sroa.0.0.arrayptr87214215.sroa_cast, align 1, !dbg !328, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref88.sroa.2.0.arrayptr87214215.sroa_idx = getelementptr inbounds i8, i8 addrspace(13)* %arrayptr87214215, i64 8, !dbg !328: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref88.sroa.2.0.arrayptr87214215.sroa_cast = bitcast i8 addrspace(13)* %arrayref88.sroa.2.0.arrayptr87214215.sroa_idx to double addrspace(13)*, !dbg !328: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref88.sroa.2.0.copyload = load double, double addrspace(13)* %arrayref88.sroa.2.0.arrayptr87214215.sroa_cast, align 1, !dbg !328, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %99 = addrspacecast {} addrspace(10)* %18 to [1 x [2 x double]] addrspace(13)* addrspace(11)*, !dbg !332: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arrayptr96216 = load [1 x [2 x double]] addrspace(13)*, [1 x [2 x double]] addrspace(13)* addrspace(11)* %99, align 8, !dbg !332, !tbaa !215, !alias.scope !217, !noalias !145, !nonnull !0: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref97.sroa.2.0..sroa_idx170 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 0, i64 0, i64 1, !dbg !332: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref97.sroa.2.0.copyload = load double, double addrspace(13)* %arrayref97.sroa.2.0..sroa_idx170, align 1, !dbg !332, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref97.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 0, i64 0, i64 0, !dbg !332: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref97.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref97.sroa.0.0..sroa_idx, align 1, !dbg !332, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref106.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 1, i64 0, i64 0, !dbg !334: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref106.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref106.sroa.0.0..sroa_idx, align 1, !dbg !334, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref106.sroa.2.0..sroa_idx169 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 1, i64 0, i64 1, !dbg !334: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
i64 5: {[-1]:Integer}, intvals: {5,}
  %107 = add nuw nsw i64 %106, 2, !dbg !159: {[-1]:Integer}, intvals: {2,}
  %arraylen_ptr = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %19, i64 0, i32 1, !dbg !110: {[-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: {}
  %or.cond = or i1 %59, %61, !dbg !324: {[-1]:Integer}, intvals: {}
  %errorbox20 = alloca i64, align 8, !dbg !285: {}, intvals: {}
  %62 = addrspacecast {} addrspace(10)* %26 to {} addrspace(12)*, !dbg !285: {}, intvals: {}
  %arrayptr23207 = load double addrspace(13)*, double addrspace(13)* addrspace(11)* %29, align 8, !dbg !285, !tbaa !215, !alias.scope !217, !noalias !145, !nonnull !0, !enzyme_type !218, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BFloat64\7D !0: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %63 = getelementptr inbounds double, double addrspace(13)* %arrayptr23207, i64 %iv3, !dbg !285: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %exitcond249.not = icmp eq i64 %iv.next4, %arraylen3, !dbg !326: {[-1]:Integer}, intvals: {}
  %64 = addrspacecast {} addrspace(10)* %26 to double addrspace(13)* addrspace(11)*, !dbg !328: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arrayptr47210 = load double addrspace(13)*, double addrspace(13)* addrspace(11)* %64, align 8, !dbg !328, !tbaa !215, !alias.scope !217, !noalias !145, !nonnull !0, !enzyme_type !218, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BFloat64\7D !0: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %66 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 1, !dbg !334: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref48 = load double, double addrspace(13)* %arrayptr47210, align 8, !dbg !328, !tbaa !288, !alias.scope !291, !noalias !292, !enzyme_type !330, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Float64 !0: {[-1]:Float@double}, intvals: {}
  %65 = addrspacecast {} addrspace(10)* %26 to double addrspace(13)* addrspace(11)*, !dbg !332: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arrayptr56211 = load double addrspace(13)*, double addrspace(13)* addrspace(11)* %65, align 8, !dbg !332, !tbaa !215, !alias.scope !217, !noalias !145, !nonnull !0, !enzyme_type !218, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BFloat64\7D !0: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref57 = load double, double addrspace(13)* %arrayptr56211, align 8, !dbg !332, !tbaa !288, !alias.scope !291, !noalias !292, !enzyme_type !330, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Float64 !0: {[-1]:Float@double}, intvals: {}
i64 24: {[-1]:Integer}, intvals: {24,}
  %12 = call noalias nonnull dereferenceable(16) dereferenceable_or_null(16) i8* @malloc(i64 16), !enzyme_fromstack !84: {[-1]:Pointer}, intvals: {}
i64 4: {[-1]:Integer}, intvals: {4,}
  %68 = add nsw i64 %arraylen33, -2, !dbg !158: {[-1]:Integer}, intvals: {}
  %69 = add nsw i64 %arraylen33, -3, !dbg !158: {[-1]:Integer}, intvals: {}
  %xtraiter = and i64 %68, 7, !dbg !158: {[-1]:Integer}, intvals: {}
  %iv = phi i64 [ %iv.next, %idxend122 ], [ 0, %idxend122.preheader.new ]: {[-1]:Integer}, intvals: {0,}
i64 -2: {[-1]:Integer}, intvals: {-2,}
  %16 = getelementptr inbounds i64*, i64** %ptls_load200201, i64 2: {[-1]:Pointer}, intvals: {}
i32 1: {[-1]:Integer}, intvals: {1,}
  %arrayref125.sroa.2.0.copyload.2 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.2, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %115 = fadd double %112, %arrayref125.sroa.0.0.copyload.2, !dbg !168: {[-1]:Float@double}, intvals: {}
  %116 = fadd double %113, %arrayref125.sroa.2.0.copyload.2, !dbg !168: {[-1]:Float@double}, intvals: {}
  %117 = add nuw nsw i64 %107, 4, !dbg !159: {[-1]:Integer}, intvals: {6,}
  %arrayref125.sroa.0.0..sroa_idx.3 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %114, i64 0, i64 0, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.0.0.copyload.3 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.3, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0..sroa_idx158.3 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %114, i64 0, i64 1, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0.copyload.3 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.3, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %118 = fadd double %115, %arrayref125.sroa.0.0.copyload.3, !dbg !168: {[-1]:Float@double}, intvals: {}
  %119 = fadd double %116, %arrayref125.sroa.2.0.copyload.3, !dbg !168: {[-1]:Float@double}, intvals: {}
  %120 = add nuw nsw i64 %107, 5, !dbg !159: {[-1]:Integer}, intvals: {7,}
  %arrayref125.sroa.0.0..sroa_idx.4 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %117, i64 0, i64 0, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.0.0.copyload.4 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.4, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0..sroa_idx158.4 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %117, i64 0, i64 1, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0.copyload.4 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.4, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %121 = fadd double %118, %arrayref125.sroa.0.0.copyload.4, !dbg !168: {[-1]:Float@double}, intvals: {}
  %122 = fadd double %119, %arrayref125.sroa.2.0.copyload.4, !dbg !168: {[-1]:Float@double}, intvals: {}
  %123 = add nuw nsw i64 %107, 6, !dbg !159: {[-1]:Integer}, intvals: {8,}
  %71 = shl nuw i64 %iv5, 3, !dbg !159: {[-1]:Integer}, intvals: {0,}
  %40 = fdiv double %arrayref.sroa.0.0.copyload, %36, !dbg !273: {[-1]:Float@double}, intvals: {}
  %41 = fmul double %40, %40, !dbg !276: {[-1]:Float@double}, intvals: {}
  %42 = fdiv double %arrayref.sroa.5.0.copyload, %36, !dbg !273: {[-1]:Float@double}, intvals: {}
  %43 = fmul double %42, %42, !dbg !276: {[-1]:Float@double}, intvals: {}
  %44 = fadd double %41, %43, !dbg !283: {[-1]:Float@double}, intvals: {}
  %45 = call double @julia_sqrt_20345(double %44) #128, !dbg !275: {[-1]:Float@double}, intvals: {}
  %46 = fmul double %36, %45, !dbg !284: {[-1]:Float@double}, intvals: {}
  %value_phi15 = phi double [ %46, %L157 ], [ %36, %L131 ], [ 0.000000e+00, %L154 ], [ %58, %idxend ]: {[-1]:Float@double}, intvals: {}
  %arraylen17 = load i64, i64 addrspace(11)* %arraylen_ptr16, align 8, !dbg !285, !tbaa !140, !range !143, !alias.scope !144, !noalias !145, !enzyme_type !200, !enzyme_inactive !0, !enzymejl_source_type_UInt64 !0, !enzymejl_byref_BITS_VALUE !0: {[-1]:Integer}, intvals: {}
  %51 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %49, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %inbounds18 = icmp ult i64 %iv3, %arraylen17, !dbg !285: {[-1]:Integer}, intvals: {}
  %arraylen33 = phi i64 [ %arraylen33.pre, %L59.L180_crit_edge ], [ %arraylen17, %L180.loopexit ], !dbg !110, !enzyme_inactive !0: {[-1]:Integer}, intvals: {}
  switch i64 %arraylen33, label %L192 [
    i64 0, label %L222
    i64 1, label %idxend45
  ], !dbg !146: {}, intvals: {}
  %47 = icmp ugt i64 %arraylen33, 15, !dbg !147: {[-1]:Integer}, intvals: {}
{}* inttoptr (i64 130282549281632 to {}*): {[-1]:Anything}, intvals: {}
  %iv1 = phi i64 [ 0, %idxend122.epil.preheader ], [ %iv.next2, %idxend122.epil ]: {[-1]:Integer}, intvals: {0,}
  call void @zeroType.26({} addrspace(10)* %10, i8 0, i64 24), !enzyme_zerostack !0: {}, intvals: {}
  %11 = bitcast {} addrspace(10)* %10 to { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)*, !enzyme_caststack !0: {[-1]:Pointer, [-1,-1]:Pointer, [-1,-1,0]:Pointer, [-1,-1,8]:Integer, [-1,-1,9]:Integer, [-1,-1,10]:Integer, [-1,-1,11]:Integer, [-1,-1,12]:Integer, [-1,-1,13]:Integer, [-1,-1,14]:Integer, [-1,-1,15]:Integer, [-1,-1,16]:Integer, [-1,-1,17]:Integer, [-1,-1,18]:Integer, [-1,-1,19]:Integer, [-1,-1,20]:Integer, [-1,-1,21]:Integer, [-1,-1,22]:Integer, [-1,-1,23]:Integer, [-1,-1,24]:Integer, [-1,-1,25]:Integer, [-1,-1,26]:Integer, [-1,-1,27]:Integer, [-1,-1,28]:Integer, [-1,-1,29]:Integer, [-1,-1,30]:Integer, [-1,-1,31]:Integer, [-1,-1,32]:Integer, [-1,-1,33]:Integer, [-1,-1,34]:Integer, [-1,-1,35]:Integer, [-1,-1,36]:Integer, [-1,-1,37]:Integer, [-1,-1,38]:Integer, [-1,-1,39]:Integer, [-1,0,0,-1]:Float@double, [-1,8,0,-1]:Integer, [-1,16,0,-1]:Float@double}, intvals: {}
  %.fca.0.0.gep = getelementptr { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)* %11, i64 0, i32 0, i64 0, !dbg !91: {[-1]:Pointer, [-1,-1]:Pointer, [-1,-1,0]:Pointer, [-1,-1,8]:Integer, [-1,-1,9]:Integer, [-1,-1,10]:Integer, [-1,-1,11]:Integer, [-1,-1,12]:Integer, [-1,-1,13]:Integer, [-1,-1,14]:Integer, [-1,-1,15]:Integer, [-1,-1,16]:Integer, [-1,-1,17]:Integer, [-1,-1,18]:Integer, [-1,-1,19]:Integer, [-1,-1,20]:Integer, [-1,-1,21]:Integer, [-1,-1,22]:Integer, [-1,-1,23]:Integer, [-1,-1,24]:Integer, [-1,-1,25]:Integer, [-1,-1,26]:Integer, [-1,-1,27]:Integer, [-1,-1,28]:Integer, [-1,-1,29]:Integer, [-1,-1,30]:Integer, [-1,-1,31]:Integer, [-1,-1,32]:Integer, [-1,-1,33]:Integer, [-1,-1,34]:Integer, [-1,-1,35]:Integer, [-1,-1,36]:Integer, [-1,-1,37]:Integer, [-1,-1,38]:Integer, [-1,-1,39]:Integer, [-1,0,0,-1]:Float@double}, intvals: {}
  %.fca.1.0.0.gep = getelementptr { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)* %11, i64 0, i32 1, i64 0, i64 0, !dbg !91: {[-1]:Pointer, [-1,-1]:Pointer, [-1,-1,0]:Pointer, [-1,-1,8]:Integer, [-1,-1,9]:Integer, [-1,-1,10]:Integer, [-1,-1,11]:Integer, [-1,-1,12]:Integer, [-1,-1,13]:Integer, [-1,-1,14]:Integer, [-1,-1,15]:Integer, [-1,-1,16]:Integer, [-1,-1,17]:Integer, [-1,-1,18]:Integer, [-1,-1,19]:Integer, [-1,-1,20]:Integer, [-1,-1,21]:Integer, [-1,-1,22]:Integer, [-1,-1,23]:Integer, [-1,-1,24]:Integer, [-1,-1,25]:Integer, [-1,-1,26]:Integer, [-1,-1,27]:Integer, [-1,-1,28]:Integer, [-1,-1,29]:Integer, [-1,-1,30]:Integer, [-1,-1,31]:Integer, [-1,-1,32]:Integer, [-1,-1,33]:Integer, [-1,-1,34]:Integer, [-1,-1,35]:Integer, [-1,-1,36]:Integer, [-1,-1,37]:Integer, [-1,-1,38]:Integer, [-1,-1,39]:Integer, [-1,0,0,-1]:Integer}, intvals: {}
  %.fca.1.0.1.gep = getelementptr { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] }, { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)* %11, i64 0, i32 1, i64 0, i64 1, !dbg !91: {[-1]:Pointer, [-1,-1]:Pointer, [-1,-1,0]:Pointer, [-1,-1,8]:Integer, [-1,-1,9]:Integer, [-1,-1,10]:Integer, [-1,-1,11]:Integer, [-1,-1,12]:Integer, [-1,-1,13]:Integer, [-1,-1,14]:Integer, [-1,-1,15]:Integer, [-1,-1,16]:Integer, [-1,-1,17]:Integer, [-1,-1,18]:Integer, [-1,-1,19]:Integer, [-1,-1,20]:Integer, [-1,-1,21]:Integer, [-1,-1,22]:Integer, [-1,-1,23]:Integer, [-1,-1,24]:Integer, [-1,-1,25]:Integer, [-1,-1,26]:Integer, [-1,-1,27]:Integer, [-1,-1,28]:Integer, [-1,-1,29]:Integer, [-1,-1,30]:Integer, [-1,-1,31]:Integer, [-1,-1,32]:Integer, [-1,-1,33]:Integer, [-1,-1,34]:Integer, [-1,-1,35]:Integer, [-1,-1,36]:Integer, [-1,-1,37]:Integer, [-1,-1,38]:Integer, [-1,-1,39]:Integer, [-1,0,0,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.0.0..sroa_idx.epil = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %21, i64 0, i64 0, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %.sroa.0175.0 = phi double [ %.sroa.0175.0.copyload184, %L55 ], [ %arrayref88.sroa.0.0.copyload, %idxend85 ], [ 0.000000e+00, %top ], [ %100, %idxend103 ], [ %.lcssa262.ph, %L59.loopexit.unr-lcssa ], [ %23, %L59.loopexit ]: {}, intvals: {}
  %.sroa.10.0 = phi double [ %.sroa.10.0.copyload194, %L55 ], [ %arrayref88.sroa.2.0.copyload, %idxend85 ], [ 0.000000e+00, %top ], [ %101, %idxend103 ], [ %.lcssa261.ph, %L59.loopexit.unr-lcssa ], [ %24, %L59.loopexit ]: {}, intvals: {}
  %25 = addrspacecast {} addrspace(10)* %3 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*, !dbg !186: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arraylen3 = load i64, i64 addrspace(11)* %arraylen_ptr2, align 8, !dbg !186, !tbaa !140, !range !143, !alias.scope !144, !noalias !145, !enzyme_type !200, !enzyme_inactive !0, !enzymejl_source_type_UInt64 !0, !enzymejl_byref_BITS_VALUE !0: {[-1]:Integer}, intvals: {}
  %.not203 = icmp eq i64 %arraylen3, 0, !dbg !210: {[-1]:Integer}, intvals: {}
  %26 = call noalias nonnull "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" {} addrspace(10)* @ijl_alloc_array_1d({} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 130282549281632 to {}*) to {} addrspace(10)*), i64 %arraylen3) #127, !dbg !201: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %.phi.trans.insert = addrspacecast {} addrspace(10)* %26 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arraylen_ptr32.phi.trans.insert = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %.phi.trans.insert, i64 0, i32 1: {[-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: {}
  %arraylen33.pre = load i64, i64 addrspace(11)* %arraylen_ptr32.phi.trans.insert, align 8, !dbg !110, !tbaa !140, !range !143, !alias.scope !144, !noalias !145, !enzyme_type !200, !enzyme_inactive !0, !enzymejl_source_type_UInt64 !0, !enzymejl_byref_BITS_VALUE !0: {[-1]:Integer}, intvals: {}
  %32 = fsub double %30, %31, !dbg !242: {[-1]:Float@double}, intvals: {}
  %27 = addrspacecast {} addrspace(10)* %3 to [1 x [2 x double]] addrspace(13)* addrspace(11)*: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arrayptr206 = load [1 x [2 x double]] addrspace(13)*, [1 x [2 x double]] addrspace(13)* addrspace(11)* %27, align 16, !tbaa !215, !alias.scope !217, !noalias !145, !nonnull !0, !enzyme_type !218, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BGeometryBasics.Point\7B2\2C\20Float64\7D\7D !0: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
i64 3: {[-1]:Integer}, intvals: {3,}
i64 2: {[-1]:Integer}, intvals: {2,}
  %iv.next8 = add nuw nsw i64 %iv7, 1, !dbg !159: {[-1]:Integer}, intvals: {1,}
  %14 = call {}*** @julia.get_pgcstack() #126: {[-1]:Pointer, [-1,16]:Pointer}, intvals: {}
  %7 = getelementptr inbounds {}*, {}** %6, i64 16: {[-1]:Pointer}, intvals: {}
  %.lcssa.ph = phi double [ undef, %idxend75.preheader ], [ %97, %L222.loopexit.unr-lcssa.loopexit ]: {[-1]:Float@double}, intvals: {}
  %value_phi68234.unr = phi i64 [ 2, %idxend75.preheader ], [ %95, %L222.loopexit.unr-lcssa.loopexit ]: {[-1]:Integer}, intvals: {2,10,}
  %value_phi67233.unr = phi double [ %67, %idxend75.preheader ], [ %97, %L222.loopexit.unr-lcssa.loopexit ]: {[-1]:Float@double}, intvals: {}
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0, !dbg !158: {[-1]:Integer}, intvals: {}
  %value_phi67233.epil = phi double [ %52, %idxend75.epil ], [ %value_phi67233.unr, %idxend75.epil.preheader ]: {[-1]:Float@double}, intvals: {}
  %50 = add nuw nsw i64 %49, 1, !dbg !159: {[-1]:Integer}, intvals: {3,11,}
  %arrayref78.epil = load double, double addrspace(13)* %51, align 8, !dbg !162, !tbaa !288, !alias.scope !291, !noalias !292: {[-1]:Float@double}, intvals: {}
  %52 = fadd double %value_phi67233.epil, %arrayref78.epil, !dbg !293: {[-1]:Float@double}, intvals: {}
  %epil.iter.cmp.not = icmp eq i64 %iv.next8, %xtraiter, !dbg !158: {[-1]:Integer}, intvals: {}
  %value_phi35 = phi double [ %arrayref48, %idxend45 ], [ %48, %L208 ], [ 0.000000e+00, %L180 ], [ %67, %idxend63 ], [ %.lcssa.ph, %L222.loopexit.unr-lcssa ], [ %52, %L222.loopexit ]: {[-1]:Float@double}, intvals: {}
  %28 = addrspacecast {} addrspace(10)* %26 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arraylen_ptr16 = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %28, i64 0, i32 1: {[-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: {}
  %29 = addrspacecast {} addrspace(10)* %26 to double addrspace(13)* addrspace(11)*: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %70 = icmp ult i64 %69, 7, !dbg !158: {[-1]:Integer}, intvals: {}
  %unroll_iter = and i64 %68, -8, !dbg !158: {[-1]:Integer}, intvals: {}
  %value_phi67233 = phi double [ %67, %idxend75.preheader.new ], [ %97, %idxend75 ]: {[-1]:Float@double}, intvals: {}
  %74 = or i64 %73, 1, !dbg !159: {[-1]:Integer}, intvals: {}
  %33 = icmp slt i64 %bitcast_coercion, 0, !dbg !251: {[-1]:Integer}, intvals: {}
  %34 = select i1 %33, double %31, double %30, !dbg !251: {[-1]:Float@double}, intvals: {}
  %35 = fcmp ord double %arrayref.sroa.0.0.copyload, %arrayref.sroa.5.0.copyload, !dbg !253: {[-1]:Integer}, intvals: {}
  %36 = select i1 %35, double %34, double %32, !dbg !257: {[-1]:Float@double}, intvals: {}
  %37 = fsub double %36, %36, !dbg !259: {[-1]:Float@double}, intvals: {}
  %38 = fcmp ord double %37, 0.000000e+00, !dbg !263: {[-1]:Integer}, intvals: {}
  %48 = call fastcc double @julia_mapreduce_impl_20412({} addrspace(10)* noundef nonnull align 16 dereferenceable(40) %26, i64 noundef signext 1, i64 signext %arraylen33) #126, !dbg !151: {[-1]:Float@double}, intvals: {}
  %31 = call double @llvm.fabs.f64(double %arrayref.sroa.5.0.copyload) #126, !dbg !239: {[-1]:Float@double}, intvals: {}
  %value_phi113238.epil = phi double [ %23, %idxend122.epil ], [ %value_phi113238.unr, %idxend122.epil.preheader ]: {[-1]:Float@double}, intvals: {}
  %iv3 = phi i64 [ %iv.next4, %idxend21 ], [ 0, %L95.lr.ph ]: {[-1]:Integer}, intvals: {0,}
  %22 = add nuw nsw i64 %21, 1, !dbg !159: {[-1]:Integer}, intvals: {3,11,}
  %arrayref125.sroa.0.0.copyload.epil = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.epil, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0.copyload.epil = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.epil, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %bitcast_coercion = bitcast double %32 to i64, !dbg !247: {[-1]:Float@double}, intvals: {}
  %23 = fadd double %value_phi113238.epil, %arrayref125.sroa.0.0.copyload.epil, !dbg !168: {[-1]:Float@double}, intvals: {}
  %24 = fadd double %value_phi114239.epil, %arrayref125.sroa.2.0.copyload.epil, !dbg !168: {[-1]:Float@double}, intvals: {}
  %iv.next4 = add nuw nsw i64 %iv3, 1, !dbg !304: {[-1]:Integer}, intvals: {1,}
  %epil.iter265.cmp.not = icmp eq i64 %iv.next2, %xtraiter264, !dbg !158: {[-1]:Integer}, intvals: {}
i64 1: {[-1]:Integer}, intvals: {1,}
  %iv.next2 = add nuw nsw i64 %iv1, 1, !dbg !159: {[-1]:Integer}, intvals: {1,}
  %ptls_field199 = getelementptr inbounds {}**, {}*** %14, i64 2: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
  %72 = shl i64 %iv5, 3, !dbg !159: {[-1]:Integer}, intvals: {0,}
double 0.000000e+00: {[-1]:Anything}, intvals: {}
i64 -3: {[-1]:Integer}, intvals: {-3,}
i32 0: {[-1]:Anything}, intvals: {0,}
i64 8: {[-1]:Integer}, intvals: {8,}
  %arrayref125.sroa.2.0..sroa_idx158.7 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %126, i64 0, i64 1, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0.copyload.7 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.7, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %130 = fadd double %127, %arrayref125.sroa.0.0.copyload.7, !dbg !168: {[-1]:Float@double}, intvals: {}
  %131 = fadd double %128, %arrayref125.sroa.2.0.copyload.7, !dbg !168: {[-1]:Float@double}, intvals: {}
  %niter270.next.7 = add i64 %105, 8, !dbg !158: {[-1]:Integer}, intvals: {8,}
  %niter270.ncmp.7 = icmp eq i64 %niter270.next.7, %unroll_iter269, !dbg !158: {[-1]:Integer}, intvals: {}
  %6 = getelementptr inbounds {}*, {}** %5, i64 -14: {[-1]:Pointer}, intvals: {}
[1 x [2 x double]]* %0: {[-1]:Pointer}, intvals: {}
[1 x {} addrspace(10)*] addrspace(11)* %1: {[-1]:Pointer, [-1,-1]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Float@double, [-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, [-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,0,24]:Integer, [-1,0,25]:Integer, [-1,0,26]:Integer, [-1,0,27]:Integer, [-1,0,28]:Integer, [-1,0,29]:Integer, [-1,0,30]:Integer, [-1,0,31]:Integer, [-1,0,32]:Integer, [-1,0,33]:Integer, [-1,0,34]:Integer, [-1,0,35]:Integer, [-1,0,36]:Integer, [-1,0,37]:Integer, [-1,0,38]:Integer, [-1,0,39]:Integer}, intvals: {}
{} addrspace(10)* %2: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]: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, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
{} addrspace(10)* %3: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arrayref106.sroa.2.0.copyload = load double, double addrspace(13)* %arrayref106.sroa.2.0..sroa_idx169, align 1, !dbg !334, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %100 = fadd double %arrayref97.sroa.0.0.copyload, %arrayref106.sroa.0.0.copyload, !dbg !340: {[-1]:Float@double}, intvals: {}
  %101 = fadd double %arrayref97.sroa.2.0.copyload, %arrayref106.sroa.2.0.copyload, !dbg !340: {[-1]:Float@double}, intvals: {}
  %.not217237 = icmp ugt i64 %arraylen, 2, !dbg !339: {[-1]:Integer}, intvals: {}
  %102 = add nsw i64 %arraylen, -2, !dbg !158: {[-1]:Integer}, intvals: {}
  %103 = add nsw i64 %arraylen, -3, !dbg !158: {[-1]:Integer}, intvals: {}
  %xtraiter264 = and i64 %102, 7, !dbg !158: {[-1]:Integer}, intvals: {}
  %104 = icmp ult i64 %103, 7, !dbg !158: {[-1]:Integer}, intvals: {}
  %unroll_iter269 = and i64 %102, -8, !dbg !158: {[-1]:Integer}, intvals: {}
  %value_phi114239 = phi double [ %101, %idxend122.preheader.new ], [ %131, %idxend122 ]: {[-1]:Float@double}, intvals: {}
  %value_phi113238 = phi double [ %100, %idxend122.preheader.new ], [ %130, %idxend122 ]: {[-1]:Float@double}, intvals: {}
  %iv7 = phi i64 [ 0, %idxend75.epil.preheader ], [ %iv.next8, %idxend75.epil ]: {[-1]:Integer}, intvals: {0,}
  %108 = or i64 %107, 1, !dbg !159: {[-1]:Integer}, intvals: {}
  %arrayref125.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %107, i64 0, i64 0, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %13 = bitcast i8* %12 to [1 x [2 x double]]*, !enzyme_caststack !0: {[-1]:Pointer}, intvals: {}
i64 15: {[-1]:Integer}, intvals: {15,}
  %21 = add nuw nsw i64 %value_phi115240.unr, %iv1, !dbg !159: {[-1]:Integer}, intvals: {2,10,}
  %17 = addrspacecast { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(10)* %11 to { [1 x {} addrspace(10)*], [1 x [2 x {} addrspace(10)*]] } addrspace(11)*, !dbg !91: {[-1]:Pointer, [-1,-1]:Pointer, [-1,-1,0]:Pointer, [-1,-1,8]:Integer, [-1,-1,9]:Integer, [-1,-1,10]:Integer, [-1,-1,11]:Integer, [-1,-1,12]:Integer, [-1,-1,13]:Integer, [-1,-1,14]:Integer, [-1,-1,15]:Integer, [-1,-1,16]:Integer, [-1,-1,17]:Integer, [-1,-1,18]:Integer, [-1,-1,19]:Integer, [-1,-1,20]:Integer, [-1,-1,21]:Integer, [-1,-1,22]:Integer, [-1,-1,23]:Integer, [-1,-1,24]:Integer, [-1,-1,25]:Integer, [-1,-1,26]:Integer, [-1,-1,27]:Integer, [-1,-1,28]:Integer, [-1,-1,29]:Integer, [-1,-1,30]:Integer, [-1,-1,31]:Integer, [-1,-1,32]:Integer, [-1,-1,33]:Integer, [-1,-1,34]:Integer, [-1,-1,35]:Integer, [-1,-1,36]:Integer, [-1,-1,37]:Integer, [-1,-1,38]:Integer, [-1,-1,39]:Integer, [-1,0,0,-1]:Float@double, [-1,8,0,-1]:Integer, [-1,16,0,-1]:Float@double}, intvals: {}
  %39 = fcmp une double %36, 0.000000e+00, !dbg !267: {[-1]:Integer}, intvals: {}
  %19 = addrspacecast {} addrspace(10)* %18 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*, !dbg !110: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arraylen = load i64, i64 addrspace(11)* %arraylen_ptr, align 8, !dbg !110, !tbaa !140, !range !143, !alias.scope !144, !noalias !145: {[-1]:Integer}, intvals: {}
  %20 = icmp ugt i64 %arraylen, 15, !dbg !147: {[-1]:Integer}, intvals: {}
  %value_phi114239.epil = phi double [ %24, %idxend122.epil ], [ %value_phi114239.unr, %idxend122.epil.preheader ]: {[-1]:Float@double}, intvals: {}
  call fastcc void @julia_mapreduce_impl_20409([1 x [2 x double]]* noalias nocapture nofree noundef nonnull writeonly sret([1 x [2 x double]]) align 8 dereferenceable(16) %13, {} addrspace(10)* noundef nonnull align 16 dereferenceable(40) %18, i64 noundef signext 1, i64 signext %arraylen) #126, !dbg !151: {}, intvals: {}
  %.sroa.0175.0.copyload184 = load double, double* %.sroa.0175.0..sroa_idx183, align 8, !dbg !91, !tbaa !154, !alias.scope !156, !noalias !157: {}, intvals: {}
  %.sroa.10.0.copyload194 = load double, double* %.sroa.10.0..sroa_idx193, align 8, !dbg !91, !tbaa !154, !alias.scope !156, !noalias !157: {}, intvals: {}
  %.lcssa262.ph = phi double [ undef, %idxend122.preheader ], [ %130, %L59.loopexit.unr-lcssa.loopexit ]: {[-1]:Float@double}, intvals: {}
  %.lcssa261.ph = phi double [ undef, %idxend122.preheader ], [ %131, %L59.loopexit.unr-lcssa.loopexit ]: {[-1]:Float@double}, intvals: {}
  %value_phi115240.unr = phi i64 [ 2, %idxend122.preheader ], [ %129, %L59.loopexit.unr-lcssa.loopexit ]: {[-1]:Integer}, intvals: {2,10,}
  %value_phi114239.unr = phi double [ %101, %idxend122.preheader ], [ %131, %L59.loopexit.unr-lcssa.loopexit ]: {[-1]:Float@double}, intvals: {}
  %value_phi113238.unr = phi double [ %100, %idxend122.preheader ], [ %130, %L59.loopexit.unr-lcssa.loopexit ]: {[-1]:Float@double}, intvals: {}
  %lcmp.mod266.not = icmp eq i64 %xtraiter264, 0, !dbg !158: {[-1]:Integer}, intvals: {}
  %getfield_addr = getelementptr inbounds [1 x {} addrspace(10)*], [1 x {} addrspace(10)*] addrspace(11)* %1, i64 0, i64 0, !dbg !91: {[-1]:Pointer, [-1,-1]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Float@double, [-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, [-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,0,24]:Integer, [-1,0,25]:Integer, [-1,0,26]:Integer, [-1,0,27]:Integer, [-1,0,28]:Integer, [-1,0,29]:Integer, [-1,0,30]:Integer, [-1,0,31]:Integer, [-1,0,32]:Integer, [-1,0,33]:Integer, [-1,0,34]:Integer, [-1,0,35]:Integer, [-1,0,36]:Integer, [-1,0,37]:Integer, [-1,0,38]:Integer, [-1,0,39]:Integer}, intvals: {}
double undef: {[-1]:Anything}, intvals: {}
  %86 = add nuw nsw i64 %73, 5, !dbg !159: {[-1]:Integer}, intvals: {7,}
  %87 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %83, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref78.4 = load double, double addrspace(13)* %87, align 8, !dbg !162, !tbaa !288, !alias.scope !291, !noalias !292: {[-1]:Float@double}, intvals: {}
  %88 = fadd double %85, %arrayref78.4, !dbg !293: {[-1]:Float@double}, intvals: {}
  %89 = add nuw nsw i64 %73, 6, !dbg !159: {[-1]:Integer}, intvals: {8,}
  %90 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %86, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref78.5 = load double, double addrspace(13)* %90, align 8, !dbg !162, !tbaa !288, !alias.scope !291, !noalias !292: {[-1]:Float@double}, intvals: {}
  %91 = fadd double %88, %arrayref78.5, !dbg !293: {[-1]:Float@double}, intvals: {}
  %92 = add nuw nsw i64 %73, 7, !dbg !159: {[-1]:Integer}, intvals: {9,}
  %93 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %89, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref78.6 = load double, double addrspace(13)* %93, align 8, !dbg !162, !tbaa !288, !alias.scope !291, !noalias !292: {[-1]:Float@double}, intvals: {}
  %94 = fadd double %91, %arrayref78.6, !dbg !293: {[-1]:Float@double}, intvals: {}
  %95 = add nuw nsw i64 %73, 8, !dbg !159: {[-1]:Integer}, intvals: {10,}
  %96 = getelementptr inbounds double, double addrspace(13)* %arrayptr56211, i64 %92, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref78.7 = load double, double addrspace(13)* %96, align 8, !dbg !162, !tbaa !288, !alias.scope !291, !noalias !292: {[-1]:Float@double}, intvals: {}
  %97 = fadd double %94, %arrayref78.7, !dbg !293: {[-1]:Float@double}, intvals: {}
  %niter.next.7 = add i64 %71, 8, !dbg !158: {[-1]:Integer}, intvals: {8,}
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter, !dbg !158: {[-1]:Integer}, intvals: {}
  %98 = addrspacecast {} addrspace(10)* %18 to i8 addrspace(13)* addrspace(11)*, !dbg !328: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]: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, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}, intvals: {}
  %arrayptr87214215 = load i8 addrspace(13)*, i8 addrspace(13)* addrspace(11)* %98, align 8, !dbg !328, !tbaa !215, !alias.scope !217, !noalias !145, !nonnull !0: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %iv.next = add nuw nsw i64 %iv, 1, !dbg !159: {[-1]:Integer}, intvals: {1,}
  %106 = shl i64 %iv, 3, !dbg !159: {[-1]:Integer}, intvals: {0,}
  %105 = shl nuw i64 %iv, 3, !dbg !159: {[-1]:Integer}, intvals: {0,}
  %arrayref125.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0..sroa_idx158 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %107, i64 0, i64 1, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0.copyload = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %109 = fadd double %value_phi113238, %arrayref125.sroa.0.0.copyload, !dbg !168: {[-1]:Float@double}, intvals: {}
  %110 = fadd double %value_phi114239, %arrayref125.sroa.2.0.copyload, !dbg !168: {[-1]:Float@double}, intvals: {}
  %111 = add nuw nsw i64 %107, 2, !dbg !159: {[-1]:Integer}, intvals: {4,}
  %arrayref125.sroa.0.0..sroa_idx.1 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %108, i64 0, i64 0, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.0.0.copyload.1 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.1, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0..sroa_idx158.1 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %108, i64 0, i64 1, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0.copyload.1 = load double, double addrspace(13)* %arrayref125.sroa.2.0..sroa_idx158.1, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %112 = fadd double %109, %arrayref125.sroa.0.0.copyload.1, !dbg !168: {[-1]:Float@double}, intvals: {}
  %113 = fadd double %110, %arrayref125.sroa.2.0.copyload.1, !dbg !168: {[-1]:Float@double}, intvals: {}
  %114 = add nuw nsw i64 %107, 3, !dbg !159: {[-1]:Integer}, intvals: {5,}
  %arrayref125.sroa.0.0..sroa_idx.2 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %111, i64 0, i64 0, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref125.sroa.0.0.copyload.2 = load double, double addrspace(13)* %arrayref125.sroa.0.0..sroa_idx.2, align 1, !dbg !162, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref125.sroa.2.0..sroa_idx158.2 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr96216, i64 %111, i64 0, i64 1, !dbg !162: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
{} addrspace(10)* addrspacecast ({}* inttoptr (i64 130277802531216 to {}*) to {} addrspace(10)*): {[-1]:Anything}, intvals: {}
  %5 = bitcast {}*** %4 to {}**: {[-1]:Pointer}, intvals: {}
  %8 = bitcast {}** %7 to i8**: {[-1]:Pointer}, intvals: {}
  %9 = load i8*, i8** %8, align 8: {}, intvals: {}
  %10 = call noalias nonnull dereferenceable(24) dereferenceable_or_null(24) {} addrspace(10)* @jl_gc_alloc_typed(i8* %9, i64 24, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 130277802531216 to {}*) to {} addrspace(10)*)), !enzyme_fromstack !84: {[-1]:Pointer, [-1,-1]:Pointer, [-1,-1,0]:Pointer, [-1,-1,8]:Integer, [-1,-1,9]:Integer, [-1,-1,10]:Integer, [-1,-1,11]:Integer, [-1,-1,12]:Integer, [-1,-1,13]:Integer, [-1,-1,14]:Integer, [-1,-1,15]:Integer, [-1,-1,16]:Integer, [-1,-1,17]:Integer, [-1,-1,18]:Integer, [-1,-1,19]:Integer, [-1,-1,20]:Integer, [-1,-1,21]:Integer, [-1,-1,22]:Integer, [-1,-1,23]:Integer, [-1,-1,24]:Integer, [-1,-1,25]:Integer, [-1,-1,26]:Integer, [-1,-1,27]:Integer, [-1,-1,28]:Integer, [-1,-1,29]:Integer, [-1,-1,30]:Integer, [-1,-1,31]:Integer, [-1,-1,32]:Integer, [-1,-1,33]:Integer, [-1,-1,34]:Integer, [-1,-1,35]:Integer, [-1,-1,36]:Integer, [-1,-1,37]:Integer, [-1,-1,38]:Integer, [-1,-1,39]:Integer, [-1,0,0,-1]:Float@double, [-1,8,0,-1]:Integer, [-1,16,0,-1]:Float@double}, intvals: {}
i64 6: {[-1]:Integer}, intvals: {6,}
  %73 = add nuw nsw i64 %72, 2, !dbg !159: {[-1]:Integer}, intvals: {2,}
{} addrspace(10)* addrspacecast ({}* inttoptr (i64 130282549281632 to {}*) to {} addrspace(10)*): {[-1]:Anything}, intvals: {}
  %53 = fdiv double %.sroa.0175.0, %value_phi35, !dbg !296: {[-1]:Float@double}, intvals: {}
  %54 = fdiv double %.sroa.10.0, %value_phi35, !dbg !296: {[-1]:Float@double}, intvals: {}
  %newstruct39.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %0, i64 0, i64 0, i64 0, !dbg !299: {[-1]:Pointer, [-1,0]:Float@double}, intvals: {}
  %newstruct39.sroa.2.0..sroa_idx171 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]]* %0, i64 0, i64 0, i64 1, !dbg !299: {[-1]:Pointer, [-1,0]:Float@double}, intvals: {}
  %iv5 = phi i64 [ %iv.next6, %idxend75 ], [ 0, %idxend75.preheader.new ]: {[-1]:Integer}, intvals: {0,}
  %iv.next6 = add nuw nsw i64 %iv5, 1, !dbg !159: {[-1]:Integer}, intvals: {1,}
  %arrayref.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr206, i64 %iv3, i64 0, i64 0, !dbg !308: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref.sroa.0.0..sroa_idx, align 1, !dbg !308, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %arrayref.sroa.5.0..sroa_idx172 = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr206, i64 %iv3, i64 0, i64 1, !dbg !308: {[-1]:Pointer, [-1,-1]:Float@double}, intvals: {}
  %arrayref.sroa.5.0.copyload = load double, double addrspace(13)* %arrayref.sroa.5.0..sroa_idx172, align 1, !dbg !308, !tbaa !165, !alias.scope !166, !noalias !167: {[-1]:Float@double}, intvals: {}
  %55 = fmul double %arrayref.sroa.0.0.copyload, %arrayref.sroa.0.0.copyload, !dbg !317: {[-1]:Float@double}, intvals: {}
  %56 = fmul double %arrayref.sroa.5.0.copyload, %arrayref.sroa.5.0.copyload, !dbg !317: {[-1]:Float@double}, intvals: {}
  %57 = fadd double %55, %56, !dbg !321: {[-1]:Float@double}, intvals: {}
  %58 = call double @julia_sqrt_20345(double %57) #128, !dbg !320: {[-1]:Float@double}, intvals: {}
  %59 = fcmp ule double %58, 0.000000e+00, !dbg !322: {[-1]:Integer}, intvals: {}
  %60 = fsub double %58, %58: {[-1]:Float@double}, intvals: {}
  %61 = fcmp uno double %60, 0.000000e+00: {[-1]:Integer}, intvals: {}
</analysis>

Cannot deduce type of phi   %.sroa.0175.0 = phi double [ %.sroa.0175.0.copyload184, %L55 ], [ %arrayref88.sroa.0.0.copyload, %idxend85 ], [ 0.000000e+00, %top ], [ %100, %idxend103 ], [ %.lcssa262.ph, %L59.loopexit.unr-lcssa ], [ %23, %L59.loopexit ]{} sz: 8


Caused by:
Stacktrace:
 [1] size
   @ ./array.jl:191
 [2] axes
   @ ./abstractarray.jl:98
 [3] combine_axes
   @ ./broadcast.jl:525
 [4] _axes
   @ ./broadcast.jl:236
 [5] axes
   @ ./broadcast.jl:234
 [6] similar
   @ ./broadcast.jl:223
 [7] override_bc_materialize
   @ ~/Documents/Work/dev/Enzyme.jl/src/compiler/interpreter.jl:701
 [8] #19
   @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:88
within MethodInstance for (::var"#19#28"{Vector{Float64}})(::Vector{Int64}, ::Vector{GeometryBasics.Point{2, Float64}})


Stacktrace:
  [1] #19
    @ ./essentials.jl:0
  [2] #4
    @ ./generator.jl:36 [inlined]
  [3] iterate
    @ ./generator.jl:47 [inlined]
  [4] collect_to!
    @ ./array.jl:892 [inlined]
  [5] collect_to_with_first!
    @ ./array.jl:870 [inlined]
  [6] collect
    @ ./array.jl:844
  [7] map
    @ ./abstractarray.jl:3409 [inlined]
  [8] #14
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:87 [inlined]
  [9] #22
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:94 [inlined]
 [10] f
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/ice_sheet1D_alloc.jl:56
 [11] ODEFunction
    @ ~/.julia/packages/SciMLBase/NtgCQ/src/scimlfunctions.jl:2358 [inlined]
 [12] ODEFunction
    @ ~/.julia/packages/SciMLBase/NtgCQ/src/scimlfunctions.jl:0 [inlined]
 [13] diffejulia_ODEFunction_20316_inner_1wrap
    @ ~/.julia/packages/SciMLBase/NtgCQ/src/scimlfunctions.jl:0
 [14] macro expansion
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:8398 [inlined]
 [15] enzyme_call
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:7950 [inlined]
 [16] AdjointThunk
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:7755 [inlined]
 [17] runtime_generic_rev(activity::Type{…}, runtimeActivity::Val{…}, width::Val{…}, ModifiedBetween::Val{…}, tape::Enzyme.Compiler.Tape{…}, 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 ~/Documents/Work/dev/Enzyme.jl/src/rules/jitrules.jl:696
 [18] steploss
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:127 [inlined]
 [19] steploss
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:0 [inlined]
 [20] diffejulia_steploss_15525_inner_1wrap
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:0
 [21] macro expansion
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:8398 [inlined]
 [22] enzyme_call
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:7950 [inlined]
 [23] CombinedAdjointThunk
    @ ~/Documents/Work/dev/Enzyme.jl/src/compiler.jl:7723 [inlined]
 [24] autodiff
    @ ~/Documents/Work/dev/Enzyme.jl/src/Enzyme.jl:491 [inlined]
 [25] autodiff
    @ ~/Documents/Work/dev/Enzyme.jl/src/Enzyme.jl:537 [inlined]
 [26] autodiff(::ReverseMode{…}, ::typeof(steploss), ::Duplicated{…}, ::Duplicated{…})
    @ Enzyme ~/Documents/Work/dev/Enzyme.jl/src/Enzyme.jl:504
 [27] top-level scope
    @ ~/Documents/Work/dev/DecapodeCalibrationNewEnzyme/DecapodeEnzymeGrad.jl:137
Some type information was truncated. Use `show(err)` to see complete types.

@jClugstor
Copy link
Collaborator Author

@ChrisRackauckas this ^ was the latest error

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

4 participants