; LLVM IR from adventure-db/adventure :: tests/struct (darray_tests)

; 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.darray = type { ptr, i64, i64 }

@test1 = external dso_local global ptr, align 8
@test2 = external dso_local global ptr, align 8
@arr = external hidden global ptr, align 8
@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [44 x i8], align 1

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #1

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local ptr @test_push_pop() #2 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = load ptr, ptr @arr, align 8, !tbaa !5
  %5 = load ptr, ptr @test1, align 8, !tbaa !5
  %6 = call i32 @darray_push(ptr noundef %4, ptr noundef %5)
  %7 = load ptr, ptr @arr, align 8, !tbaa !5
  %8 = call ptr @darray_get(ptr noundef %7, i64 noundef 0)
  %9 = load ptr, ptr @test1, align 8, !tbaa !5
  %10 = icmp eq ptr %8, %9
  br i1 %10, label %24, label %11

11:                                               ; preds = %0
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = call ptr @__errno_location() #5
  %14 = load i32, ptr %13, align 4, !tbaa !9
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %11
  br label %21

17:                                               ; preds = %11
  %18 = call ptr @__errno_location() #5
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = call ptr @strerror(i32 noundef %19) #6
  br label %21

21:                                               ; preds = %17, %16
  %22 = phi ptr [ @.str.5, %16 ], [ %20, %17 ]
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef @.str.13, ptr noundef @.str.4, i32 noundef 30, ptr noundef %22) #6
  store ptr @.str.14, ptr %1, align 8
  br label %193

24:                                               ; preds = %0
  %25 = load ptr, ptr @arr, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.darray, ptr %25, i32 0, i32 1
  %27 = load i64, ptr %26, align 8, !tbaa !11
  %28 = icmp eq i64 %27, 1
  br i1 %28, label %42, label %29

29:                                               ; preds = %24
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = call ptr @__errno_location() #5
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %29
  br label %39

35:                                               ; preds = %29
  %36 = call ptr @__errno_location() #5
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = call ptr @strerror(i32 noundef %37) #6
  br label %39

39:                                               ; preds = %35, %34
  %40 = phi ptr [ @.str.5, %34 ], [ %38, %35 ]
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.15, ptr noundef @.str.4, i32 noundef 31, ptr noundef %40) #6
  store ptr @.str.16, ptr %1, align 8
  br label %193

42:                                               ; preds = %24
  %43 = load ptr, ptr @arr, align 8, !tbaa !5
  %44 = load ptr, ptr @test2, align 8, !tbaa !5
  %45 = call i32 @darray_push(ptr noundef %43, ptr noundef %44)
  %46 = load ptr, ptr @arr, align 8, !tbaa !5
  %47 = call ptr @darray_get(ptr noundef %46, i64 noundef 1)
  %48 = load ptr, ptr @test2, align 8, !tbaa !5
  %49 = icmp eq ptr %47, %48
  br i1 %49, label %63, label %50

50:                                               ; preds = %42
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = call ptr @__errno_location() #5
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %50
  br label %60

56:                                               ; preds = %50
  %57 = call ptr @__errno_location() #5
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = call ptr @strerror(i32 noundef %58) #6
  br label %60

60:                                               ; preds = %56, %55
  %61 = phi ptr [ @.str.5, %55 ], [ %59, %56 ]
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef @.str.13, ptr noundef @.str.4, i32 noundef 34, ptr noundef %61) #6
  store ptr @.str.14, ptr %1, align 8
  br label %193

63:                                               ; preds = %42
  %64 = load ptr, ptr @arr, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.darray, ptr %64, i32 0, i32 1
  %66 = load i64, ptr %65, align 8, !tbaa !11
  %67 = icmp eq i64 %66, 2
  br i1 %67, label %81, label %68

68:                                               ; preds = %63
  %69 = load ptr, ptr @stderr, align 8, !tbaa !5
  %70 = call ptr @__errno_location() #5
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %68
  br label %78

74:                                               ; preds = %68
  %75 = call ptr @__errno_location() #5
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = call ptr @strerror(i32 noundef %76) #6
  br label %78

78:                                               ; preds = %74, %73
  %79 = phi ptr [ @.str.5, %73 ], [ %77, %74 ]
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.17, ptr noundef @.str.4, i32 noundef 35, ptr noundef %79) #6
  store ptr @.str.18, ptr %1, align 8
  br label %193

81:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %82 = load ptr, ptr @arr, align 8, !tbaa !5
  %83 = call ptr @darray_pop(ptr noundef %82)
  store ptr %83, ptr %2, align 8, !tbaa !5
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = load ptr, ptr @test2, align 8, !tbaa !5
  %86 = icmp eq ptr %84, %85
  br i1 %86, label %100, label %87

87:                                               ; preds = %81
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call ptr @__errno_location() #5
  %90 = load i32, ptr %89, align 4, !tbaa !9
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %87
  br label %97

93:                                               ; preds = %87
  %94 = call ptr @__errno_location() #5
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = call ptr @strerror(i32 noundef %95) #6
  br label %97

97:                                               ; preds = %93, %92
  %98 = phi ptr [ @.str.5, %92 ], [ %96, %93 ]
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.19, ptr noundef @.str.4, i32 noundef 38, ptr noundef %98) #6
  store ptr @.str.20, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %192

100:                                              ; preds = %81
  %101 = load ptr, ptr @arr, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.darray, ptr %101, i32 0, i32 1
  %103 = load i64, ptr %102, align 8, !tbaa !11
  %104 = icmp eq i64 %103, 1
  br i1 %104, label %118, label %105

105:                                              ; preds = %100
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = call ptr @__errno_location() #5
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %111

110:                                              ; preds = %105
  br label %115

111:                                              ; preds = %105
  %112 = call ptr @__errno_location() #5
  %113 = load i32, ptr %112, align 4, !tbaa !9
  %114 = call ptr @strerror(i32 noundef %113) #6
  br label %115

115:                                              ; preds = %111, %110
  %116 = phi ptr [ @.str.5, %110 ], [ %114, %111 ]
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef @.str.15, ptr noundef @.str.4, i32 noundef 39, ptr noundef %116) #6
  store ptr @.str.16, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %192

118:                                              ; preds = %100
  %119 = load ptr, ptr @arr, align 8, !tbaa !5
  %120 = call ptr @darray_pop(ptr noundef %119)
  store ptr %120, ptr %2, align 8, !tbaa !5
  %121 = load ptr, ptr %2, align 8, !tbaa !5
  %122 = load ptr, ptr @test1, align 8, !tbaa !5
  %123 = icmp eq ptr %121, %122
  br i1 %123, label %137, label %124

124:                                              ; preds = %118
  %125 = load ptr, ptr @stderr, align 8, !tbaa !5
  %126 = call ptr @__errno_location() #5
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %129, label %130

129:                                              ; preds = %124
  br label %134

130:                                              ; preds = %124
  %131 = call ptr @__errno_location() #5
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = call ptr @strerror(i32 noundef %132) #6
  br label %134

134:                                              ; preds = %130, %129
  %135 = phi ptr [ @.str.5, %129 ], [ %133, %130 ]
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str.19, ptr noundef @.str.4, i32 noundef 42, ptr noundef %135) #6
  store ptr @.str.20, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %192

137:                                              ; preds = %118
  %138 = load ptr, ptr @arr, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.darray, ptr %138, i32 0, i32 1
  %140 = load i64, ptr %139, align 8, !tbaa !11
  %141 = icmp eq i64 %140, 0
  br i1 %141, label %155, label %142

142:                                              ; preds = %137
  %143 = load ptr, ptr @stderr, align 8, !tbaa !5
  %144 = call ptr @__errno_location() #5
  %145 = load i32, ptr %144, align 4, !tbaa !9
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %142
  br label %152

148:                                              ; preds = %142
  %149 = call ptr @__errno_location() #5
  %150 = load i32, ptr %149, align 4, !tbaa !9
  %151 = call ptr @strerror(i32 noundef %150) #6
  br label %152

152:                                              ; preds = %148, %147
  %153 = phi ptr [ @.str.5, %147 ], [ %151, %148 ]
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef @.str.21, ptr noundef @.str.4, i32 noundef 43, ptr noundef %153) #6
  store ptr @.str.22, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %192

155:                                              ; preds = %137
  %156 = load ptr, ptr @arr, align 8, !tbaa !5
  %157 = call ptr @darray_pop(ptr noundef %156)
  store ptr %157, ptr %2, align 8, !tbaa !5
  %158 = load ptr, ptr %2, align 8, !tbaa !5
  %159 = icmp eq ptr %158, null
  br i1 %159, label %173, label %160

160:                                              ; preds = %155
  %161 = load ptr, ptr @stderr, align 8, !tbaa !5
  %162 = call ptr @__errno_location() #5
  %163 = load i32, ptr %162, align 4, !tbaa !9
  %164 = icmp eq i32 %163, 0
  br i1 %164, label %165, label %166

165:                                              ; preds = %160
  br label %170

166:                                              ; preds = %160
  %167 = call ptr @__errno_location() #5
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = call ptr @strerror(i32 noundef %168) #6
  br label %170

170:                                              ; preds = %166, %165
  %171 = phi ptr [ @.str.5, %165 ], [ %169, %166 ]
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.23, ptr noundef @.str.4, i32 noundef 46, ptr noundef %171) #6
  store ptr @.str.24, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %192

173:                                              ; preds = %155
  %174 = load ptr, ptr @arr, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.darray, ptr %174, i32 0, i32 1
  %176 = load i64, ptr %175, align 8, !tbaa !11
  %177 = icmp eq i64 %176, 0
  br i1 %177, label %191, label %178

178:                                              ; preds = %173
  %179 = load ptr, ptr @stderr, align 8, !tbaa !5
  %180 = call ptr @__errno_location() #5
  %181 = load i32, ptr %180, align 4, !tbaa !9
  %182 = icmp eq i32 %181, 0
  br i1 %182, label %183, label %184

183:                                              ; preds = %178
  br label %188

184:                                              ; preds = %178
  %185 = call ptr @__errno_location() #5
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = call ptr @strerror(i32 noundef %186) #6
  br label %188

188:                                              ; preds = %184, %183
  %189 = phi ptr [ @.str.5, %183 ], [ %187, %184 ]
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %179, ptr noundef @.str.21, ptr noundef @.str.4, i32 noundef 47, ptr noundef %189) #6
  store ptr @.str.22, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %192

191:                                              ; preds = %173
  store ptr null, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %192

192:                                              ; preds = %191, %188, %170, %152, %134, %115, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %193

193:                                              ; preds = %192, %78, %60, %39, %21
  %194 = load ptr, ptr %1, align 8
  ret ptr %194
}

declare i32 @darray_push(ptr noundef, ptr noundef) #3

declare ptr @darray_get(ptr noundef, i64 noundef) #3

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

declare ptr @darray_pop(ptr noundef) #3

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

attributes #0 = { 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 #1 = { nounwind willreturn memory(none) "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 = { 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 #3 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind willreturn memory(none) }
attributes #6 = { 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 = !{!12, !13, i64 8}
!12 = !{!"darray", !6, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"long", !7, i64 0}


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

@test1 = external dso_local local_unnamed_addr global ptr, align 8
@test2 = external dso_local local_unnamed_addr global ptr, align 8
@arr = external hidden local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [44 x i8], align 1

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #1

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @test_push_pop() local_unnamed_addr #3 {
  %1 = load ptr, ptr @arr, align 8, !tbaa !5
  %2 = load ptr, ptr @test1, align 8, !tbaa !5
  %3 = tail call i32 @darray_push(ptr noundef %1, ptr noundef %2) #5
  %4 = load ptr, ptr @arr, align 8, !tbaa !5
  %5 = tail call ptr @darray_get(ptr noundef %4, i64 noundef 0) #5
  %6 = load ptr, ptr @test1, align 8, !tbaa !5
  %7 = icmp eq ptr %5, %6
  br i1 %7, label %18, label %8

8:                                                ; preds = %0
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call ptr @__errno_location() #6
  %11 = load i32, ptr %10, align 4, !tbaa !9
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %15, label %13

13:                                               ; preds = %8
  %14 = tail call ptr @strerror(i32 noundef %11) #5
  br label %15

15:                                               ; preds = %8, %13
  %16 = phi ptr [ %14, %13 ], [ @.str.5, %8 ]
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.4, i32 noundef 30, ptr noundef %16) #7
  br label %151

18:                                               ; preds = %0
  %19 = load ptr, ptr @arr, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = load i64, ptr %20, align 8, !tbaa !11
  %22 = icmp eq i64 %21, 1
  br i1 %22, label %33, label %23

23:                                               ; preds = %18
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = tail call ptr @__errno_location() #6
  %26 = load i32, ptr %25, align 4, !tbaa !9
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %30, label %28

28:                                               ; preds = %23
  %29 = tail call ptr @strerror(i32 noundef %26) #5
  br label %30

30:                                               ; preds = %23, %28
  %31 = phi ptr [ %29, %28 ], [ @.str.5, %23 ]
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.4, i32 noundef 31, ptr noundef %31) #7
  br label %151

33:                                               ; preds = %18
  %34 = load ptr, ptr @test2, align 8, !tbaa !5
  %35 = tail call i32 @darray_push(ptr noundef nonnull %19, ptr noundef %34) #5
  %36 = load ptr, ptr @arr, align 8, !tbaa !5
  %37 = tail call ptr @darray_get(ptr noundef %36, i64 noundef 1) #5
  %38 = load ptr, ptr @test2, align 8, !tbaa !5
  %39 = icmp eq ptr %37, %38
  br i1 %39, label %50, label %40

40:                                               ; preds = %33
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = tail call ptr @__errno_location() #6
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %47, label %45

45:                                               ; preds = %40
  %46 = tail call ptr @strerror(i32 noundef %43) #5
  br label %47

47:                                               ; preds = %40, %45
  %48 = phi ptr [ %46, %45 ], [ @.str.5, %40 ]
  %49 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.4, i32 noundef 34, ptr noundef %48) #7
  br label %151

50:                                               ; preds = %33
  %51 = load ptr, ptr @arr, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %51, i64 8
  %53 = load i64, ptr %52, align 8, !tbaa !11
  %54 = icmp eq i64 %53, 2
  br i1 %54, label %65, label %55

55:                                               ; preds = %50
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = tail call ptr @__errno_location() #6
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %62, label %60

60:                                               ; preds = %55
  %61 = tail call ptr @strerror(i32 noundef %58) #5
  br label %62

62:                                               ; preds = %55, %60
  %63 = phi ptr [ %61, %60 ], [ @.str.5, %55 ]
  %64 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.4, i32 noundef 35, ptr noundef %63) #7
  br label %151

65:                                               ; preds = %50
  %66 = tail call ptr @darray_pop(ptr noundef nonnull %51) #5
  %67 = load ptr, ptr @test2, align 8, !tbaa !5
  %68 = icmp eq ptr %66, %67
  br i1 %68, label %79, label %69

69:                                               ; preds = %65
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = tail call ptr @__errno_location() #6
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %76, label %74

74:                                               ; preds = %69
  %75 = tail call ptr @strerror(i32 noundef %72) #5
  br label %76

76:                                               ; preds = %69, %74
  %77 = phi ptr [ %75, %74 ], [ @.str.5, %69 ]
  %78 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.4, i32 noundef 38, ptr noundef %77) #7
  br label %151

79:                                               ; preds = %65
  %80 = load ptr, ptr @arr, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i64 8
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = icmp eq i64 %82, 1
  br i1 %83, label %94, label %84

84:                                               ; preds = %79
  %85 = load ptr, ptr @stderr, align 8, !tbaa !5
  %86 = tail call ptr @__errno_location() #6
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %91, label %89

89:                                               ; preds = %84
  %90 = tail call ptr @strerror(i32 noundef %87) #5
  br label %91

91:                                               ; preds = %84, %89
  %92 = phi ptr [ %90, %89 ], [ @.str.5, %84 ]
  %93 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.4, i32 noundef 39, ptr noundef %92) #7
  br label %151

94:                                               ; preds = %79
  %95 = tail call ptr @darray_pop(ptr noundef nonnull %80) #5
  %96 = load ptr, ptr @test1, align 8, !tbaa !5
  %97 = icmp eq ptr %95, %96
  br i1 %97, label %108, label %98

98:                                               ; preds = %94
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = tail call ptr @__errno_location() #6
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = icmp eq i32 %101, 0
  br i1 %102, label %105, label %103

103:                                              ; preds = %98
  %104 = tail call ptr @strerror(i32 noundef %101) #5
  br label %105

105:                                              ; preds = %98, %103
  %106 = phi ptr [ %104, %103 ], [ @.str.5, %98 ]
  %107 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.4, i32 noundef 42, ptr noundef %106) #7
  br label %151

108:                                              ; preds = %94
  %109 = load ptr, ptr @arr, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 8
  %111 = load i64, ptr %110, align 8, !tbaa !11
  %112 = icmp eq i64 %111, 0
  br i1 %112, label %123, label %113

113:                                              ; preds = %108
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = tail call ptr @__errno_location() #6
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %120, label %118

118:                                              ; preds = %113
  %119 = tail call ptr @strerror(i32 noundef %116) #5
  br label %120

120:                                              ; preds = %113, %118
  %121 = phi ptr [ %119, %118 ], [ @.str.5, %113 ]
  %122 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.4, i32 noundef 43, ptr noundef %121) #7
  br label %151

123:                                              ; preds = %108
  %124 = tail call ptr @darray_pop(ptr noundef nonnull %109) #5
  %125 = icmp eq ptr %124, null
  br i1 %125, label %136, label %126

126:                                              ; preds = %123
  %127 = load ptr, ptr @stderr, align 8, !tbaa !5
  %128 = tail call ptr @__errno_location() #6
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = icmp eq i32 %129, 0
  br i1 %130, label %133, label %131

131:                                              ; preds = %126
  %132 = tail call ptr @strerror(i32 noundef %129) #5
  br label %133

133:                                              ; preds = %126, %131
  %134 = phi ptr [ %132, %131 ], [ @.str.5, %126 ]
  %135 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.4, i32 noundef 46, ptr noundef %134) #7
  br label %151

136:                                              ; preds = %123
  %137 = load ptr, ptr @arr, align 8, !tbaa !5
  %138 = getelementptr inbounds i8, ptr %137, i64 8
  %139 = load i64, ptr %138, align 8, !tbaa !11
  %140 = icmp eq i64 %139, 0
  br i1 %140, label %151, label %141

141:                                              ; preds = %136
  %142 = load ptr, ptr @stderr, align 8, !tbaa !5
  %143 = tail call ptr @__errno_location() #6
  %144 = load i32, ptr %143, align 4, !tbaa !9
  %145 = icmp eq i32 %144, 0
  br i1 %145, label %148, label %146

146:                                              ; preds = %141
  %147 = tail call ptr @strerror(i32 noundef %144) #5
  br label %148

148:                                              ; preds = %141, %146
  %149 = phi ptr [ %147, %146 ], [ @.str.5, %141 ]
  %150 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.4, i32 noundef 47, ptr noundef %149) #7
  br label %151

151:                                              ; preds = %76, %91, %105, %120, %133, %148, %136, %62, %47, %30, %15
  %.1 = phi ptr [ @.str.18, %62 ], [ @.str.14, %47 ], [ @.str.16, %30 ], [ @.str.14, %15 ], [ @.str.22, %148 ], [ @.str.24, %133 ], [ @.str.22, %120 ], [ @.str.20, %105 ], [ @.str.16, %91 ], [ @.str.20, %76 ], [ null, %136 ]
  ret ptr %.1
}

declare i32 @darray_push(ptr noundef, ptr noundef) local_unnamed_addr #4

declare ptr @darray_get(ptr noundef, i64 noundef) local_unnamed_addr #4

declare ptr @darray_pop(ptr noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { 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 #3 = { 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 #4 = { "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 = { nounwind }
attributes #6 = { nounwind willreturn memory(none) }
attributes #7 = { cold 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 = !{!12, !13, i64 8}
!12 = !{!"darray", !6, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"long", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass