; LLVM IR from humz2k/sugaryc :: ext/bdwgc/tests (leak)

; 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"

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [100 x ptr], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 800, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @GC_set_find_leak(i32 noundef 1)
  call void @GC_init()
  %5 = call noalias ptr @GC_memalign(i64 noundef 16, i64 noundef 70) #8
  %6 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 0
  store ptr %5, ptr %6, align 16, !tbaa !5
  %7 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 0
  %8 = load ptr, ptr %7, align 16, !tbaa !5
  %9 = icmp ne ptr %8, null
  br i1 %9, label %13, label %10

10:                                               ; preds = %0
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef @.str) #7
  store i32 1, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %149

13:                                               ; preds = %0
  %14 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 0
  %15 = load ptr, ptr %14, align 16, !tbaa !5
  call void @GC_free(ptr noundef %15)
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %46, %13
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = icmp ult i32 %17, 100
  br i1 %18, label %19, label %49

19:                                               ; preds = %16
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = icmp ugt i32 %20, 0
  br i1 %21, label %22, label %27

22:                                               ; preds = %19
  %23 = load i32, ptr %3, align 4, !tbaa !9
  %24 = zext i32 %23 to i64
  %25 = add i64 4, %24
  %26 = call noalias ptr @GC_debug_malloc(i64 noundef %25, ptr noundef @.str.1, i32 noundef 35) #9
  br label %29

27:                                               ; preds = %19
  %28 = call noalias ptr @GC_debug_strdup(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 36)
  br label %29

29:                                               ; preds = %27, %22
  %30 = phi ptr [ %26, %22 ], [ %28, %27 ]
  %31 = load i32, ptr %3, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 %32
  store ptr %30, ptr %33, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %29
  %35 = load i32, ptr %3, align 4, !tbaa !9
  %36 = zext i32 %35 to i64
  %37 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 %36
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = icmp eq ptr null, %38
  br i1 %39, label %40, label %43

40:                                               ; preds = %34
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef @.str.3) #7
  call void @exit(i32 noundef 69) #10
  unreachable

43:                                               ; preds = %34
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %3, align 4, !tbaa !9
  %48 = add i32 %47, 1
  store i32 %48, ptr %3, align 4, !tbaa !9
  br label %16, !llvm.loop !11

49:                                               ; preds = %16
  call void @GC_gcollect()
  store i32 3, ptr %3, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %93, %49
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = icmp ult i32 %51, 50
  br i1 %52, label %53, label %96

53:                                               ; preds = %50
  %54 = load i32, ptr %3, align 4, !tbaa !9
  %55 = and i32 %54, 1
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %66

57:                                               ; preds = %53
  %58 = load i32, ptr %3, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = load i32, ptr %3, align 4, !tbaa !9
  %63 = mul i32 %62, 43
  %64 = zext i32 %63 to i64
  %65 = call ptr @GC_debug_realloc(ptr noundef %61, i64 noundef %64, ptr noundef @.str.1, i32 noundef 41) #8
  br label %76

66:                                               ; preds = %53
  %67 = load i32, ptr %3, align 4, !tbaa !9
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = load i32, ptr %3, align 4, !tbaa !9
  %72 = mul i32 %71, 16
  %73 = add i32 %72, 1
  %74 = zext i32 %73 to i64
  %75 = call ptr @GC_debug_realloc(ptr noundef %70, i64 noundef %74, ptr noundef @.str.1, i32 noundef 42) #8
  br label %76

76:                                               ; preds = %66, %57
  %77 = phi ptr [ %65, %57 ], [ %75, %66 ]
  %78 = load i32, ptr %3, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 %79
  store ptr %77, ptr %80, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %76
  %82 = load i32, ptr %3, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = icmp eq ptr null, %85
  br i1 %86, label %87, label %90

87:                                               ; preds = %81
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.3) #7
  call void @exit(i32 noundef 69) #10
  unreachable

90:                                               ; preds = %81
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %3, align 4, !tbaa !9
  %95 = add i32 %94, 1
  store i32 %95, ptr %3, align 4, !tbaa !9
  br label %50, !llvm.loop !13

96:                                               ; preds = %50
  call void @GC_gcollect()
  store i32 2, ptr %3, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %105, %96
  %98 = load i32, ptr %3, align 4, !tbaa !9
  %99 = icmp ult i32 %98, 100
  br i1 %99, label %100, label %108

100:                                              ; preds = %97
  %101 = load i32, ptr %3, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  call void @GC_debug_free(ptr noundef %104)
  br label %105

105:                                              ; preds = %100
  %106 = load i32, ptr %3, align 4, !tbaa !9
  %107 = add i32 %106, 1
  store i32 %107, ptr %3, align 4, !tbaa !9
  br label %97, !llvm.loop !14

108:                                              ; preds = %97
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %144, %108
  %110 = load i32, ptr %3, align 4, !tbaa !9
  %111 = icmp ult i32 %110, 12
  br i1 %111, label %112, label %147

112:                                              ; preds = %109
  %113 = load i32, ptr %3, align 4, !tbaa !9
  %114 = icmp ult i32 %113, 3
  br i1 %114, label %118, label %115

115:                                              ; preds = %112
  %116 = load i32, ptr %3, align 4, !tbaa !9
  %117 = icmp ugt i32 %116, 6
  br i1 %117, label %118, label %123

118:                                              ; preds = %115, %112
  %119 = load i32, ptr %3, align 4, !tbaa !9
  %120 = zext i32 %119 to i64
  %121 = add i64 4, %120
  %122 = call noalias ptr @GC_debug_malloc(i64 noundef %121, ptr noundef @.str.1, i32 noundef 50) #9
  br label %127

123:                                              ; preds = %115
  %124 = load i32, ptr %3, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = call noalias ptr @GC_debug_strndup(ptr noundef @.str.4, i64 noundef %125, ptr noundef @.str.1, i32 noundef 51)
  br label %127

127:                                              ; preds = %123, %118
  %128 = phi ptr [ %122, %118 ], [ %126, %123 ]
  %129 = load i32, ptr %3, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 %130
  store ptr %128, ptr %131, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %127
  %133 = load i32, ptr %3, align 4, !tbaa !9
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds [100 x ptr], ptr %2, i64 0, i64 %134
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = icmp eq ptr null, %136
  br i1 %137, label %138, label %141

138:                                              ; preds = %132
  %139 = load ptr, ptr @stderr, align 8, !tbaa !5
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef @.str.3) #7
  call void @exit(i32 noundef 69) #10
  unreachable

141:                                              ; preds = %132
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %3, align 4, !tbaa !9
  %146 = add i32 %145, 1
  store i32 %146, ptr %3, align 4, !tbaa !9
  br label %109, !llvm.loop !15

147:                                              ; preds = %109
  call void @GC_gcollect()
  call void @GC_gcollect()
  call void @GC_gcollect()
  %148 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %149

149:                                              ; preds = %147, %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 800, ptr %2) #7
  %150 = load i32, ptr %1, align 4
  ret i32 %150
}

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

declare void @GC_set_find_leak(i32 noundef) #2

declare void @GC_init() #2

; Function Attrs: allocsize(1)
declare noalias ptr @GC_memalign(i64 noundef, i64 noundef) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

declare void @GC_free(ptr noundef) #2

; Function Attrs: allocsize(0)
declare noalias ptr @GC_debug_malloc(i64 noundef, ptr noundef, i32 noundef) #5

declare noalias ptr @GC_debug_strdup(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #6

declare void @GC_gcollect() #2

; Function Attrs: allocsize(1)
declare ptr @GC_debug_realloc(ptr noundef, i64 noundef, ptr noundef, i32 noundef) #3

declare void @GC_debug_free(ptr noundef) #2

declare noalias ptr @GC_debug_strndup(ptr noundef, i64 noundef, ptr noundef, i32 noundef) #2

declare i32 @printf(ptr noundef, ...) #2

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

attributes #0 = { nounwind 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { allocsize(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 #4 = { nounwind "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 #5 = { allocsize(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 #6 = { noreturn nounwind "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 #7 = { nounwind }
attributes #8 = { allocsize(1) }
attributes #9 = { allocsize(0) }
attributes #10 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; 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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main() local_unnamed_addr #0 {
  %1 = alloca [100 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %1) #7
  tail call void @GC_set_find_leak(i32 noundef 1) #7
  tail call void @GC_init() #7
  %2 = tail call noalias dereferenceable_or_null(70) ptr @GC_memalign(i64 noundef 16, i64 noundef 70) #8
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %3, label %6

3:                                                ; preds = %0
  %4 = load ptr, ptr @stderr, align 8, !tbaa !5
  %5 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %4, ptr noundef nonnull @.str) #9
  br label %80

6:                                                ; preds = %0
  tail call void @GC_free(ptr noundef nonnull %2) #7
  %7 = tail call noalias ptr @GC_debug_strdup(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 36) #7
  %8 = icmp eq ptr %7, null
  br i1 %8, label %.loopexit, label %.peel.next

9:                                                ; preds = %.peel.next
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100
  br i1 %exitcond.not, label %.loopexit40, label %.peel.next, !llvm.loop !9

.peel.next:                                       ; preds = %6, %9
  %indvars.iv = phi i64 [ %indvars.iv.next, %9 ], [ 1, %6 ]
  %10 = add nuw nsw i64 %indvars.iv, 4
  %11 = tail call noalias ptr @GC_debug_malloc(i64 noundef %10, ptr noundef nonnull @.str.1, i32 noundef 35) #10
  %12 = getelementptr inbounds [100 x ptr], ptr %1, i64 0, i64 %indvars.iv
  store ptr %11, ptr %12, align 8, !tbaa !5
  %13 = icmp eq ptr %11, null
  br i1 %13, label %.loopexit, label %9

.loopexit:                                        ; preds = %.peel.next, %6
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.3) #9
  tail call void @exit(i32 noundef 69) #11
  unreachable

.loopexit40:                                      ; preds = %9
  tail call void @GC_gcollect() #7
  br label %17

16:                                               ; preds = %28
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %exitcond44.not = icmp eq i64 %indvars.iv.next42, 50
  br i1 %exitcond44.not, label %35, label %17, !llvm.loop !12

17:                                               ; preds = %.loopexit40, %16
  %indvars.iv41 = phi i64 [ 3, %.loopexit40 ], [ %indvars.iv.next42, %16 ]
  %18 = and i64 %indvars.iv41, 1
  %.not30 = icmp eq i64 %18, 0
  %19 = getelementptr inbounds [100 x ptr], ptr %1, i64 0, i64 %indvars.iv41
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  br i1 %.not30, label %24, label %21

21:                                               ; preds = %17
  %22 = mul nuw nsw i64 %indvars.iv41, 43
  %23 = tail call ptr @GC_debug_realloc(ptr noundef %20, i64 noundef %22, ptr noundef nonnull @.str.1, i32 noundef 41) #8
  br label %28

24:                                               ; preds = %17
  %25 = shl nuw nsw i64 %indvars.iv41, 4
  %26 = or disjoint i64 %25, 1
  %27 = tail call ptr @GC_debug_realloc(ptr noundef %20, i64 noundef %26, ptr noundef nonnull @.str.1, i32 noundef 42) #8
  br label %28

28:                                               ; preds = %24, %21
  %29 = phi ptr [ %23, %21 ], [ %27, %24 ]
  %30 = getelementptr inbounds [100 x ptr], ptr %1, i64 0, i64 %indvars.iv41
  store ptr %29, ptr %30, align 8, !tbaa !5
  %31 = icmp eq ptr %29, null
  br i1 %31, label %32, label %16

32:                                               ; preds = %28
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.3) #9
  tail call void @exit(i32 noundef 69) #11
  unreachable

35:                                               ; preds = %16
  tail call void @GC_gcollect() #7
  br label %36

36:                                               ; preds = %35, %36
  %indvars.iv45 = phi i64 [ 2, %35 ], [ %indvars.iv.next46, %36 ]
  %37 = getelementptr inbounds [100 x ptr], ptr %1, i64 0, i64 %indvars.iv45
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  tail call void @GC_debug_free(ptr noundef %38) #7
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %exitcond48.not = icmp eq i64 %indvars.iv.next46, 100
  br i1 %exitcond48.not, label %74, label %36, !llvm.loop !13

39:                                               ; preds = %74
  %40 = tail call noalias dereferenceable_or_null(5) ptr @GC_debug_malloc(i64 noundef 5, ptr noundef nonnull @.str.1, i32 noundef 50) #10
  %41 = icmp eq ptr %40, null
  br i1 %41, label %77, label %42

42:                                               ; preds = %39
  %43 = tail call noalias dereferenceable_or_null(6) ptr @GC_debug_malloc(i64 noundef 6, ptr noundef nonnull @.str.1, i32 noundef 50) #10
  %44 = icmp eq ptr %43, null
  br i1 %44, label %77, label %45

45:                                               ; preds = %42
  %46 = tail call noalias ptr @GC_debug_strndup(ptr noundef nonnull @.str.4, i64 noundef 3, ptr noundef nonnull @.str.1, i32 noundef 51) #7
  %47 = icmp eq ptr %46, null
  br i1 %47, label %77, label %48

48:                                               ; preds = %45
  %49 = tail call noalias ptr @GC_debug_strndup(ptr noundef nonnull @.str.4, i64 noundef 4, ptr noundef nonnull @.str.1, i32 noundef 51) #7
  %50 = icmp eq ptr %49, null
  br i1 %50, label %77, label %51

51:                                               ; preds = %48
  %52 = tail call noalias ptr @GC_debug_strndup(ptr noundef nonnull @.str.4, i64 noundef 5, ptr noundef nonnull @.str.1, i32 noundef 51) #7
  %53 = icmp eq ptr %52, null
  br i1 %53, label %77, label %54

54:                                               ; preds = %51
  %55 = tail call noalias ptr @GC_debug_strndup(ptr noundef nonnull @.str.4, i64 noundef 6, ptr noundef nonnull @.str.1, i32 noundef 51) #7
  %56 = icmp eq ptr %55, null
  br i1 %56, label %77, label %57

57:                                               ; preds = %54
  %58 = tail call noalias dereferenceable_or_null(11) ptr @GC_debug_malloc(i64 noundef 11, ptr noundef nonnull @.str.1, i32 noundef 50) #10
  %59 = icmp eq ptr %58, null
  br i1 %59, label %77, label %60

60:                                               ; preds = %57
  %61 = tail call noalias dereferenceable_or_null(12) ptr @GC_debug_malloc(i64 noundef 12, ptr noundef nonnull @.str.1, i32 noundef 50) #10
  %62 = icmp eq ptr %61, null
  br i1 %62, label %77, label %63

63:                                               ; preds = %60
  %64 = tail call noalias dereferenceable_or_null(13) ptr @GC_debug_malloc(i64 noundef 13, ptr noundef nonnull @.str.1, i32 noundef 50) #10
  %65 = icmp eq ptr %64, null
  br i1 %65, label %77, label %66

66:                                               ; preds = %63
  %67 = tail call noalias dereferenceable_or_null(14) ptr @GC_debug_malloc(i64 noundef 14, ptr noundef nonnull @.str.1, i32 noundef 50) #10
  %68 = icmp eq ptr %67, null
  br i1 %68, label %77, label %69

69:                                               ; preds = %66
  %70 = tail call noalias dereferenceable_or_null(15) ptr @GC_debug_malloc(i64 noundef 15, ptr noundef nonnull @.str.1, i32 noundef 50) #10
  %71 = icmp eq ptr %70, null
  br i1 %71, label %77, label %72

72:                                               ; preds = %69
  tail call void @GC_gcollect() #7
  tail call void @GC_gcollect() #7
  tail call void @GC_gcollect() #7
  %73 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %80

74:                                               ; preds = %36
  %75 = tail call noalias dereferenceable_or_null(4) ptr @GC_debug_malloc(i64 noundef 4, ptr noundef nonnull @.str.1, i32 noundef 50) #10
  %76 = icmp eq ptr %75, null
  br i1 %76, label %77, label %39

77:                                               ; preds = %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %74
  %78 = load ptr, ptr @stderr, align 8, !tbaa !5
  %79 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef nonnull @.str.3) #9
  tail call void @exit(i32 noundef 69) #11
  unreachable

80:                                               ; preds = %72, %3
  %.028 = phi i32 [ 0, %72 ], [ 1, %3 ]
  call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %1) #7
  ret i32 %.028
}

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

declare void @GC_set_find_leak(i32 noundef) local_unnamed_addr #2

declare void @GC_init() local_unnamed_addr #2

; Function Attrs: allocsize(1)
declare noalias ptr @GC_memalign(i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

declare void @GC_free(ptr noundef) local_unnamed_addr #2

; Function Attrs: allocsize(0)
declare noalias ptr @GC_debug_malloc(i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare noalias ptr @GC_debug_strdup(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #6

declare void @GC_gcollect() local_unnamed_addr #2

; Function Attrs: allocsize(1)
declare ptr @GC_debug_realloc(ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @GC_debug_free(ptr noundef) local_unnamed_addr #2

declare noalias ptr @GC_debug_strndup(ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

attributes #0 = { nounwind 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { allocsize(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 #4 = { nofree nounwind "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 #5 = { allocsize(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 #6 = { noreturn nounwind "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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(1) }
attributes #9 = { cold nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { noreturn 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/C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.peeled.count", i32 1}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass