; LLVM IR from tensorflow/tflite-micro :: tensorflow/lite/micro (micro_log_test)

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

@_ZN10micro_test12tests_passedE = external dso_local global i32, align 4
@_ZN10micro_test12tests_failedE = external dso_local global i32, align 4
@_ZN10micro_test16is_test_completeE = external dso_local global i8, align 1
@_ZN10micro_test13did_test_failE = external dso_local global i8, align 1
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@_ZN12_GLOBAL__N_17kFormatE = external hidden global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [48 x i8], align 1
@_ZN12_GLOBAL__N_17kExpectE = external hidden global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [128 x i8], align 16
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store i32 0, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  store i32 0, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  call void @_ZN6tflite14InitializeTestEv()
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str)
  store i8 0, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  store i8 0, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %15

15:                                               ; preds = %20, %2
  %16 = load i8, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11, !range !13, !noundef !14
  %17 = trunc i8 %16 to i1
  %18 = xor i1 %17, true
  br i1 %18, label %19, label %33

19:                                               ; preds = %15
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.1, i32 noundef 42)
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.2, double noundef 4.242000e+01)
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.3, ptr noundef @.str.4)
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.5)
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.6)
  br label %20

20:                                               ; preds = %19
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  %21 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %22 = trunc i8 %21 to i1
  %23 = zext i1 %22 to i64
  %24 = select i1 %22, i32 0, i32 1
  %25 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %26 = add nsw i32 %25, %24
  store i32 %26, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %27 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %28 = trunc i8 %27 to i1
  %29 = zext i1 %28 to i64
  %30 = select i1 %28, i32 1, i32 0
  %31 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %32 = add nsw i32 %31, %30
  store i32 %32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  br label %15, !llvm.loop !15

33:                                               ; preds = %15
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.7)
  store i8 0, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  store i8 0, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %34

34:                                               ; preds = %139, %33
  %35 = load i8, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11, !range !13, !noundef !14
  %36 = trunc i8 %35 to i1
  %37 = xor i1 %36, true
  br i1 %37, label %38, label %152

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 128, ptr %6) #6
  %39 = getelementptr inbounds [128 x i8], ptr %6, i64 0, i64 0
  store i8 0, ptr %39, align 16, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %40 = getelementptr inbounds [128 x i8], ptr %6, i64 0, i64 0
  %41 = load ptr, ptr @_ZN12_GLOBAL__N_17kFormatE, align 8, !tbaa !9
  %42 = call noundef i32 (ptr, i64, ptr, ...) @_Z13MicroSnprintfPcmPKcz(ptr noundef %40, i64 noundef 128, ptr noundef %41, i32 noundef 42, double noundef 4.242000e+01, i32 noundef 66, ptr noundef @.str.8)
  %43 = sext i32 %42 to i64
  store i64 %43, ptr %7, align 8, !tbaa !18
  br label %44

44:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %45 = load i64, ptr %7, align 8, !tbaa !18
  store i64 %45, ptr %8, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %46 = getelementptr inbounds [128 x i8], ptr %6, i64 0, i64 0
  %47 = call i64 @strlen(ptr noundef %46) #7
  store i64 %47, ptr %9, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  store i8 0, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  store i8 0, ptr %11, align 1, !tbaa !11
  %48 = load i8, ptr %10, align 1, !tbaa !11, !range !13, !noundef !14
  %49 = trunc i8 %48 to i1
  br i1 %49, label %50, label %76

50:                                               ; preds = %44
  %51 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %52 = trunc i8 %51 to i1
  br i1 %52, label %53, label %76

53:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %54 = load i64, ptr %8, align 8, !tbaa !18
  %55 = load i64, ptr %9, align 8, !tbaa !18
  %56 = icmp ugt i64 %54, %55
  br i1 %56, label %57, label %61

57:                                               ; preds = %53
  %58 = load i64, ptr %8, align 8, !tbaa !18
  %59 = load i64, ptr %9, align 8, !tbaa !18
  %60 = sub i64 %58, %59
  br label %65

61:                                               ; preds = %53
  %62 = load i64, ptr %9, align 8, !tbaa !18
  %63 = load i64, ptr %8, align 8, !tbaa !18
  %64 = sub i64 %62, %63
  br label %65

65:                                               ; preds = %61, %57
  %66 = phi i64 [ %60, %57 ], [ %64, %61 ]
  store i64 %66, ptr %12, align 8, !tbaa !18
  %67 = load i64, ptr %12, align 8, !tbaa !18
  %68 = call noundef i64 @_ZNSt14numeric_limitsImE7epsilonEv() #6
  %69 = icmp ugt i64 %67, %68
  br i1 %69, label %70, label %75

70:                                               ; preds = %65
  %71 = load i64, ptr %8, align 8, !tbaa !18
  %72 = uitofp i64 %71 to double
  %73 = load i64, ptr %9, align 8, !tbaa !18
  %74 = uitofp i64 %73 to double
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.9, ptr noundef @.str.10, i32 noundef 50, double noundef %72, double noundef %74)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %75

75:                                               ; preds = %70, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %93

76:                                               ; preds = %50, %44
  %77 = load i64, ptr %8, align 8, !tbaa !18
  %78 = load i64, ptr %9, align 8, !tbaa !18
  %79 = icmp ne i64 %77, %78
  br i1 %79, label %80, label %92

80:                                               ; preds = %76
  %81 = load i64, ptr %8, align 8, !tbaa !18
  %82 = trunc i64 %81 to i32
  %83 = load i64, ptr %9, align 8, !tbaa !18
  %84 = trunc i64 %83 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.11, ptr noundef @.str.10, i32 noundef 50, i32 noundef %82, i32 noundef %84)
  %85 = load i8, ptr %10, align 1, !tbaa !11, !range !13, !noundef !14
  %86 = trunc i8 %85 to i1
  br i1 %86, label %90, label %87

87:                                               ; preds = %80
  %88 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %91

90:                                               ; preds = %87, %80
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.12)
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.13)
  br label %91

91:                                               ; preds = %90, %87
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  br label %92

92:                                               ; preds = %91, %76
  br label %93

93:                                               ; preds = %92, %75
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %132, %96
  %98 = load ptr, ptr @_ZN12_GLOBAL__N_17kExpectE, align 8, !tbaa !9
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %98, i64 %100
  %102 = load i8, ptr %101, align 1, !tbaa !17
  %103 = sext i8 %102 to i32
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %112

105:                                              ; preds = %97
  %106 = load i32, ptr %13, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [128 x i8], ptr %6, i64 0, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !17
  %110 = sext i8 %109 to i32
  %111 = icmp ne i32 %110, 0
  br label %112

112:                                              ; preds = %105, %97
  %113 = phi i1 [ false, %97 ], [ %111, %105 ]
  br i1 %113, label %115, label %114

114:                                              ; preds = %112
  store i32 12, ptr %14, align 4
  br label %135

115:                                              ; preds = %112
  %116 = load ptr, ptr @_ZN12_GLOBAL__N_17kExpectE, align 8, !tbaa !9
  %117 = load i32, ptr %13, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i8, ptr %116, i64 %118
  %120 = load i8, ptr %119, align 1, !tbaa !17
  %121 = sext i8 %120 to i32
  %122 = load i32, ptr %13, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [128 x i8], ptr %6, i64 0, i64 %123
  %125 = load i8, ptr %124, align 1, !tbaa !17
  %126 = sext i8 %125 to i32
  %127 = icmp ne i32 %121, %126
  br i1 %127, label %128, label %131

128:                                              ; preds = %115
  %129 = load ptr, ptr @_ZN12_GLOBAL__N_17kExpectE, align 8, !tbaa !9
  %130 = getelementptr inbounds [128 x i8], ptr %6, i64 0, i64 0
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.14, ptr noundef %129, ptr noundef %130, ptr noundef @.str.10, i32 noundef 51)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11
  store i32 12, ptr %14, align 4
  br label %135

131:                                              ; preds = %115
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %13, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %13, align 4, !tbaa !5
  br label %97, !llvm.loop !20

135:                                              ; preds = %128, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %6) #6
  br label %139

139:                                              ; preds = %138
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !11
  %140 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %141 = trunc i8 %140 to i1
  %142 = zext i1 %141 to i64
  %143 = select i1 %141, i32 0, i32 1
  %144 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %145 = add nsw i32 %144, %143
  store i32 %145, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %146 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !11, !range !13, !noundef !14
  %147 = trunc i8 %146 to i1
  %148 = zext i1 %147 to i64
  %149 = select i1 %147, i32 1, i32 0
  %150 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %151 = add nsw i32 %150, %149
  store i32 %151, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  br label %34, !llvm.loop !21

152:                                              ; preds = %34
  %153 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %154 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %155 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %156 = add nsw i32 %154, %155
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.15, i32 noundef %153, i32 noundef %156)
  %157 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %158 = icmp eq i32 %157, 0
  br i1 %158, label %159, label %160

159:                                              ; preds = %152
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.16)
  store i32 0, ptr %3, align 4
  br label %161

160:                                              ; preds = %152
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef @.str.17)
  store i32 1, ptr %3, align 4
  br label %161

161:                                              ; preds = %160, %159
  %162 = load i32, ptr %3, align 4
  ret i32 %162
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite14InitializeTestEv() #1

declare void @_Z11MicroPrintfPKcz(ptr noundef, ...) #2

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

declare noundef i32 @_Z13MicroSnprintfPcmPKcz(ptr noundef, i64 noundef, ptr noundef, ...) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsImE7epsilonEv() #5 align 2

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

attributes #0 = { mustprogress norecurse 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 = { inlinehint 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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind willreturn memory(read) "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 = { mustprogress 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !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"

@_ZN10micro_test12tests_passedE = external dso_local local_unnamed_addr global i32, align 4
@_ZN10micro_test12tests_failedE = external dso_local local_unnamed_addr global i32, align 4
@_ZN10micro_test16is_test_completeE = external dso_local local_unnamed_addr global i8, align 1
@_ZN10micro_test13did_test_failE = external dso_local local_unnamed_addr global i8, align 1
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@_ZN12_GLOBAL__N_17kFormatE = external hidden local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [52 x i8], align 1
@_ZN12_GLOBAL__N_17kExpectE = external hidden local_unnamed_addr global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
.lr.ph41:
  %2 = alloca [128 x i8], align 16
  store i32 0, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  store i32 0, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  tail call void @_ZN6tflite14InitializeTestEv()
  tail call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str)
  store i8 0, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !9
  store i8 0, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9
  tail call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.1, i32 noundef 42)
  tail call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.2, double noundef 4.242000e+01)
  tail call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4)
  tail call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.5)
  tail call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.6)
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !9
  %3 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9, !range !11, !noundef !12
  %4 = xor i8 %3, 1
  %not.33 = zext nneg i8 %4 to i32
  %5 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %6 = add nsw i32 %5, %not.33
  store i32 %6, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %7 = zext nneg i8 %3 to i32
  %8 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %9 = add nsw i32 %8, %7
  store i32 %9, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  tail call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.7)
  store i8 0, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !9
  store i8 0, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %2) #5
  store i8 0, ptr %2, align 16, !tbaa !13
  %10 = load ptr, ptr @_ZN12_GLOBAL__N_17kFormatE, align 8, !tbaa !14
  %11 = call noundef i32 (ptr, i64, ptr, ...) @_Z13MicroSnprintfPcmPKcz(ptr noundef nonnull %2, i64 noundef 128, ptr noundef %10, i32 noundef 42, double noundef 4.242000e+01, i32 noundef 66, ptr noundef nonnull @.str.8)
  %12 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #6
  %13 = sext i32 %11 to i64
  %.not = icmp eq i64 %12, %13
  br i1 %.not, label %16, label %14

14:                                               ; preds = %.lr.ph41
  %15 = trunc i64 %12 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.10, i32 noundef 50, i32 noundef %11, i32 noundef %15)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9
  br label %16

16:                                               ; preds = %.lr.ph41, %14
  %17 = load ptr, ptr @_ZN12_GLOBAL__N_17kExpectE, align 8, !tbaa !14
  %18 = load i8, ptr %17, align 1, !tbaa !13
  %.not3035 = icmp eq i8 %18, 0
  br i1 %.not3035, label %._crit_edge42, label %.lr.ph38

19:                                               ; preds = %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = getelementptr inbounds i8, ptr %17, i64 %indvars.iv.next
  %21 = load i8, ptr %20, align 1, !tbaa !13
  %.not30 = icmp eq i8 %21, 0
  br i1 %.not30, label %._crit_edge42, label %.lr.ph38, !llvm.loop !16

.lr.ph38:                                         ; preds = %16, %19
  %indvars.iv = phi i64 [ %indvars.iv.next, %19 ], [ 0, %16 ]
  %22 = phi i8 [ %21, %19 ], [ %18, %16 ]
  %23 = getelementptr inbounds [128 x i8], ptr %2, i64 0, i64 %indvars.iv
  %24 = load i8, ptr %23, align 1, !tbaa !13
  %.not31 = icmp eq i8 %24, 0
  br i1 %.not31, label %._crit_edge42, label %25

25:                                               ; preds = %.lr.ph38
  %.not32 = icmp eq i8 %22, %24
  br i1 %.not32, label %19, label %26

26:                                               ; preds = %25
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.14, ptr noundef nonnull %17, ptr noundef nonnull %2, ptr noundef nonnull @.str.10, i32 noundef 51)
  store i8 1, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9
  br label %._crit_edge42

._crit_edge42:                                    ; preds = %19, %.lr.ph38, %16, %26
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %2) #5
  store i8 1, ptr @_ZN10micro_test16is_test_completeE, align 1, !tbaa !9
  %27 = load i8, ptr @_ZN10micro_test13did_test_failE, align 1, !tbaa !9, !range !11, !noundef !12
  %28 = xor i8 %27, 1
  %not. = zext nneg i8 %28 to i32
  %29 = load i32, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %30 = add nsw i32 %29, %not.
  store i32 %30, ptr @_ZN10micro_test12tests_passedE, align 4, !tbaa !5
  %31 = zext nneg i8 %27 to i32
  %32 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %33 = add nsw i32 %32, %31
  store i32 %33, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %34 = add nsw i32 %33, %30
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull @.str.15, i32 noundef %30, i32 noundef %34)
  %35 = load i32, ptr @_ZN10micro_test12tests_failedE, align 4, !tbaa !5
  %36 = icmp ne i32 %35, 0
  %.str.16..str.17 = select i1 %36, ptr @.str.17, ptr @.str.16
  %. = zext i1 %36 to i32
  call void (ptr, ...) @_Z11MicroPrintfPKcz(ptr noundef nonnull %.str.16..str.17)
  ret i32 %.
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6tflite14InitializeTestEv() local_unnamed_addr #1

declare void @_Z11MicroPrintfPKcz(ptr noundef, ...) local_unnamed_addr #2

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

declare noundef i32 @_Z13MicroSnprintfPcmPKcz(ptr noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) 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) #3

attributes #0 = { mustprogress norecurse 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 = { inlinehint 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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(read) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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