begin
    Ct_lvl = ((ex.bodies[1]).bodies[1]).tns.bind.lvl
    Ct_lvl_2 = Ct_lvl.lvl
    Ct_lvl_3 = Ct_lvl_2.lvl
    Ct_lvl_3_val = Ct_lvl_3.val
    A_lvl = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[1]).tns.bind.lvl
    A_lvl_ptr = A_lvl.ptr
    A_lvl_tbl1 = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[1]).tns.bind.lvl.tbl[1]
    A_lvl_stop1 = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[1]).tns.bind.lvl.shape[1]
    A_lvl_tbl2 = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[1]).tns.bind.lvl.tbl[2]
    A_lvl_stop2 = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[1]).tns.bind.lvl.shape[2]
    A_lvl_2 = A_lvl.lvl
    A_lvl_2_val = A_lvl_2.val
    B_lvl = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[2]).tns.bind.lvl
    B_lvl_ptr = B_lvl.ptr
    B_lvl_tbl1 = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[2]).tns.bind.lvl.tbl[1]
    B_lvl_stop1 = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[2]).tns.bind.lvl.shape[1]
    B_lvl_tbl2 = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[2]).tns.bind.lvl.tbl[2]
    B_lvl_stop2 = (((ex.bodies[1]).bodies[2]).body.body.body.rhs.args[2]).tns.bind.lvl.shape[2]
    B_lvl_2 = B_lvl.lvl
    B_lvl_2_val = B_lvl_2.val
    n = (Base.Threads).nthreads()
    B_lvl_stop1 == A_lvl_stop2 || throw(DimensionMismatch("mismatched dimension limits ($(B_lvl_stop1) != $(A_lvl_stop2))"))
    @warn "Performance Warning: non-concordant traversal of A[i, k] (hint: most arrays prefer column major or first index fast, run in fast mode to ignore this warning)"
    pos_stop = A_lvl_stop1 * B_lvl_stop2
    Finch.resize_if_smaller!(Ct_lvl_3_val, pos_stop)
    Finch.fill_range!(Ct_lvl_3_val, 0x00000000, 1, pos_stop)
    B_lvl_q = B_lvl_ptr[1]
    B_lvl_q_stop = B_lvl_ptr[1 + 1]
    if B_lvl_q < B_lvl_q_stop
        B_lvl_i_stop = B_lvl_tbl2[B_lvl_q_stop - 1]
    else
        B_lvl_i_stop = 0
    end
    phase_stop = min(B_lvl_stop2, B_lvl_i_stop)
    if phase_stop >= 1
        j = 1
        if B_lvl_tbl2[B_lvl_q] < 1
            B_lvl_q = Finch.scansearch(B_lvl_tbl2, 1, B_lvl_q, B_lvl_q_stop - 1)
        end
        while true
            B_lvl_i = B_lvl_tbl2[B_lvl_q]
            B_lvl_q_step = B_lvl_q
            if B_lvl_tbl2[B_lvl_q] == B_lvl_i
                B_lvl_q_step = Finch.scansearch(B_lvl_tbl2, B_lvl_i + 1, B_lvl_q, B_lvl_q_stop - 1)
            end
            if B_lvl_i < phase_stop
                for j_6 = j:-1 + B_lvl_i
                    Threads.@threads :dynamic for tid = 1:n
                            Finch.@barrier begin
                                    @inbounds @fastmath(begin
                                                phase_start_4 = max(1, 1 + fld(A_lvl_stop1 * tid, n))
                                                if A_lvl_stop1 >= phase_start_4
                                                    A_lvl_stop1 + 1
                                                end
                                            end)
                                    nothing
                                end
                        end
                end
                Ct_lvl_q = (1 - 1) * B_lvl_stop2 + B_lvl_i
                Ct_lvl_3_val_2 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), Ct_lvl_3_val)
                B_lvl_2_val_2 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), B_lvl_2_val)
                B_lvl_tbl1_2 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), B_lvl_tbl1)
                A_lvl_2_val_2 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), A_lvl_2_val)
                A_lvl_ptr_2 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), A_lvl_ptr)
                A_lvl_tbl1_2 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), A_lvl_tbl1)
                A_lvl_tbl2_2 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), A_lvl_tbl2)
                Threads.@threads :dynamic for tid_2 = 1:n
                        Finch.@barrier begin
                                @inbounds @fastmath(begin
                                            Ct_lvl_3_val_3 = (Finch).transfer(Finch.CPUThread(tid_2, Finch.CPU(n), Finch.Serial()), Ct_lvl_3_val_2)
                                            B_lvl_2_val_3 = (Finch).transfer(Finch.CPUThread(tid_2, Finch.CPU(n), Finch.Serial()), B_lvl_2_val_2)
                                            B_lvl_tbl1_3 = (Finch).transfer(Finch.CPUThread(tid_2, Finch.CPU(n), Finch.Serial()), B_lvl_tbl1_2)
                                            A_lvl_2_val_3 = (Finch).transfer(Finch.CPUThread(tid_2, Finch.CPU(n), Finch.Serial()), A_lvl_2_val_2)
                                            A_lvl_ptr_3 = (Finch).transfer(Finch.CPUThread(tid_2, Finch.CPU(n), Finch.Serial()), A_lvl_ptr_2)
                                            A_lvl_tbl1_3 = (Finch).transfer(Finch.CPUThread(tid_2, Finch.CPU(n), Finch.Serial()), A_lvl_tbl1_2)
                                            A_lvl_tbl2_3 = (Finch).transfer(Finch.CPUThread(tid_2, Finch.CPU(n), Finch.Serial()), A_lvl_tbl2_2)
                                            phase_start_6 = max(1, 1 + fld(A_lvl_stop1 * (-1 + tid_2), n))
                                            phase_stop_7 = min(A_lvl_stop1, fld(A_lvl_stop1 * tid_2, n))
                                            if phase_stop_7 >= phase_start_6
                                                for i_10 = phase_start_6:phase_stop_7
                                                    Ct_lvl_2_q = (Ct_lvl_q - 1) * A_lvl_stop1 + i_10
                                                    A_lvl_q = A_lvl_ptr_3[1]
                                                    A_lvl_q_stop = A_lvl_ptr_3[1 + 1]
                                                    if A_lvl_q < A_lvl_q_stop
                                                        A_lvl_i_stop = A_lvl_tbl2_3[A_lvl_q_stop - 1]
                                                    else
                                                        A_lvl_i_stop = 0
                                                    end
                                                    B_lvl_q_2 = B_lvl_q
                                                    if B_lvl_q < B_lvl_q_step
                                                        B_lvl_i_stop_2 = B_lvl_tbl1_3[B_lvl_q_step - 1]
                                                    else
                                                        B_lvl_i_stop_2 = 0
                                                    end
                                                    phase_stop_8 = min(B_lvl_stop1, A_lvl_i_stop, B_lvl_i_stop_2)
                                                    if phase_stop_8 >= 1
                                                        k = 1
                                                        if A_lvl_tbl2_3[A_lvl_q] < 1
                                                            A_lvl_q = Finch.scansearch(A_lvl_tbl2_3, 1, A_lvl_q, A_lvl_q_stop - 1)
                                                        end
                                                        if B_lvl_tbl1_3[B_lvl_q] < 1
                                                            B_lvl_q_2 = Finch.scansearch(B_lvl_tbl1_3, 1, B_lvl_q, B_lvl_q_step - 1)
                                                        end
                                                        while k <= phase_stop_8
                                                            A_lvl_i = A_lvl_tbl2_3[A_lvl_q]
                                                            A_lvl_q_step = A_lvl_q
                                                            if A_lvl_tbl2_3[A_lvl_q] == A_lvl_i
                                                                A_lvl_q_step = Finch.scansearch(A_lvl_tbl2_3, A_lvl_i + 1, A_lvl_q, A_lvl_q_stop - 1)
                                                            end
                                                            B_lvl_i_2 = B_lvl_tbl1_3[B_lvl_q_2]
                                                            phase_stop_9 = min(B_lvl_i_2, phase_stop_8, A_lvl_i)
                                                            if A_lvl_i == phase_stop_9 && B_lvl_i_2 == phase_stop_9
                                                                B_lvl_2_val_4 = B_lvl_2_val_3[B_lvl_q_2]
                                                                A_lvl_q_2 = A_lvl_q
                                                                if A_lvl_q < A_lvl_q_step
                                                                    A_lvl_i_stop_2 = A_lvl_tbl1_3[A_lvl_q_step - 1]
                                                                else
                                                                    A_lvl_i_stop_2 = 0
                                                                end
                                                                phase_stop_10 = min(i_10, A_lvl_i_stop_2)
                                                                if phase_stop_10 >= i_10
                                                                    if A_lvl_tbl1_3[A_lvl_q] < i_10
                                                                        A_lvl_q_2 = Finch.scansearch(A_lvl_tbl1_3, i_10, A_lvl_q, A_lvl_q_step - 1)
                                                                    end
                                                                    while true
                                                                        A_lvl_i_2 = A_lvl_tbl1_3[A_lvl_q_2]
                                                                        if A_lvl_i_2 < phase_stop_10
                                                                            A_lvl_2_val_4 = A_lvl_2_val_3[A_lvl_q_2]
                                                                            Ct_lvl_3_val_3[Ct_lvl_2_q] = B_lvl_2_val_4 * A_lvl_2_val_4 + Ct_lvl_3_val_3[Ct_lvl_2_q]
                                                                            A_lvl_q_2 += 1
                                                                        else
                                                                            phase_stop_12 = min(phase_stop_10, A_lvl_i_2)
                                                                            if A_lvl_i_2 == phase_stop_12
                                                                                A_lvl_2_val_4 = A_lvl_2_val_3[A_lvl_q_2]
                                                                                Ct_lvl_3_val_3[Ct_lvl_2_q] += B_lvl_2_val_4 * A_lvl_2_val_4
                                                                                A_lvl_q_2 += 1
                                                                            end
                                                                            break
                                                                        end
                                                                    end
                                                                end
                                                                A_lvl_q = A_lvl_q_step
                                                                B_lvl_q_2 += 1
                                                            elseif B_lvl_i_2 == phase_stop_9
                                                                B_lvl_q_2 += 1
                                                            elseif A_lvl_i == phase_stop_9
                                                                A_lvl_q = A_lvl_q_step
                                                            end
                                                            k = phase_stop_9 + 1
                                                        end
                                                    end
                                                end
                                            end
                                            phase_start_15 = max(1, 1 + fld(A_lvl_stop1 * tid_2, n))
                                            if A_lvl_stop1 >= phase_start_15
                                                A_lvl_stop1 + 1
                                            end
                                        end)
                                nothing
                            end
                    end
                Ct_lvl_3_val = (Finch).transfer(Ct_lvl_3_val, Ct_lvl_3_val_2)
                B_lvl_q = B_lvl_q_step
                j = B_lvl_i + 1
            else
                phase_stop_18 = min(phase_stop, B_lvl_i)
                if B_lvl_i == phase_stop_18
                    for j_8 = j:-1 + phase_stop_18
                        Threads.@threads :dynamic for tid_3 = 1:n
                                Finch.@barrier begin
                                        @inbounds @fastmath(begin
                                                    phase_start_19 = max(1, 1 + fld(A_lvl_stop1 * tid_3, n))
                                                    if A_lvl_stop1 >= phase_start_19
                                                        A_lvl_stop1 + 1
                                                    end
                                                end)
                                        nothing
                                    end
                            end
                    end
                    Ct_lvl_q = (1 - 1) * B_lvl_stop2 + phase_stop_18
                    Ct_lvl_3_val_4 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), Ct_lvl_3_val)
                    B_lvl_2_val_6 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), B_lvl_2_val)
                    B_lvl_tbl1_4 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), B_lvl_tbl1)
                    A_lvl_2_val_5 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), A_lvl_2_val)
                    A_lvl_ptr_4 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), A_lvl_ptr)
                    A_lvl_tbl1_4 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), A_lvl_tbl1)
                    A_lvl_tbl2_4 = (Finch).transfer(Finch.CPUSharedMemory(Finch.CPU(n)), A_lvl_tbl2)
                    Threads.@threads :dynamic for tid_4 = 1:n
                            Finch.@barrier begin
                                    @inbounds @fastmath(begin
                                                Ct_lvl_3_val_5 = (Finch).transfer(Finch.CPUThread(tid_4, Finch.CPU(n), Finch.Serial()), Ct_lvl_3_val_4)
                                                B_lvl_2_val_7 = (Finch).transfer(Finch.CPUThread(tid_4, Finch.CPU(n), Finch.Serial()), B_lvl_2_val_6)
                                                B_lvl_tbl1_5 = (Finch).transfer(Finch.CPUThread(tid_4, Finch.CPU(n), Finch.Serial()), B_lvl_tbl1_4)
                                                A_lvl_2_val_6 = (Finch).transfer(Finch.CPUThread(tid_4, Finch.CPU(n), Finch.Serial()), A_lvl_2_val_5)
                                                A_lvl_ptr_5 = (Finch).transfer(Finch.CPUThread(tid_4, Finch.CPU(n), Finch.Serial()), A_lvl_ptr_4)
                                                A_lvl_tbl1_5 = (Finch).transfer(Finch.CPUThread(tid_4, Finch.CPU(n), Finch.Serial()), A_lvl_tbl1_4)
                                                A_lvl_tbl2_5 = (Finch).transfer(Finch.CPUThread(tid_4, Finch.CPU(n), Finch.Serial()), A_lvl_tbl2_4)
                                                phase_start_21 = max(1, 1 + fld(A_lvl_stop1 * (-1 + tid_4), n))
                                                phase_stop_23 = min(A_lvl_stop1, fld(A_lvl_stop1 * tid_4, n))
                                                if phase_stop_23 >= phase_start_21
                                                    for i_18 = phase_start_21:phase_stop_23
                                                        Ct_lvl_2_q_2 = (Ct_lvl_q - 1) * A_lvl_stop1 + i_18
                                                        A_lvl_q_3 = A_lvl_ptr_5[1]
                                                        A_lvl_q_stop_3 = A_lvl_ptr_5[1 + 1]
                                                        if A_lvl_q_3 < A_lvl_q_stop_3
                                                            A_lvl_i_stop_3 = A_lvl_tbl2_5[A_lvl_q_stop_3 - 1]
                                                        else
                                                            A_lvl_i_stop_3 = 0
                                                        end
                                                        B_lvl_q_3 = B_lvl_q
                                                        if B_lvl_q < B_lvl_q_step
                                                            B_lvl_i_stop_3 = B_lvl_tbl1_5[B_lvl_q_step - 1]
                                                        else
                                                            B_lvl_i_stop_3 = 0
                                                        end
                                                        phase_stop_24 = min(B_lvl_stop1, A_lvl_i_stop_3, B_lvl_i_stop_3)
                                                        if phase_stop_24 >= 1
                                                            k = 1
                                                            if A_lvl_tbl2_5[A_lvl_q_3] < 1
                                                                A_lvl_q_3 = Finch.scansearch(A_lvl_tbl2_5, 1, A_lvl_q_3, A_lvl_q_stop_3 - 1)
                                                            end
                                                            if B_lvl_tbl1_5[B_lvl_q] < 1
                                                                B_lvl_q_3 = Finch.scansearch(B_lvl_tbl1_5, 1, B_lvl_q, B_lvl_q_step - 1)
                                                            end
                                                            while k <= phase_stop_24
                                                                A_lvl_i_3 = A_lvl_tbl2_5[A_lvl_q_3]
                                                                A_lvl_q_step_3 = A_lvl_q_3
                                                                if A_lvl_tbl2_5[A_lvl_q_3] == A_lvl_i_3
                                                                    A_lvl_q_step_3 = Finch.scansearch(A_lvl_tbl2_5, A_lvl_i_3 + 1, A_lvl_q_3, A_lvl_q_stop_3 - 1)
                                                                end
                                                                B_lvl_i_3 = B_lvl_tbl1_5[B_lvl_q_3]
                                                                phase_stop_25 = min(B_lvl_i_3, phase_stop_24, A_lvl_i_3)
                                                                if A_lvl_i_3 == phase_stop_25 && B_lvl_i_3 == phase_stop_25
                                                                    B_lvl_2_val_8 = B_lvl_2_val_7[B_lvl_q_3]
                                                                    A_lvl_q_4 = A_lvl_q_3
                                                                    if A_lvl_q_3 < A_lvl_q_step_3
                                                                        A_lvl_i_stop_4 = A_lvl_tbl1_5[A_lvl_q_step_3 - 1]
                                                                    else
                                                                        A_lvl_i_stop_4 = 0
                                                                    end
                                                                    phase_stop_26 = min(i_18, A_lvl_i_stop_4)
                                                                    if phase_stop_26 >= i_18
                                                                        if A_lvl_tbl1_5[A_lvl_q_3] < i_18
                                                                            A_lvl_q_4 = Finch.scansearch(A_lvl_tbl1_5, i_18, A_lvl_q_3, A_lvl_q_step_3 - 1)
                                                                        end
                                                                        while true
                                                                            A_lvl_i_4 = A_lvl_tbl1_5[A_lvl_q_4]
                                                                            if A_lvl_i_4 < phase_stop_26
                                                                                A_lvl_2_val_7 = A_lvl_2_val_6[A_lvl_q_4]
                                                                                Ct_lvl_3_val_5[Ct_lvl_2_q_2] = B_lvl_2_val_8 * A_lvl_2_val_7 + Ct_lvl_3_val_5[Ct_lvl_2_q_2]
                                                                                A_lvl_q_4 += 1
                                                                            else
                                                                                phase_stop_28 = min(phase_stop_26, A_lvl_i_4)
                                                                                if A_lvl_i_4 == phase_stop_28
                                                                                    A_lvl_2_val_7 = A_lvl_2_val_6[A_lvl_q_4]
                                                                                    Ct_lvl_3_val_5[Ct_lvl_2_q_2] += B_lvl_2_val_8 * A_lvl_2_val_7
                                                                                    A_lvl_q_4 += 1
                                                                                end
                                                                                break
                                                                            end
                                                                        end
                                                                    end
                                                                    A_lvl_q_3 = A_lvl_q_step_3
                                                                    B_lvl_q_3 += 1
                                                                elseif B_lvl_i_3 == phase_stop_25
                                                                    B_lvl_q_3 += 1
                                                                elseif A_lvl_i_3 == phase_stop_25
                                                                    A_lvl_q_3 = A_lvl_q_step_3
                                                                end
                                                                k = phase_stop_25 + 1
                                                            end
                                                        end
                                                    end
                                                end
                                                phase_start_30 = max(1, 1 + fld(A_lvl_stop1 * tid_4, n))
                                                if A_lvl_stop1 >= phase_start_30
                                                    A_lvl_stop1 + 1
                                                end
                                            end)
                                    nothing
                                end
                        end
                    Ct_lvl_3_val = (Finch).transfer(Ct_lvl_3_val, Ct_lvl_3_val_4)
                    B_lvl_q = B_lvl_q_step
                else
                    for j_10 = j:phase_stop_18
                        Threads.@threads :dynamic for tid_5 = 1:n
                                Finch.@barrier begin
                                        @inbounds @fastmath(begin
                                                    phase_start_33 = max(1, 1 + fld(A_lvl_stop1 * tid_5, n))
                                                    if A_lvl_stop1 >= phase_start_33
                                                        A_lvl_stop1 + 1
                                                    end
                                                end)
                                        nothing
                                    end
                            end
                    end
                end
                j = phase_stop_18 + 1
                break
            end
        end
    end
    phase_start_34 = max(1, 1 + B_lvl_i_stop)
    if B_lvl_stop2 >= phase_start_34
        for j_12 = phase_start_34:B_lvl_stop2
            Threads.@threads :dynamic for tid_6 = 1:n
                    Finch.@barrier begin
                            @inbounds @fastmath(begin
                                        phase_start_37 = max(1, 1 + fld(A_lvl_stop1 * tid_6, n))
                                        if A_lvl_stop1 >= phase_start_37
                                            A_lvl_stop1 + 1
                                        end
                                    end)
                            nothing
                        end
                end
        end
    end
    resize!(Ct_lvl_3_val, A_lvl_stop1 * B_lvl_stop2)
    (Ct = Tensor((DenseLevel){Int32}((DenseLevel){Int32}(ElementLevel{0x00000000, UInt32, Int32}(Ct_lvl_3_val), A_lvl_stop1), B_lvl_stop2)),)
end
