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

Error with phi or function boundaries #2122

Open
jgreener64 opened this issue Nov 26, 2024 · 5 comments
Open

Error with phi or function boundaries #2122

jgreener64 opened this issue Nov 26, 2024 · 5 comments

Comments

@jgreener64
Copy link
Contributor

I am on Enzyme main (d096464), StaticArrays 1.9.8 and Julia 1.10.6. This is a rather long example but it is self-contained, I found it hard to trim it down. I could get rid of the error in a few ways, for example by removing norm or inlining some functions, but nothing I tried fixed it in the larger codebase. The full error is attached as error.txt.

using Enzyme, StaticArrays, LinearAlgebra

struct A{T}
    f1::T
end

struct PeriodicTorsion{N, T, E}
    periodicities::NTuple{N, Int}
    phases::NTuple{N, T}
    ks::NTuple{N, E}
    proper::Bool
end

struct InteractionList4Atoms{I, T}
    is::I
    js::I
    ks::I
    ls::I
    inters::T
    types::Vector{String}
end

dict_get(dic, key, default) = haskey(dic, key) ? dic[key] : default

function inject_interaction(inter::PeriodicTorsion{N, T, E}, inter_type, params_dic) where {N, T, E}
    key_prefix = "inter_PT_$(inter_type)_"
    return PeriodicTorsion{N, T, E}(
        inter.periodicities,
        ntuple(i -> dict_get(params_dic, key_prefix * "phase_$i", inter.phases[i]), N),
        ntuple(i -> dict_get(params_dic, key_prefix * "k_$i"    , inter.ks[i]    ), N),
        inter.proper,
    )
end

function periodic_torsion_vectors(coords_i, coords_j, coords_k, coords_l)
    ab = coords_j - coords_i
    bc = coords_k - coords_j
    cross_ab_bc = ab × bc
    bc_norm = norm(bc)
    return ab, bc, cross_ab_bc, bc_norm
end

function specific_forces!(fs_nounits, coords, sils_4_atoms)
    for inter_list in sils_4_atoms
        for ind in 1:length(inter_list.is)
            i, j, k, l, d = inter_list.is[ind], inter_list.js[ind], inter_list.ks[ind],
                                inter_list.ls[ind], inter_list.inters[ind]
            ab, bc, cross_ab_bc, bc_norm = periodic_torsion_vectors(
                        coords[i], coords[j], coords[k], coords[l])
            fi = d.ks[1] * bc_norm * cross_ab_bc
            sf = A(fi)
            fs_nounits[i] += sf.f1
        end
    end
    return fs_nounits
end

function inject_inter_list(inter, params_dic)
    inters_grad = inject_interaction.(inter.inters, inter.types, (params_dic,))
    InteractionList4Atoms(inter.is, inter.js, inter.ks, inter.ls, inters_grad, inter.types)
end

function test_forces_grad(params_dic, sis_in, coords)
    sis = inject_inter_list.(sis_in, (params_dic,))
    fs_nounits = zero(coords)
    sis2 = A(sis)
    fill!(fs_nounits, zero(eltype(fs_nounits)))
    sils_4_atoms = filter(il -> il isa InteractionList4Atoms, values(sis2.f1))
    specific_forces!(fs_nounits, coords, sils_4_atoms)
    return sum(sum.(abs, fs_nounits))
end

params_dic = Dict("inter_PT_-/C/N/-_k_1" => -10.46)
grads_enzyme = Dict(k => 0.0 for k in keys(params_dic))

pt1 = [
    PeriodicTorsion((1, 1), (1.0, 1.0), (1.0, 1.0), true),
    PeriodicTorsion((1, 1), (1.0, 1.0), (1.0, 1.0), true),
]
sis = (
    InteractionList4Atoms([1, 2], [2, 3], [3, 4], [4, 5], pt1, ["", ""]),
    InteractionList4Atoms([1, 2], [2, 3], [3, 4], [4, 5], pt1, ["", ""]),
)
coords = rand(SVector{3, Float64}, 5)

test_forces_grad(params_dic, sis, coords) # Works

autodiff(
    set_runtime_activity(Reverse),
    test_forces_grad,
    Active,
    Duplicated(params_dic, grads_enzyme),
    Const(sis),
    Duplicated(copy(coords), zero(coords)),
)
ERROR: LoadError: Enzyme compilation failed.
Current scope: 
; Function Attrs: mustprogress willreturn
define internal fastcc void @preprocess_julia_specific_forces__3670({} 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"="140582344946832" "enzymejl_parmtype_ref"="2" %0, {} 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"="140582344946832" "enzymejl_parmtype_ref"="2" %1, [2 x [6 x {} addrspace(10)*]] addrspace(11)* nocapture noundef nonnull readonly align 8 dereferenceable(96) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]: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, [-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, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]: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, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,-1]:Integer, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,-1]:Integer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Pointer, [-1,32,0]:Pointer, [-1,32,0,0]:Integer, [-1,32,0,1]:Integer, [-1,32,0,2]:Integer, [-1,32,0,3]:Integer, [-1,32,0,4]:Integer, [-1,32,0,5]:Integer, [-1,32,0,6]:Integer, [-1,32,0,7]:Integer, [-1,32,0,8]:Integer, [-1,32,0,9]:Integer, [-1,32,0,10]:Integer, [-1,32,0,11]:Integer, [-1,32,0,12]:Integer, [-1,32,0,13]:Integer, [-1,32,0,14]:Integer, [-1,32,0,15]:Integer, [-1,32,0,16]:Float@double, [-1,32,0,24]:Float@double, [-1,32,0,32]:Float@double, [-1,32,0,40]:Float@double, [-1,32,0,48]:Integer, [-1,32,8]:Integer, [-1,32,9]:Integer, [-1,32,10]:Integer, [-1,32,11]:Integer, [-1,32,12]:Integer, [-1,32,13]:Integer, [-1,32,14]:Integer, [-1,32,15]:Integer, [-1,32,16]:Integer, [-1,32,17]:Integer, [-1,32,18]:Integer, [-1,32,19]:Integer, [-1,32,20]:Integer, [-1,32,21]:Integer, [-1,32,22]:Integer, [-1,32,23]:Integer, [-1,32,24]:Integer, [-1,32,25]:Integer, [-1,32,26]:Integer, [-1,32,27]:Integer, [-1,32,28]:Integer, [-1,32,29]:Integer, [-1,32,30]:Integer, [-1,32,31]:Integer, [-1,32,32]:Integer, [-1,32,33]:Integer, [-1,32,34]:Integer, [-1,32,35]:Integer, [-1,32,36]:Integer, [-1,32,37]:Integer, [-1,32,38]:Integer, [-1,32,39]:Integer, [-1,40]:Pointer, [-1,40,0]:Pointer, [-1,40,0,0]:Pointer, [-1,40,8]:Integer, [-1,40,9]:Integer, [-1,40,10]:Integer, [-1,40,11]:Integer, [-1,40,12]:Integer, [-1,40,13]:Integer, [-1,40,14]:Integer, [-1,40,15]:Integer, [-1,40,16]:Integer, [-1,40,17]:Integer, [-1,40,18]:Integer, [-1,40,19]:Integer, [-1,40,20]:Integer, [-1,40,21]:Integer, [-1,40,22]:Integer, [-1,40,23]:Integer, [-1,40,24]:Integer, [-1,40,25]:Integer, [-1,40,26]:Integer, [-1,40,27]:Integer, [-1,40,28]:Integer, [-1,40,29]:Integer, [-1,40,30]:Integer, [-1,40,31]:Integer, [-1,40,32]:Integer, [-1,40,33]:Integer, [-1,40,34]:Integer, [-1,40,35]:Integer, [-1,40,36]:Integer, [-1,40,37]:Integer, [-1,40,38]:Integer, [-1,40,39]:Integer, [-1,48]:Pointer, [-1,48,0]:Pointer, [-1,48,0,-1]:Integer, [-1,48,8]:Integer, [-1,48,9]:Integer, [-1,48,10]:Integer, [-1,48,11]:Integer, [-1,48,12]:Integer, [-1,48,13]:Integer, [-1,48,14]:Integer, [-1,48,15]:Integer, [-1,48,16]:Integer, [-1,48,17]:Integer, [-1,48,18]:Integer, [-1,48,19]:Integer, [-1,48,20]:Integer, [-1,48,21]:Integer, [-1,48,22]:Integer, [-1,48,23]:Integer, [-1,48,24]:Integer, [-1,48,25]:Integer, [-1,48,26]:Integer, [-1,48,27]:Integer, [-1,48,28]:Integer, [-1,48,29]:Integer, [-1,48,30]:Integer, [-1,48,31]:Integer, [-1,48,32]:Integer, [-1,48,33]:Integer, [-1,48,34]:Integer, [-1,48,35]:Integer, [-1,48,36]:Integer, [-1,48,37]:Integer, [-1,48,38]:Integer, [-1,48,39]:Integer, [-1,56]:Pointer, [-1,56,0]:Pointer, [-1,56,0,-1]:Integer, [-1,56,8]:Integer, [-1,56,9]:Integer, [-1,56,10]:Integer, [-1,56,11]:Integer, [-1,56,12]:Integer, [-1,56,13]:Integer, [-1,56,14]:Integer, [-1,56,15]: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,56,24]:Integer, [-1,56,25]:Integer, [-1,56,26]:Integer, [-1,56,27]:Integer, [-1,56,28]:Integer, [-1,56,29]:Integer, [-1,56,30]:Integer, [-1,56,31]:Integer, [-1,56,32]:Integer, [-1,56,33]:Integer, [-1,56,34]:Integer, [-1,56,35]:Integer, [-1,56,36]:Integer, [-1,56,37]:Integer, [-1,56,38]:Integer, [-1,56,39]:Integer, [-1,64]:Pointer, [-1,64,0]:Pointer, [-1,64,0,-1]: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,64,16]:Integer, [-1,64,17]:Integer, [-1,64,18]:Integer, [-1,64,19]:Integer, [-1,64,20]:Integer, [-1,64,21]:Integer, [-1,64,22]:Integer, [-1,64,23]:Integer, [-1,64,24]:Integer, [-1,64,25]:Integer, [-1,64,26]:Integer, [-1,64,27]:Integer, [-1,64,28]:Integer, [-1,64,29]:Integer, [-1,64,30]:Integer, [-1,64,31]:Integer, [-1,64,32]:Integer, [-1,64,33]:Integer, [-1,64,34]:Integer, [-1,64,35]:Integer, [-1,64,36]:Integer, [-1,64,37]:Integer, [-1,64,38]:Integer, [-1,64,39]:Integer, [-1,72]:Pointer, [-1,72,0]:Pointer, [-1,72,0,-1]:Integer, [-1,72,8]:Integer, [-1,72,9]:Integer, [-1,72,10]:Integer, [-1,72,11]:Integer, [-1,72,12]:Integer, [-1,72,13]:Integer, [-1,72,14]:Integer, [-1,72,15]: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,72,24]:Integer, [-1,72,25]:Integer, [-1,72,26]:Integer, [-1,72,27]:Integer, [-1,72,28]:Integer, [-1,72,29]:Integer, [-1,72,30]:Integer, [-1,72,31]:Integer, [-1,72,32]:Integer, [-1,72,33]:Integer, [-1,72,34]:Integer, [-1,72,35]:Integer, [-1,72,36]:Integer, [-1,72,37]:Integer, [-1,72,38]:Integer, [-1,72,39]:Integer, [-1,80]:Pointer, [-1,80,0]:Pointer, [-1,80,0,0]:Integer, [-1,80,0,1]:Integer, [-1,80,0,2]:Integer, [-1,80,0,3]:Integer, [-1,80,0,4]:Integer, [-1,80,0,5]:Integer, [-1,80,0,6]:Integer, [-1,80,0,7]:Integer, [-1,80,0,8]:Integer, [-1,80,0,9]:Integer, [-1,80,0,10]:Integer, [-1,80,0,11]:Integer, [-1,80,0,12]:Integer, [-1,80,0,13]:Integer, [-1,80,0,14]:Integer, [-1,80,0,15]:Integer, [-1,80,0,16]:Float@double, [-1,80,0,24]:Float@double, [-1,80,0,32]:Float@double, [-1,80,0,40]:Float@double, [-1,80,0,48]: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,80,16]:Integer, [-1,80,17]:Integer, [-1,80,18]:Integer, [-1,80,19]:Integer, [-1,80,20]:Integer, [-1,80,21]:Integer, [-1,80,22]:Integer, [-1,80,23]:Integer, [-1,80,24]:Integer, [-1,80,25]:Integer, [-1,80,26]:Integer, [-1,80,27]:Integer, [-1,80,28]:Integer, [-1,80,29]:Integer, [-1,80,30]:Integer, [-1,80,31]:Integer, [-1,80,32]:Integer, [-1,80,33]:Integer, [-1,80,34]:Integer, [-1,80,35]:Integer, [-1,80,36]:Integer, [-1,80,37]:Integer, [-1,80,38]:Integer, [-1,80,39]:Integer, [-1,88]:Pointer, [-1,88,0]:Pointer, [-1,88,0,0]:Pointer, [-1,88,8]:Integer, [-1,88,9]:Integer, [-1,88,10]:Integer, [-1,88,11]:Integer, [-1,88,12]:Integer, [-1,88,13]:Integer, [-1,88,14]:Integer, [-1,88,15]: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,88,24]:Integer, [-1,88,25]:Integer, [-1,88,26]:Integer, [-1,88,27]:Integer, [-1,88,28]:Integer, [-1,88,29]:Integer, [-1,88,30]:Integer, [-1,88,31]:Integer, [-1,88,32]:Integer, [-1,88,33]:Integer, [-1,88,34]:Integer, [-1,88,35]:Integer, [-1,88,36]:Integer, [-1,88,37]:Integer, [-1,88,38]:Integer, [-1,88,39]:Integer}" "enzymejl_parmtype"="140582344938640" "enzymejl_parmtype_ref"="1" %2) unnamed_addr #25 !dbg !1321 {

[...]

pass:                                             ; preds = %L83
  %88 = add nsw i64 %30, -1, !dbg !1363
  %89 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, !dbg !1363
  %90 = add nuw nsw i64 %30, 1, !dbg !1364
  %.not159 = icmp eq [6 x {} addrspace(10)*] addrspace(11)* %89, null, !dbg !1361
  br i1 %.not159, label %L94, label %guard_pass122, !dbg !1361

guard_pass122:                                    ; preds = %pass
  %unbox124.elt = getelementptr inbounds [6 x {} addrspace(10)*], [6 x {} addrspace(10)*] addrspace(11)* %89, i64 0, i64 0, !dbg !1361
  %unbox124.unpack = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %91 = insertvalue [6 x {} addrspace(10)*] undef, {} addrspace(10)* %unbox124.unpack, 0, !dbg !1361
  %unbox124.elt160 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 1, !dbg !1361
  %unbox124.unpack161 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt160, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %92 = insertvalue [6 x {} addrspace(10)*] %91, {} addrspace(10)* %unbox124.unpack161, 1, !dbg !1361
  %unbox124.elt162 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 2, !dbg !1361
  %unbox124.unpack163 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt162, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %93 = insertvalue [6 x {} addrspace(10)*] %92, {} addrspace(10)* %unbox124.unpack163, 2, !dbg !1361
  %unbox124.elt164 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 3, !dbg !1361
  %unbox124.unpack165 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt164, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %94 = insertvalue [6 x {} addrspace(10)*] %93, {} addrspace(10)* %unbox124.unpack165, 3, !dbg !1361
  %unbox124.elt166 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 4, !dbg !1361
  %unbox124.unpack167 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt166, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %95 = insertvalue [6 x {} addrspace(10)*] %94, {} addrspace(10)* %unbox124.unpack167, 4, !dbg !1361
  %unbox124.elt168 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 5, !dbg !1361
  %unbox124.unpack169 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt168, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %unbox124170 = insertvalue [6 x {} addrspace(10)*] %95, {} addrspace(10)* %unbox124.unpack169, 5, !dbg !1361
  br label %L94, !dbg !1361
}

Illegal replace ficticious phi for:   %unbox117.unpack141_replacementA = phi {} addrspace(10)*  of   %unbox117.unpack141 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox117.elt140, align 8, !enzyme_inactive !0, !enzyme_type !26, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BInt64\7D !0
; Function Attrs: mustprogress willreturn
define internal fastcc void @diffejulia_specific_forces__3670({} addrspace(10)* 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"="140582344946832" "enzymejl_parmtype_ref"="2" %0, {} addrspace(10)* align 16 "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"="140582344946832" "enzymejl_parmtype_ref"="2" %"'", {} addrspace(10)* 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"="140582344946832" "enzymejl_parmtype_ref"="2" %1, {} addrspace(10)* align 16 "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"="140582344946832" "enzymejl_parmtype_ref"="2" %"'1", [2 x [6 x {} addrspace(10)*]] addrspace(11)* nocapture readonly align 8 dereferenceable(96) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]: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, [-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, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]: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, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,-1]:Integer, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,-1]:Integer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Pointer, [-1,32,0]:Pointer, [-1,32,0,0]:Integer, [-1,32,0,1]:Integer, [-1,32,0,2]:Integer, [-1,32,0,3]:Integer, [-1,32,0,4]:Integer, [-1,32,0,5]:Integer, [-1,32,0,6]:Integer, [-1,32,0,7]:Integer, [-1,32,0,8]:Integer, [-1,32,0,9]:Integer, [-1,32,0,10]:Integer, [-1,32,0,11]:Integer, [-1,32,0,12]:Integer, [-1,32,0,13]:Integer, [-1,32,0,14]:Integer, [-1,32,0,15]:Integer, [-1,32,0,16]:Float@double, [-1,32,0,24]:Float@double, [-1,32,0,32]:Float@double, [-1,32,0,40]:Float@double, [-1,32,0,48]:Integer, [-1,32,8]:Integer, [-1,32,9]:Integer, [-1,32,10]:Integer, [-1,32,11]:Integer, [-1,32,12]:Integer, [-1,32,13]:Integer, [-1,32,14]:Integer, [-1,32,15]:Integer, [-1,32,16]:Integer, [-1,32,17]:Integer, [-1,32,18]:Integer, [-1,32,19]:Integer, [-1,32,20]:Integer, [-1,32,21]:Integer, [-1,32,22]:Integer, [-1,32,23]:Integer, [-1,32,24]:Integer, [-1,32,25]:Integer, [-1,32,26]:Integer, [-1,32,27]:Integer, [-1,32,28]:Integer, [-1,32,29]:Integer, [-1,32,30]:Integer, [-1,32,31]:Integer, [-1,32,32]:Integer, [-1,32,33]:Integer, [-1,32,34]:Integer, [-1,32,35]:Integer, [-1,32,36]:Integer, [-1,32,37]:Integer, [-1,32,38]:Integer, [-1,32,39]:Integer, [-1,40]:Pointer, [-1,40,0]:Pointer, [-1,40,0,0]:Pointer, [-1,40,8]:Integer, [-1,40,9]:Integer, [-1,40,10]:Integer, [-1,40,11]:Integer, [-1,40,12]:Integer, [-1,40,13]:Integer, [-1,40,14]:Integer, [-1,40,15]:Integer, [-1,40,16]:Integer, [-1,40,17]:Integer, [-1,40,18]:Integer, [-1,40,19]:Integer, [-1,40,20]:Integer, [-1,40,21]:Integer, [-1,40,22]:Integer, [-1,40,23]:Integer, [-1,40,24]:Integer, [-1,40,25]:Integer, [-1,40,26]:Integer, [-1,40,27]:Integer, [-1,40,28]:Integer, [-1,40,29]:Integer, [-1,40,30]:Integer, [-1,40,31]:Integer, [-1,40,32]:Integer, [-1,40,33]:Integer, [-1,40,34]:Integer, [-1,40,35]:Integer, [-1,40,36]:Integer, [-1,40,37]:Integer, [-1,40,38]:Integer, [-1,40,39]:Integer, [-1,48]:Pointer, [-1,48,0]:Pointer, [-1,48,0,-1]:Integer, [-1,48,8]:Integer, [-1,48,9]:Integer, [-1,48,10]:Integer, [-1,48,11]:Integer, [-1,48,12]:Integer, [-1,48,13]:Integer, [-1,48,14]:Integer, [-1,48,15]:Integer, [-1,48,16]:Integer, [-1,48,17]:Integer, [-1,48,18]:Integer, [-1,48,19]:Integer, [-1,48,20]:Integer, [-1,48,21]:Integer, [-1,48,22]:Integer, [-1,48,23]:Integer, [-1,48,24]:Integer, [-1,48,25]:Integer, [-1,48,26]:Integer, [-1,48,27]:Integer, [-1,48,28]:Integer, [-1,48,29]:Integer, [-1,48,30]:Integer, [-1,48,31]:Integer, [-1,48,32]:Integer, [-1,48,33]:Integer, [-1,48,34]:Integer, [-1,48,35]:Integer, [-1,48,36]:Integer, [-1,48,37]:Integer, [-1,48,38]:Integer, [-1,48,39]:Integer, [-1,56]:Pointer, [-1,56,0]:Pointer, [-1,56,0,-1]:Integer, [-1,56,8]:Integer, [-1,56,9]:Integer, [-1,56,10]:Integer, [-1,56,11]:Integer, [-1,56,12]:Integer, [-1,56,13]:Integer, [-1,56,14]:Integer, [-1,56,15]: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,56,24]:Integer, [-1,56,25]:Integer, [-1,56,26]:Integer, [-1,56,27]:Integer, [-1,56,28]:Integer, [-1,56,29]:Integer, [-1,56,30]:Integer, [-1,56,31]:Integer, [-1,56,32]:Integer, [-1,56,33]:Integer, [-1,56,34]:Integer, [-1,56,35]:Integer, [-1,56,36]:Integer, [-1,56,37]:Integer, [-1,56,38]:Integer, [-1,56,39]:Integer, [-1,64]:Pointer, [-1,64,0]:Pointer, [-1,64,0,-1]: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,64,16]:Integer, [-1,64,17]:Integer, [-1,64,18]:Integer, [-1,64,19]:Integer, [-1,64,20]:Integer, [-1,64,21]:Integer, [-1,64,22]:Integer, [-1,64,23]:Integer, [-1,64,24]:Integer, [-1,64,25]:Integer, [-1,64,26]:Integer, [-1,64,27]:Integer, [-1,64,28]:Integer, [-1,64,29]:Integer, [-1,64,30]:Integer, [-1,64,31]:Integer, [-1,64,32]:Integer, [-1,64,33]:Integer, [-1,64,34]:Integer, [-1,64,35]:Integer, [-1,64,36]:Integer, [-1,64,37]:Integer, [-1,64,38]:Integer, [-1,64,39]:Integer, [-1,72]:Pointer, [-1,72,0]:Pointer, [-1,72,0,-1]:Integer, [-1,72,8]:Integer, [-1,72,9]:Integer, [-1,72,10]:Integer, [-1,72,11]:Integer, [-1,72,12]:Integer, [-1,72,13]:Integer, [-1,72,14]:Integer, [-1,72,15]: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,72,24]:Integer, [-1,72,25]:Integer, [-1,72,26]:Integer, [-1,72,27]:Integer, [-1,72,28]:Integer, [-1,72,29]:Integer, [-1,72,30]:Integer, [-1,72,31]:Integer, [-1,72,32]:Integer, [-1,72,33]:Integer, [-1,72,34]:Integer, [-1,72,35]:Integer, [-1,72,36]:Integer, [-1,72,37]:Integer, [-1,72,38]:Integer, [-1,72,39]:Integer, [-1,80]:Pointer, [-1,80,0]:Pointer, [-1,80,0,0]:Integer, [-1,80,0,1]:Integer, [-1,80,0,2]:Integer, [-1,80,0,3]:Integer, [-1,80,0,4]:Integer, [-1,80,0,5]:Integer, [-1,80,0,6]:Integer, [-1,80,0,7]:Integer, [-1,80,0,8]:Integer, [-1,80,0,9]:Integer, [-1,80,0,10]:Integer, [-1,80,0,11]:Integer, [-1,80,0,12]:Integer, [-1,80,0,13]:Integer, [-1,80,0,14]:Integer, [-1,80,0,15]:Integer, [-1,80,0,16]:Float@double, [-1,80,0,24]:Float@double, [-1,80,0,32]:Float@double, [-1,80,0,40]:Float@double, [-1,80,0,48]: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,80,16]:Integer, [-1,80,17]:Integer, [-1,80,18]:Integer, [-1,80,19]:Integer, [-1,80,20]:Integer, [-1,80,21]:Integer, [-1,80,22]:Integer, [-1,80,23]:Integer, [-1,80,24]:Integer, [-1,80,25]:Integer, [-1,80,26]:Integer, [-1,80,27]:Integer, [-1,80,28]:Integer, [-1,80,29]:Integer, [-1,80,30]:Integer, [-1,80,31]:Integer, [-1,80,32]:Integer, [-1,80,33]:Integer, [-1,80,34]:Integer, [-1,80,35]:Integer, [-1,80,36]:Integer, [-1,80,37]:Integer, [-1,80,38]:Integer, [-1,80,39]:Integer, [-1,88]:Pointer, [-1,88,0]:Pointer, [-1,88,0,0]:Pointer, [-1,88,8]:Integer, [-1,88,9]:Integer, [-1,88,10]:Integer, [-1,88,11]:Integer, [-1,88,12]:Integer, [-1,88,13]:Integer, [-1,88,14]:Integer, [-1,88,15]: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,88,24]:Integer, [-1,88,25]:Integer, [-1,88,26]:Integer, [-1,88,27]:Integer, [-1,88,28]:Integer, [-1,88,29]:Integer, [-1,88,30]:Integer, [-1,88,31]:Integer, [-1,88,32]:Integer, [-1,88,33]:Integer, [-1,88,34]:Integer, [-1,88,35]:Integer, [-1,88,36]:Integer, [-1,88,37]:Integer, [-1,88,38]:Integer, [-1,88,39]:Integer}" "enzymejl_parmtype"="140582344938640" "enzymejl_parmtype_ref"="1" %2, [2 x [6 x {} addrspace(10)*]] addrspace(11)* nocapture align 8 "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]: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, [-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, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]: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, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,-1]:Integer, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,-1]:Integer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Pointer, [-1,32,0]:Pointer, [-1,32,0,0]:Integer, [-1,32,0,1]:Integer, [-1,32,0,2]:Integer, [-1,32,0,3]:Integer, [-1,32,0,4]:Integer, [-1,32,0,5]:Integer, [-1,32,0,6]:Integer, [-1,32,0,7]:Integer, [-1,32,0,8]:Integer, [-1,32,0,9]:Integer, [-1,32,0,10]:Integer, [-1,32,0,11]:Integer, [-1,32,0,12]:Integer, [-1,32,0,13]:Integer, [-1,32,0,14]:Integer, [-1,32,0,15]:Integer, [-1,32,0,16]:Float@double, [-1,32,0,24]:Float@double, [-1,32,0,32]:Float@double, [-1,32,0,40]:Float@double, [-1,32,0,48]:Integer, [-1,32,8]:Integer, [-1,32,9]:Integer, [-1,32,10]:Integer, [-1,32,11]:Integer, [-1,32,12]:Integer, [-1,32,13]:Integer, [-1,32,14]:Integer, [-1,32,15]:Integer, [-1,32,16]:Integer, [-1,32,17]:Integer, [-1,32,18]:Integer, [-1,32,19]:Integer, [-1,32,20]:Integer, [-1,32,21]:Integer, [-1,32,22]:Integer, [-1,32,23]:Integer, [-1,32,24]:Integer, [-1,32,25]:Integer, [-1,32,26]:Integer, [-1,32,27]:Integer, [-1,32,28]:Integer, [-1,32,29]:Integer, [-1,32,30]:Integer, [-1,32,31]:Integer, [-1,32,32]:Integer, [-1,32,33]:Integer, [-1,32,34]:Integer, [-1,32,35]:Integer, [-1,32,36]:Integer, [-1,32,37]:Integer, [-1,32,38]:Integer, [-1,32,39]:Integer, [-1,40]:Pointer, [-1,40,0]:Pointer, [-1,40,0,0]:Pointer, [-1,40,8]:Integer, [-1,40,9]:Integer, [-1,40,10]:Integer, [-1,40,11]:Integer, [-1,40,12]:Integer, [-1,40,13]:Integer, [-1,40,14]:Integer, [-1,40,15]:Integer, [-1,40,16]:Integer, [-1,40,17]:Integer, [-1,40,18]:Integer, [-1,40,19]:Integer, [-1,40,20]:Integer, [-1,40,21]:Integer, [-1,40,22]:Integer, [-1,40,23]:Integer, [-1,40,24]:Integer, [-1,40,25]:Integer, [-1,40,26]:Integer, [-1,40,27]:Integer, [-1,40,28]:Integer, [-1,40,29]:Integer, [-1,40,30]:Integer, [-1,40,31]:Integer, [-1,40,32]:Integer, [-1,40,33]:Integer, [-1,40,34]:Integer, [-1,40,35]:Integer, [-1,40,36]:Integer, [-1,40,37]:Integer, [-1,40,38]:Integer, [-1,40,39]:Integer, [-1,48]:Pointer, [-1,48,0]:Pointer, [-1,48,0,-1]:Integer, [-1,48,8]:Integer, [-1,48,9]:Integer, [-1,48,10]:Integer, [-1,48,11]:Integer, [-1,48,12]:Integer, [-1,48,13]:Integer, [-1,48,14]:Integer, [-1,48,15]:Integer, [-1,48,16]:Integer, [-1,48,17]:Integer, [-1,48,18]:Integer, [-1,48,19]:Integer, [-1,48,20]:Integer, [-1,48,21]:Integer, [-1,48,22]:Integer, [-1,48,23]:Integer, [-1,48,24]:Integer, [-1,48,25]:Integer, [-1,48,26]:Integer, [-1,48,27]:Integer, [-1,48,28]:Integer, [-1,48,29]:Integer, [-1,48,30]:Integer, [-1,48,31]:Integer, [-1,48,32]:Integer, [-1,48,33]:Integer, [-1,48,34]:Integer, [-1,48,35]:Integer, [-1,48,36]:Integer, [-1,48,37]:Integer, [-1,48,38]:Integer, [-1,48,39]:Integer, [-1,56]:Pointer, [-1,56,0]:Pointer, [-1,56,0,-1]:Integer, [-1,56,8]:Integer, [-1,56,9]:Integer, [-1,56,10]:Integer, [-1,56,11]:Integer, [-1,56,12]:Integer, [-1,56,13]:Integer, [-1,56,14]:Integer, [-1,56,15]: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,56,24]:Integer, [-1,56,25]:Integer, [-1,56,26]:Integer, [-1,56,27]:Integer, [-1,56,28]:Integer, [-1,56,29]:Integer, [-1,56,30]:Integer, [-1,56,31]:Integer, [-1,56,32]:Integer, [-1,56,33]:Integer, [-1,56,34]:Integer, [-1,56,35]:Integer, [-1,56,36]:Integer, [-1,56,37]:Integer, [-1,56,38]:Integer, [-1,56,39]:Integer, [-1,64]:Pointer, [-1,64,0]:Pointer, [-1,64,0,-1]: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,64,16]:Integer, [-1,64,17]:Integer, [-1,64,18]:Integer, [-1,64,19]:Integer, [-1,64,20]:Integer, [-1,64,21]:Integer, [-1,64,22]:Integer, [-1,64,23]:Integer, [-1,64,24]:Integer, [-1,64,25]:Integer, [-1,64,26]:Integer, [-1,64,27]:Integer, [-1,64,28]:Integer, [-1,64,29]:Integer, [-1,64,30]:Integer, [-1,64,31]:Integer, [-1,64,32]:Integer, [-1,64,33]:Integer, [-1,64,34]:Integer, [-1,64,35]:Integer, [-1,64,36]:Integer, [-1,64,37]:Integer, [-1,64,38]:Integer, [-1,64,39]:Integer, [-1,72]:Pointer, [-1,72,0]:Pointer, [-1,72,0,-1]:Integer, [-1,72,8]:Integer, [-1,72,9]:Integer, [-1,72,10]:Integer, [-1,72,11]:Integer, [-1,72,12]:Integer, [-1,72,13]:Integer, [-1,72,14]:Integer, [-1,72,15]: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,72,24]:Integer, [-1,72,25]:Integer, [-1,72,26]:Integer, [-1,72,27]:Integer, [-1,72,28]:Integer, [-1,72,29]:Integer, [-1,72,30]:Integer, [-1,72,31]:Integer, [-1,72,32]:Integer, [-1,72,33]:Integer, [-1,72,34]:Integer, [-1,72,35]:Integer, [-1,72,36]:Integer, [-1,72,37]:Integer, [-1,72,38]:Integer, [-1,72,39]:Integer, [-1,80]:Pointer, [-1,80,0]:Pointer, [-1,80,0,0]:Integer, [-1,80,0,1]:Integer, [-1,80,0,2]:Integer, [-1,80,0,3]:Integer, [-1,80,0,4]:Integer, [-1,80,0,5]:Integer, [-1,80,0,6]:Integer, [-1,80,0,7]:Integer, [-1,80,0,8]:Integer, [-1,80,0,9]:Integer, [-1,80,0,10]:Integer, [-1,80,0,11]:Integer, [-1,80,0,12]:Integer, [-1,80,0,13]:Integer, [-1,80,0,14]:Integer, [-1,80,0,15]:Integer, [-1,80,0,16]:Float@double, [-1,80,0,24]:Float@double, [-1,80,0,32]:Float@double, [-1,80,0,40]:Float@double, [-1,80,0,48]: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,80,16]:Integer, [-1,80,17]:Integer, [-1,80,18]:Integer, [-1,80,19]:Integer, [-1,80,20]:Integer, [-1,80,21]:Integer, [-1,80,22]:Integer, [-1,80,23]:Integer, [-1,80,24]:Integer, [-1,80,25]:Integer, [-1,80,26]:Integer, [-1,80,27]:Integer, [-1,80,28]:Integer, [-1,80,29]:Integer, [-1,80,30]:Integer, [-1,80,31]:Integer, [-1,80,32]:Integer, [-1,80,33]:Integer, [-1,80,34]:Integer, [-1,80,35]:Integer, [-1,80,36]:Integer, [-1,80,37]:Integer, [-1,80,38]:Integer, [-1,80,39]:Integer, [-1,88]:Pointer, [-1,88,0]:Pointer, [-1,88,0,0]:Pointer, [-1,88,8]:Integer, [-1,88,9]:Integer, [-1,88,10]:Integer, [-1,88,11]:Integer, [-1,88,12]:Integer, [-1,88,13]:Integer, [-1,88,14]:Integer, [-1,88,15]: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,88,24]:Integer, [-1,88,25]:Integer, [-1,88,26]:Integer, [-1,88,27]:Integer, [-1,88,28]:Integer, [-1,88,29]:Integer, [-1,88,30]:Integer, [-1,88,31]:Integer, [-1,88,32]:Integer, [-1,88,33]:Integer, [-1,88,34]:Integer, [-1,88,35]:Integer, [-1,88,36]:Integer, [-1,88,37]:Integer, [-1,88,38]:Integer, [-1,88,39]:Integer}" "enzymejl_parmtype"="140582344938640" "enzymejl_parmtype_ref"="1" %"'2", { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg) unnamed_addr #25 !dbg !1754 {

[...]

invertidxend105_amerge_amerge_active:             ; preds = %invertidxend105_amerge_amerge
  %732 = load double, double addrspace(13)* %"arrayref95.sroa.3.0..sroa_idx129'ipg_unwrap", align 8, !dbg !1821, !tbaa !376, !alias.scope !1942, !noalias !1927
  %733 = fadd fast double %732, %728, !dbg !1821
  store double %733, double addrspace(13)* %"arrayref95.sroa.3.0..sroa_idx129'ipg_unwrap", align 8, !dbg !1821, !tbaa !376, !alias.scope !1942, !noalias !1927
  br label %invertidxend105_amerge_amerge_amerge, !dbg !1821

invertidxend105_amerge_amerge_amerge:             ; preds = %invertidxend105_amerge_amerge_active, %invertidxend105_amerge_amerge
  br label %invertidxend79

invertpass:                                       ; preds = %invertguard_pass122, %invertL94
  br label %invertL83

invertguard_pass122:                              ; preds = %invertL94
  br label %invertpass

remat_enter:                                      ; preds = %mergeinvertL28_L83.loopexit, %incinvertL28
  br label %remat_L28_L28

remat_L28_L28:                                    ; preds = %remat_enter
  br label %remat_L28_idxend

remat_L28_idxend:                                 ; preds = %remat_L28_L28
  br label %remat_L28_idxend16

remat_L28_idxend16:                               ; preds = %remat_L28_idxend
  br label %remat_L28_idxend25

remat_L28_idxend25:                               ; preds = %remat_L28_idxend16
  br label %remat_L28_idxend34

remat_L28_idxend34:                               ; preds = %remat_L28_idxend25
  br label %remat_L28_idxend43

remat_L28_idxend43:                               ; preds = %remat_L28_idxend34
  br label %remat_L28_idxend52

remat_L28_idxend52:                               ; preds = %remat_L28_idxend43
  %734 = load i64, i64* %"iv13'ac", align 8
  %735 = load i64, i64* %"iv'ac", align 8
  %_unwrap = bitcast i8* %56 to [1 x [3 x double]]*
  %.fca.0.0.gep8_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap, i32 0, i32 0, i32 0
  %736 = load i64, i64* %"iv13'ac", align 8
  %737 = load i64, i64* %"iv'ac", align 8
  %738 = load i64, i64* %"iv'ac", align 8
  %_unwrap300 = load i64*, i64** %mdyncache_fromtape_cache267, align 8, !dbg !1759, !dereferenceable !1112, !invariant.group !1763
  %_unwrap301 = getelementptr inbounds i64, i64* %_unwrap300, i64 %738
  %arraylen_unwrap302 = load i64, i64* %_unwrap301, align 8, !dbg !1759, !alias.scope !1879, !noalias !1882, !invariant.group !1764
  %_unwrap34 = add nsw i64 %arraylen_unwrap302, -1
  %739 = add nuw i64 %_unwrap34, 1
  %740 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 14
  %741 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %740, i64 %737
  %742 = load [1 x [3 x double]]*, [1 x [3 x double]]** %741, align 8, !dereferenceable !1112, !invariant.group !1947
  %743 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %742, i64 %736
  %744 = load [1 x [3 x double]], [1 x [3 x double]]* %743, align 8, !dbg !1789, !invariant.group !1948
  %.fca.0.0.extract7_unwrap = extractvalue [1 x [3 x double]] %744, 0, 0
  store double %.fca.0.0.extract7_unwrap, double* %.fca.0.0.gep8_unwrap, align 8, !dbg !1789
  %745 = load i64, i64* %"iv13'ac", align 8
  %746 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.gep10_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap, i32 0, i32 0, i32 1
  %747 = load i64, i64* %"iv13'ac", align 8
  %748 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.extract9_unwrap = extractvalue [1 x [3 x double]] %744, 0, 1
  store double %.fca.0.1.extract9_unwrap, double* %.fca.0.1.gep10_unwrap, align 8, !dbg !1789
  %749 = load i64, i64* %"iv13'ac", align 8
  %750 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.gep12_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap, i32 0, i32 0, i32 2
  %751 = load i64, i64* %"iv13'ac", align 8
  %752 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.extract11_unwrap = extractvalue [1 x [3 x double]] %744, 0, 2
  store double %.fca.0.2.extract11_unwrap, double* %.fca.0.2.gep12_unwrap, align 8, !dbg !1789
  br label %remat_L28_idxend61

remat_L28_idxend61:                               ; preds = %remat_L28_idxend52
  %753 = load i64, i64* %"iv13'ac", align 8
  %754 = load i64, i64* %"iv'ac", align 8
  %_unwrap35 = bitcast i8* %57 to [1 x [3 x double]]*
  %.fca.0.0.gep2_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap35, i32 0, i32 0, i32 0
  %755 = load i64, i64* %"iv13'ac", align 8
  %756 = load i64, i64* %"iv'ac", align 8
  %757 = load i64, i64* %"iv'ac", align 8
  %_unwrap303 = load i64*, i64** %mdyncache_fromtape_cache267, align 8, !dbg !1759, !dereferenceable !1112, !invariant.group !1763
  %_unwrap304 = getelementptr inbounds i64, i64* %_unwrap303, i64 %757
  %arraylen_unwrap305 = load i64, i64* %_unwrap304, align 8, !dbg !1759, !alias.scope !1879, !noalias !1882, !invariant.group !1764
  %_unwrap44 = add nsw i64 %arraylen_unwrap305, -1
  %758 = add nuw i64 %_unwrap44, 1
  %759 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 16
  %760 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %759, i64 %756
  %761 = load [1 x [3 x double]]*, [1 x [3 x double]]** %760, align 8, !dereferenceable !1112, !invariant.group !1949
  %762 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %761, i64 %755
  %763 = load [1 x [3 x double]], [1 x [3 x double]]* %762, align 8, !dbg !1789, !invariant.group !1950
  %.fca.0.0.extract1_unwrap = extractvalue [1 x [3 x double]] %763, 0, 0
  store double %.fca.0.0.extract1_unwrap, double* %.fca.0.0.gep2_unwrap, align 8, !dbg !1789
  %764 = load i64, i64* %"iv13'ac", align 8
  %765 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.gep4_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap35, i32 0, i32 0, i32 1
  %766 = load i64, i64* %"iv13'ac", align 8
  %767 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.extract3_unwrap = extractvalue [1 x [3 x double]] %763, 0, 1
  store double %.fca.0.1.extract3_unwrap, double* %.fca.0.1.gep4_unwrap, align 8, !dbg !1789
  %768 = load i64, i64* %"iv13'ac", align 8
  %769 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.gep6_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap35, i32 0, i32 0, i32 2
  %770 = load i64, i64* %"iv13'ac", align 8
  %771 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.extract5_unwrap = extractvalue [1 x [3 x double]] %763, 0, 2
  store double %.fca.0.2.extract5_unwrap, double* %.fca.0.2.gep6_unwrap, align 8, !dbg !1789
  br label %remat_L28_idxend70

remat_L28_idxend70:                               ; preds = %remat_L28_idxend61
  %772 = load i64, i64* %"iv13'ac", align 8
  %773 = load i64, i64* %"iv'ac", align 8
  %_unwrap45 = bitcast i8* %58 to [1 x [3 x double]]*
  %.fca.0.0.gep_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap45, i32 0, i32 0, i32 0
  %774 = load i64, i64* %"iv13'ac", align 8
  %775 = load i64, i64* %"iv'ac", align 8
  %776 = load i64, i64* %"iv'ac", align 8
  %_unwrap297 = load i64*, i64** %mdyncache_fromtape_cache267, align 8, !dbg !1759, !dereferenceable !1112, !invariant.group !1763
  %_unwrap298 = getelementptr inbounds i64, i64* %_unwrap297, i64 %776
  %arraylen_unwrap299 = load i64, i64* %_unwrap298, align 8, !dbg !1759, !alias.scope !1879, !noalias !1882, !invariant.group !1764
  %_unwrap54 = add nsw i64 %arraylen_unwrap299, -1
  %777 = add nuw i64 %_unwrap54, 1
  %778 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 18
  %779 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %778, i64 %775
  %780 = load [1 x [3 x double]]*, [1 x [3 x double]]** %779, align 8, !dereferenceable !1112, !invariant.group !1951
  %781 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %780, i64 %774
  %782 = load [1 x [3 x double]], [1 x [3 x double]]* %781, align 8, !dbg !1789, !invariant.group !1952
  %.fca.0.0.extract_unwrap = extractvalue [1 x [3 x double]] %782, 0, 0
  store double %.fca.0.0.extract_unwrap, double* %.fca.0.0.gep_unwrap, align 8, !dbg !1789
  %783 = load i64, i64* %"iv13'ac", align 8
  %784 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.gep_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap45, i32 0, i32 0, i32 1
  %785 = load i64, i64* %"iv13'ac", align 8
  %786 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.extract_unwrap = extractvalue [1 x [3 x double]] %782, 0, 1
  store double %.fca.0.1.extract_unwrap, double* %.fca.0.1.gep_unwrap, align 8, !dbg !1789
  %787 = load i64, i64* %"iv13'ac", align 8
  %788 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.gep_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap45, i32 0, i32 0, i32 2
  %789 = load i64, i64* %"iv13'ac", align 8
  %790 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.extract_unwrap = extractvalue [1 x [3 x double]] %782, 0, 2
  store double %.fca.0.2.extract_unwrap, double* %.fca.0.2.gep_unwrap, align 8, !dbg !1789
  br label %remat_L28_idxend79

remat_L28_idxend79:                               ; preds = %remat_L28_idxend70
  br label %remat_L28_idxend105

remat_L28_idxend105:                              ; preds = %remat_L28_idxend79
  %791 = load i64, i64* %"iv13'ac", align 8
  %792 = load i64, i64* %"iv'ac", align 8
  %iv.next14_unwrap = add nuw nsw i64 %791, 1
  %793 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 11
  %794 = getelementptr inbounds i64, i64* %793, i64 %792
  %795 = load i64, i64* %794, align 8, !dbg !1758, !tbaa !80, !range !83, !alias.scope !1879, !noalias !1882, !invariant.group !1884
  %.not158_unwrap = icmp eq i64 %iv.next14_unwrap, %795
  br i1 %.not158_unwrap, label %invertidxend105, label %invertidxend105
}

LLVM.LoadInst(%unbox117.unpack141 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox117.elt140, align 8, !enzyme_inactive !0, !enzyme_type !26, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BInt64\7D !0)
LLVM.PHIInst(%unbox117.unpack141_replacementA = phi {} addrspace(10)* )


Stacktrace:
 [1] specific_forces!
   @ ~/dms/molly_dev/enzyme_err41.jl:46

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/dev/Enzyme/src/compiler.jl:1641
  [2] EnzymeCreatePrimalAndGradient(logic::Enzyme.Logic, todiff::LLVM.Function, retType::Enzyme.API.CDIFFE_TYPE, constant_args::Vector{Enzyme.API.CDIFFE_TYPE}, TA::Enzyme.TypeAnalysis, returnValue::Bool, dretUsed::Bool, mode::Enzyme.API.CDerivativeMode, runtimeActivity::Bool, width::Int64, additionalArg::Ptr{Nothing}, forceAnonymousTape::Bool, typeInfo::Enzyme.FnTypeInfo, uncacheable_args::Vector{Bool}, augmented::Ptr{Nothing}, atomicAdd::Bool)
    @ Enzyme.API ~/.julia/dev/Enzyme/src/api.jl:253
  [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{4, Bool}, returnPrimal::Bool, expectedTapeType::Type, loweredArgs::Set{Int64}, boxedArgs::Set{Int64})
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:4186
  [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/dev/Enzyme/src/compiler.jl:7338
  [5] codegen
    @ ~/.julia/dev/Enzyme/src/compiler.jl:6146 [inlined]
  [6] _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool)
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:8468
  [7] _thunk
    @ ~/.julia/dev/Enzyme/src/compiler.jl:8468 [inlined]
  [8] cached_compilation
    @ ~/.julia/dev/Enzyme/src/compiler.jl:8509 [inlined]
  [9] thunkbase(ctx::LLVM.Context, mi::Core.MethodInstance, ::Val{0x0000000000007b18}, ::Type{Const{typeof(test_forces_grad)}}, ::Type{Active}, tt::Type{Tuple{Duplicated{Dict{String, Float64}}, Const{Tuple{InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64, Float64}}}, InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64, Float64}}}}}, Duplicated{Vector{SVector{3, Float64}}}}}, ::Val{Enzyme.API.DEM_ReverseModeCombined}, ::Val{1}, ::Val{(false, false, false, false)}, ::Val{false}, ::Val{false}, ::Type{FFIABI}, ::Val{true}, ::Val{true})
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:8641
 [10] #s2103#19072
    @ ~/.julia/dev/Enzyme/src/compiler.jl:8778 [inlined]
 [11] var"#s2103#19072"(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, ::Type, ::Type, ::Type, tt::Any, ::Type, ::Type, ::Type, ::Type, ::Type, ::Type, ::Type, ::Any)
    @ Enzyme.Compiler ./none:0
 [12] (::Core.GeneratedFunctionStub)(::UInt64, ::LineNumberNode, ::Any, ::Vararg{Any})
    @ Core ./boot.jl:602
 [13] autodiff
    @ ~/.julia/dev/Enzyme/src/Enzyme.jl:473 [inlined]
 [14] autodiff(::ReverseMode{false, true, FFIABI, false, false}, ::typeof(test_forces_grad), ::Type{Active}, ::Duplicated{Dict{String, Float64}}, ::Const{Tuple{InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64, Float64}}}, InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64, Float64}}}}}, ::Duplicated{Vector{SVector{3, Float64}}})
    @ Enzyme ~/.julia/dev/Enzyme/src/Enzyme.jl:512
 [15] top-level scope
    @ ~/dms/molly_dev/enzyme_err41.jl:90
@wsmoses
Copy link
Member

wsmoses commented Nov 27, 2024

Can you paste the whole log

@wsmoses
Copy link
Member

wsmoses commented Nov 27, 2024

ah you did!

@jgreener64
Copy link
Contributor Author

I would be grateful if this one could get looked at at some point, it is (I think) the only error holding Molly back from switching to Enzyme for CPU.

@wsmoses
Copy link
Member

wsmoses commented Dec 15, 2024

Yeah sorry I’ve personally been staring at compile time issues recently, if you have a chance to see if you can reduce this a bit further that would be massively appreciated (this is not an error that I can tell a quick fix from the log sadly).

@jgreener64
Copy link
Contributor Author

Here is a shorter version showing a similar error on main (c24b383), StaticArrays 1.9.8 and Julia 1.10.6.

Some ways to remove the error:

  • Only return bc_norm from periodic_torsion_vectors (coords_i is unused).
  • Replace norm with sum.
  • Make sis only have one element.
using Enzyme, StaticArrays, LinearAlgebra

Enzyme.Compiler.VERBOSE_ERRORS[] = true

struct A{T}
    f1::T
end

struct PeriodicTorsion{N, E}
    ks::NTuple{N, E}
end

struct InteractionList4Atoms{I, T}
    is::I
    js::I
    inters::T
end

function periodic_torsion_vectors(coords_i, coords_j)
    bc_norm = norm(coords_j)
    return coords_i, bc_norm
end

function specific_forces!(fs_nounits, coords, sils_4_atoms)
    for inter_list in sils_4_atoms
        for ind in 1:length(inter_list.is)
            i, d = inter_list.is[ind], inter_list.inters[ind]
            ab, bc_norm = periodic_torsion_vectors(coords[i], coords[i+1])
            fi = d.ks[1] * bc_norm * SVector(1.0, 1.0, 1.0)
            sf = A(fi)
            fs_nounits[i] += sf.f1
        end
    end
    return fs_nounits
end

inject_interaction(inter) = inter

function inject_inter_list(inter)
    inters_grad = inject_interaction.(inter.inters)
    InteractionList4Atoms(inter.is, inter.js, inters_grad)
end

function test_forces_grad(sis_in, coords)
    sis = inject_inter_list.(sis_in)
    fs_nounits = zero(coords)
    sis2 = A(sis)
    fill!(fs_nounits, zero(eltype(fs_nounits)))
    sils_4_atoms = filter(il -> il isa InteractionList4Atoms, values(sis2.f1))
    specific_forces!(fs_nounits, coords, sils_4_atoms)
    return sum(sum.(abs, fs_nounits))
end

pt1 = [PeriodicTorsion((1.0, 1.0)), PeriodicTorsion((1.0, 1.0))]
sis = (
    InteractionList4Atoms([1, 2], [2, 3], pt1),
    InteractionList4Atoms([1, 2], [2, 3], pt1),
)
coords = rand(SVector{3, Float64}, 5)

test_forces_grad(sis, coords) # Works

autodiff(
    set_runtime_activity(Reverse),
    test_forces_grad,
    Active,
    Const(sis),
    Duplicated(copy(coords), zero(coords)),
)
ERROR: LoadError: Enzyme compilation failed due to an internal error.
 Please open an issue with the code to reproduce and full error log on github.com/EnzymeAD/Enzyme.jl
 To toggle more information for debugging (needed for bug reports), set Enzyme.Compiler.VERBOSE_ERRORS[] = true (default false)
Current scope: 
; Function Attrs: mustprogress willreturn
define internal fastcc void @preprocess_julia_specific_forces__1949({} 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"="139647234018384" "enzymejl_parmtype_ref"="2" %0, {} 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"="139647234018384" "enzymejl_parmtype_ref"="2" %1, [2 x [3 x {} addrspace(10)*]] addrspace(11)* nocapture noundef nonnull readonly align 8 dereferenceable(48) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]: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, [-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, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]: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, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,-1]:Float@double, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,-1]:Integer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Pointer, [-1,32,0]:Pointer, [-1,32,0,-1]:Integer, [-1,32,8]:Integer, [-1,32,9]:Integer, [-1,32,10]:Integer, [-1,32,11]:Integer, [-1,32,12]:Integer, [-1,32,13]:Integer, [-1,32,14]:Integer, [-1,32,15]:Integer, [-1,32,16]:Integer, [-1,32,17]:Integer, [-1,32,18]:Integer, [-1,32,19]:Integer, [-1,32,20]:Integer, [-1,32,21]:Integer, [-1,32,22]:Integer, [-1,32,23]:Integer, [-1,32,24]:Integer, [-1,32,25]:Integer, [-1,32,26]:Integer, [-1,32,27]:Integer, [-1,32,28]:Integer, [-1,32,29]:Integer, [-1,32,30]:Integer, [-1,32,31]:Integer, [-1,32,32]:Integer, [-1,32,33]:Integer, [-1,32,34]:Integer, [-1,32,35]:Integer, [-1,32,36]:Integer, [-1,32,37]:Integer, [-1,32,38]:Integer, [-1,32,39]:Integer, [-1,40]:Pointer, [-1,40,0]:Pointer, [-1,40,0,-1]:Float@double, [-1,40,8]:Integer, [-1,40,9]:Integer, [-1,40,10]:Integer, [-1,40,11]:Integer, [-1,40,12]:Integer, [-1,40,13]:Integer, [-1,40,14]:Integer, [-1,40,15]:Integer, [-1,40,16]:Integer, [-1,40,17]:Integer, [-1,40,18]:Integer, [-1,40,19]:Integer, [-1,40,20]:Integer, [-1,40,21]:Integer, [-1,40,22]:Integer, [-1,40,23]:Integer, [-1,40,24]:Integer, [-1,40,25]:Integer, [-1,40,26]:Integer, [-1,40,27]:Integer, [-1,40,28]:Integer, [-1,40,29]:Integer, [-1,40,30]:Integer, [-1,40,31]:Integer, [-1,40,32]:Integer, [-1,40,33]:Integer, [-1,40,34]:Integer, [-1,40,35]:Integer, [-1,40,36]:Integer, [-1,40,37]:Integer, [-1,40,38]:Integer, [-1,40,39]:Integer}" "enzymejl_parmtype"="139647234075600" "enzymejl_parmtype_ref"="1" %2) unnamed_addr #23 !dbg !1053 {
top:
  %3 = call noalias nonnull dereferenceable(24) dereferenceable_or_null(24) i8* @malloc(i64 24), !enzyme_fromstack !1054
  %arrayref37 = bitcast i8* %3 to [1 x [3 x double]]*, !enzyme_caststack !0
  %4 = call noalias nonnull dereferenceable(24) dereferenceable_or_null(24) i8* @malloc(i64 24), !enzyme_fromstack !1054
  %arrayref28 = bitcast i8* %4 to [1 x [3 x double]]*, !enzyme_caststack !0
  %5 = call noalias nonnull dereferenceable(32) dereferenceable_or_null(32) i8* @malloc(i64 32), !enzymejl_allocart !530, !enzyme_type !254, !enzyme_fromstack !1054
  %6 = bitcast i8* %5 to { [1 x [3 x double]], double }*, !enzyme_caststack !0
  %7 = call {}*** @julia.get_pgcstack() #29
  %ptls_field87 = getelementptr inbounds {}**, {}*** %7, i64 2
  %8 = bitcast {}*** %ptls_field87 to i64***
  %ptls_load8889 = load i64**, i64*** %8, align 8, !tbaa !17
  %9 = getelementptr inbounds i64*, i64** %ptls_load8889, i64 2
  %safepoint = load i64*, i64** %9, align 8, !tbaa !21
  fence syncscope("singlethread") seq_cst
  call void @julia.safepoint(i64* %safepoint) #29, !dbg !1055
  fence syncscope("singlethread") seq_cst
  %unbox69.elt = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 0, i64 0
  %unbox69.unpack = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox69.elt, align 8, !enzyme_inactive !0, !enzyme_type !140, !enzymejl_source_type_Vector\7BInt64\7D !0, !enzymejl_byref_MUT_REF !0
  %10 = insertvalue [3 x {} addrspace(10)*] undef, {} addrspace(10)* %unbox69.unpack, 0
  %unbox69.elt90 = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 0, i64 1
  %unbox69.unpack91 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox69.elt90, align 8, !enzyme_inactive !0, !enzyme_type !140, !enzymejl_source_type_Vector\7BInt64\7D !0, !enzymejl_byref_MUT_REF !0
  %11 = insertvalue [3 x {} addrspace(10)*] %10, {} addrspace(10)* %unbox69.unpack91, 1
  %unbox69.elt92 = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 0, i64 2
  %unbox69.unpack93 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox69.elt92, align 8, !enzyme_type !143, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BPeriodicTorsion\7B2\2C\20Float64\7D\7D !0
  %unbox6994 = insertvalue [3 x {} addrspace(10)*] %11, {} addrspace(10)* %unbox69.unpack93, 2
  %12 = addrspacecast {} addrspace(10)* %1 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*
  %arraylen_ptr20 = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %12, i64 0, i32 1
  %13 = addrspacecast {} addrspace(10)* %1 to [1 x [3 x double]] addrspace(13)* addrspace(11)*
  %14 = bitcast [1 x [3 x double]]* %arrayref28 to i8*
  %15 = bitcast [1 x [3 x double]]* %arrayref37 to i8*
  %16 = addrspacecast [1 x [3 x double]]* %arrayref28 to [1 x [3 x double]] addrspace(11)*
  %17 = addrspacecast [1 x [3 x double]]* %arrayref37 to [1 x [3 x double]] addrspace(11)*
  %18 = addrspacecast {} addrspace(10)* %0 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*
  %arraylen_ptr39 = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %18, i64 0, i32 1
  %19 = addrspacecast {} addrspace(10)* %0 to [1 x [3 x double]] addrspace(13)* addrspace(11)*
  %20 = getelementptr inbounds { [1 x [3 x double]], double }, { [1 x [3 x double]], double }* %6, i64 0, i32 1
  br label %L8, !dbg !1056

L8:                                               ; preds = %L80, %top
  %iv = phi i64 [ %iv.next, %L80 ], [ 0, %top ]
  %value_phi = phi [3 x {} addrspace(10)*] [ %unbox6994, %top ], [ %value_phi64, %L80 ]
  %21 = add nuw nsw i64 %iv, 2, !dbg !1057
  %iv.next = add nuw nsw i64 %iv, 1, !dbg !1057
  %22 = extractvalue [3 x {} addrspace(10)*] %value_phi, 0, !dbg !1057, !enzyme_type !537
  %23 = addrspacecast {} addrspace(10)* %22 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*, !dbg !1059
  %arraylen_ptr = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %23, i64 0, i32 1, !dbg !1059
  %arraylen = load i64, i64 addrspace(11)* %arraylen_ptr, align 8, !dbg !1059, !tbaa !181, !range !184, !alias.scope !185, !noalias !186
  %.not = icmp eq i64 %arraylen, 0, !dbg !1060
  br i1 %.not, label %L69, label %L28.preheader, !dbg !1058

L28.preheader:                                    ; preds = %L8
  %24 = addrspacecast {} addrspace(10)* %22 to i64 addrspace(13)* addrspace(11)*
  %25 = extractvalue [3 x {} addrspace(10)*] %value_phi, 2, !enzyme_type !537
  %26 = addrspacecast {} addrspace(10)* %25 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*
  %arraylen_ptr11 = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %26, i64 0, i32 1
  %27 = addrspacecast {} addrspace(10)* %25 to [1 x [2 x double]] addrspace(13)* addrspace(11)*
  br label %L28, !dbg !1064

L28:                                              ; preds = %idxend57, %L28.preheader
  %iv7 = phi i64 [ %iv.next8, %idxend57 ], [ 0, %L28.preheader ]
  %iv.next8 = add nuw nsw i64 %iv7, 1, !dbg !1064
  %28 = add nsw i64 %iv.next8, -1, !dbg !1064
  %arraylen10 = load i64, i64 addrspace(11)* %arraylen_ptr, align 8, !dbg !1064, !tbaa !181, !range !184, !alias.scope !185, !noalias !186
  %inbounds = icmp ult i64 %28, %arraylen10, !dbg !1064
  br i1 %inbounds, label %idxend, label %oob, !dbg !1064

L69.loopexit:                                     ; preds = %idxend57
  br label %L69, !dbg !1066

L69:                                              ; preds = %L69.loopexit, %L8
  %exitcond = icmp eq i64 %21, 3, !dbg !1066
  br i1 %exitcond, label %L86, label %pass, !dbg !1066

L80:                                              ; preds = %guard_pass74, %pass
  %value_phi64 = phi [3 x {} addrspace(10)*] [ zeroinitializer, %pass ], [ %unbox76105, %guard_pass74 ]
  br label %L8, !dbg !1067

L86:                                              ; preds = %L69
  ret void, !dbg !1068

oob:                                              ; preds = %L28
  %errorbox = alloca i64, align 8, !dbg !1064
  store i64 %iv.next8, i64* %errorbox, align 8, !dbg !1064, !noalias !1069
  %29 = addrspacecast {} addrspace(10)* %22 to {} addrspace(12)*, !dbg !1064
  call void @ijl_bounds_error_ints({} addrspace(12)* %29, i64* noundef nonnull align 8 %errorbox, i64 noundef 1) #30, !dbg !1064
  unreachable, !dbg !1064

idxend:                                           ; preds = %L28
  %arrayptr95 = load i64 addrspace(13)*, i64 addrspace(13)* addrspace(11)* %24, align 8, !dbg !1064, !tbaa !251, !alias.scope !1072, !noalias !186, !nonnull !0
  %30 = getelementptr inbounds i64, i64 addrspace(13)* %arrayptr95, i64 %28, !dbg !1064
  %arrayref = load i64, i64 addrspace(13)* %30, align 8, !dbg !1064, !tbaa !383, !alias.scope !136, !noalias !409
  %arraylen12 = load i64, i64 addrspace(11)* %arraylen_ptr11, align 8, !dbg !1064, !tbaa !181, !range !184, !alias.scope !185, !noalias !186
  %inbounds13 = icmp ult i64 %28, %arraylen12, !dbg !1064
  br i1 %inbounds13, label %idxend16, label %oob14, !dbg !1064

oob14:                                            ; preds = %idxend
  %errorbox15 = alloca i64, align 8, !dbg !1064
  store i64 %iv.next8, i64* %errorbox15, align 8, !dbg !1064, !noalias !1069
  %31 = addrspacecast {} addrspace(10)* %25 to {} addrspace(12)*, !dbg !1064
  call void @ijl_bounds_error_ints({} addrspace(12)* %31, i64* noundef nonnull align 8 %errorbox15, i64 noundef 1) #30, !dbg !1064
  unreachable, !dbg !1064

idxend16:                                         ; preds = %idxend
  %arrayptr1896 = load [1 x [2 x double]] addrspace(13)*, [1 x [2 x double]] addrspace(13)* addrspace(11)* %27, align 8, !dbg !1064, !tbaa !251, !alias.scope !1072, !noalias !186, !nonnull !0
  %arrayref19.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr1896, i64 %28, i64 0, i64 0, !dbg !1064
  %arrayref19.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref19.sroa.0.0..sroa_idx, align 1, !dbg !1064, !tbaa !362, !alias.scope !363, !noalias !1073
  %32 = add i64 %arrayref, -1, !dbg !1074
  %arraylen21 = load i64, i64 addrspace(11)* %arraylen_ptr20, align 8, !dbg !1074, !tbaa !181, !range !184, !alias.scope !185, !noalias !186, !enzyme_inactive !0, !enzyme_type !130, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_UInt64 !0
  %inbounds22 = icmp ult i64 %32, %arraylen21, !dbg !1074
  br i1 %inbounds22, label %idxend25, label %oob23, !dbg !1074

oob23:                                            ; preds = %idxend16
  %errorbox24 = alloca i64, align 8, !dbg !1074
  store i64 %arrayref, i64* %errorbox24, align 8, !dbg !1074, !noalias !1069
  %33 = addrspacecast {} addrspace(10)* %1 to {} addrspace(12)*, !dbg !1074
  call void @ijl_bounds_error_ints({} addrspace(12)* noundef %33, i64* noundef nonnull align 8 %errorbox24, i64 noundef 1) #30, !dbg !1074
  unreachable, !dbg !1074

idxend25:                                         ; preds = %idxend16
  %arrayptr2797 = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %13, align 16, !dbg !1074, !tbaa !251, !alias.scope !1072, !noalias !186, !nonnull !0, !enzyme_type !254, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BSVector\7B3\2C\20Float64\7D\7D !0
  %34 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr2797, i64 %32, i64 0, !dbg !1074
  %35 = bitcast [3 x double] addrspace(13)* %34 to i8 addrspace(13)*, !dbg !1074
  %36 = bitcast i8* %14 to [1 x [3 x double]]*, !dbg !1074
  %37 = bitcast i8 addrspace(13)* %35 to [1 x [3 x double]] addrspace(13)*, !dbg !1074
  %38 = load [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %37, align 8, !dbg !1074
  call void @llvm.lifetime.start.p0i8(i64 24, i8* %14) #29, !dbg !1074
  %.fca.0.0.extract1 = extractvalue [1 x [3 x double]] %38, 0, 0, !dbg !1074
  %.fca.0.0.gep2 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %36, i32 0, i32 0, i32 0, !dbg !1074
  store double %.fca.0.0.extract1, double* %.fca.0.0.gep2, align 8, !dbg !1074
  %.fca.0.1.extract3 = extractvalue [1 x [3 x double]] %38, 0, 1, !dbg !1074
  %.fca.0.1.gep4 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %36, i32 0, i32 0, i32 1, !dbg !1074
  store double %.fca.0.1.extract3, double* %.fca.0.1.gep4, align 8, !dbg !1074
  %.fca.0.2.extract5 = extractvalue [1 x [3 x double]] %38, 0, 2, !dbg !1074
  %.fca.0.2.gep6 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %36, i32 0, i32 0, i32 2, !dbg !1074
  store double %.fca.0.2.extract5, double* %.fca.0.2.gep6, align 8, !dbg !1074
  %inbounds31 = icmp ult i64 %arrayref, %arraylen21, !dbg !1074
  br i1 %inbounds31, label %idxend34, label %oob32, !dbg !1074

oob32:                                            ; preds = %idxend25
  %39 = add nuw nsw i64 %arrayref, 1, !dbg !1076
  %errorbox33 = alloca i64, align 8, !dbg !1074
  store i64 %39, i64* %errorbox33, align 8, !dbg !1074, !noalias !1069
  %40 = addrspacecast {} addrspace(10)* %1 to {} addrspace(12)*, !dbg !1074
  call void @ijl_bounds_error_ints({} addrspace(12)* noundef %40, i64* noundef nonnull align 8 %errorbox33, i64 noundef 1) #30, !dbg !1074
  unreachable, !dbg !1074

idxend34:                                         ; preds = %idxend25
  %41 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr2797, i64 %arrayref, i64 0, !dbg !1074
  %42 = bitcast [3 x double] addrspace(13)* %41 to i8 addrspace(13)*, !dbg !1074
  %43 = bitcast i8* %15 to [1 x [3 x double]]*, !dbg !1074
  %44 = bitcast i8 addrspace(13)* %42 to [1 x [3 x double]] addrspace(13)*, !dbg !1074
  %45 = load [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %44, align 8, !dbg !1074
  call void @llvm.lifetime.start.p0i8(i64 24, i8* %15) #29, !dbg !1074
  %.fca.0.0.extract = extractvalue [1 x [3 x double]] %45, 0, 0, !dbg !1074
  %.fca.0.0.gep = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %43, i32 0, i32 0, i32 0, !dbg !1074
  store double %.fca.0.0.extract, double* %.fca.0.0.gep, align 8, !dbg !1074
  %.fca.0.1.extract = extractvalue [1 x [3 x double]] %45, 0, 1, !dbg !1074
  %.fca.0.1.gep = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %43, i32 0, i32 0, i32 1, !dbg !1074
  store double %.fca.0.1.extract, double* %.fca.0.1.gep, align 8, !dbg !1074
  %.fca.0.2.extract = extractvalue [1 x [3 x double]] %45, 0, 2, !dbg !1074
  %.fca.0.2.gep = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %43, i32 0, i32 0, i32 2, !dbg !1074
  store double %.fca.0.2.extract, double* %.fca.0.2.gep, align 8, !dbg !1074
  call fastcc void @julia_periodic_torsion_vectors_1952({ [1 x [3 x double]], double }* noalias nocapture nofree noundef nonnull writeonly sret({ [1 x [3 x double]], double }) align 8 dereferenceable(32) %6, [1 x [3 x double]] addrspace(11)* nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) %16, [1 x [3 x double]] addrspace(11)* nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) %17) #29, !dbg !1075
  %arraylen40 = load i64, i64 addrspace(11)* %arraylen_ptr39, align 8, !dbg !1077, !tbaa !181, !range !184, !alias.scope !185, !noalias !186, !enzyme_inactive !0, !enzyme_type !130, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_UInt64 !0
  %inbounds41 = icmp ult i64 %32, %arraylen40, !dbg !1077
  br i1 %inbounds41, label %idxend57, label %oob42, !dbg !1077

oob42:                                            ; preds = %idxend34
  %errorbox43 = alloca i64, align 8, !dbg !1077
  store i64 %arrayref, i64* %errorbox43, align 8, !dbg !1077, !noalias !1069
  %46 = addrspacecast {} addrspace(10)* %0 to {} addrspace(12)*, !dbg !1077
  call void @ijl_bounds_error_ints({} addrspace(12)* noundef %46, i64* noundef nonnull align 8 %errorbox43, i64 noundef 1) #30, !dbg !1077
  unreachable, !dbg !1077

idxend57:                                         ; preds = %idxend34
  %arrayptr4698 = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %19, align 16, !dbg !1077, !tbaa !251, !alias.scope !1072, !noalias !186, !nonnull !0, !enzyme_type !254, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BSVector\7B3\2C\20Float64\7D\7D !0
  %arrayref47.sroa.3.0..sroa_idx81 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr4698, i64 %32, i64 0, i64 2, !dbg !1077
  %arrayref47.sroa.3.0.copyload = load double, double addrspace(13)* %arrayref47.sroa.3.0..sroa_idx81, align 8, !dbg !1077, !tbaa !362, !alias.scope !363, !noalias !1073
  %unbox38 = load double, double* %20, align 8, !dbg !1079, !tbaa !288, !alias.scope !290, !noalias !572, !enzyme_type !55, !enzymejl_source_type_Float64 !0, !enzymejl_byref_BITS_VALUE !0
  %47 = fmul double %arrayref19.sroa.0.0.copyload, %unbox38, !dbg !1079
  %48 = fadd double %arrayref47.sroa.3.0.copyload, %47, !dbg !1082
  %arrayref47.sroa.2.0..sroa_idx80 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr4698, i64 %32, i64 0, i64 1, !dbg !1077
  %arrayref47.sroa.2.0.copyload = load double, double addrspace(13)* %arrayref47.sroa.2.0..sroa_idx80, align 8, !dbg !1077, !tbaa !362, !alias.scope !363, !noalias !1073
  %49 = fadd double %arrayref47.sroa.2.0.copyload, %47, !dbg !1082
  %arrayref47.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr4698, i64 %32, i64 0, i64 0, !dbg !1077
  %arrayref47.sroa.0.0.copyload = load double, double addrspace(13)* %arrayref47.sroa.0.0..sroa_idx, align 8, !dbg !1077, !tbaa !362, !alias.scope !363, !noalias !1073
  %50 = fadd double %47, %arrayref47.sroa.0.0.copyload, !dbg !1082
  store double %50, double addrspace(13)* %arrayref47.sroa.0.0..sroa_idx, align 8, !dbg !1087, !tbaa !362, !alias.scope !585, !noalias !1073
  store double %49, double addrspace(13)* %arrayref47.sroa.2.0..sroa_idx80, align 8, !dbg !1087, !tbaa !362, !alias.scope !585, !noalias !1073
  store double %48, double addrspace(13)* %arrayref47.sroa.3.0..sroa_idx81, align 8, !dbg !1087, !tbaa !362, !alias.scope !585, !noalias !1073
  %.not99 = icmp eq i64 %iv.next8, %arraylen, !dbg !1088
  %51 = add nuw nsw i64 %iv.next8, 1, !dbg !1089
  br i1 %.not99, label %L69.loopexit, label %L28, !dbg !1090

pass:                                             ; preds = %L69
  %52 = add nsw i64 %21, -1, !dbg !1091
  %53 = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %52, !dbg !1091
  %54 = add nuw nsw i64 %21, 1, !dbg !1092
  %.not100 = icmp eq [3 x {} addrspace(10)*] addrspace(11)* %53, null, !dbg !1089
  br i1 %.not100, label %L80, label %guard_pass74, !dbg !1089

guard_pass74:                                     ; preds = %pass
  %unbox76.elt = getelementptr inbounds [3 x {} addrspace(10)*], [3 x {} addrspace(10)*] addrspace(11)* %53, i64 0, i64 0, !dbg !1089
  %unbox76.unpack = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox76.elt, align 8, !dbg !1089, !tbaa !21, !alias.scope !47, !noalias !50, !enzyme_type !537
  %55 = insertvalue [3 x {} addrspace(10)*] undef, {} addrspace(10)* %unbox76.unpack, 0, !dbg !1089
  %unbox76.elt101 = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %52, i64 1, !dbg !1089
  %unbox76.unpack102 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox76.elt101, align 8, !dbg !1089, !tbaa !21, !alias.scope !47, !noalias !50, !enzyme_type !537
  %56 = insertvalue [3 x {} addrspace(10)*] %55, {} addrspace(10)* %unbox76.unpack102, 1, !dbg !1089
  %unbox76.elt103 = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %52, i64 2, !dbg !1089
  %unbox76.unpack104 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox76.elt103, align 8, !dbg !1089, !tbaa !21, !alias.scope !47, !noalias !50, !enzyme_type !537
  %unbox76105 = insertvalue [3 x {} addrspace(10)*] %56, {} addrspace(10)* %unbox76.unpack104, 2, !dbg !1089
  br label %L80, !dbg !1089
}

Illegal replace ficticious phi for:   %unbox69.unpack_replacementA = phi {} addrspace(10)*  of   %unbox69.unpack = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox69.elt, align 8, !enzyme_inactive !0, !enzyme_type !29, !enzymejl_source_type_Vector\7BInt64\7D !0, !enzymejl_byref_MUT_REF !0
; Function Attrs: mustprogress willreturn
define internal fastcc void @diffejulia_specific_forces__1949({} addrspace(10)* 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"="139647234018384" "enzymejl_parmtype_ref"="2" %0, {} addrspace(10)* align 16 "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"="139647234018384" "enzymejl_parmtype_ref"="2" %"'", {} addrspace(10)* 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"="139647234018384" "enzymejl_parmtype_ref"="2" %1, {} addrspace(10)* align 16 "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"="139647234018384" "enzymejl_parmtype_ref"="2" %"'1", [2 x [3 x {} addrspace(10)*]] addrspace(11)* nocapture readonly align 8 dereferenceable(48) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]: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, [-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, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]: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, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,-1]:Float@double, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,-1]:Integer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Pointer, [-1,32,0]:Pointer, [-1,32,0,-1]:Integer, [-1,32,8]:Integer, [-1,32,9]:Integer, [-1,32,10]:Integer, [-1,32,11]:Integer, [-1,32,12]:Integer, [-1,32,13]:Integer, [-1,32,14]:Integer, [-1,32,15]:Integer, [-1,32,16]:Integer, [-1,32,17]:Integer, [-1,32,18]:Integer, [-1,32,19]:Integer, [-1,32,20]:Integer, [-1,32,21]:Integer, [-1,32,22]:Integer, [-1,32,23]:Integer, [-1,32,24]:Integer, [-1,32,25]:Integer, [-1,32,26]:Integer, [-1,32,27]:Integer, [-1,32,28]:Integer, [-1,32,29]:Integer, [-1,32,30]:Integer, [-1,32,31]:Integer, [-1,32,32]:Integer, [-1,32,33]:Integer, [-1,32,34]:Integer, [-1,32,35]:Integer, [-1,32,36]:Integer, [-1,32,37]:Integer, [-1,32,38]:Integer, [-1,32,39]:Integer, [-1,40]:Pointer, [-1,40,0]:Pointer, [-1,40,0,-1]:Float@double, [-1,40,8]:Integer, [-1,40,9]:Integer, [-1,40,10]:Integer, [-1,40,11]:Integer, [-1,40,12]:Integer, [-1,40,13]:Integer, [-1,40,14]:Integer, [-1,40,15]:Integer, [-1,40,16]:Integer, [-1,40,17]:Integer, [-1,40,18]:Integer, [-1,40,19]:Integer, [-1,40,20]:Integer, [-1,40,21]:Integer, [-1,40,22]:Integer, [-1,40,23]:Integer, [-1,40,24]:Integer, [-1,40,25]:Integer, [-1,40,26]:Integer, [-1,40,27]:Integer, [-1,40,28]:Integer, [-1,40,29]:Integer, [-1,40,30]:Integer, [-1,40,31]:Integer, [-1,40,32]:Integer, [-1,40,33]:Integer, [-1,40,34]:Integer, [-1,40,35]:Integer, [-1,40,36]:Integer, [-1,40,37]:Integer, [-1,40,38]:Integer, [-1,40,39]:Integer}" "enzymejl_parmtype"="139647234075600" "enzymejl_parmtype_ref"="1" %2, [2 x [3 x {} addrspace(10)*]] addrspace(11)* nocapture align 8 "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]: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, [-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, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]: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, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,-1]:Float@double, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,-1]:Integer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Pointer, [-1,32,0]:Pointer, [-1,32,0,-1]:Integer, [-1,32,8]:Integer, [-1,32,9]:Integer, [-1,32,10]:Integer, [-1,32,11]:Integer, [-1,32,12]:Integer, [-1,32,13]:Integer, [-1,32,14]:Integer, [-1,32,15]:Integer, [-1,32,16]:Integer, [-1,32,17]:Integer, [-1,32,18]:Integer, [-1,32,19]:Integer, [-1,32,20]:Integer, [-1,32,21]:Integer, [-1,32,22]:Integer, [-1,32,23]:Integer, [-1,32,24]:Integer, [-1,32,25]:Integer, [-1,32,26]:Integer, [-1,32,27]:Integer, [-1,32,28]:Integer, [-1,32,29]:Integer, [-1,32,30]:Integer, [-1,32,31]:Integer, [-1,32,32]:Integer, [-1,32,33]:Integer, [-1,32,34]:Integer, [-1,32,35]:Integer, [-1,32,36]:Integer, [-1,32,37]:Integer, [-1,32,38]:Integer, [-1,32,39]:Integer, [-1,40]:Pointer, [-1,40,0]:Pointer, [-1,40,0,-1]:Float@double, [-1,40,8]:Integer, [-1,40,9]:Integer, [-1,40,10]:Integer, [-1,40,11]:Integer, [-1,40,12]:Integer, [-1,40,13]:Integer, [-1,40,14]:Integer, [-1,40,15]:Integer, [-1,40,16]:Integer, [-1,40,17]:Integer, [-1,40,18]:Integer, [-1,40,19]:Integer, [-1,40,20]:Integer, [-1,40,21]:Integer, [-1,40,22]:Integer, [-1,40,23]:Integer, [-1,40,24]:Integer, [-1,40,25]:Integer, [-1,40,26]:Integer, [-1,40,27]:Integer, [-1,40,28]:Integer, [-1,40,29]:Integer, [-1,40,30]:Integer, [-1,40,31]:Integer, [-1,40,32]:Integer, [-1,40,33]:Integer, [-1,40,34]:Integer, [-1,40,35]:Integer, [-1,40,36]:Integer, [-1,40,37]:Integer, [-1,40,38]:Integer, [-1,40,39]:Integer}" "enzymejl_parmtype"="139647234075600" "enzymejl_parmtype_ref"="1" %"'2", { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg) unnamed_addr #23 !dbg !1369 {
top:
  %3 = call {}*** @julia.get_pgcstack()
  %4 = call {}*** @julia.get_pgcstack()
  %5 = call {}*** @julia.get_pgcstack()
  %6 = call {}*** @julia.get_pgcstack()
  %7 = call {}*** @julia.get_pgcstack()
  %8 = call {}*** @julia.get_pgcstack()
  %9 = call {}*** @julia.get_pgcstack()
  %10 = call {}*** @julia.get_pgcstack()
  %11 = call {}*** @julia.get_pgcstack()
  %12 = call {}*** @julia.get_pgcstack()
  %13 = call {}*** @julia.get_pgcstack()
  %14 = call {}*** @julia.get_pgcstack()
  %15 = call {}*** @julia.get_pgcstack()
  %16 = call {}*** @julia.get_pgcstack()
  %17 = call {}*** @julia.get_pgcstack()
  %18 = call {}*** @julia.get_pgcstack()
  %19 = call {}*** @julia.get_pgcstack()
  %20 = call {}*** @julia.get_pgcstack()
  %21 = call {}*** @julia.get_pgcstack()
  %22 = call {}*** @julia.get_pgcstack()
  %23 = call {}*** @julia.get_pgcstack()
  %24 = call {}*** @julia.get_pgcstack()
  %25 = call {}*** @julia.get_pgcstack()
  %26 = call {}*** @julia.get_pgcstack()
  %"arrayref37'ai" = alloca [1 x [3 x double]], i64 1, align 8
  %27 = bitcast [1 x [3 x double]]* %"arrayref37'ai" to i8*
  call void @llvm.memset.p0i8.i64(i8* nonnull dereferenceable(24) dereferenceable_or_null(24) %27, i8 0, i64 24, i1 false)
  %"arrayref37'ipc" = bitcast i8* %27 to [1 x [3 x double]]*
  %28 = bitcast i8* %139 to [1 x [3 x double]]*, !enzyme_caststack !0
  %"arrayref28'ai" = alloca [1 x [3 x double]], i64 1, align 8
  %29 = bitcast [1 x [3 x double]]* %"arrayref28'ai" to i8*
  call void @llvm.memset.p0i8.i64(i8* nonnull dereferenceable(24) dereferenceable_or_null(24) %29, i8 0, i64 24, i1 false)
  %"arrayref28'ipc" = bitcast i8* %29 to [1 x [3 x double]]*
  %30 = bitcast i8* %138 to [1 x [3 x double]]*, !enzyme_caststack !0
  %"'ai" = alloca { [1 x [3 x double]], double }, i64 1, align 8
  %31 = bitcast { [1 x [3 x double]], double }* %"'ai" to i8*
  call void @llvm.memset.p0i8.i64(i8* nonnull dereferenceable(32) dereferenceable_or_null(32) %31, i8 0, i64 32, i1 false)
  %32 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 1
  %"'ipc81" = bitcast i8* %31 to { [1 x [3 x double]], double }*
  %33 = bitcast i8* %32 to { [1 x [3 x double]], double }*, !enzyme_caststack !0
  %34 = call {}*** @julia.get_pgcstack() #29
  %unbox69.unpack_replacementA = phi {} addrspace(10)* 
  %"'ipiv" = insertvalue [3 x {} addrspace(10)*] undef, {} addrspace(10)* %unbox69.unpack_replacementA, 0
  %unbox69.unpack91 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 5
  %"'ipiv39" = insertvalue [3 x {} addrspace(10)*] %"'ipiv", {} addrspace(10)* %unbox69.unpack91, 1
  %"unbox69.unpack93'il_phi" = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 0
  %"unbox6994'ipiv" = insertvalue [3 x {} addrspace(10)*] %"'ipiv39", {} addrspace(10)* %"unbox69.unpack93'il_phi", 2
  %unbox6994 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 6
  %"'ipc67" = addrspacecast {} addrspace(10)* %"'1" to [1 x [3 x double]] addrspace(13)* addrspace(11)*
  %35 = addrspacecast {} addrspace(10)* %1 to [1 x [3 x double]] addrspace(13)* addrspace(11)*
  %"'ipc63" = bitcast [1 x [3 x double]]* %"arrayref28'ipc" to i8*
  %36 = bitcast [1 x [3 x double]]* %30 to i8*
  %"'ipc84" = bitcast [1 x [3 x double]]* %"arrayref37'ipc" to i8*
  %37 = bitcast [1 x [3 x double]]* %28 to i8*
  %"'ipc82" = addrspacecast [1 x [3 x double]]* %"arrayref28'ipc" to [1 x [3 x double]] addrspace(11)*
  %38 = addrspacecast [1 x [3 x double]]* %30 to [1 x [3 x double]] addrspace(11)*
  %"'ipc83" = addrspacecast [1 x [3 x double]]* %"arrayref37'ipc" to [1 x [3 x double]] addrspace(11)*
  %39 = addrspacecast [1 x [3 x double]]* %28 to [1 x [3 x double]] addrspace(11)*
  %"'ipc98" = addrspacecast {} addrspace(10)* %"'" to [1 x [3 x double]] addrspace(13)* addrspace(11)*
  %40 = addrspacecast {} addrspace(10)* %0 to [1 x [3 x double]] addrspace(13)* addrspace(11)*
  %"'ipg120" = getelementptr inbounds { [1 x [3 x double]], double }, { [1 x [3 x double]], double }* %"'ipc81", i64 0, i32 1
  %41 = getelementptr inbounds { [1 x [3 x double]], double }, { [1 x [3 x double]], double }* %33, i64 0, i32 1
  %42 = bitcast {}*** %25 to {}**, !dbg !1370
  %43 = getelementptr inbounds {}*, {}** %42, i64 -14, !dbg !1370
  %44 = getelementptr inbounds {}*, {}** %43, i64 16, !dbg !1370
  %45 = bitcast {}** %44 to i8**, !dbg !1370
  %46 = load i8*, i8** %45, align 8, !dbg !1370
  %47 = bitcast {}*** %21 to {}**, !dbg !1370
  %48 = getelementptr inbounds {}*, {}** %47, i64 -14, !dbg !1370
  %49 = getelementptr inbounds {}*, {}** %48, i64 16, !dbg !1370
  %50 = bitcast {}** %49 to i8**, !dbg !1370
  %51 = load i8*, i8** %50, align 8, !dbg !1370
  %52 = bitcast {}*** %17 to {}**, !dbg !1370
  %53 = getelementptr inbounds {}*, {}** %52, i64 -14, !dbg !1370
  %54 = getelementptr inbounds {}*, {}** %53, i64 16, !dbg !1370
  %55 = bitcast {}** %54 to i8**, !dbg !1370
  %56 = load i8*, i8** %55, align 8, !dbg !1370
  %57 = bitcast {}*** %13 to {}**, !dbg !1370
  %58 = getelementptr inbounds {}*, {}** %57, i64 -14, !dbg !1370
  %59 = getelementptr inbounds {}*, {}** %58, i64 16, !dbg !1370
  %60 = bitcast {}** %59 to i8**, !dbg !1370
  %61 = load i8*, i8** %60, align 8, !dbg !1370
  br label %L8, !dbg !1370

L8:                                               ; preds = %L80, %top
  %iv = phi i64 [ %iv.next, %L80 ], [ 0, %top ]
  %62 = phi [3 x {} addrspace(10)*] [ %"unbox6994'ipiv", %top ], [ %96, %L80 ]
  %value_phi = phi [3 x {} addrspace(10)*] [ %unbox6994, %top ], [ %value_phi64, %L80 ]
  %iv.next = add nuw nsw i64 %iv, 1, !dbg !1371
  %63 = add nuw nsw i64 %iv, 2, !dbg !1371
  %64 = load i64*, i64** %mdyncache_fromtape_cache129, align 8, !dbg !1373, !dereferenceable !1054, !invariant.group !1377
  %65 = getelementptr inbounds i64, i64* %64, i64 %iv, !dbg !1373
  %arraylen = load i64, i64* %65, align 8, !dbg !1373, !invariant.group !1378
  %.not = icmp eq i64 %arraylen, 0, !dbg !1373
  br i1 %.not, label %L69, label %L28.preheader, !dbg !1372

L28.preheader:                                    ; preds = %L8
  %66 = extractvalue [3 x {} addrspace(10)*] %value_phi, 2, !enzyme_type !537
  %"'ipev" = extractvalue [3 x {} addrspace(10)*] %62, 2
  %"'ipc" = addrspacecast {} addrspace(10)* %"'ipev" to [1 x [2 x double]] addrspace(13)* addrspace(11)*
  %67 = addrspacecast {} addrspace(10)* %66 to [1 x [2 x double]] addrspace(13)* addrspace(11)*
  %68 = add nsw i64 %arraylen, -1, !dbg !1379
  %69 = add nuw i64 %68, 1, !dbg !1379
  %70 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 10, !dbg !1379
  %71 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %70, i64 %iv, !dbg !1379
  %72 = mul nuw i64 %69, 24, !dbg !1379
  %73 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 11, !dbg !1379
  %74 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %73, i64 %iv, !dbg !1379
  %75 = mul nuw i64 %69, 24, !dbg !1379
  %76 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 8, !dbg !1379
  %77 = getelementptr inbounds i64*, i64** %76, i64 %iv, !dbg !1379
  %78 = mul nuw i64 %69, 8, !dbg !1379
  %79 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 12, !dbg !1379
  %80 = getelementptr inbounds double*, double** %79, i64 %iv, !dbg !1379
  %81 = mul nuw i64 %69, 8, !dbg !1379
  %82 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 9, !dbg !1379
  %83 = getelementptr inbounds double*, double** %82, i64 %iv, !dbg !1379
  %84 = mul nuw i64 %69, 8, !dbg !1379
  %85 = load i64**, i64*** %mdyncache_fromtape_cache131, align 8, !dbg !1379, !invariant.group !1381
  %86 = getelementptr inbounds i64*, i64** %85, i64 %iv, !dbg !1379
  %87 = load double**, double*** %mdyncache_fromtape_cache136, align 8, !dbg !1379, !invariant.group !1382
  %88 = getelementptr inbounds double*, double** %87, i64 %iv, !dbg !1379
  %89 = load [1 x [3 x double]]**, [1 x [3 x double]]*** %mdyncache_fromtape_cache141, align 8, !dbg !1379, !invariant.group !1383
  %90 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %89, i64 %iv, !dbg !1379
  %91 = load [1 x [3 x double]]**, [1 x [3 x double]]*** %mdyncache_fromtape_cache146, align 8, !dbg !1379, !invariant.group !1384
  %92 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %91, i64 %iv, !dbg !1379
  %93 = load double**, double*** %mdyncache_fromtape_cache150, align 8, !dbg !1379, !invariant.group !1385
  %94 = getelementptr inbounds double*, double** %93, i64 %iv, !dbg !1379
  br label %L28, !dbg !1379

L28:                                              ; preds = %idxend57, %L28.preheader
  %iv7 = phi i64 [ %iv.next8, %idxend57 ], [ 0, %L28.preheader ]
  %iv.next8 = add nuw nsw i64 %iv7, 1, !dbg !1379
  %95 = add nsw i64 %iv.next8, -1, !dbg !1379
  br i1 true, label %idxend, label %oob, !dbg !1379

L69.loopexit:                                     ; preds = %idxend57
  br label %L69, !dbg !1386

L69:                                              ; preds = %L69.loopexit, %L8
  %exitcond = icmp eq i64 %63, 3, !dbg !1386
  br i1 %exitcond, label %L86, label %pass, !dbg !1386

L80:                                              ; preds = %guard_pass74, %pass
  %96 = phi [3 x {} addrspace(10)*] [ zeroinitializer, %pass ], [ %"unbox76105'ipiv", %guard_pass74 ]
  %value_phi64 = phi [3 x {} addrspace(10)*] [ zeroinitializer, %pass ], [ %unbox76105, %guard_pass74 ]
  br label %L8, !dbg !1387

L86:                                              ; preds = %L69
  br label %invertL86, !dbg !1388

oob:                                              ; preds = %L28
  unreachable

idxend:                                           ; preds = %L28
  %97 = load i64**, i64*** %mdyncache_fromtape_cache131, align 8, !dbg !1379, !dereferenceable !1054, !invariant.group !1389
  %98 = getelementptr inbounds i64*, i64** %97, i64 %iv, !dbg !1379
  %99 = load i64*, i64** %98, align 8, !dbg !1379, !dereferenceable !1054, !invariant.group !1390
  %100 = getelementptr inbounds i64, i64* %99, i64 %iv7, !dbg !1379
  %arrayref = load i64, i64* %100, align 8, !dbg !1379, !invariant.group !1391
  br i1 true, label %idxend16, label %oob14, !dbg !1379

oob14:                                            ; preds = %idxend
  unreachable

idxend16:                                         ; preds = %idxend
  %"arrayptr1896'ipl" = load [1 x [2 x double]] addrspace(13)*, [1 x [2 x double]] addrspace(13)* addrspace(11)* %"'ipc", align 8, !dbg !1379, !tbaa !251, !alias.scope !1392, !noalias !1395, !nonnull !0
  %arrayptr1896 = load [1 x [2 x double]] addrspace(13)*, [1 x [2 x double]] addrspace(13)* addrspace(11)* %67, align 8, !dbg !1379, !tbaa !251, !alias.scope !1397, !noalias !1398, !nonnull !0, !invariant.group !1399
  %"arrayref19.sroa.0.0..sroa_idx'ipg" = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %"arrayptr1896'ipl", i64 %95, i64 0, i64 0, !dbg !1379
  %arrayref19.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr1896, i64 %95, i64 0, i64 0, !dbg !1379
  %101 = load double**, double*** %mdyncache_fromtape_cache136, align 8, !dbg !1400, !dereferenceable !1054, !invariant.group !1402
  %102 = getelementptr inbounds double*, double** %101, i64 %iv, !dbg !1400
  %103 = load double*, double** %102, align 8, !dbg !1400, !dereferenceable !1054, !invariant.group !1403
  %104 = getelementptr inbounds double, double* %103, i64 %iv7, !dbg !1400
  %arrayref19.sroa.0.0.copyload = load double, double* %104, align 8, !dbg !1400, !invariant.group !1404
  %105 = add i64 %arrayref, -1, !dbg !1400
  br i1 true, label %idxend25, label %oob23, !dbg !1400

oob23:                                            ; preds = %idxend16
  unreachable

idxend25:                                         ; preds = %idxend16
  %"arrayptr2797'ipl" = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %"'ipc67", align 16, !dbg !1400, !tbaa !251, !alias.scope !1405, !noalias !1408, !nonnull !0, !invariant.group !1410
  %arrayptr2797 = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %35, align 16, !dbg !1400, !tbaa !251, !alias.scope !1411, !noalias !1412, !nonnull !0, !invariant.group !1413, !enzyme_type !254, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BSVector\7B3\2C\20Float64\7D\7D !0
  %"'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr2797'ipl", i64 %105, i64 0, !dbg !1400
  %106 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr2797, i64 %105, i64 0, !dbg !1400
  %"'ipc65" = bitcast [3 x double] addrspace(13)* %"'ipg" to i8 addrspace(13)*, !dbg !1400
  %107 = bitcast [3 x double] addrspace(13)* %106 to i8 addrspace(13)*, !dbg !1400
  %"'ipc64" = bitcast i8* %"'ipc63" to [1 x [3 x double]]*, !dbg !1400
  %108 = bitcast i8* %36 to [1 x [3 x double]]*, !dbg !1400
  %"'ipc66" = bitcast i8 addrspace(13)* %"'ipc65" to [1 x [3 x double]] addrspace(13)*, !dbg !1400
  %109 = bitcast i8 addrspace(13)* %107 to [1 x [3 x double]] addrspace(13)*, !dbg !1400
  %110 = load [1 x [3 x double]]**, [1 x [3 x double]]*** %mdyncache_fromtape_cache141, align 8, !dbg !1400, !dereferenceable !1054, !invariant.group !1414
  %111 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %110, i64 %iv, !dbg !1400
  %112 = load [1 x [3 x double]]*, [1 x [3 x double]]** %111, align 8, !dbg !1400, !dereferenceable !1054, !invariant.group !1415
  %113 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %112, i64 %iv7, !dbg !1400
  %114 = load [1 x [3 x double]], [1 x [3 x double]]* %113, align 8, !dbg !1400, !invariant.group !1416
  %.fca.0.0.extract1 = extractvalue [1 x [3 x double]] %114, 0, 0, !dbg !1400
  %".fca.0.0.gep2'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc64", i32 0, i32 0, i32 0, !dbg !1400
  %.fca.0.0.gep2 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %108, i32 0, i32 0, i32 0, !dbg !1400
  %.fca.0.1.extract3 = extractvalue [1 x [3 x double]] %114, 0, 1, !dbg !1400
  %".fca.0.1.gep4'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc64", i32 0, i32 0, i32 1, !dbg !1400
  %.fca.0.1.gep4 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %108, i32 0, i32 0, i32 1, !dbg !1400
  %.fca.0.2.extract5 = extractvalue [1 x [3 x double]] %114, 0, 2, !dbg !1400
  %".fca.0.2.gep6'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc64", i32 0, i32 0, i32 2, !dbg !1400
  %.fca.0.2.gep6 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %108, i32 0, i32 0, i32 2, !dbg !1400
  br i1 true, label %idxend34, label %oob32, !dbg !1400

oob32:                                            ; preds = %idxend25
  unreachable

idxend34:                                         ; preds = %idxend25
  %"'ipg87" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr2797'ipl", i64 %arrayref, i64 0, !dbg !1400
  %115 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr2797, i64 %arrayref, i64 0, !dbg !1400
  %"'ipc88" = bitcast [3 x double] addrspace(13)* %"'ipg87" to i8 addrspace(13)*, !dbg !1400
  %116 = bitcast [3 x double] addrspace(13)* %115 to i8 addrspace(13)*, !dbg !1400
  %"'ipc85" = bitcast i8* %"'ipc84" to [1 x [3 x double]]*, !dbg !1400
  %117 = bitcast i8* %37 to [1 x [3 x double]]*, !dbg !1400
  %"'ipc89" = bitcast i8 addrspace(13)* %"'ipc88" to [1 x [3 x double]] addrspace(13)*, !dbg !1400
  %118 = bitcast i8 addrspace(13)* %116 to [1 x [3 x double]] addrspace(13)*, !dbg !1400
  %119 = load [1 x [3 x double]]**, [1 x [3 x double]]*** %mdyncache_fromtape_cache146, align 8, !dbg !1400, !dereferenceable !1054, !invariant.group !1417
  %120 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %119, i64 %iv, !dbg !1400
  %121 = load [1 x [3 x double]]*, [1 x [3 x double]]** %120, align 8, !dbg !1400, !dereferenceable !1054, !invariant.group !1418
  %122 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %121, i64 %iv7, !dbg !1400
  %123 = load [1 x [3 x double]], [1 x [3 x double]]* %122, align 8, !dbg !1400, !invariant.group !1419
  %.fca.0.0.extract = extractvalue [1 x [3 x double]] %123, 0, 0, !dbg !1400
  %".fca.0.0.gep'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc85", i32 0, i32 0, i32 0, !dbg !1400
  %.fca.0.0.gep = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %117, i32 0, i32 0, i32 0, !dbg !1400
  %.fca.0.1.extract = extractvalue [1 x [3 x double]] %123, 0, 1, !dbg !1400
  %".fca.0.1.gep'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc85", i32 0, i32 0, i32 1, !dbg !1400
  %.fca.0.1.gep = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %117, i32 0, i32 0, i32 1, !dbg !1400
  %.fca.0.2.extract = extractvalue [1 x [3 x double]] %123, 0, 2, !dbg !1400
  %".fca.0.2.gep'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc85", i32 0, i32 0, i32 2, !dbg !1400
  %.fca.0.2.gep = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %117, i32 0, i32 0, i32 2, !dbg !1400
  br i1 true, label %idxend57, label %oob42, !dbg !1420

oob42:                                            ; preds = %idxend34
  unreachable

idxend57:                                         ; preds = %idxend34
  %"arrayptr4698'ipl" = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %"'ipc98", align 16, !dbg !1420, !tbaa !251, !alias.scope !1422, !noalias !1425, !nonnull !0
  %arrayptr4698 = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %40, align 16, !dbg !1420, !tbaa !251, !alias.scope !1427, !noalias !1428, !nonnull !0, !invariant.group !1429, !enzyme_type !254, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BSVector\7B3\2C\20Float64\7D\7D !0
  %"arrayref47.sroa.3.0..sroa_idx81'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr4698'ipl", i64 %105, i64 0, i64 2, !dbg !1420
  %arrayref47.sroa.3.0..sroa_idx81 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr4698, i64 %105, i64 0, i64 2, !dbg !1420
  %124 = load double**, double*** %mdyncache_fromtape_cache150, align 8, !dbg !1430, !dereferenceable !1054, !invariant.group !1433
  %125 = getelementptr inbounds double*, double** %124, i64 %iv, !dbg !1430
  %126 = load double*, double** %125, align 8, !dbg !1430, !dereferenceable !1054, !invariant.group !1434
  %127 = getelementptr inbounds double, double* %126, i64 %iv7, !dbg !1430
  %unbox38 = load double, double* %127, align 8, !dbg !1430, !invariant.group !1435
  %"arrayref47.sroa.2.0..sroa_idx80'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr4698'ipl", i64 %105, i64 0, i64 1, !dbg !1420
  %arrayref47.sroa.2.0..sroa_idx80 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr4698, i64 %105, i64 0, i64 1, !dbg !1420
  %"arrayref47.sroa.0.0..sroa_idx'ipg" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr4698'ipl", i64 %105, i64 0, i64 0, !dbg !1420
  %arrayref47.sroa.0.0..sroa_idx = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr4698, i64 %105, i64 0, i64 0, !dbg !1420
  %.not99 = icmp eq i64 %iv.next8, %arraylen, !dbg !1436
  br i1 %.not99, label %L69.loopexit, label %L28, !dbg !1438

pass:                                             ; preds = %L69
  %128 = add nsw i64 %63, -1, !dbg !1439
  %129 = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %128, !dbg !1439
  %.not100 = icmp eq [3 x {} addrspace(10)*] addrspace(11)* %129, null, !dbg !1437
  br i1 %.not100, label %L80, label %guard_pass74, !dbg !1437

guard_pass74:                                     ; preds = %pass
  %130 = load {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)** %mdyncache_fromtape_cache127, align 8, !dbg !1437, !dereferenceable !1054, !invariant.group !1440
  %131 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %130, i64 %iv, !dbg !1437
  %"unbox76.unpack'il_phi" = load {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %131, align 8, !dbg !1437, !invariant.group !1441
  %"'ipiv40" = insertvalue [3 x {} addrspace(10)*] undef, {} addrspace(10)* %"unbox76.unpack'il_phi", 0, !dbg !1437
  %132 = load {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)** %mdyncache_fromtape_cache124, align 8, !dbg !1437, !dereferenceable !1054, !invariant.group !1442
  %133 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %132, i64 %iv, !dbg !1437
  %"unbox76.unpack102'il_phi" = load {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %133, align 8, !dbg !1437, !invariant.group !1443
  %"'ipiv41" = insertvalue [3 x {} addrspace(10)*] %"'ipiv40", {} addrspace(10)* %"unbox76.unpack102'il_phi", 1, !dbg !1437
  %134 = load {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)** %mdyncache_fromtape_cache, align 8, !dbg !1437, !dereferenceable !1054, !invariant.group !1444
  %135 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %134, i64 %iv, !dbg !1437
  %"unbox76.unpack104'il_phi" = load {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %135, align 8, !dbg !1437, !invariant.group !1445
  %"unbox76105'ipiv" = insertvalue [3 x {} addrspace(10)*] %"'ipiv41", {} addrspace(10)* %"unbox76.unpack104'il_phi", 2, !dbg !1437
  %136 = load [3 x {} addrspace(10)*] addrspace(10)*, [3 x {} addrspace(10)*] addrspace(10)** %mdyncache_fromtape_cache155, align 8, !dbg !1437, !dereferenceable !1054, !invariant.group !1446
  %137 = getelementptr inbounds [3 x {} addrspace(10)*], [3 x {} addrspace(10)*] addrspace(10)* %136, i64 %iv, !dbg !1437
  %unbox76105 = load [3 x {} addrspace(10)*], [3 x {} addrspace(10)*] addrspace(10)* %137, align 8, !dbg !1437, !invariant.group !1447
  br label %L80, !dbg !1437

allocsForInversion:                               ; No predecessors!
  %"iv'ac" = alloca i64, align 8
  %"iv7'ac" = alloca i64, align 8
  %arrayref28 = alloca [1 x [3 x double]], i64 1, align 8
  %138 = bitcast [1 x [3 x double]]* %arrayref28 to i8*
  %arrayref37 = alloca [1 x [3 x double]], i64 1, align 8
  %139 = bitcast [1 x [3 x double]]* %arrayref37 to i8*
  %_cache = alloca [1 x [3 x double]]**, align 8
  %_cache22 = alloca [1 x [3 x double]]**, align 8
  %arraylen_cache = alloca i64*, align 8
  %"arrayref19.sroa.0.0.copyload'de" = alloca double, align 8
  %140 = getelementptr double, double* %"arrayref19.sroa.0.0.copyload'de", i64 0
  store double 0.000000e+00, double* %140, align 8
  %unbox76105_cache = alloca [3 x {} addrspace(10)*] addrspace(10)*, align 8
  %".fca.0.2.extract5'de" = alloca double, align 8
  %141 = getelementptr double, double* %".fca.0.2.extract5'de", i64 0
  store double 0.000000e+00, double* %141, align 8
  %"'de" = alloca [1 x [3 x double]], align 8
  %142 = getelementptr [1 x [3 x double]], [1 x [3 x double]]* %"'de", i64 0, i32 0, i32 0
  store double 0.000000e+00, double* %142, align 8
  %143 = getelementptr [1 x [3 x double]], [1 x [3 x double]]* %"'de", i64 0, i32 0, i32 1
  store double 0.000000e+00, double* %143, align 8
  %144 = getelementptr [1 x [3 x double]], [1 x [3 x double]]* %"'de", i64 0, i32 0, i32 2
  store double 0.000000e+00, double* %144, align 8
  %".fca.0.1.extract3'de" = alloca double, align 8
  %145 = getelementptr double, double* %".fca.0.1.extract3'de", i64 0
  store double 0.000000e+00, double* %145, align 8
  %".fca.0.0.extract1'de" = alloca double, align 8
  %146 = getelementptr double, double* %".fca.0.0.extract1'de", i64 0
  store double 0.000000e+00, double* %146, align 8
  %arrayref_cache = alloca i64**, align 8
  %147 = alloca <3 x double>, align 32
  %".fca.0.2.extract'de" = alloca double, align 8
  %148 = getelementptr double, double* %".fca.0.2.extract'de", i64 0
  store double 0.000000e+00, double* %148, align 8
  %"'de86" = alloca [1 x [3 x double]], align 8
  %149 = getelementptr [1 x [3 x double]], [1 x [3 x double]]* %"'de86", i64 0, i32 0, i32 0
  store double 0.000000e+00, double* %149, align 8
  %150 = getelementptr [1 x [3 x double]], [1 x [3 x double]]* %"'de86", i64 0, i32 0, i32 1
  store double 0.000000e+00, double* %150, align 8
  %151 = getelementptr [1 x [3 x double]], [1 x [3 x double]]* %"'de86", i64 0, i32 0, i32 2
  store double 0.000000e+00, double* %151, align 8
  %".fca.0.1.extract'de" = alloca double, align 8
  %152 = getelementptr double, double* %".fca.0.1.extract'de", i64 0
  store double 0.000000e+00, double* %152, align 8
  %".fca.0.0.extract'de" = alloca double, align 8
  %153 = getelementptr double, double* %".fca.0.0.extract'de", i64 0
  store double 0.000000e+00, double* %153, align 8
  %154 = alloca <3 x double>, align 32
  %"'de102" = alloca double, align 8
  %155 = getelementptr double, double* %"'de102", i64 0
  store double 0.000000e+00, double* %155, align 8
  %"'de103" = alloca double, align 8
  %156 = getelementptr double, double* %"'de103", i64 0
  store double 0.000000e+00, double* %156, align 8
  %"'de104" = alloca double, align 8
  %157 = getelementptr double, double* %"'de104", i64 0
  store double 0.000000e+00, double* %157, align 8
  %"'de106" = alloca double, align 8
  %158 = getelementptr double, double* %"'de106", i64 0
  store double 0.000000e+00, double* %158, align 8
  %"arrayref47.sroa.0.0.copyload'de" = alloca double, align 8
  %159 = getelementptr double, double* %"arrayref47.sroa.0.0.copyload'de", i64 0
  store double 0.000000e+00, double* %159, align 8
  %"arrayref47.sroa.2.0.copyload'de" = alloca double, align 8
  %160 = getelementptr double, double* %"arrayref47.sroa.2.0.copyload'de", i64 0
  store double 0.000000e+00, double* %160, align 8
  %"arrayref47.sroa.3.0.copyload'de" = alloca double, align 8
  %161 = getelementptr double, double* %"arrayref47.sroa.3.0.copyload'de", i64 0
  store double 0.000000e+00, double* %161, align 8
  %unbox38_cache = alloca double**, align 8
  %arrayref19.sroa.0.0.copyload_cache = alloca double**, align 8
  %"unbox38'de" = alloca double, align 8
  %162 = getelementptr double, double* %"unbox38'de", i64 0
  store double 0.000000e+00, double* %162, align 8
  %163 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 2
  %mdyncache_fromtape_cache = alloca {} addrspace(10)* addrspace(10)*, align 8
  store {} addrspace(10)* addrspace(10)* %163, {} addrspace(10)* addrspace(10)** %mdyncache_fromtape_cache, align 8
  %164 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 3
  %mdyncache_fromtape_cache124 = alloca {} addrspace(10)* addrspace(10)*, align 8
  store {} addrspace(10)* addrspace(10)* %164, {} addrspace(10)* addrspace(10)** %mdyncache_fromtape_cache124, align 8
  %165 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 4
  %mdyncache_fromtape_cache127 = alloca {} addrspace(10)* addrspace(10)*, align 8
  store {} addrspace(10)* addrspace(10)* %165, {} addrspace(10)* addrspace(10)** %mdyncache_fromtape_cache127, align 8
  %166 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 7
  %mdyncache_fromtape_cache129 = alloca i64*, align 8
  store i64* %166, i64** %mdyncache_fromtape_cache129, align 8
  %167 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 8
  %mdyncache_fromtape_cache131 = alloca i64**, align 8
  store i64** %167, i64*** %mdyncache_fromtape_cache131, align 8
  %168 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 9
  %mdyncache_fromtape_cache136 = alloca double**, align 8
  store double** %168, double*** %mdyncache_fromtape_cache136, align 8
  %169 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 10
  %mdyncache_fromtape_cache141 = alloca [1 x [3 x double]]**, align 8
  store [1 x [3 x double]]** %169, [1 x [3 x double]]*** %mdyncache_fromtape_cache141, align 8
  %170 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 11
  %mdyncache_fromtape_cache146 = alloca [1 x [3 x double]]**, align 8
  store [1 x [3 x double]]** %170, [1 x [3 x double]]*** %mdyncache_fromtape_cache146, align 8
  %171 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 12
  %mdyncache_fromtape_cache150 = alloca double**, align 8
  store double** %171, double*** %mdyncache_fromtape_cache150, align 8
  %172 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 13
  %mdyncache_fromtape_cache155 = alloca [3 x {} addrspace(10)*] addrspace(10)*, align 8
  store [3 x {} addrspace(10)*] addrspace(10)* %172, [3 x {} addrspace(10)*] addrspace(10)** %mdyncache_fromtape_cache155, align 8

inverttop:                                        ; preds = %invertL8
  fence syncscope("singlethread") seq_cst
  fence syncscope("singlethread") seq_cst
  call void @free(i8* %32)
  %173 = load i64, i64* %"iv'ac", align 8
  %174 = load i64, i64* %"iv'ac", align 8
  %175 = load i64, i64* %"iv'ac", align 8
  %176 = load i64, i64* %"iv'ac", align 8
  %177 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 2
  %178 = load i64, i64* %"iv'ac", align 8
  %179 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 3
  %180 = load i64, i64* %"iv'ac", align 8
  %181 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 4
  %182 = load i64, i64* %"iv'ac", align 8
  %183 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 13
  %184 = load i64, i64* %"iv'ac", align 8
  %185 = load i64, i64* %"iv'ac", align 8
  %186 = load i64, i64* %"iv'ac", align 8
  %187 = load i64, i64* %"iv'ac", align 8
  %forfree122 = load {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)** %mdyncache_fromtape_cache, align 8, !dereferenceable !1054, !invariant.group !1444
  %188 = load i64, i64* %"iv'ac", align 8
  %forfree125 = load {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)** %mdyncache_fromtape_cache124, align 8, !dereferenceable !1054, !invariant.group !1442
  %189 = load i64, i64* %"iv'ac", align 8
  %forfree128 = load {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)** %mdyncache_fromtape_cache127, align 8, !dereferenceable !1054, !invariant.group !1440
  %190 = load i64, i64* %"iv'ac", align 8
  %forfree130 = load i64*, i64** %mdyncache_fromtape_cache129, align 8, !dereferenceable !1054, !invariant.group !1377
  %191 = bitcast i64* %forfree130 to i8*
  call void @free(i8* nonnull %191), !dbg !1448
  %192 = load i64, i64* %"iv'ac", align 8
  %forfree132 = load i64**, i64*** %mdyncache_fromtape_cache131, align 8, !dereferenceable !1054, !invariant.group !1389
  %193 = bitcast i64** %forfree132 to i8*
  call void @free(i8* nonnull %193), !dbg !1448
  %194 = load i64, i64* %"iv'ac", align 8
  %forfree137 = load double**, double*** %mdyncache_fromtape_cache136, align 8, !dereferenceable !1054, !invariant.group !1402
  %195 = bitcast double** %forfree137 to i8*
  call void @free(i8* nonnull %195), !dbg !1448
  %196 = load i64, i64* %"iv'ac", align 8
  %forfree142 = load [1 x [3 x double]]**, [1 x [3 x double]]*** %mdyncache_fromtape_cache141, align 8, !dereferenceable !1054, !invariant.group !1414
  %197 = bitcast [1 x [3 x double]]** %forfree142 to i8*
  call void @free(i8* nonnull %197), !dbg !1448
  %198 = load i64, i64* %"iv'ac", align 8
  %forfree = load [1 x [3 x double]]**, [1 x [3 x double]]*** %mdyncache_fromtape_cache146, align 8, !dereferenceable !1054, !invariant.group !1417
  %199 = bitcast [1 x [3 x double]]** %forfree to i8*
  call void @free(i8* nonnull %199), !dbg !1448
  %200 = load i64, i64* %"iv'ac", align 8
  %forfree151 = load double**, double*** %mdyncache_fromtape_cache150, align 8, !dereferenceable !1054, !invariant.group !1433
  %201 = bitcast double** %forfree151 to i8*
  call void @free(i8* nonnull %201), !dbg !1448
  %202 = load i64, i64* %"iv'ac", align 8
  %forfree156 = load [3 x {} addrspace(10)*] addrspace(10)*, [3 x {} addrspace(10)*] addrspace(10)** %mdyncache_fromtape_cache155, align 8, !dereferenceable !1449, !invariant.group !1446
  ret void

invertL8:                                         ; preds = %invertL69, %invertL28.preheader
  %203 = load i64, i64* %"iv'ac", align 8
  %204 = icmp eq i64 %203, 0
  %205 = xor i1 %204, true
  br i1 %204, label %inverttop, label %incinvertL8

incinvertL8:                                      ; preds = %invertL8
  %206 = load i64, i64* %"iv'ac", align 8
  %207 = add nsw i64 %206, -1
  store i64 %207, i64* %"iv'ac", align 8
  br label %invertL80

invertL28.preheader:                              ; preds = %invertL28
  %208 = load i64, i64* %"iv7'ac", align 8
  %209 = load i64, i64* %"iv7'ac", align 8
  %210 = load i64, i64* %"iv7'ac", align 8
  %211 = load i64, i64* %"iv7'ac", align 8
  %212 = load i64, i64* %"iv7'ac", align 8
  %213 = load i64, i64* %"iv'ac", align 8
  %214 = load i64, i64* %"iv7'ac", align 8
  %_unwrap133 = load i64**, i64*** %mdyncache_fromtape_cache131, align 8, !dbg !1379, !invariant.group !1381
  %_unwrap134 = getelementptr inbounds i64*, i64** %_unwrap133, i64 %213
  %forfree135 = load i64*, i64** %_unwrap134, align 8, !dereferenceable !1054, !invariant.group !1390
  %215 = bitcast i64* %forfree135 to i8*
  call void @free(i8* nonnull %215), !dbg !1448
  %216 = load i64, i64* %"iv'ac", align 8
  %217 = load i64, i64* %"iv7'ac", align 8
  %_unwrap138 = load double**, double*** %mdyncache_fromtape_cache136, align 8, !dbg !1379, !invariant.group !1382
  %_unwrap139 = getelementptr inbounds double*, double** %_unwrap138, i64 %216
  %forfree140 = load double*, double** %_unwrap139, align 8, !dereferenceable !1054, !invariant.group !1403
  %218 = bitcast double* %forfree140 to i8*
  call void @free(i8* nonnull %218), !dbg !1448
  %219 = load i64, i64* %"iv'ac", align 8
  %220 = load i64, i64* %"iv7'ac", align 8
  %_unwrap143 = load [1 x [3 x double]]**, [1 x [3 x double]]*** %mdyncache_fromtape_cache141, align 8, !dbg !1379, !invariant.group !1383
  %_unwrap144 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %_unwrap143, i64 %219
  %forfree145 = load [1 x [3 x double]]*, [1 x [3 x double]]** %_unwrap144, align 8, !dereferenceable !1449, !invariant.group !1415
  %221 = bitcast [1 x [3 x double]]* %forfree145 to i8*
  call void @free(i8* nonnull %221), !dbg !1448
  %222 = load i64, i64* %"iv'ac", align 8
  %223 = load i64, i64* %"iv7'ac", align 8
  %_unwrap147 = load [1 x [3 x double]]**, [1 x [3 x double]]*** %mdyncache_fromtape_cache146, align 8, !dbg !1379, !invariant.group !1384
  %_unwrap148 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %_unwrap147, i64 %222
  %forfree149 = load [1 x [3 x double]]*, [1 x [3 x double]]** %_unwrap148, align 8, !dereferenceable !1449, !invariant.group !1418
  %224 = bitcast [1 x [3 x double]]* %forfree149 to i8*
  call void @free(i8* nonnull %224), !dbg !1448
  %225 = load i64, i64* %"iv'ac", align 8
  %226 = load i64, i64* %"iv7'ac", align 8
  %_unwrap152 = load double**, double*** %mdyncache_fromtape_cache150, align 8, !dbg !1379, !invariant.group !1385
  %_unwrap153 = getelementptr inbounds double*, double** %_unwrap152, i64 %225
  %forfree154 = load double*, double** %_unwrap153, align 8, !dereferenceable !1054, !invariant.group !1434
  %227 = bitcast double* %forfree154 to i8*
  call void @free(i8* nonnull %227), !dbg !1448
  br label %invertL8

invertL28:                                        ; preds = %invertidxend
  %228 = load i64, i64* %"iv7'ac", align 8
  %229 = icmp eq i64 %228, 0
  %230 = xor i1 %229, true
  br i1 %229, label %invertL28.preheader, label %incinvertL28

incinvertL28:                                     ; preds = %invertL28
  %231 = load i64, i64* %"iv7'ac", align 8
  %232 = add nsw i64 %231, -1
  store i64 %232, i64* %"iv7'ac", align 8
  br label %remat_enter

invertL69.loopexit:                               ; preds = %invertL69
  %233 = load i64, i64* %"iv'ac", align 8
  %234 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 7
  %235 = getelementptr inbounds i64, i64* %234, i64 %233
  %236 = load i64, i64* %235, align 8, !dbg !1450, !tbaa !181, !range !184, !alias.scope !1451, !noalias !1454, !invariant.group !1456
  %_unwrap32 = add nsw i64 %236, -1
  br label %mergeinvertL28_L69.loopexit

mergeinvertL28_L69.loopexit:                      ; preds = %invertL69.loopexit
  store i64 %_unwrap32, i64* %"iv7'ac", align 8
  br label %remat_enter

invertL69:                                        ; preds = %invertpass, %mergeinvertL8_L86
  %237 = load i64, i64* %"iv'ac", align 8
  %238 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 7
  %239 = getelementptr inbounds i64, i64* %238, i64 %237
  %240 = load i64, i64* %239, align 8, !dbg !1450, !tbaa !181, !range !184, !alias.scope !1451, !noalias !1454, !invariant.group !1456
  %.not_unwrap = icmp eq i64 %240, 0
  br i1 %.not_unwrap, label %invertL8, label %invertL69.loopexit

invertL80:                                        ; preds = %incinvertL8
  %241 = load i64, i64* %"iv'ac", align 8
  %_unwrap33 = add nuw nsw i64 %241, 2
  %_unwrap34 = add nsw i64 %_unwrap33, -1
  %_unwrap35 = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %_unwrap34
  %.not100_unwrap = icmp eq [3 x {} addrspace(10)*] addrspace(11)* %_unwrap35, null
  br i1 %.not100_unwrap, label %invertpass, label %invertguard_pass74

invertL86:                                        ; preds = %L86
  br label %mergeinvertL8_L86

mergeinvertL8_L86:                                ; preds = %invertL86
  store i64 1, i64* %"iv'ac", align 8
  br label %invertL69

invertoob:                                        ; No predecessors!

invertidxend:                                     ; preds = %invertidxend16_phimerge_phimerge_amerge
  br label %invertL28

invertoob14:                                      ; No predecessors!

invertidxend16:                                   ; preds = %invertidxend25_amerge
  %242 = load double, double* %"arrayref19.sroa.0.0.copyload'de", align 8, !dbg !1379
  store double 0.000000e+00, double* %"arrayref19.sroa.0.0.copyload'de", align 8, !dbg !1379
  %243 = load i64, i64* %"iv7'ac", align 8, !dbg !1379
  %244 = load i64, i64* %"iv'ac", align 8, !dbg !1379
  %245 = icmp ne i64 %244, 0, !dbg !1379
  br i1 %245, label %invertidxend16_phirc, label %invertidxend16_phirc50, !dbg !1379

invertidxend16_phirc:                             ; preds = %invertidxend16
  %246 = sub nuw i64 %244, 1
  %_unwrap42 = add nuw nsw i64 %246, 2
  %_unwrap43 = add nsw i64 %_unwrap42, -1
  %_unwrap44 = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %_unwrap43
  %.not100_unwrap45 = icmp eq [3 x {} addrspace(10)*] addrspace(11)* %_unwrap44, null
  br i1 %.not100_unwrap45, label %invertidxend16_phirc_phirc, label %invertidxend16_phirc_phirc46

invertidxend16_phirc50:                           ; preds = %invertidxend16
  br label %invertidxend16_phimerge

invertidxend16_phimerge:                          ; preds = %invertidxend16_phirc50, %invertidxend16_phirc_phimerge
  %247 = phi [3 x {} addrspace(10)*] [ %269, %invertidxend16_phirc_phimerge ], [ %"unbox6994'ipiv", %invertidxend16_phirc50 ], !dbg !1379
  %"'ipev_unwrap" = extractvalue [3 x {} addrspace(10)*] %247, 2, !dbg !1379
  %"'ipc_unwrap" = addrspacecast {} addrspace(10)* %"'ipev_unwrap" to [1 x [2 x double]] addrspace(13)* addrspace(11)*, !dbg !1379
  %"arrayptr1896'il_phi_unwrap" = load [1 x [2 x double]] addrspace(13)*, [1 x [2 x double]] addrspace(13)* addrspace(11)* %"'ipc_unwrap", align 8, !dbg !1379, !tbaa !251, !alias.scope !1392, !noalias !1395, !nonnull !0
  %iv.next8_unwrap51 = add nuw nsw i64 %243, 1, !dbg !1379
  %_unwrap52 = add nsw i64 %iv.next8_unwrap51, -1, !dbg !1379
  %"arrayref19.sroa.0.0..sroa_idx'ipg_unwrap" = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %"arrayptr1896'il_phi_unwrap", i64 %_unwrap52, i64 0, i64 0, !dbg !1379
  %248 = load i64, i64* %"iv7'ac", align 8, !dbg !1379
  %249 = load i64, i64* %"iv'ac", align 8, !dbg !1379
  %250 = icmp ne i64 %249, 0, !dbg !1379
  br i1 %250, label %invertidxend16_phimerge_phirc, label %invertidxend16_phimerge_phirc59, !dbg !1379

invertidxend16_phimerge_phirc:                    ; preds = %invertidxend16_phimerge
  %251 = sub nuw i64 %249, 1
  %_unwrap53 = add nuw nsw i64 %251, 2
  %_unwrap54 = add nsw i64 %_unwrap53, -1
  %_unwrap55 = getelementptr inbounds [2 x [3 x {} addrspace(10)*]], [2 x [3 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %_unwrap54
  %.not100_unwrap56 = icmp eq [3 x {} addrspace(10)*] addrspace(11)* %_unwrap55, null
  br i1 %.not100_unwrap56, label %invertidxend16_phimerge_phirc_phirc, label %invertidxend16_phimerge_phirc_phirc57

invertidxend16_phimerge_phirc59:                  ; preds = %invertidxend16_phimerge
  br label %invertidxend16_phimerge_phimerge

invertidxend16_phimerge_phimerge:                 ; preds = %invertidxend16_phimerge_phirc59, %invertidxend16_phimerge_phirc_phimerge
  %252 = phi [3 x {} addrspace(10)*] [ %259, %invertidxend16_phimerge_phirc_phimerge ], [ %unbox6994, %invertidxend16_phimerge_phirc59 ], !dbg !1379
  %_unwrap60 = extractvalue [3 x {} addrspace(10)*] %252, 2, !dbg !1379
  %_unwrap61 = addrspacecast {} addrspace(10)* %_unwrap60 to [1 x [2 x double]] addrspace(13)* addrspace(11)*, !dbg !1379
  %arrayptr1896_unwrap = load [1 x [2 x double]] addrspace(13)*, [1 x [2 x double]] addrspace(13)* addrspace(11)* %_unwrap61, align 8, !dbg !1379, !tbaa !251, !alias.scope !1397, !noalias !1398, !nonnull !0, !invariant.group !1399
  %arrayref19.sroa.0.0..sroa_idx_unwrap = getelementptr inbounds [1 x [2 x double]], [1 x [2 x double]] addrspace(13)* %arrayptr1896_unwrap, i64 %_unwrap52, i64 0, i64 0, !dbg !1379
  %253 = icmp ne double addrspace(13)* %arrayref19.sroa.0.0..sroa_idx_unwrap, %"arrayref19.sroa.0.0..sroa_idx'ipg_unwrap", !dbg !1379
  br i1 %253, label %invertidxend16_phimerge_phimerge_active, label %invertidxend16_phimerge_phimerge_amerge, !dbg !1379

invertidxend16_phimerge_phimerge_active:          ; preds = %invertidxend16_phimerge_phimerge
  %254 = load double, double addrspace(13)* %"arrayref19.sroa.0.0..sroa_idx'ipg_unwrap", align 1, !dbg !1379, !tbaa !362, !alias.scope !1457, !noalias !1460
  %255 = fadd fast double %254, %242, !dbg !1379
  store double %255, double addrspace(13)* %"arrayref19.sroa.0.0..sroa_idx'ipg_unwrap", align 1, !dbg !1379, !tbaa !362, !alias.scope !1457, !noalias !1460
  br label %invertidxend16_phimerge_phimerge_amerge, !dbg !1379

invertidxend16_phimerge_phimerge_amerge:          ; preds = %invertidxend16_phimerge_phimerge_active, %invertidxend16_phimerge_phimerge
  br label %invertidxend

invertidxend16_phimerge_phirc_phirc:              ; preds = %invertidxend16_phimerge_phirc
  br label %invertidxend16_phimerge_phirc_phimerge

invertidxend16_phimerge_phirc_phirc57:            ; preds = %invertidxend16_phimerge_phirc
  %256 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 13
  %257 = getelementptr inbounds [3 x {} addrspace(10)*], [3 x {} addrspace(10)*] addrspace(10)* %256, i64 %251
  %258 = load [3 x {} addrspace(10)*], [3 x {} addrspace(10)*] addrspace(10)* %257, align 8, !invariant.group !1462
  br label %invertidxend16_phimerge_phirc_phimerge

invertidxend16_phimerge_phirc_phimerge:           ; preds = %invertidxend16_phimerge_phirc_phirc57, %invertidxend16_phimerge_phirc_phirc
  %259 = phi [3 x {} addrspace(10)*] [ zeroinitializer, %invertidxend16_phimerge_phirc_phirc ], [ %258, %invertidxend16_phimerge_phirc_phirc57 ]
  br label %invertidxend16_phimerge_phimerge

invertidxend16_phirc_phirc:                       ; preds = %invertidxend16_phirc
  br label %invertidxend16_phirc_phimerge

invertidxend16_phirc_phirc46:                     ; preds = %invertidxend16_phirc
  %260 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 2
  %261 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %260, i64 %246
  %262 = load {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %261, align 8, !invariant.group !1463
  %263 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 3
  %264 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %263, i64 %246
  %265 = load {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %264, align 8, !invariant.group !1464
  %266 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 4
  %267 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %266, i64 %246
  %268 = load {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %267, align 8, !invariant.group !1465
  %"'ipiv40_unwrap" = insertvalue [3 x {} addrspace(10)*] undef, {} addrspace(10)* %268, 0
  %"'ipiv41_unwrap" = insertvalue [3 x {} addrspace(10)*] %"'ipiv40_unwrap", {} addrspace(10)* %265, 1
  %"unbox76105'ipiv_unwrap" = insertvalue [3 x {} addrspace(10)*] %"'ipiv41_unwrap", {} addrspace(10)* %262, 2
  br label %invertidxend16_phirc_phimerge

invertidxend16_phirc_phimerge:                    ; preds = %invertidxend16_phirc_phirc46, %invertidxend16_phirc_phirc
  %269 = phi [3 x {} addrspace(10)*] [ zeroinitializer, %invertidxend16_phirc_phirc ], [ %"unbox76105'ipiv_unwrap", %invertidxend16_phirc_phirc46 ]
  br label %invertidxend16_phimerge

invertoob23:                                      ; No predecessors!

invertidxend25:                                   ; preds = %invertidxend34_amerge
  %270 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %271 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %"'ipc64_unwrap" = bitcast i8* %"'ipc63" to [1 x [3 x double]]*, !dbg !1400
  %".fca.0.2.gep6'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc64_unwrap", i32 0, i32 0, i32 2, !dbg !1400
  %272 = load double, double* %".fca.0.2.gep6'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1466, !noalias !1469
  store double 0.000000e+00, double* %".fca.0.2.gep6'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1466, !noalias !1469
  %273 = load double, double* %".fca.0.2.extract5'de", align 8, !dbg !1400
  %274 = fadd fast double %273, %272, !dbg !1400
  store double %274, double* %".fca.0.2.extract5'de", align 8, !dbg !1400
  %275 = load double, double* %".fca.0.2.extract5'de", align 8, !dbg !1400
  %276 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'de", i32 0, i32 0, i32 2, !dbg !1400
  %277 = load double, double* %276, align 8, !dbg !1400
  %278 = fadd fast double %277, %275, !dbg !1400
  store double %278, double* %276, align 8, !dbg !1400
  store double 0.000000e+00, double* %".fca.0.2.extract5'de", align 8, !dbg !1400
  %279 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %280 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %".fca.0.1.gep4'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc64_unwrap", i32 0, i32 0, i32 1, !dbg !1400
  %281 = load double, double* %".fca.0.1.gep4'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1466, !noalias !1469
  store double 0.000000e+00, double* %".fca.0.1.gep4'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1466, !noalias !1469
  %282 = load double, double* %".fca.0.1.extract3'de", align 8, !dbg !1400
  %283 = fadd fast double %282, %281, !dbg !1400
  store double %283, double* %".fca.0.1.extract3'de", align 8, !dbg !1400
  %284 = load double, double* %".fca.0.1.extract3'de", align 8, !dbg !1400
  %285 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'de", i32 0, i32 0, i32 1, !dbg !1400
  %286 = load double, double* %285, align 8, !dbg !1400
  %287 = fadd fast double %286, %284, !dbg !1400
  store double %287, double* %285, align 8, !dbg !1400
  store double 0.000000e+00, double* %".fca.0.1.extract3'de", align 8, !dbg !1400
  %288 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %289 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %".fca.0.0.gep2'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc64_unwrap", i32 0, i32 0, i32 0, !dbg !1400
  %290 = load double, double* %".fca.0.0.gep2'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1466, !noalias !1469
  store double 0.000000e+00, double* %".fca.0.0.gep2'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1466, !noalias !1469
  %291 = load double, double* %".fca.0.0.extract1'de", align 8, !dbg !1400
  %292 = fadd fast double %291, %290, !dbg !1400
  store double %292, double* %".fca.0.0.extract1'de", align 8, !dbg !1400
  %293 = load double, double* %".fca.0.0.extract1'de", align 8, !dbg !1400
  %294 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'de", i32 0, i32 0, i32 0, !dbg !1400
  %295 = load double, double* %294, align 8, !dbg !1400
  %296 = fadd fast double %295, %293, !dbg !1400
  store double %296, double* %294, align 8, !dbg !1400
  store double 0.000000e+00, double* %".fca.0.0.extract1'de", align 8, !dbg !1400
  %297 = load [1 x [3 x double]], [1 x [3 x double]]* %"'de", align 8, !dbg !1400
  store [1 x [3 x double]] zeroinitializer, [1 x [3 x double]]* %"'de", align 8, !dbg !1400
  %298 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %299 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %"arrayptr2797'il_phi_unwrap" = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %"'ipc67", align 16, !dbg !1400, !tbaa !251, !alias.scope !1405, !noalias !1408, !nonnull !0
  %300 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %_unwrap162 = load i64*, i64** %mdyncache_fromtape_cache129, align 8, !dbg !1373, !dereferenceable !1054, !invariant.group !1377
  %_unwrap163 = getelementptr inbounds i64, i64* %_unwrap162, i64 %300, !dbg !1400
  %arraylen_unwrap164 = load i64, i64* %_unwrap163, align 8, !dbg !1373, !alias.scope !1451, !noalias !1454, !invariant.group !1378
  %_unwrap74 = add nsw i64 %arraylen_unwrap164, -1, !dbg !1400
  %301 = add nuw i64 %_unwrap74, 1, !dbg !1400
  %302 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 8, !dbg !1400
  %303 = getelementptr inbounds i64*, i64** %302, i64 %299, !dbg !1400
  %304 = load i64*, i64** %303, align 8, !dbg !1400, !dereferenceable !1054, !invariant.group !1471
  %305 = getelementptr inbounds i64, i64* %304, i64 %298, !dbg !1400
  %306 = load i64, i64* %305, align 8, !dbg !1379, !tbaa !383, !alias.scope !1472, !noalias !1475, !invariant.group !1477
  %_unwrap75 = add i64 %306, -1, !dbg !1400
  %"'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr2797'il_phi_unwrap", i64 %_unwrap75, i64 0, !dbg !1400
  %"'ipc65_unwrap" = bitcast [3 x double] addrspace(13)* %"'ipg_unwrap" to i8 addrspace(13)*, !dbg !1400
  %"'ipc66_unwrap" = bitcast i8 addrspace(13)* %"'ipc65_unwrap" to [1 x [3 x double]] addrspace(13)*, !dbg !1400
  %307 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %308 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %arrayptr2797_unwrap = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %35, align 16, !dbg !1400, !tbaa !251, !alias.scope !1411, !noalias !1412, !nonnull !0, !invariant.group !1413
  %_unwrap76 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr2797_unwrap, i64 %_unwrap75, i64 0, !dbg !1400
  %_unwrap77 = bitcast [3 x double] addrspace(13)* %_unwrap76 to i8 addrspace(13)*, !dbg !1400
  %_unwrap78 = bitcast i8 addrspace(13)* %_unwrap77 to [1 x [3 x double]] addrspace(13)*, !dbg !1400
  %309 = icmp ne [1 x [3 x double]] addrspace(13)* %_unwrap78, %"'ipc66_unwrap", !dbg !1400
  br i1 %309, label %invertidxend25_active, label %invertidxend25_amerge, !dbg !1400

invertidxend25_active:                            ; preds = %invertidxend25
  %310 = bitcast [1 x [3 x double]] addrspace(13)* %"'ipc66_unwrap" to <3 x double> addrspace(13)*, !dbg !1400
  %311 = bitcast <3 x double>* %147 to [1 x [3 x double]]*, !dbg !1400
  store [1 x [3 x double]] %297, [1 x [3 x double]]* %311, align 8, !dbg !1400
  %312 = load <3 x double>, <3 x double>* %147, align 32, !dbg !1400
  %313 = load <3 x double>, <3 x double> addrspace(13)* %310, align 8, !dbg !1400, !alias.scope !1478, !noalias !1481
  %314 = fadd fast <3 x double> %313, %312, !dbg !1400
  store <3 x double> %314, <3 x double> addrspace(13)* %310, align 8, !dbg !1400, !alias.scope !1478, !noalias !1481
  br label %invertidxend25_amerge, !dbg !1400

invertidxend25_amerge:                            ; preds = %invertidxend25_active, %invertidxend25
  br label %invertidxend16

invertoob32:                                      ; No predecessors!

invertidxend34:                                   ; preds = %invertidxend57_amerge_amerge_amerge
  call fastcc void @diffejulia_periodic_torsion_vectors_1952({ [1 x [3 x double]], double }* nocapture nofree writeonly align 8 "enzyme_sret" undef, { [1 x [3 x double]], double }* nocapture nofree align 8 "enzyme_sret" %"'ipc81", [1 x [3 x double]] addrspace(11)* nocapture nofree readonly align 8 %38, [1 x [3 x double]] addrspace(11)* nocapture nofree align 8 %"'ipc82", [1 x [3 x double]] addrspace(11)* nocapture nofree readonly align 8 %39, [1 x [3 x double]] addrspace(11)* nocapture nofree align 8 %"'ipc83"), !dbg !1401
  %315 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %316 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %"'ipc85_unwrap" = bitcast i8* %"'ipc84" to [1 x [3 x double]]*, !dbg !1400
  %".fca.0.2.gep'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc85_unwrap", i32 0, i32 0, i32 2, !dbg !1400
  %317 = load double, double* %".fca.0.2.gep'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1483, !noalias !1486
  store double 0.000000e+00, double* %".fca.0.2.gep'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1483, !noalias !1486
  %318 = load double, double* %".fca.0.2.extract'de", align 8, !dbg !1400
  %319 = fadd fast double %318, %317, !dbg !1400
  store double %319, double* %".fca.0.2.extract'de", align 8, !dbg !1400
  %320 = load double, double* %".fca.0.2.extract'de", align 8, !dbg !1400
  %321 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'de86", i32 0, i32 0, i32 2, !dbg !1400
  %322 = load double, double* %321, align 8, !dbg !1400
  %323 = fadd fast double %322, %320, !dbg !1400
  store double %323, double* %321, align 8, !dbg !1400
  store double 0.000000e+00, double* %".fca.0.2.extract'de", align 8, !dbg !1400
  %324 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %325 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %".fca.0.1.gep'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc85_unwrap", i32 0, i32 0, i32 1, !dbg !1400
  %326 = load double, double* %".fca.0.1.gep'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1483, !noalias !1486
  store double 0.000000e+00, double* %".fca.0.1.gep'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1483, !noalias !1486
  %327 = load double, double* %".fca.0.1.extract'de", align 8, !dbg !1400
  %328 = fadd fast double %327, %326, !dbg !1400
  store double %328, double* %".fca.0.1.extract'de", align 8, !dbg !1400
  %329 = load double, double* %".fca.0.1.extract'de", align 8, !dbg !1400
  %330 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'de86", i32 0, i32 0, i32 1, !dbg !1400
  %331 = load double, double* %330, align 8, !dbg !1400
  %332 = fadd fast double %331, %329, !dbg !1400
  store double %332, double* %330, align 8, !dbg !1400
  store double 0.000000e+00, double* %".fca.0.1.extract'de", align 8, !dbg !1400
  %333 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %334 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %".fca.0.0.gep'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'ipc85_unwrap", i32 0, i32 0, i32 0, !dbg !1400
  %335 = load double, double* %".fca.0.0.gep'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1483, !noalias !1486
  store double 0.000000e+00, double* %".fca.0.0.gep'ipg_unwrap", align 8, !dbg !1400, !alias.scope !1483, !noalias !1486
  %336 = load double, double* %".fca.0.0.extract'de", align 8, !dbg !1400
  %337 = fadd fast double %336, %335, !dbg !1400
  store double %337, double* %".fca.0.0.extract'de", align 8, !dbg !1400
  %338 = load double, double* %".fca.0.0.extract'de", align 8, !dbg !1400
  %339 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %"'de86", i32 0, i32 0, i32 0, !dbg !1400
  %340 = load double, double* %339, align 8, !dbg !1400
  %341 = fadd fast double %340, %338, !dbg !1400
  store double %341, double* %339, align 8, !dbg !1400
  store double 0.000000e+00, double* %".fca.0.0.extract'de", align 8, !dbg !1400
  %342 = load [1 x [3 x double]], [1 x [3 x double]]* %"'de86", align 8, !dbg !1400
  store [1 x [3 x double]] zeroinitializer, [1 x [3 x double]]* %"'de86", align 8, !dbg !1400
  %343 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %344 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %"arrayptr2797'ipl_unwrap" = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %"'ipc67", align 16, !dbg !1400, !tbaa !251, !alias.scope !1405, !noalias !1408, !nonnull !0, !invariant.group !1410
  %345 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %_unwrap157 = load i64*, i64** %mdyncache_fromtape_cache129, align 8, !dbg !1373, !dereferenceable !1054, !invariant.group !1377
  %_unwrap158 = getelementptr inbounds i64, i64* %_unwrap157, i64 %345, !dbg !1400
  %arraylen_unwrap = load i64, i64* %_unwrap158, align 8, !dbg !1373, !alias.scope !1451, !noalias !1454, !invariant.group !1378
  %_unwrap91 = add nsw i64 %arraylen_unwrap, -1, !dbg !1400
  %346 = add nuw i64 %_unwrap91, 1, !dbg !1400
  %347 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 8, !dbg !1400
  %348 = getelementptr inbounds i64*, i64** %347, i64 %344, !dbg !1400
  %349 = load i64*, i64** %348, align 8, !dbg !1400, !dereferenceable !1054, !invariant.group !1471
  %350 = getelementptr inbounds i64, i64* %349, i64 %343, !dbg !1400
  %351 = load i64, i64* %350, align 8, !dbg !1379, !tbaa !383, !alias.scope !1472, !noalias !1475, !invariant.group !1477
  %"'ipg87_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr2797'ipl_unwrap", i64 %351, i64 0, !dbg !1400
  %"'ipc88_unwrap" = bitcast [3 x double] addrspace(13)* %"'ipg87_unwrap" to i8 addrspace(13)*, !dbg !1400
  %"'ipc89_unwrap" = bitcast i8 addrspace(13)* %"'ipc88_unwrap" to [1 x [3 x double]] addrspace(13)*, !dbg !1400
  %352 = load i64, i64* %"iv7'ac", align 8, !dbg !1400
  %353 = load i64, i64* %"iv'ac", align 8, !dbg !1400
  %arrayptr2797_unwrap92 = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %35, align 16, !dbg !1400, !tbaa !251, !alias.scope !1411, !noalias !1412, !nonnull !0, !invariant.group !1413
  %_unwrap93 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr2797_unwrap92, i64 %351, i64 0, !dbg !1400
  %_unwrap94 = bitcast [3 x double] addrspace(13)* %_unwrap93 to i8 addrspace(13)*, !dbg !1400
  %_unwrap95 = bitcast i8 addrspace(13)* %_unwrap94 to [1 x [3 x double]] addrspace(13)*, !dbg !1400
  %354 = icmp ne [1 x [3 x double]] addrspace(13)* %_unwrap95, %"'ipc89_unwrap", !dbg !1400
  br i1 %354, label %invertidxend34_active, label %invertidxend34_amerge, !dbg !1400

invertidxend34_active:                            ; preds = %invertidxend34
  %355 = bitcast [1 x [3 x double]] addrspace(13)* %"'ipc89_unwrap" to <3 x double> addrspace(13)*, !dbg !1400
  %356 = bitcast <3 x double>* %154 to [1 x [3 x double]]*, !dbg !1400
  store [1 x [3 x double]] %342, [1 x [3 x double]]* %356, align 8, !dbg !1400
  %357 = load <3 x double>, <3 x double>* %154, align 32, !dbg !1400
  %358 = load <3 x double>, <3 x double> addrspace(13)* %355, align 8, !dbg !1400, !alias.scope !1478, !noalias !1481
  %359 = fadd fast <3 x double> %358, %357, !dbg !1400
  store <3 x double> %359, <3 x double> addrspace(13)* %355, align 8, !dbg !1400, !alias.scope !1478, !noalias !1481
  br label %invertidxend34_amerge, !dbg !1400

invertidxend34_amerge:                            ; preds = %invertidxend34_active, %invertidxend34
  br label %invertidxend25

invertoob42:                                      ; No predecessors!

invertidxend57:                                   ; preds = %remat_L28_idxend57, %remat_L28_idxend57
  %360 = load i64, i64* %"iv7'ac", align 8, !dbg !1488
  %361 = load i64, i64* %"iv'ac", align 8, !dbg !1488
  %"arrayptr4698'il_phi_unwrap" = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %"'ipc98", align 16, !dbg !1420, !tbaa !251, !alias.scope !1422, !noalias !1425, !nonnull !0
  %362 = load i64, i64* %"iv'ac", align 8, !dbg !1488
  %_unwrap159 = load i64*, i64** %mdyncache_fromtape_cache129, align 8, !dbg !1373, !dereferenceable !1054, !invariant.group !1377
  %_unwrap160 = getelementptr inbounds i64, i64* %_unwrap159, i64 %362, !dbg !1488
  %arraylen_unwrap161 = load i64, i64* %_unwrap160, align 8, !dbg !1373, !alias.scope !1451, !noalias !1454, !invariant.group !1378
  %_unwrap100 = add nsw i64 %arraylen_unwrap161, -1, !dbg !1488
  %363 = add nuw i64 %_unwrap100, 1, !dbg !1488
  %364 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 8, !dbg !1488
  %365 = getelementptr inbounds i64*, i64** %364, i64 %361, !dbg !1488
  %366 = load i64*, i64** %365, align 8, !dbg !1488, !dereferenceable !1054, !invariant.group !1471
  %367 = getelementptr inbounds i64, i64* %366, i64 %360, !dbg !1488
  %368 = load i64, i64* %367, align 8, !dbg !1379, !tbaa !383, !alias.scope !1472, !noalias !1475, !invariant.group !1477
  %_unwrap101 = add i64 %368, -1, !dbg !1488
  %"arrayref47.sroa.3.0..sroa_idx81'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr4698'il_phi_unwrap", i64 %_unwrap101, i64 0, i64 2, !dbg !1488
  %369 = load double, double addrspace(13)* %"arrayref47.sroa.3.0..sroa_idx81'ipg_unwrap", align 8, !dbg !1488, !tbaa !362, !alias.scope !1489, !noalias !1492
  store double 0.000000e+00, double addrspace(13)* %"arrayref47.sroa.3.0..sroa_idx81'ipg_unwrap", align 8, !dbg !1488, !tbaa !362, !alias.scope !1489, !noalias !1492
  %370 = load double, double* %"'de102", align 8, !dbg !1488
  %371 = fadd fast double %370, %369, !dbg !1488
  store double %371, double* %"'de102", align 8, !dbg !1488
  %372 = load i64, i64* %"iv7'ac", align 8, !dbg !1488
  %373 = load i64, i64* %"iv'ac", align 8, !dbg !1488
  %"arrayref47.sroa.2.0..sroa_idx80'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr4698'il_phi_unwrap", i64 %_unwrap101, i64 0, i64 1, !dbg !1488
  %374 = load double, double addrspace(13)* %"arrayref47.sroa.2.0..sroa_idx80'ipg_unwrap", align 8, !dbg !1488, !tbaa !362, !alias.scope !1489, !noalias !1492
  store double 0.000000e+00, double addrspace(13)* %"arrayref47.sroa.2.0..sroa_idx80'ipg_unwrap", align 8, !dbg !1488, !tbaa !362, !alias.scope !1489, !noalias !1492
  %375 = load double, double* %"'de103", align 8, !dbg !1488
  %376 = fadd fast double %375, %374, !dbg !1488
  store double %376, double* %"'de103", align 8, !dbg !1488
  %377 = load i64, i64* %"iv7'ac", align 8, !dbg !1488
  %378 = load i64, i64* %"iv'ac", align 8, !dbg !1488
  %"arrayref47.sroa.0.0..sroa_idx'ipg_unwrap" = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %"arrayptr4698'il_phi_unwrap", i64 %_unwrap101, i64 0, i64 0, !dbg !1488
  %379 = load double, double addrspace(13)* %"arrayref47.sroa.0.0..sroa_idx'ipg_unwrap", align 8, !dbg !1488, !tbaa !362, !alias.scope !1489, !noalias !1492
  store double 0.000000e+00, double addrspace(13)* %"arrayref47.sroa.0.0..sroa_idx'ipg_unwrap", align 8, !dbg !1488, !tbaa !362, !alias.scope !1489, !noalias !1492
  %380 = load double, double* %"'de104", align 8, !dbg !1488
  %381 = fadd fast double %380, %379, !dbg !1488
  store double %381, double* %"'de104", align 8, !dbg !1488
  %382 = load double, double* %"'de104", align 8, !dbg !1494
  store double 0.000000e+00, double* %"'de104", align 8, !dbg !1494
  %383 = load double, double* %"'de106", align 8, !dbg !1494
  %384 = fadd fast double %383, %382, !dbg !1494
  store double %384, double* %"'de106", align 8, !dbg !1494
  %385 = load double, double* %"arrayref47.sroa.0.0.copyload'de", align 8, !dbg !1494
  %386 = fadd fast double %385, %382, !dbg !1494
  store double %386, double* %"arrayref47.sroa.0.0.copyload'de", align 8, !dbg !1494
  %387 = load double, double* %"arrayref47.sroa.0.0.copyload'de", align 8, !dbg !1420
  store double 0.000000e+00, double* %"arrayref47.sroa.0.0.copyload'de", align 8, !dbg !1420
  %388 = load i64, i64* %"iv7'ac", align 8, !dbg !1420
  %389 = load i64, i64* %"iv'ac", align 8, !dbg !1420
  %arrayptr4698_unwrap = load [1 x [3 x double]] addrspace(13)*, [1 x [3 x double]] addrspace(13)* addrspace(11)* %40, align 16, !dbg !1420, !tbaa !251, !alias.scope !1427, !noalias !1428, !nonnull !0, !invariant.group !1429
  %arrayref47.sroa.0.0..sroa_idx_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr4698_unwrap, i64 %_unwrap101, i64 0, i64 0, !dbg !1420
  %390 = icmp ne double addrspace(13)* %arrayref47.sroa.0.0..sroa_idx_unwrap, %"arrayref47.sroa.0.0..sroa_idx'ipg_unwrap", !dbg !1420
  br i1 %390, label %invertidxend57_active, label %invertidxend57_amerge, !dbg !1420

invertidxend57_active:                            ; preds = %invertidxend57
  %391 = load double, double addrspace(13)* %"arrayref47.sroa.0.0..sroa_idx'ipg_unwrap", align 8, !dbg !1420, !tbaa !362, !alias.scope !1499, !noalias !1492
  %392 = fadd fast double %391, %387, !dbg !1420
  store double %392, double addrspace(13)* %"arrayref47.sroa.0.0..sroa_idx'ipg_unwrap", align 8, !dbg !1420, !tbaa !362, !alias.scope !1499, !noalias !1492
  br label %invertidxend57_amerge, !dbg !1420

invertidxend57_amerge:                            ; preds = %invertidxend57_active, %invertidxend57
  %393 = load double, double* %"'de103", align 8, !dbg !1494
  store double 0.000000e+00, double* %"'de103", align 8, !dbg !1494
  %394 = load double, double* %"arrayref47.sroa.2.0.copyload'de", align 8, !dbg !1494
  %395 = fadd fast double %394, %393, !dbg !1494
  store double %395, double* %"arrayref47.sroa.2.0.copyload'de", align 8, !dbg !1494
  %396 = load double, double* %"'de106", align 8, !dbg !1494
  %397 = fadd fast double %396, %393, !dbg !1494
  store double %397, double* %"'de106", align 8, !dbg !1494
  %398 = load double, double* %"arrayref47.sroa.2.0.copyload'de", align 8, !dbg !1420
  store double 0.000000e+00, double* %"arrayref47.sroa.2.0.copyload'de", align 8, !dbg !1420
  %399 = load i64, i64* %"iv7'ac", align 8, !dbg !1420
  %400 = load i64, i64* %"iv'ac", align 8, !dbg !1420
  %arrayref47.sroa.2.0..sroa_idx80_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr4698_unwrap, i64 %_unwrap101, i64 0, i64 1, !dbg !1420
  %401 = icmp ne double addrspace(13)* %arrayref47.sroa.2.0..sroa_idx80_unwrap, %"arrayref47.sroa.2.0..sroa_idx80'ipg_unwrap", !dbg !1420
  br i1 %401, label %invertidxend57_amerge_active, label %invertidxend57_amerge_amerge, !dbg !1420

invertidxend57_amerge_active:                     ; preds = %invertidxend57_amerge
  %402 = load double, double addrspace(13)* %"arrayref47.sroa.2.0..sroa_idx80'ipg_unwrap", align 8, !dbg !1420, !tbaa !362, !alias.scope !1499, !noalias !1492
  %403 = fadd fast double %402, %398, !dbg !1420
  store double %403, double addrspace(13)* %"arrayref47.sroa.2.0..sroa_idx80'ipg_unwrap", align 8, !dbg !1420, !tbaa !362, !alias.scope !1499, !noalias !1492
  br label %invertidxend57_amerge_amerge, !dbg !1420

invertidxend57_amerge_amerge:                     ; preds = %invertidxend57_amerge_active, %invertidxend57_amerge
  %404 = load double, double* %"'de102", align 8, !dbg !1494
  store double 0.000000e+00, double* %"'de102", align 8, !dbg !1494
  %405 = load double, double* %"arrayref47.sroa.3.0.copyload'de", align 8, !dbg !1494
  %406 = fadd fast double %405, %404, !dbg !1494
  store double %406, double* %"arrayref47.sroa.3.0.copyload'de", align 8, !dbg !1494
  %407 = load double, double* %"'de106", align 8, !dbg !1494
  %408 = fadd fast double %407, %404, !dbg !1494
  store double %408, double* %"'de106", align 8, !dbg !1494
  %409 = load double, double* %"'de106", align 8, !dbg !1430
  store double 0.000000e+00, double* %"'de106", align 8, !dbg !1430
  %410 = load i64, i64* %"iv7'ac", align 8, !dbg !1430
  %411 = load i64, i64* %"iv'ac", align 8, !dbg !1430
  %412 = load i64, i64* %"iv'ac", align 8, !dbg !1430
  %413 = add nuw i64 %_unwrap100, 1, !dbg !1430
  %414 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 12, !dbg !1430
  %415 = getelementptr inbounds double*, double** %414, i64 %411, !dbg !1430
  %416 = load double*, double** %415, align 8, !dbg !1430, !dereferenceable !1054, !invariant.group !1500
  %417 = getelementptr inbounds double, double* %416, i64 %410, !dbg !1430
  %418 = load double, double* %417, align 8, !dbg !1430, !tbaa !288, !alias.scope !290, !noalias !572, !invariant.group !1501
  %419 = fmul fast double %409, %418, !dbg !1430
  %420 = load double, double* %"arrayref19.sroa.0.0.copyload'de", align 8, !dbg !1430
  %421 = fadd fast double %420, %419, !dbg !1430
  store double %421, double* %"arrayref19.sroa.0.0.copyload'de", align 8, !dbg !1430
  %422 = load i64, i64* %"iv7'ac", align 8, !dbg !1430
  %423 = load i64, i64* %"iv'ac", align 8, !dbg !1430
  %424 = load i64, i64* %"iv'ac", align 8, !dbg !1430
  %425 = add nuw i64 %_unwrap100, 1, !dbg !1430
  %426 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 9, !dbg !1430
  %427 = getelementptr inbounds double*, double** %426, i64 %423, !dbg !1430
  %428 = load double*, double** %427, align 8, !dbg !1430, !dereferenceable !1054, !invariant.group !1502
  %429 = getelementptr inbounds double, double* %428, i64 %422, !dbg !1430
  %430 = load double, double* %429, align 8, !dbg !1379, !tbaa !362, !alias.scope !1503, !noalias !1504, !invariant.group !1505
  %431 = fmul fast double %409, %430, !dbg !1430
  %432 = load double, double* %"unbox38'de", align 8, !dbg !1430
  %433 = fadd fast double %432, %431, !dbg !1430
  store double %433, double* %"unbox38'de", align 8, !dbg !1430
  %434 = load double, double* %"unbox38'de", align 8, !dbg !1430
  store double 0.000000e+00, double* %"unbox38'de", align 8, !dbg !1430
  %435 = load double, double* %"'ipg120", align 8, !dbg !1430, !tbaa !288, !alias.scope !1506, !noalias !1509
  %436 = fadd fast double %435, %434, !dbg !1430
  store double %436, double* %"'ipg120", align 8, !dbg !1430, !tbaa !288, !alias.scope !1506, !noalias !1509
  %437 = load double, double* %"arrayref47.sroa.3.0.copyload'de", align 8, !dbg !1420
  store double 0.000000e+00, double* %"arrayref47.sroa.3.0.copyload'de", align 8, !dbg !1420
  %438 = load i64, i64* %"iv7'ac", align 8, !dbg !1420
  %439 = load i64, i64* %"iv'ac", align 8, !dbg !1420
  %arrayref47.sroa.3.0..sroa_idx81_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]] addrspace(13)* %arrayptr4698_unwrap, i64 %_unwrap101, i64 0, i64 2, !dbg !1420
  %440 = icmp ne double addrspace(13)* %arrayref47.sroa.3.0..sroa_idx81_unwrap, %"arrayref47.sroa.3.0..sroa_idx81'ipg_unwrap", !dbg !1420
  br i1 %440, label %invertidxend57_amerge_amerge_active, label %invertidxend57_amerge_amerge_amerge, !dbg !1420

invertidxend57_amerge_amerge_active:              ; preds = %invertidxend57_amerge_amerge
  %441 = load double, double addrspace(13)* %"arrayref47.sroa.3.0..sroa_idx81'ipg_unwrap", align 8, !dbg !1420, !tbaa !362, !alias.scope !1499, !noalias !1492
  %442 = fadd fast double %441, %437, !dbg !1420
  store double %442, double addrspace(13)* %"arrayref47.sroa.3.0..sroa_idx81'ipg_unwrap", align 8, !dbg !1420, !tbaa !362, !alias.scope !1499, !noalias !1492
  br label %invertidxend57_amerge_amerge_amerge, !dbg !1420

invertidxend57_amerge_amerge_amerge:              ; preds = %invertidxend57_amerge_amerge_active, %invertidxend57_amerge_amerge
  br label %invertidxend34

invertpass:                                       ; preds = %invertguard_pass74, %invertL80
  br label %invertL69

invertguard_pass74:                               ; preds = %invertL80
  br label %invertpass

remat_enter:                                      ; preds = %mergeinvertL28_L69.loopexit, %incinvertL28
  br label %remat_L28_L28

remat_L28_L28:                                    ; preds = %remat_enter
  br label %remat_L28_idxend

remat_L28_idxend:                                 ; preds = %remat_L28_L28
  br label %remat_L28_idxend16

remat_L28_idxend16:                               ; preds = %remat_L28_idxend
  br label %remat_L28_idxend25

remat_L28_idxend25:                               ; preds = %remat_L28_idxend16
  %443 = load i64, i64* %"iv7'ac", align 8
  %444 = load i64, i64* %"iv'ac", align 8
  %_unwrap = bitcast i8* %36 to [1 x [3 x double]]*
  %.fca.0.0.gep2_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap, i32 0, i32 0, i32 0
  %445 = load i64, i64* %"iv7'ac", align 8
  %446 = load i64, i64* %"iv'ac", align 8
  %447 = load i64, i64* %"iv'ac", align 8
  %_unwrap165 = load i64*, i64** %mdyncache_fromtape_cache129, align 8, !dbg !1373, !dereferenceable !1054, !invariant.group !1377
  %_unwrap166 = getelementptr inbounds i64, i64* %_unwrap165, i64 %447
  %arraylen_unwrap167 = load i64, i64* %_unwrap166, align 8, !dbg !1373, !alias.scope !1451, !noalias !1454, !invariant.group !1378
  %_unwrap20 = add nsw i64 %arraylen_unwrap167, -1
  %448 = add nuw i64 %_unwrap20, 1
  %449 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 10
  %450 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %449, i64 %446
  %451 = load [1 x [3 x double]]*, [1 x [3 x double]]** %450, align 8, !dereferenceable !1054, !invariant.group !1511
  %452 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %451, i64 %445
  %453 = load [1 x [3 x double]], [1 x [3 x double]]* %452, align 8, !dbg !1400, !invariant.group !1512
  %.fca.0.0.extract1_unwrap = extractvalue [1 x [3 x double]] %453, 0, 0
  store double %.fca.0.0.extract1_unwrap, double* %.fca.0.0.gep2_unwrap, align 8, !dbg !1400
  %454 = load i64, i64* %"iv7'ac", align 8
  %455 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.gep4_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap, i32 0, i32 0, i32 1
  %456 = load i64, i64* %"iv7'ac", align 8
  %457 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.extract3_unwrap = extractvalue [1 x [3 x double]] %453, 0, 1
  store double %.fca.0.1.extract3_unwrap, double* %.fca.0.1.gep4_unwrap, align 8, !dbg !1400
  %458 = load i64, i64* %"iv7'ac", align 8
  %459 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.gep6_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap, i32 0, i32 0, i32 2
  %460 = load i64, i64* %"iv7'ac", align 8
  %461 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.extract5_unwrap = extractvalue [1 x [3 x double]] %453, 0, 2
  store double %.fca.0.2.extract5_unwrap, double* %.fca.0.2.gep6_unwrap, align 8, !dbg !1400
  br label %remat_L28_idxend34

remat_L28_idxend34:                               ; preds = %remat_L28_idxend25
  %462 = load i64, i64* %"iv7'ac", align 8
  %463 = load i64, i64* %"iv'ac", align 8
  %_unwrap21 = bitcast i8* %37 to [1 x [3 x double]]*
  %.fca.0.0.gep_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap21, i32 0, i32 0, i32 0
  %464 = load i64, i64* %"iv7'ac", align 8
  %465 = load i64, i64* %"iv'ac", align 8
  %466 = load i64, i64* %"iv'ac", align 8
  %_unwrap168 = load i64*, i64** %mdyncache_fromtape_cache129, align 8, !dbg !1373, !dereferenceable !1054, !invariant.group !1377
  %_unwrap169 = getelementptr inbounds i64, i64* %_unwrap168, i64 %466
  %arraylen_unwrap170 = load i64, i64* %_unwrap169, align 8, !dbg !1373, !alias.scope !1451, !noalias !1454, !invariant.group !1378
  %_unwrap30 = add nsw i64 %arraylen_unwrap170, -1
  %467 = add nuw i64 %_unwrap30, 1
  %468 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 11
  %469 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %468, i64 %465
  %470 = load [1 x [3 x double]]*, [1 x [3 x double]]** %469, align 8, !dereferenceable !1054, !invariant.group !1513
  %471 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %470, i64 %464
  %472 = load [1 x [3 x double]], [1 x [3 x double]]* %471, align 8, !dbg !1400, !invariant.group !1514
  %.fca.0.0.extract_unwrap = extractvalue [1 x [3 x double]] %472, 0, 0
  store double %.fca.0.0.extract_unwrap, double* %.fca.0.0.gep_unwrap, align 8, !dbg !1400
  %473 = load i64, i64* %"iv7'ac", align 8
  %474 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.gep_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap21, i32 0, i32 0, i32 1
  %475 = load i64, i64* %"iv7'ac", align 8
  %476 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.extract_unwrap = extractvalue [1 x [3 x double]] %472, 0, 1
  store double %.fca.0.1.extract_unwrap, double* %.fca.0.1.gep_unwrap, align 8, !dbg !1400
  %477 = load i64, i64* %"iv7'ac", align 8
  %478 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.gep_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap21, i32 0, i32 0, i32 2
  %479 = load i64, i64* %"iv7'ac", align 8
  %480 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.extract_unwrap = extractvalue [1 x [3 x double]] %472, 0, 2
  store double %.fca.0.2.extract_unwrap, double* %.fca.0.2.gep_unwrap, align 8, !dbg !1400
  br label %remat_L28_idxend57

remat_L28_idxend57:                               ; preds = %remat_L28_idxend34
  %481 = load i64, i64* %"iv7'ac", align 8
  %482 = load i64, i64* %"iv'ac", align 8
  %iv.next8_unwrap = add nuw nsw i64 %481, 1
  %483 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, [3 x {} addrspace(10)*], i64*, i64**, double**, [1 x [3 x double]]**, [1 x [3 x double]]**, double**, [3 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 7
  %484 = getelementptr inbounds i64, i64* %483, i64 %482
  %485 = load i64, i64* %484, align 8, !dbg !1450, !tbaa !181, !range !184, !alias.scope !1451, !noalias !1454, !invariant.group !1456
  %.not99_unwrap = icmp eq i64 %iv.next8_unwrap, %485
  br i1 %.not99_unwrap, label %invertidxend57, label %invertidxend57
}

LLVM.LoadInst(%unbox69.unpack = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox69.elt, align 8, !enzyme_inactive !0, !enzyme_type !29, !enzymejl_source_type_Vector\7BInt64\7D !0, !enzymejl_byref_MUT_REF !0)
LLVM.PHIInst(%unbox69.unpack_replacementA = phi {} addrspace(10)* )


Stacktrace:
 [1] specific_forces!
   @ ~/dms/molly_dev/enzyme_err41.jl:31

Stacktrace:
  [1] julia_error(msg::String, 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/dev/Enzyme/src/errors.jl:384
  [2] 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/dev/Enzyme/src/errors.jl:210
  [3] EnzymeCreatePrimalAndGradient(logic::Enzyme.Logic, todiff::LLVM.Function, retType::Enzyme.API.CDIFFE_TYPE, constant_args::Vector{Enzyme.API.CDIFFE_TYPE}, TA::Enzyme.TypeAnalysis, returnValue::Bool, dretUsed::Bool, mode::Enzyme.API.CDerivativeMode, runtimeActivity::Bool, width::Int64, additionalArg::Ptr{Nothing}, forceAnonymousTape::Bool, typeInfo::Enzyme.FnTypeInfo, uncacheable_args::Vector{Bool}, augmented::Ptr{Nothing}, atomicAdd::Bool)
    @ Enzyme.API ~/.julia/dev/Enzyme/src/api.jl:268
  [4] 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::Tuple{Vararg{Bool, N}} where N, returnPrimal::Bool, expectedTapeType::Type, loweredArgs::Set{Int64}, boxedArgs::Set{Int64})
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:1592
  [5] 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/dev/Enzyme/src/compiler.jl:4436
  [6] codegen
    @ ~/.julia/dev/Enzyme/src/compiler.jl:3239 [inlined]
  [7] _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool)
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:5288
  [8] _thunk
    @ ~/.julia/dev/Enzyme/src/compiler.jl:5288 [inlined]
  [9] cached_compilation
    @ ~/.julia/dev/Enzyme/src/compiler.jl:5340 [inlined]
 [10] thunkbase(mi::Core.MethodInstance, World::UInt64, FA::Type{<:Annotation}, A::Type{<:Annotation}, TT::Type, Mode::Enzyme.API.CDerivativeMode, width::Int64, ModifiedBetween::Tuple{Vararg{Bool, N}} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, edges::Vector{Any})
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:5451
 [11] thunk_generator(world::UInt64, source::LineNumberNode, FA::Type, A::Type, TT::Type, Mode::Enzyme.API.CDerivativeMode, Width::Int64, ModifiedBetween::Tuple{Vararg{Bool, N}} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, self::Any, fakeworld::Any, fa::Type, a::Type, tt::Type, mode::Type, width::Type, modifiedbetween::Type, returnprimal::Type, shadowinit::Type, abi::Type, erriffuncwritten::Type, runtimeactivity::Type)
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:5636
 [12] autodiff
    @ ~/.julia/dev/Enzyme/src/Enzyme.jl:485 [inlined]
 [13] autodiff(::ReverseMode{false, true, FFIABI, false, false}, ::typeof(test_forces_grad), ::Type{Active}, ::Const{Tuple{InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64}}}, InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64}}}}}, ::Duplicated{Vector{SVector{3, Float64}}})
    @ Enzyme ~/.julia/dev/Enzyme/src/Enzyme.jl:524
 [14] top-level scope
    @ ~/dms/molly_dev/enzyme_err41.jl:69

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

2 participants