; LLVM IR from sayanadhikari/picsp :: lib/iniparser/src (iniparser)

; 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.8 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [38 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

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

19:                                               ; preds = %1
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.9, ptr noundef %21) #7
  store ptr null, ptr %2, align 8
  store i32 1, ptr %15, align 4
  br label %163

23:                                               ; preds = %1
  %24 = call ptr @dictionary_new(i32 noundef 0)
  store ptr %24, ptr %14, align 8, !tbaa !5
  %25 = load ptr, ptr %14, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %30, label %27

27:                                               ; preds = %23
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call i32 @fclose(ptr noundef %28)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %15, align 4
  br label %163

30:                                               ; preds = %23
  %31 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %31, i8 0, i64 1024, i1 false)
  %32 = getelementptr inbounds [1025 x i8], ptr %6, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %32, i8 0, i64 1024, i1 false)
  %33 = getelementptr inbounds [1025 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %33, i8 0, i64 1024, i1 false)
  %34 = getelementptr inbounds [1025 x i8], ptr %9, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %34, i8 0, i64 1024, i1 false)
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %153, %112, %54, %30
  %36 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 0
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds i8, ptr %36, i64 %38
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = sub nsw i32 1024, %40
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = call ptr @fgets(ptr noundef %39, i32 noundef %41, ptr noundef %42)
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %154

45:                                               ; preds = %35
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %12, align 4, !tbaa !9
  %48 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 0
  %49 = call i64 @strlen(ptr noundef %48) #8
  %50 = trunc i64 %49 to i32
  %51 = sub nsw i32 %50, 1
  store i32 %51, ptr %11, align 4, !tbaa !9
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %45
  br label %35, !llvm.loop !11

55:                                               ; preds = %45
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !13
  %60 = sext i8 %59 to i32
  %61 = icmp ne i32 %60, 10
  br i1 %61, label %62, label %70

62:                                               ; preds = %55
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.10, ptr noundef %64, i32 noundef %65) #7
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  call void @dictionary_del(ptr noundef %67)
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = call i32 @fclose(ptr noundef %68)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %15, align 4
  br label %163

70:                                               ; preds = %55
  br label %71

71:                                               ; preds = %99, %70
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = icmp sge i32 %72, 0
  br i1 %73, label %74, label %97

74:                                               ; preds = %71
  %75 = load i32, ptr %11, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !13
  %79 = sext i8 %78 to i32
  %80 = icmp eq i32 %79, 10
  br i1 %80, label %95, label %81

81:                                               ; preds = %74
  %82 = call ptr @__ctype_b_loc() #9
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = load i32, ptr %11, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !13
  %88 = sext i8 %87 to i32
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i16, ptr %83, i64 %89
  %91 = load i16, ptr %90, align 2, !tbaa !14
  %92 = zext i16 %91 to i32
  %93 = and i32 %92, 8192
  %94 = icmp ne i32 %93, 0
  br label %95

95:                                               ; preds = %81, %74
  %96 = phi i1 [ true, %74 ], [ %94, %81 ]
  br label %97

97:                                               ; preds = %95, %71
  %98 = phi i1 [ false, %71 ], [ %96, %95 ]
  br i1 %98, label %99, label %105

99:                                               ; preds = %97
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 %101
  store i8 0, ptr %102, align 1, !tbaa !13
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = add nsw i32 %103, -1
  store i32 %104, ptr %11, align 4, !tbaa !9
  br label %71, !llvm.loop !16

105:                                              ; preds = %97
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !13
  %110 = sext i8 %109 to i32
  %111 = icmp eq i32 %110, 92
  br i1 %111, label %112, label %114

112:                                              ; preds = %105
  %113 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %113, ptr %10, align 4, !tbaa !9
  br label %35, !llvm.loop !11

114:                                              ; preds = %105
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %114
  %116 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 0
  %117 = getelementptr inbounds [1025 x i8], ptr %6, i64 0, i64 0
  %118 = getelementptr inbounds [1025 x i8], ptr %7, i64 0, i64 0
  %119 = getelementptr inbounds [1025 x i8], ptr %9, i64 0, i64 0
  %120 = call i32 @iniparser_line(ptr noundef %116, ptr noundef %117, ptr noundef %118, ptr noundef %119)
  switch i32 %120, label %145 [
    i32 2, label %121
    i32 3, label %121
    i32 4, label %122
    i32 5, label %126
    i32 1, label %135
  ]

121:                                              ; preds = %115, %115
  br label %146

122:                                              ; preds = %115
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  %124 = getelementptr inbounds [1025 x i8], ptr %6, i64 0, i64 0
  %125 = call i32 @dictionary_set(ptr noundef %123, ptr noundef %124, ptr noundef null)
  store i32 %125, ptr %13, align 4, !tbaa !9
  br label %146

126:                                              ; preds = %115
  %127 = getelementptr inbounds [1025 x i8], ptr %8, i64 0, i64 0
  %128 = getelementptr inbounds [1025 x i8], ptr %6, i64 0, i64 0
  %129 = getelementptr inbounds [1025 x i8], ptr %7, i64 0, i64 0
  %130 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %127, ptr noundef @.str.11, ptr noundef %128, ptr noundef %129) #7
  %131 = load ptr, ptr %14, align 8, !tbaa !5
  %132 = getelementptr inbounds [1025 x i8], ptr %8, i64 0, i64 0
  %133 = getelementptr inbounds [1025 x i8], ptr %9, i64 0, i64 0
  %134 = call i32 @dictionary_set(ptr noundef %131, ptr noundef %132, ptr noundef %133)
  store i32 %134, ptr %13, align 4, !tbaa !9
  br label %146

135:                                              ; preds = %115
  %136 = load ptr, ptr @stderr, align 8, !tbaa !5
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = load i32, ptr %12, align 4, !tbaa !9
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %136, ptr noundef @.str.12, ptr noundef %137, i32 noundef %138) #7
  %140 = load ptr, ptr @stderr, align 8, !tbaa !5
  %141 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 0
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str.13, ptr noundef %141) #7
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %13, align 4, !tbaa !9
  br label %146

145:                                              ; preds = %115
  br label %146

146:                                              ; preds = %145, %135, %126, %122, %121
  %147 = getelementptr inbounds [1025 x i8], ptr %5, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %147, i8 0, i64 1024, i1 false)
  store i32 0, ptr %10, align 4, !tbaa !9
  %148 = load i32, ptr %13, align 4, !tbaa !9
  %149 = icmp slt i32 %148, 0
  br i1 %149, label %150, label %153

150:                                              ; preds = %146
  %151 = load ptr, ptr @stderr, align 8, !tbaa !5
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %151, ptr noundef @.str.14) #7
  br label %154

153:                                              ; preds = %146
  br label %35, !llvm.loop !11

154:                                              ; preds = %150, %35
  %155 = load i32, ptr %13, align 4, !tbaa !9
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %159

157:                                              ; preds = %154
  %158 = load ptr, ptr %14, align 8, !tbaa !5
  call void @dictionary_del(ptr noundef %158)
  store ptr null, ptr %14, align 8, !tbaa !5
  br label %159

159:                                              ; preds = %157, %154
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = call i32 @fclose(ptr noundef %160)
  %162 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %162, ptr %2, align 8
  store i32 1, ptr %15, align 4
  br label %163

163:                                              ; preds = %159, %62, %27, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 1025, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1025, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1025, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 1025, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 1025, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %164 = load ptr, ptr %2, align 8
  ret ptr %164
}

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

declare ptr @dictionary_new(i32 noundef) #3

declare i32 @fclose(ptr noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

declare void @dictionary_del(ptr noundef) #3

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() #6

; Function Attrs: nounwind uwtable
declare hidden i32 @iniparser_line(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 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 #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 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = distinct !{!16, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [38 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

declare i32 @dictionary_set(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local ptr @iniparser_load(ptr noundef %0) local_unnamed_addr #4 {
  %2 = alloca [1025 x i8], align 16
  %3 = alloca [1025 x i8], align 16
  %4 = alloca [1025 x i8], align 16
  %5 = alloca [1025 x i8], align 16
  %6 = alloca [1025 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1025, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1025, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 1025, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 1025, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 1025, ptr nonnull %6) #7
  %7 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.8)
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %12

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

12:                                               ; preds = %1
  %13 = tail call ptr @dictionary_new(i32 noundef 0) #7
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %14, label %16

14:                                               ; preds = %12
  %15 = tail call i32 @fclose(ptr noundef nonnull %7)
  br label %71

16:                                               ; preds = %12
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %2, i8 0, i64 1024, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %3, i8 0, i64 1024, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %4, i8 0, i64 1024, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %6, i8 0, i64 1024, i1 false)
  br label %.outer.outer

.outer.outer:                                     ; preds = %16, %63
  %.034.ph.ph = phi i32 [ 0, %16 ], [ %23, %63 ]
  %.033.ph.ph = phi i32 [ 0, %16 ], [ %.1, %63 ]
  br label %.outer

.outer:                                           ; preds = %.outer.outer, %.critedge
  %.036.ph = phi i32 [ %.035.lcssa.ph, %.critedge ], [ 0, %.outer.outer ]
  %.034.ph = phi i32 [ %23, %.critedge ], [ %.034.ph.ph, %.outer.outer ]
  %17 = sext i32 %.036.ph to i64
  %18 = getelementptr inbounds i8, ptr %2, i64 %17
  %19 = sub nsw i32 1024, %.036.ph
  br label %20

20:                                               ; preds = %.outer, %22
  %.034 = phi i32 [ %23, %22 ], [ %.034.ph, %.outer ]
  %21 = call ptr @fgets(ptr noundef nonnull %18, i32 noundef %19, ptr noundef nonnull %7)
  %.not42 = icmp eq ptr %21, null
  br i1 %.not42, label %67, label %22

22:                                               ; preds = %20
  %23 = add nsw i32 %.034, 1
  %24 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #9
  %25 = trunc i64 %24 to i32
  %26 = add nsw i32 %25, -1
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %20, label %28, !llvm.loop !9

28:                                               ; preds = %22
  %29 = sext i32 %26 to i64
  %30 = getelementptr inbounds [1025 x i8], ptr %2, i64 0, i64 %29
  %31 = load i8, ptr %30, align 1, !tbaa !11
  %.not43 = icmp eq i8 %31, 10
  br i1 %.not43, label %.preheader, label %34

.preheader:                                       ; preds = %28
  %32 = icmp sgt i32 %25, 0
  br i1 %32, label %.lr.ph.preheader, label %.critedge.thread

.lr.ph.preheader:                                 ; preds = %.preheader
  %33 = zext nneg i32 %26 to i64
  br label %.lr.ph

34:                                               ; preds = %28
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.10, ptr noundef %0, i32 noundef %23) #8
  call void @dictionary_del(ptr noundef nonnull %13) #7
  %37 = call i32 @fclose(ptr noundef nonnull %7)
  br label %71

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.critedge2
  %indvars.iv = phi i64 [ %33, %.lr.ph.preheader ], [ %indvars.iv.next, %.critedge2 ]
  %38 = getelementptr inbounds [1025 x i8], ptr %2, i64 0, i64 %indvars.iv
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = icmp eq i8 %39, 10
  br i1 %40, label %.critedge2, label %41

41:                                               ; preds = %.lr.ph
  %42 = tail call ptr @__ctype_b_loc() #10
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = sext i8 %39 to i64
  %45 = getelementptr inbounds i16, ptr %43, i64 %44
  %46 = load i16, ptr %45, align 2, !tbaa !12
  %47 = and i16 %46, 8192
  %.not44 = icmp eq i16 %47, 0
  br i1 %.not44, label %.critedge.split.loop.exit, label %.critedge2

.critedge2:                                       ; preds = %.lr.ph, %41
  store i8 0, ptr %38, align 1, !tbaa !11
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %48 = icmp sgt i64 %indvars.iv, 0
  br i1 %48, label %.lr.ph, label %.critedge, !llvm.loop !14

.critedge.split.loop.exit:                        ; preds = %41
  %49 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge2, %.critedge.split.loop.exit
  %.035.lcssa.ph = phi i32 [ %49, %.critedge.split.loop.exit ], [ -1, %.critedge2 ]
  %.pre = sext i32 %.035.lcssa.ph to i64
  %.phi.trans.insert = getelementptr inbounds [1025 x i8], ptr %2, i64 0, i64 %.pre
  %.pre61 = load i8, ptr %.phi.trans.insert, align 1, !tbaa !11
  %50 = icmp eq i8 %.pre61, 92
  br i1 %50, label %.outer, label %.critedge.thread, !llvm.loop !9

.critedge.thread:                                 ; preds = %.preheader, %.critedge
  %51 = call i32 @iniparser_line(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %6)
  switch i32 %51, label %63 [
    i32 1, label %57
    i32 5, label %54
    i32 4, label %52
  ]

52:                                               ; preds = %.critedge.thread
  %53 = call i32 @dictionary_set(ptr noundef nonnull %13, ptr noundef nonnull %3, ptr noundef null) #7
  br label %63

54:                                               ; preds = %.critedge.thread
  %55 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull %3, ptr noundef nonnull %4) #7
  %56 = call i32 @dictionary_set(ptr noundef nonnull %13, ptr noundef nonnull %5, ptr noundef nonnull %6) #7
  br label %63

57:                                               ; preds = %.critedge.thread
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.12, ptr noundef %0, i32 noundef %23) #8
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.13, ptr noundef nonnull %2) #8
  %62 = add nuw nsw i32 %.033.ph.ph, 1
  br label %63

63:                                               ; preds = %.critedge.thread, %57, %54, %52
  %.1 = phi i32 [ %.033.ph.ph, %.critedge.thread ], [ %53, %52 ], [ %56, %54 ], [ %62, %57 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %2, i8 0, i64 1024, i1 false)
  %64 = icmp slt i32 %.1, 0
  br i1 %64, label %.thread, label %.outer.outer, !llvm.loop !9

.thread:                                          ; preds = %63
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.14) #8
  br label %68

67:                                               ; preds = %20
  %.not45 = icmp eq i32 %.033.ph.ph, 0
  br i1 %.not45, label %69, label %68

68:                                               ; preds = %.thread, %67
  call void @dictionary_del(ptr noundef nonnull %13) #7
  br label %69

69:                                               ; preds = %68, %67
  %.0 = phi ptr [ null, %68 ], [ %13, %67 ]
  %70 = call i32 @fclose(ptr noundef nonnull %7)
  br label %71

71:                                               ; preds = %69, %34, %14, %9
  %.037 = phi ptr [ null, %9 ], [ null, %34 ], [ %.0, %69 ], [ null, %14 ]
  call void @llvm.lifetime.end.p0(i64 1025, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 1025, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 1025, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1025, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 1025, ptr nonnull %2) #7
  ret ptr %.037
}

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

declare ptr @dictionary_new(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #1

declare void @dictionary_del(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare hidden i32 @iniparser_line(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { nounwind willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = distinct !{!14, !10}


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