; LLVM IR from jingweizhanghuai/Morn :: test (test_INI_file)

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

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca [16 x i8], align 16
  %13 = alloca float, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %16 = call ptr @SheetCreate(i32 noundef -1, ptr noundef null, ptr noundef null, ptr noundef null)
  store ptr %16, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ptr, ...) @mINILoad(ptr noundef %17, ptr noundef @.str)
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %42, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %20, i64 noundef ptrtoint (ptr @.str.2 to i64), i64 noundef %22, ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %23, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %19
  store i32 2, ptr %7, align 4
  br label %39

27:                                               ; preds = %19
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.MSheet, ptr %28, i32 0, i32 3
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds ptr, ptr %30, i64 1
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds ptr, ptr %32, i64 %34
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef %36, ptr noundef %37)
  store i32 0, ptr %7, align 4
  br label %39

39:                                               ; preds = %27, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %40 = load i32, ptr %7, align 4
  switch i32 %40, label %45 [
    i32 0, label %41
  ]

41:                                               ; preds = %39
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %5, align 4, !tbaa !9
  br label %19

45:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %46

46:                                               ; preds = %45
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %132, %46
  %49 = load i32, ptr %2, align 4, !tbaa !9
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.MSheet, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !13
  %53 = icmp slt i32 %49, %52
  br i1 %53, label %54, label %135

54:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.MSheet, ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !14
  %59 = load i32, ptr %2, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %58, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = ptrtoint ptr %62 to i64
  %64 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %55, i64 noundef %63, i64 noundef ptrtoint (ptr @.str.4 to i64), ptr noundef @.str.5, ptr noundef %8, i32 noundef -1, i32 noundef -1)
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.MSheet, ptr %66, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !14
  %69 = load i32, ptr %2, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds ptr, ptr %68, i64 %70
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = ptrtoint ptr %72 to i64
  %74 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %65, i64 noundef %73, i64 noundef ptrtoint (ptr @.str.6 to i64), ptr noundef @.str.5, ptr noundef %9, i32 noundef -1, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.MSheet, ptr %76, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !14
  %79 = load i32, ptr %2, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds ptr, ptr %78, i64 %80
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = ptrtoint ptr %82 to i64
  %84 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %75, i64 noundef %83, i64 noundef ptrtoint (ptr @.str.7 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %84, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store float 0.000000e+00, ptr %11, align 4, !tbaa !15
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %111, %54
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %86 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %87 = load i32, ptr %3, align 4, !tbaa !9
  %88 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %86, ptr noundef @.str.8, i32 noundef %87) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.MSheet, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !14
  %93 = load i32, ptr %2, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = ptrtoint ptr %96 to i64
  %98 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %99 = ptrtoint ptr %98 to i64
  %100 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %101 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %89, i64 noundef %97, i64 noundef %99, ptr noundef @.str.9, ptr noundef %100, ptr noundef %13, i32 noundef -1, i32 noundef -1)
  %102 = icmp eq ptr %101, null
  br i1 %102, label %103, label %104

103:                                              ; preds = %85
  store i32 8, ptr %7, align 4
  br label %108

104:                                              ; preds = %85
  %105 = load float, ptr %13, align 4, !tbaa !15
  %106 = load float, ptr %11, align 4, !tbaa !15
  %107 = fadd float %106, %105
  store float %107, ptr %11, align 4, !tbaa !15
  store i32 0, ptr %7, align 4
  br label %108

108:                                              ; preds = %104, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  %109 = load i32, ptr %7, align 4
  switch i32 %109, label %177 [
    i32 0, label %110
    i32 8, label %114
  ]

110:                                              ; preds = %108
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %3, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %3, align 4, !tbaa !9
  br label %85

114:                                              ; preds = %108
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.MSheet, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !14
  %118 = load i32, ptr %2, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds ptr, ptr %117, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  %122 = load i32, ptr %8, align 4, !tbaa !9
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = load float, ptr %11, align 4, !tbaa !15
  %126 = load i32, ptr %3, align 4, !tbaa !9
  %127 = sub nsw i32 %126, 1
  %128 = sitofp i32 %127 to float
  %129 = fdiv float %125, %128
  %130 = fpext float %129 to double
  %131 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, ptr noundef %121, i32 noundef %122, i32 noundef %123, ptr noundef %124, double noundef %130)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  br label %132

132:                                              ; preds = %114
  %133 = load i32, ptr %2, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %2, align 4, !tbaa !9
  br label %48, !llvm.loop !17

135:                                              ; preds = %48
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef %136, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef @.str.13, ptr noundef @.str.14, i32 noundef 0, i32 noundef -1, i32 noundef -1)
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef %138, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.15 to i64), ptr noundef @.str.13, ptr noundef @.str.16, i32 noundef 75, i32 noundef -1, i32 noundef -1)
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef %140, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.6 to i64), ptr noundef @.str.5, i32 noundef 5, i32 noundef -1, i32 noundef -1)
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef %142, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.4 to i64), ptr noundef @.str.5, i32 noundef 6, i32 noundef -1, i32 noundef -1)
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef %144, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.7 to i64), ptr noundef @.str.18, i32 noundef -1, i32 noundef -1)
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef %146, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef @.str.13, ptr noundef @.str.14, i32 noundef 100, i32 noundef -1, i32 noundef -1)
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef %148, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.19 to i64), ptr noundef @.str.13, ptr noundef @.str.20, i32 noundef 100, i32 noundef -1, i32 noundef -1)
  br label %150

150:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 2, ptr %14, align 4, !tbaa !9
  %151 = load i32, ptr %14, align 4, !tbaa !9
  %152 = icmp eq i32 %151, 2
  br i1 %152, label %153, label %155

153:                                              ; preds = %150
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  call void @m_INIDelete(ptr noundef %154, i64 noundef ptrtoint (ptr @.str.2 to i64), i64 noundef ptrtoint (ptr @.str.15 to i64))
  br label %157

155:                                              ; preds = %150
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  call void @m_INIDelete(ptr noundef %156, i64 noundef ptrtoint (ptr @.str.2 to i64), i64 noundef -1)
  br label %157

157:                                              ; preds = %155, %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %158

158:                                              ; preds = %157
  br label %159

159:                                              ; preds = %158
  br label %160

160:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %161 = load i8, ptr @.str.21, align 1, !tbaa !19
  %162 = sext i8 %161 to i32
  %163 = icmp ne i32 %162, 0
  %164 = zext i1 %163 to i32
  store i32 %164, ptr %15, align 4, !tbaa !9
  %165 = load i32, ptr %15, align 4, !tbaa !9
  %166 = icmp eq i32 %165, 2
  br i1 %166, label %167, label %169

167:                                              ; preds = %160
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  call void @m_INIDelete(ptr noundef %168, i64 noundef ptrtoint (ptr @.str.22 to i64), i64 noundef -1)
  br label %171

169:                                              ; preds = %160
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  call void @m_INIDelete(ptr noundef %170, i64 noundef ptrtoint (ptr @.str.22 to i64), i64 noundef -1)
  br label %171

171:                                              ; preds = %169, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %172

172:                                              ; preds = %171
  br label %173

173:                                              ; preds = %172
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  call void @mINISave(ptr noundef %174, ptr noundef @.str.23)
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  call void @mSheetRelease(ptr noundef %175)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %176 = load i32, ptr %1, align 4
  ret i32 %176

177:                                              ; preds = %108
  unreachable
}

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

declare ptr @SheetCreate(i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare ptr @m_INIRead(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ...) #2

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

declare ptr @m_INIWrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ...) #2

declare void @m_INIDelete(ptr noundef, i64 noundef, i64 noundef) #2

declare void @mINISave(ptr noundef, ptr noundef) #2

declare void @mSheetRelease(ptr noundef) #2

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 = { 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 #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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"MSheet", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!7, !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"

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [16 x i8], align 16
  %4 = alloca float, align 4
  %5 = tail call ptr @SheetCreate(i32 noundef -1, ptr noundef null, ptr noundef null, ptr noundef null) #4
  tail call void (ptr, ptr, ...) @mINILoad(ptr noundef %5, ptr noundef nonnull @.str) #4
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %7 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %5, i64 noundef ptrtoint (ptr @.str.2 to i64), i64 noundef 0, ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not54 = icmp eq ptr %7, null
  br i1 %.not54, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %8 = getelementptr inbounds i8, ptr %5, i64 24
  br label %9

9:                                                ; preds = %.lr.ph, %9
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %9 ]
  %10 = phi ptr [ %7, %.lr.ph ], [ %17, %9 ]
  %11 = load ptr, ptr %8, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef %15, ptr noundef nonnull %10)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %5, i64 noundef ptrtoint (ptr @.str.2 to i64), i64 noundef %indvars.iv.next, ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %.critedge, label %9

.critedge:                                        ; preds = %9, %0
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %19 = load i32, ptr %5, align 8, !tbaa !12
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %.critedge
  %21 = getelementptr inbounds i8, ptr %5, i64 8
  %22 = ptrtoint ptr %3 to i64
  br label %23

23:                                               ; preds = %.lr.ph61, %._crit_edge
  %indvars.iv64 = phi i64 [ 0, %.lr.ph61 ], [ %indvars.iv.next65, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %24 = load ptr, ptr %21, align 8, !tbaa !13
  %25 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv64
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = ptrtoint ptr %26 to i64
  %28 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef nonnull %5, i64 noundef %27, i64 noundef ptrtoint (ptr @.str.4 to i64), ptr noundef nonnull @.str.5, ptr noundef nonnull %1, i32 noundef -1, i32 noundef -1) #4
  %29 = load ptr, ptr %21, align 8, !tbaa !13
  %30 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv64
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  %32 = ptrtoint ptr %31 to i64
  %33 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef nonnull %5, i64 noundef %32, i64 noundef ptrtoint (ptr @.str.6 to i64), ptr noundef nonnull @.str.5, ptr noundef nonnull %2, i32 noundef -1, i32 noundef -1) #4
  %34 = load ptr, ptr %21, align 8, !tbaa !13
  %35 = getelementptr inbounds ptr, ptr %34, i64 %indvars.iv64
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = ptrtoint ptr %36 to i64
  %38 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef nonnull %5, i64 noundef %37, i64 noundef ptrtoint (ptr @.str.7 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %39 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef 1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %40 = load ptr, ptr %21, align 8, !tbaa !13
  %41 = getelementptr inbounds ptr, ptr %40, i64 %indvars.iv64
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = ptrtoint ptr %42 to i64
  %44 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef nonnull %5, i64 noundef %43, i64 noundef %22, ptr noundef nonnull @.str.9, ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef -1, i32 noundef -1) #4
  %45 = icmp eq ptr %44, null
  %46 = load float, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  br i1 %45, label %._crit_edge, label %.lr.ph58

.lr.ph58:                                         ; preds = %23, %.lr.ph58
  %47 = phi float [ %57, %.lr.ph58 ], [ %46, %23 ]
  %.04857 = phi i32 [ %49, %.lr.ph58 ], [ 1, %23 ]
  %.04956 = phi float [ %48, %.lr.ph58 ], [ 0.000000e+00, %23 ]
  %48 = fadd float %.04956, %47
  %49 = add nuw nsw i32 %.04857, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %50 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %49) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %51 = load ptr, ptr %21, align 8, !tbaa !13
  %52 = getelementptr inbounds ptr, ptr %51, i64 %indvars.iv64
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = ptrtoint ptr %53 to i64
  %55 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef nonnull %5, i64 noundef %54, i64 noundef %22, ptr noundef nonnull @.str.9, ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef -1, i32 noundef -1) #4
  %56 = icmp eq ptr %55, null
  %57 = load float, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  br i1 %56, label %._crit_edge, label %.lr.ph58

._crit_edge:                                      ; preds = %.lr.ph58, %23
  %.049.lcssa = phi float [ 0.000000e+00, %23 ], [ %48, %.lr.ph58 ]
  %.048.lcssa = phi i32 [ 0, %23 ], [ %.04857, %.lr.ph58 ]
  %58 = load ptr, ptr %21, align 8, !tbaa !13
  %59 = getelementptr inbounds ptr, ptr %58, i64 %indvars.iv64
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = load i32, ptr %1, align 4, !tbaa !14
  %62 = load i32, ptr %2, align 4, !tbaa !14
  %63 = uitofp nneg i32 %.048.lcssa to float
  %64 = fdiv float %.049.lcssa, %63
  %65 = fpext float %64 to double
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, ptr noundef %60, i32 noundef %61, i32 noundef %62, ptr noundef %38, double noundef %65)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %67 = load i32, ptr %5, align 8, !tbaa !12
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv.next65, %68
  br i1 %69, label %23, label %._crit_edge62, !llvm.loop !15

._crit_edge62:                                    ; preds = %._crit_edge, %.critedge
  %70 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef nonnull %5, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.14, i32 noundef 0, i32 noundef -1, i32 noundef -1) #4
  %71 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef nonnull %5, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.15 to i64), ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.16, i32 noundef 75, i32 noundef -1, i32 noundef -1) #4
  %72 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef nonnull %5, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.6 to i64), ptr noundef nonnull @.str.5, i32 noundef 5, i32 noundef -1, i32 noundef -1) #4
  %73 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef nonnull %5, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.4 to i64), ptr noundef nonnull @.str.5, i32 noundef 6, i32 noundef -1, i32 noundef -1) #4
  %74 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef nonnull %5, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.7 to i64), ptr noundef nonnull @.str.18, i32 noundef -1, i32 noundef -1) #4
  %75 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef nonnull %5, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.14, i32 noundef 100, i32 noundef -1, i32 noundef -1) #4
  %76 = call ptr (ptr, i64, i64, ptr, ...) @m_INIWrite(ptr noundef nonnull %5, i64 noundef ptrtoint (ptr @.str.17 to i64), i64 noundef ptrtoint (ptr @.str.19 to i64), ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.20, i32 noundef 100, i32 noundef -1, i32 noundef -1) #4
  call void @m_INIDelete(ptr noundef nonnull %5, i64 noundef ptrtoint (ptr @.str.2 to i64), i64 noundef ptrtoint (ptr @.str.15 to i64)) #4
  call void @m_INIDelete(ptr noundef nonnull %5, i64 noundef ptrtoint (ptr @.str.22 to i64), i64 noundef -1) #4
  call void @mINISave(ptr noundef nonnull %5, ptr noundef nonnull @.str.23) #4
  call void @mSheetRelease(ptr noundef nonnull %5) #4
  ret i32 0
}

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

declare ptr @SheetCreate(i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

declare void @m_INIDelete(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare void @mINISave(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @mSheetRelease(ptr noundef) local_unnamed_addr #2

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


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