; LLVM IR from tezc/sc :: ini (ini_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"

@.str.3 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [11 x i8], align 1
@test8.ini = external hidden global ptr, align 8
@.str.28 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [3 x i8], align 1
@__PRETTY_FUNCTION__.test8 = external hidden unnamed_addr constant [17 x i8], align 1
@test8.ini2 = external hidden global ptr, align 8
@__const.test8.bom = external hidden unnamed_addr constant [3 x i8], align 1
@test8.ini3 = external hidden global ptr, align 8
@__const.test8.boms = external hidden unnamed_addr constant [2 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [8 x i8], align 1
@__const.test8.bom0 = external hidden unnamed_addr constant [3 x i8], align 1
@__const.test8.bom2 = external hidden unnamed_addr constant [3 x i8], align 1
@__const.test8.bom3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [9 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @cb8(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @test8() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca [3 x i8], align 1
  %5 = alloca [2 x i8], align 1
  %6 = alloca [3 x i8], align 1
  %7 = alloca [3 x i8], align 1
  %8 = alloca [3 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %9 = call noalias ptr @fopen(ptr noundef @.str.28, ptr noundef @.str.29)
  store ptr %9, ptr %3, align 8, !tbaa !9
  %10 = load ptr, ptr @test8.ini, align 8, !tbaa !9
  %11 = load ptr, ptr @test8.ini, align 8, !tbaa !9
  %12 = call i64 @strlen(ptr noundef %11) #8
  %13 = load ptr, ptr %3, align 8, !tbaa !9
  %14 = call i64 @fwrite(ptr noundef %10, i64 noundef 1, i64 noundef %12, ptr noundef %13)
  %15 = load ptr, ptr %3, align 8, !tbaa !9
  %16 = call i32 @fclose(ptr noundef %15)
  %17 = call i32 @sc_ini_parse_file(ptr noundef %2, ptr noundef @cb8, ptr noundef @.str.28)
  store i32 %17, ptr %1, align 4, !tbaa !5
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %0
  br label %22

21:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.3, i32 noundef 271, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

22:                                               ; preds = %20
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = icmp eq i32 %23, 3
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  br label %27

26:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.3, i32 noundef 272, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

27:                                               ; preds = %25
  %28 = call i32 @remove(ptr noundef @.str.28) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  %29 = call noalias ptr @fopen(ptr noundef @.str.28, ptr noundef @.str.29)
  store ptr %29, ptr %3, align 8, !tbaa !9
  %30 = load ptr, ptr @test8.ini2, align 8, !tbaa !9
  %31 = load ptr, ptr @test8.ini2, align 8, !tbaa !9
  %32 = call i64 @strlen(ptr noundef %31) #8
  %33 = load ptr, ptr %3, align 8, !tbaa !9
  %34 = call i64 @fwrite(ptr noundef %30, i64 noundef 1, i64 noundef %32, ptr noundef %33)
  %35 = load ptr, ptr %3, align 8, !tbaa !9
  %36 = call i32 @fclose(ptr noundef %35)
  %37 = call i32 @sc_ini_parse_file(ptr noundef %2, ptr noundef @cb8, ptr noundef @.str.28)
  store i32 %37, ptr %1, align 4, !tbaa !5
  %38 = load i32, ptr %1, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %27
  br label %42

41:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.3, i32 noundef 287, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

42:                                               ; preds = %40
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = icmp eq i32 %43, 3
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  br label %47

46:                                               ; preds = %42
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.3, i32 noundef 288, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

47:                                               ; preds = %45
  %48 = call i32 @remove(ptr noundef @.str.28) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 3, ptr %4) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %4, ptr align 1 @__const.test8.bom, i64 3, i1 false)
  %49 = call noalias ptr @fopen(ptr noundef @.str.28, ptr noundef @.str.29)
  store ptr %49, ptr %3, align 8, !tbaa !9
  %50 = getelementptr inbounds [3 x i8], ptr %4, i64 0, i64 0
  %51 = load ptr, ptr %3, align 8, !tbaa !9
  %52 = call i64 @fwrite(ptr noundef %50, i64 noundef 1, i64 noundef 3, ptr noundef %51)
  %53 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %54 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %55 = call i64 @strlen(ptr noundef %54) #8
  %56 = load ptr, ptr %3, align 8, !tbaa !9
  %57 = call i64 @fwrite(ptr noundef %53, i64 noundef 1, i64 noundef %55, ptr noundef %56)
  %58 = load ptr, ptr %3, align 8, !tbaa !9
  %59 = call i32 @fclose(ptr noundef %58)
  %60 = call i32 @sc_ini_parse_file(ptr noundef %2, ptr noundef @cb8, ptr noundef @.str.28)
  store i32 %60, ptr %1, align 4, !tbaa !5
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %47
  br label %65

64:                                               ; preds = %47
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.3, i32 noundef 305, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

65:                                               ; preds = %63
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = icmp eq i32 %66, 3
  br i1 %67, label %68, label %69

68:                                               ; preds = %65
  br label %70

69:                                               ; preds = %65
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.3, i32 noundef 306, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

70:                                               ; preds = %68
  %71 = call i32 @remove(ptr noundef @.str.28) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %5, ptr align 1 @__const.test8.boms, i64 2, i1 false)
  %72 = call noalias ptr @fopen(ptr noundef @.str.28, ptr noundef @.str.29)
  store ptr %72, ptr %3, align 8, !tbaa !9
  %73 = getelementptr inbounds [2 x i8], ptr %5, i64 0, i64 0
  %74 = load ptr, ptr %3, align 8, !tbaa !9
  %75 = call i64 @fwrite(ptr noundef %73, i64 noundef 1, i64 noundef 2, ptr noundef %74)
  %76 = load ptr, ptr %3, align 8, !tbaa !9
  %77 = call i32 @fclose(ptr noundef %76)
  %78 = call i32 @sc_ini_parse_file(ptr noundef %2, ptr noundef @cb8, ptr noundef @.str.28)
  store i32 %78, ptr %1, align 4, !tbaa !5
  %79 = load i32, ptr %1, align 4, !tbaa !5
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %70
  br label %83

82:                                               ; preds = %70
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.3, i32 noundef 314, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

83:                                               ; preds = %81
  %84 = call i32 @remove(ptr noundef @.str.28) #7
  call void @llvm.lifetime.start.p0(i64 3, ptr %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %6, ptr align 1 @__const.test8.bom0, i64 3, i1 false)
  %85 = call noalias ptr @fopen(ptr noundef @.str.28, ptr noundef @.str.29)
  store ptr %85, ptr %3, align 8, !tbaa !9
  %86 = getelementptr inbounds [3 x i8], ptr %6, i64 0, i64 0
  %87 = load ptr, ptr %3, align 8, !tbaa !9
  %88 = call i64 @fwrite(ptr noundef %86, i64 noundef 1, i64 noundef 3, ptr noundef %87)
  %89 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %90 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %91 = call i64 @strlen(ptr noundef %90) #8
  %92 = load ptr, ptr %3, align 8, !tbaa !9
  %93 = call i64 @fwrite(ptr noundef %89, i64 noundef 1, i64 noundef %91, ptr noundef %92)
  %94 = load ptr, ptr %3, align 8, !tbaa !9
  %95 = call i32 @fclose(ptr noundef %94)
  %96 = call i32 @sc_ini_parse_file(ptr noundef %2, ptr noundef @cb8, ptr noundef @.str.28)
  store i32 %96, ptr %1, align 4, !tbaa !5
  %97 = load i32, ptr %1, align 4, !tbaa !5
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %100

99:                                               ; preds = %83
  br label %101

100:                                              ; preds = %83
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.3, i32 noundef 323, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

101:                                              ; preds = %99
  %102 = call i32 @remove(ptr noundef @.str.28) #7
  call void @llvm.lifetime.start.p0(i64 3, ptr %7) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %7, ptr align 1 @__const.test8.bom2, i64 3, i1 false)
  %103 = call noalias ptr @fopen(ptr noundef @.str.28, ptr noundef @.str.29)
  store ptr %103, ptr %3, align 8, !tbaa !9
  %104 = getelementptr inbounds [3 x i8], ptr %7, i64 0, i64 0
  %105 = load ptr, ptr %3, align 8, !tbaa !9
  %106 = call i64 @fwrite(ptr noundef %104, i64 noundef 1, i64 noundef 3, ptr noundef %105)
  %107 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %108 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %109 = call i64 @strlen(ptr noundef %108) #8
  %110 = load ptr, ptr %3, align 8, !tbaa !9
  %111 = call i64 @fwrite(ptr noundef %107, i64 noundef 1, i64 noundef %109, ptr noundef %110)
  %112 = load ptr, ptr %3, align 8, !tbaa !9
  %113 = call i32 @fclose(ptr noundef %112)
  %114 = call i32 @sc_ini_parse_file(ptr noundef %2, ptr noundef @cb8, ptr noundef @.str.28)
  store i32 %114, ptr %1, align 4, !tbaa !5
  %115 = load i32, ptr %1, align 4, !tbaa !5
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %118

117:                                              ; preds = %101
  br label %119

118:                                              ; preds = %101
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.3, i32 noundef 332, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

119:                                              ; preds = %117
  %120 = call i32 @remove(ptr noundef @.str.28) #7
  call void @llvm.lifetime.start.p0(i64 3, ptr %8) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %8, ptr align 1 @__const.test8.bom3, i64 3, i1 false)
  %121 = call noalias ptr @fopen(ptr noundef @.str.28, ptr noundef @.str.29)
  store ptr %121, ptr %3, align 8, !tbaa !9
  %122 = getelementptr inbounds [3 x i8], ptr %8, i64 0, i64 0
  %123 = load ptr, ptr %3, align 8, !tbaa !9
  %124 = call i64 @fwrite(ptr noundef %122, i64 noundef 1, i64 noundef 3, ptr noundef %123)
  %125 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %126 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %127 = call i64 @strlen(ptr noundef %126) #8
  %128 = load ptr, ptr %3, align 8, !tbaa !9
  %129 = call i64 @fwrite(ptr noundef %125, i64 noundef 1, i64 noundef %127, ptr noundef %128)
  %130 = load ptr, ptr %3, align 8, !tbaa !9
  %131 = call i32 @fclose(ptr noundef %130)
  %132 = call i32 @sc_ini_parse_file(ptr noundef %2, ptr noundef @cb8, ptr noundef @.str.28)
  store i32 %132, ptr %1, align 4, !tbaa !5
  %133 = load i32, ptr %1, align 4, !tbaa !5
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %136

135:                                              ; preds = %119
  br label %137

136:                                              ; preds = %119
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.3, i32 noundef 341, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

137:                                              ; preds = %135
  %138 = call i32 @remove(ptr noundef @.str.28) #7
  %139 = call i32 @sc_ini_parse_file(ptr noundef %2, ptr noundef @cb8, ptr noundef @.str.28)
  store i32 %139, ptr %1, align 4, !tbaa !5
  %140 = load i32, ptr %1, align 4, !tbaa !5
  %141 = icmp eq i32 %140, -1
  br i1 %141, label %142, label %143

142:                                              ; preds = %137
  br label %144

143:                                              ; preds = %137
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.3, i32 noundef 345, ptr noundef @__PRETTY_FUNCTION__.test8) #9
  unreachable

144:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 3, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  ret void
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

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

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

declare i32 @fclose(ptr noundef) #3

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

; Function Attrs: nounwind
declare i32 @remove(ptr noundef) #5

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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.3 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [11 x i8], align 1
@test8.ini = external hidden local_unnamed_addr global ptr, align 8
@.str.28 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [3 x i8], align 1
@__PRETTY_FUNCTION__.test8 = external hidden unnamed_addr constant [17 x i8], align 1
@test8.ini2 = external hidden local_unnamed_addr global ptr, align 8
@__const.test8.bom = external hidden unnamed_addr constant [3 x i8], align 1
@test8.ini3 = external hidden local_unnamed_addr global ptr, align 8
@__const.test8.boms = external hidden unnamed_addr constant [2 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [8 x i8], align 1
@__const.test8.bom0 = external hidden unnamed_addr constant [3 x i8], align 1
@__const.test8.bom2 = external hidden unnamed_addr constant [3 x i8], align 1
@__const.test8.bom3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [9 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @cb8(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @test8() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca [3 x i8], align 1
  %3 = alloca [2 x i8], align 2
  %4 = alloca [3 x i8], align 1
  %5 = alloca [3 x i8], align 1
  %6 = alloca [3 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  %7 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.29)
  %8 = load ptr, ptr @test8.ini, align 8, !tbaa !9
  %9 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %8) #8
  %10 = tail call i64 @fwrite(ptr noundef %8, i64 noundef 1, i64 noundef %9, ptr noundef %7)
  %11 = tail call i32 @fclose(ptr noundef %7)
  %12 = call i32 @sc_ini_parse_file(ptr noundef nonnull %1, ptr noundef nonnull @cb8, ptr noundef nonnull @.str.28) #7
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %15, label %14

14:                                               ; preds = %0
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.3, i32 noundef 271, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

15:                                               ; preds = %0
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = icmp eq i32 %16, 3
  br i1 %17, label %19, label %18

18:                                               ; preds = %15
  call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.3, i32 noundef 272, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

19:                                               ; preds = %15
  %20 = call i32 @remove(ptr noundef nonnull @.str.28) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  %21 = call noalias ptr @fopen(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.29)
  %22 = load ptr, ptr @test8.ini2, align 8, !tbaa !9
  %23 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %22) #8
  %24 = call i64 @fwrite(ptr noundef %22, i64 noundef 1, i64 noundef %23, ptr noundef %21)
  %25 = call i32 @fclose(ptr noundef %21)
  %26 = call i32 @sc_ini_parse_file(ptr noundef nonnull %1, ptr noundef nonnull @cb8, ptr noundef nonnull @.str.28) #7
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %29, label %28

28:                                               ; preds = %19
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.3, i32 noundef 287, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

29:                                               ; preds = %19
  %30 = load i32, ptr %1, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 3
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.3, i32 noundef 288, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

33:                                               ; preds = %29
  %34 = call i32 @remove(ptr noundef nonnull @.str.28) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %2) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %2, ptr noundef nonnull align 1 dereferenceable(3) @__const.test8.bom, i64 3, i1 false)
  %35 = call noalias ptr @fopen(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.29)
  %36 = call i64 @fwrite(ptr noundef nonnull %2, i64 noundef 1, i64 noundef 3, ptr noundef %35)
  %37 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %38 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %37) #8
  %39 = call i64 @fwrite(ptr noundef %37, i64 noundef 1, i64 noundef %38, ptr noundef %35)
  %40 = call i32 @fclose(ptr noundef %35)
  %41 = call i32 @sc_ini_parse_file(ptr noundef nonnull %1, ptr noundef nonnull @cb8, ptr noundef nonnull @.str.28) #7
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %44, label %43

43:                                               ; preds = %33
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.3, i32 noundef 305, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

44:                                               ; preds = %33
  %45 = load i32, ptr %1, align 4, !tbaa !5
  %46 = icmp eq i32 %45, 3
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.3, i32 noundef 306, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

48:                                               ; preds = %44
  %49 = call i32 @remove(ptr noundef nonnull @.str.28) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %3) #7
  %50 = load i16, ptr @__const.test8.boms, align 1
  store i16 %50, ptr %3, align 2
  %51 = call noalias ptr @fopen(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.29)
  %52 = call i64 @fwrite(ptr noundef nonnull %3, i64 noundef 1, i64 noundef 2, ptr noundef %51)
  %53 = call i32 @fclose(ptr noundef %51)
  %54 = call i32 @sc_ini_parse_file(ptr noundef nonnull %1, ptr noundef nonnull @cb8, ptr noundef nonnull @.str.28) #7
  %.not = icmp eq i32 %54, 0
  br i1 %.not, label %55, label %56

55:                                               ; preds = %48
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.3, i32 noundef 314, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

56:                                               ; preds = %48
  %57 = call i32 @remove(ptr noundef nonnull @.str.28) #7
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %4) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %4, ptr noundef nonnull align 1 dereferenceable(3) @__const.test8.bom0, i64 3, i1 false)
  %58 = call noalias ptr @fopen(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.29)
  %59 = call i64 @fwrite(ptr noundef nonnull %4, i64 noundef 1, i64 noundef 3, ptr noundef %58)
  %60 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %61 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %60) #8
  %62 = call i64 @fwrite(ptr noundef %60, i64 noundef 1, i64 noundef %61, ptr noundef %58)
  %63 = call i32 @fclose(ptr noundef %58)
  %64 = call i32 @sc_ini_parse_file(ptr noundef nonnull %1, ptr noundef nonnull @cb8, ptr noundef nonnull @.str.28) #7
  %.not25 = icmp eq i32 %64, 0
  br i1 %.not25, label %65, label %66

65:                                               ; preds = %56
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.3, i32 noundef 323, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

66:                                               ; preds = %56
  %67 = call i32 @remove(ptr noundef nonnull @.str.28) #7
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %5) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %5, ptr noundef nonnull align 1 dereferenceable(3) @__const.test8.bom2, i64 3, i1 false)
  %68 = call noalias ptr @fopen(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.29)
  %69 = call i64 @fwrite(ptr noundef nonnull %5, i64 noundef 1, i64 noundef 3, ptr noundef %68)
  %70 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %71 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %70) #8
  %72 = call i64 @fwrite(ptr noundef %70, i64 noundef 1, i64 noundef %71, ptr noundef %68)
  %73 = call i32 @fclose(ptr noundef %68)
  %74 = call i32 @sc_ini_parse_file(ptr noundef nonnull %1, ptr noundef nonnull @cb8, ptr noundef nonnull @.str.28) #7
  %.not26 = icmp eq i32 %74, 0
  br i1 %.not26, label %75, label %76

75:                                               ; preds = %66
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.3, i32 noundef 332, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

76:                                               ; preds = %66
  %77 = call i32 @remove(ptr noundef nonnull @.str.28) #7
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %6, ptr noundef nonnull align 1 dereferenceable(3) @__const.test8.bom3, i64 3, i1 false)
  %78 = call noalias ptr @fopen(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.29)
  %79 = call i64 @fwrite(ptr noundef nonnull %6, i64 noundef 1, i64 noundef 3, ptr noundef %78)
  %80 = load ptr, ptr @test8.ini3, align 8, !tbaa !9
  %81 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %80) #8
  %82 = call i64 @fwrite(ptr noundef %80, i64 noundef 1, i64 noundef %81, ptr noundef %78)
  %83 = call i32 @fclose(ptr noundef %78)
  %84 = call i32 @sc_ini_parse_file(ptr noundef nonnull %1, ptr noundef nonnull @cb8, ptr noundef nonnull @.str.28) #7
  %.not27 = icmp eq i32 %84, 0
  br i1 %.not27, label %85, label %86

85:                                               ; preds = %76
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.3, i32 noundef 341, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

86:                                               ; preds = %76
  %87 = call i32 @remove(ptr noundef nonnull @.str.28) #7
  %88 = call i32 @sc_ini_parse_file(ptr noundef nonnull %1, ptr noundef nonnull @cb8, ptr noundef nonnull @.str.28) #7
  %89 = icmp eq i32 %88, -1
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.3, i32 noundef 345, ptr noundef nonnull @__PRETTY_FUNCTION__.test8) #9
  unreachable

91:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret void
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

declare i32 @sc_ini_parse_file(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


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