; LLVM IR from dartsim/dart :: dart/external/odelcpsolver/lcp.ll (ZN4dart8external3ode4dLCP22transfer_i_from_C_to_NEiPv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.dart::external::ode::dLCP" = type { i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [42 x i8], align 1
@__FUNCTION__._ZN4dart8external3ode4dLCP22transfer_i_from_C_to_NEiPv = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4dart8external3odeL11swapProblemEPPdS2_S2_S2_S2_S2_PiPbS4_iiiii(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dart8external3ode4dLCP22transfer_i_from_C_to_NEiPv(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %1, ptr noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %13 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 19
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  store ptr %14, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 -1, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %15 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 3
  %16 = load i32, ptr %15, align 4, !tbaa !13
  store i32 %16, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %118, %3
  %18 = load i32, ptr %10, align 4, !tbaa !9
  %19 = load i32, ptr %9, align 4, !tbaa !9
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %21, label %121

21:                                               ; preds = %17
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i32, ptr %22, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !9
  %27 = load i32, ptr %9, align 4, !tbaa !9
  %28 = sub nsw i32 %27, 1
  %29 = icmp eq i32 %26, %28
  br i1 %29, label %30, label %32

30:                                               ; preds = %21
  %31 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %31, ptr %8, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %30, %21
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %33, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = icmp eq i32 %37, %38
  br i1 %39, label %40, label %117

40:                                               ; preds = %32
  %41 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 5
  %42 = load ptr, ptr %41, align 8, !tbaa !14
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 11
  %45 = load ptr, ptr %44, align 8, !tbaa !15
  %46 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 12
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  %48 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !17
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 1
  %53 = load i32, ptr %52, align 4, !tbaa !18
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN4dart8external3ode12_dLDLTRemoveEPPdPKiS2_S2_iiiiPv(ptr noundef %42, ptr noundef %43, ptr noundef %45, ptr noundef %47, i32 noundef %49, i32 noundef %50, i32 noundef %51, i32 noundef %53, ptr noundef %54)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = icmp eq i32 %55, -1
  br i1 %56, label %57, label %84

57:                                               ; preds = %40
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %11, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %75, %57
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %64, label %78

64:                                               ; preds = %60
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = load i32, ptr %11, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = sub nsw i32 %70, 1
  %72 = icmp eq i32 %69, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %64
  br label %78

74:                                               ; preds = %64
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %11, align 4, !tbaa !9
  br label %60, !llvm.loop !19

78:                                               ; preds = %73, %60
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = load i32, ptr %9, align 4, !tbaa !9
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 1, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4dart8external3ode4dLCP22transfer_i_from_C_to_NEiPv, ptr noundef @.str.1, i32 noundef 631)
  br label %83

83:                                               ; preds = %82, %78
  br label %86

84:                                               ; preds = %40
  %85 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %85, ptr %11, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %84, %83
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i32, ptr %87, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i32, ptr %11, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %92, i64 %94
  store i32 %91, ptr %95, align 4, !tbaa !9
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = load i32, ptr %9, align 4, !tbaa !9
  %98 = sub nsw i32 %97, 1
  %99 = icmp slt i32 %96, %98
  br i1 %99, label %100, label %116

100:                                              ; preds = %86
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = load i32, ptr %10, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %101, i64 %103
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load i32, ptr %10, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i32, ptr %105, i64 %107
  %109 = getelementptr inbounds i32, ptr %108, i64 1
  %110 = load i32, ptr %9, align 4, !tbaa !9
  %111 = load i32, ptr %10, align 4, !tbaa !9
  %112 = sub nsw i32 %110, %111
  %113 = sub nsw i32 %112, 1
  %114 = sext i32 %113 to i64
  %115 = mul i64 %114, 4
  call void @llvm.memmove.p0.p0.i64(ptr align 4 %104, ptr align 4 %109, i64 %115, i1 false)
  br label %116

116:                                              ; preds = %100, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %121

117:                                              ; preds = %32
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %10, align 4, !tbaa !9
  br label %17, !llvm.loop !21

121:                                              ; preds = %116, %17
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 1, ptr noundef @.str.2, ptr noundef @__FUNCTION__._ZN4dart8external3ode4dLCP22transfer_i_from_C_to_NEiPv, ptr noundef @.str.1, i32 noundef 641)
  br label %126

126:                                              ; preds = %125, %121
  %127 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 5
  %128 = load ptr, ptr %127, align 8, !tbaa !14
  %129 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 6
  %130 = load ptr, ptr %129, align 8, !tbaa !22
  %131 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 7
  %132 = load ptr, ptr %131, align 8, !tbaa !23
  %133 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 8
  %134 = load ptr, ptr %133, align 8, !tbaa !24
  %135 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 9
  %136 = load ptr, ptr %135, align 8, !tbaa !25
  %137 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 10
  %138 = load ptr, ptr %137, align 8, !tbaa !26
  %139 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 18
  %140 = load ptr, ptr %139, align 8, !tbaa !27
  %141 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 16
  %142 = load ptr, ptr %141, align 8, !tbaa !28
  %143 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 17
  %144 = load ptr, ptr %143, align 8, !tbaa !29
  %145 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 0
  %146 = load i32, ptr %145, align 8, !tbaa !17
  %147 = load i32, ptr %5, align 4, !tbaa !9
  %148 = load i32, ptr %9, align 4, !tbaa !9
  %149 = sub nsw i32 %148, 1
  %150 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 1
  %151 = load i32, ptr %150, align 4, !tbaa !18
  call void @_ZN4dart8external3odeL11swapProblemEPPdS2_S2_S2_S2_S2_PiPbS4_iiiii(ptr noundef %128, ptr noundef %130, ptr noundef %132, ptr noundef %134, ptr noundef %136, ptr noundef %138, ptr noundef %140, ptr noundef %142, ptr noundef %144, i32 noundef %146, i32 noundef %147, i32 noundef %149, i32 noundef %151, i32 noundef 1)
  %152 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 4
  %153 = load i32, ptr %152, align 8, !tbaa !30
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %152, align 8, !tbaa !30
  %155 = load i32, ptr %9, align 4, !tbaa !9
  %156 = sub nsw i32 %155, 1
  %157 = getelementptr inbounds %"struct.dart::external::ode::dLCP", ptr %12, i32 0, i32 3
  store i32 %156, ptr %157, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret void
}

declare void @_ZN4dart8external3ode12_dLDLTRemoveEPPdPKiS2_S2_iiiiPv(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #2

declare void @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef, ptr noundef, ...) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 136}
!12 = !{!"_ZTSN4dart8external3ode4dLCPE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136}
!13 = !{!12, !10, i64 12}
!14 = !{!12, !6, i64 24}
!15 = !{!12, !6, i64 72}
!16 = !{!12, !6, i64 80}
!17 = !{!12, !10, i64 0}
!18 = !{!12, !10, i64 4}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!12, !6, i64 32}
!23 = !{!12, !6, i64 40}
!24 = !{!12, !6, i64 48}
!25 = !{!12, !6, i64 56}
!26 = !{!12, !6, i64 64}
!27 = !{!12, !6, i64 128}
!28 = !{!12, !6, i64 112}
!29 = !{!12, !6, i64 120}
!30 = !{!12, !10, i64 16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [42 x i8], align 1
@__FUNCTION__._ZN4dart8external3ode4dLCP22transfer_i_from_C_to_NEiPv = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4dart8external3odeL11swapProblemEPPdS2_S2_S2_S2_S2_PiPbS4_iiiii(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dart8external3ode4dLCP22transfer_i_from_C_to_NEiPv(ptr nocapture noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 136
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 12
  %7 = load i32, ptr %6, align 4, !tbaa !11
  %8 = icmp sgt i32 %7, 0
  %9 = add nsw i32 %7, -1
  br i1 %8, label %.lr.ph, label %.critedge47

.lr.ph:                                           ; preds = %3
  %wide.trip.count = zext nneg i32 %7 to i64
  br label %10

10:                                               ; preds = %.lr.ph, %46
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %46 ]
  %.04352 = phi i32 [ -1, %.lr.ph ], [ %spec.select, %46 ]
  %11 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv
  %12 = load i32, ptr %11, align 4, !tbaa !12
  %13 = icmp eq i32 %12, %9
  %14 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select = select i1 %13, i32 %14, i32 %.04352
  %15 = icmp eq i32 %12, %1
  br i1 %15, label %16, label %46

16:                                               ; preds = %10
  %17 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = getelementptr inbounds i8, ptr %0, i64 72
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %0, i64 80
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = load i32, ptr %0, align 8, !tbaa !16
  %25 = getelementptr inbounds i8, ptr %0, i64 4
  %26 = load i32, ptr %25, align 4, !tbaa !17
  tail call void @_ZN4dart8external3ode12_dLDLTRemoveEPPdPKiS2_S2_iiiiPv(ptr noundef %19, ptr noundef nonnull %5, ptr noundef %21, ptr noundef %23, i32 noundef %24, i32 noundef %7, i32 noundef %14, i32 noundef %26, ptr noundef %2)
  %27 = icmp eq i32 %spec.select, -1
  br i1 %27, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %16
  %28 = zext nneg i32 %7 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %30
  %indvars.iv60 = phi i64 [ %indvars.iv, %.preheader.preheader ], [ %indvars.iv.next61, %30 ]
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %29 = icmp ult i64 %indvars.iv.next61, %28
  br i1 %29, label %30, label %.critedge

30:                                               ; preds = %.preheader
  %31 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv.next61
  %32 = load i32, ptr %31, align 4, !tbaa !12
  %33 = icmp eq i32 %32, %9
  br i1 %33, label %.loopexit.loopexit, label %.preheader, !llvm.loop !18

.critedge:                                        ; preds = %.preheader
  %34 = trunc nuw nsw i64 %indvars.iv.next61 to i32
  tail call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 1, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4dart8external3ode4dLCP22transfer_i_from_C_to_NEiPv, ptr noundef nonnull @.str.1, i32 noundef 631)
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %30
  %35 = trunc nuw nsw i64 %indvars.iv.next61 to i32
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %16, %.critedge
  %.1 = phi i32 [ %34, %.critedge ], [ %spec.select, %16 ], [ %35, %.loopexit.loopexit ]
  %36 = load i32, ptr %17, align 4, !tbaa !12
  %37 = sext i32 %.1 to i64
  %38 = getelementptr inbounds i32, ptr %5, i64 %37
  store i32 %36, ptr %38, align 4, !tbaa !12
  %39 = icmp sgt i32 %9, %14
  br i1 %39, label %40, label %47

40:                                               ; preds = %.loopexit
  %41 = getelementptr inbounds i8, ptr %17, i64 4
  %42 = xor i32 %14, -1
  %43 = add nsw i32 %7, %42
  %44 = sext i32 %43 to i64
  %45 = shl nsw i64 %44, 2
  tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 4 %17, ptr nonnull align 4 %41, i64 %45, i1 false)
  br label %47

46:                                               ; preds = %10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge47, label %10, !llvm.loop !20

.critedge47:                                      ; preds = %46, %3
  tail call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 1, ptr noundef nonnull @.str.2, ptr noundef nonnull @__FUNCTION__._ZN4dart8external3ode4dLCP22transfer_i_from_C_to_NEiPv, ptr noundef nonnull @.str.1, i32 noundef 641)
  br label %47

47:                                               ; preds = %40, %.loopexit, %.critedge47
  %48 = getelementptr inbounds i8, ptr %0, i64 24
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  %50 = getelementptr inbounds i8, ptr %0, i64 32
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  %52 = getelementptr inbounds i8, ptr %0, i64 40
  %53 = load ptr, ptr %52, align 8, !tbaa !22
  %54 = getelementptr inbounds i8, ptr %0, i64 48
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  %56 = getelementptr inbounds i8, ptr %0, i64 56
  %57 = load ptr, ptr %56, align 8, !tbaa !24
  %58 = getelementptr inbounds i8, ptr %0, i64 64
  %59 = load ptr, ptr %58, align 8, !tbaa !25
  %60 = getelementptr inbounds i8, ptr %0, i64 128
  %61 = load ptr, ptr %60, align 8, !tbaa !26
  %62 = getelementptr inbounds i8, ptr %0, i64 112
  %63 = load ptr, ptr %62, align 8, !tbaa !27
  %64 = getelementptr inbounds i8, ptr %0, i64 120
  %65 = load ptr, ptr %64, align 8, !tbaa !28
  %66 = load i32, ptr %0, align 8, !tbaa !16
  %67 = getelementptr inbounds i8, ptr %0, i64 4
  %68 = load i32, ptr %67, align 4, !tbaa !17
  tail call void @_ZN4dart8external3odeL11swapProblemEPPdS2_S2_S2_S2_S2_PiPbS4_iiiii(ptr noundef %49, ptr noundef %51, ptr noundef %53, ptr noundef %55, ptr noundef %57, ptr noundef %59, ptr noundef %61, ptr noundef %63, ptr noundef %65, i32 noundef %66, i32 noundef %1, i32 noundef %9, i32 noundef %68, i32 noundef 1)
  %69 = getelementptr inbounds i8, ptr %0, i64 16
  %70 = load i32, ptr %69, align 8, !tbaa !29
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %69, align 8, !tbaa !29
  store i32 %9, ptr %6, align 4, !tbaa !11
  ret void
}

declare void @_ZN4dart8external3ode12_dLDLTRemoveEPPdPKiS2_S2_iiiiPv(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 136}
!6 = !{!"_ZTSN4dart8external3ode4dLCPE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 12}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !10, i64 72}
!15 = !{!6, !10, i64 80}
!16 = !{!6, !7, i64 0}
!17 = !{!6, !7, i64 4}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!6, !10, i64 32}
!22 = !{!6, !10, i64 40}
!23 = !{!6, !10, i64 48}
!24 = !{!6, !10, i64 56}
!25 = !{!6, !10, i64 64}
!26 = !{!6, !10, i64 128}
!27 = !{!6, !10, i64 112}
!28 = !{!6, !10, i64 120}
!29 = !{!6, !7, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass