; LLVM IR from google/zopfli :: src/zopfli (zopfli_bin)

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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [276 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [218 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 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 [71 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [47 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.ZopfliOptions, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @ZopfliInitOptions(ptr noundef %6)
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %109, %2
  %15 = load i32, ptr %10, align 4, !tbaa !5
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %18, label %112

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = load i32, ptr %10, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds ptr, ptr %19, i64 %21
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %23, ptr %11, align 8, !tbaa !9
  %24 = load ptr, ptr %11, align 8, !tbaa !9
  %25 = call signext i8 @StringsEqual(ptr noundef %24, ptr noundef @.str)
  %26 = icmp ne i8 %25, 0
  br i1 %26, label %27, label %29

27:                                               ; preds = %18
  %28 = getelementptr inbounds %struct.ZopfliOptions, ptr %6, i32 0, i32 0
  store i32 1, ptr %28, align 4, !tbaa !11
  br label %105

29:                                               ; preds = %18
  %30 = load ptr, ptr %11, align 8, !tbaa !9
  %31 = call signext i8 @StringsEqual(ptr noundef %30, ptr noundef @.str.1)
  %32 = icmp ne i8 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %29
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %104

34:                                               ; preds = %29
  %35 = load ptr, ptr %11, align 8, !tbaa !9
  %36 = call signext i8 @StringsEqual(ptr noundef %35, ptr noundef @.str.2)
  %37 = icmp ne i8 %36, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %34
  store i32 2, ptr %7, align 4, !tbaa !5
  br label %103

39:                                               ; preds = %34
  %40 = load ptr, ptr %11, align 8, !tbaa !9
  %41 = call signext i8 @StringsEqual(ptr noundef %40, ptr noundef @.str.3)
  %42 = icmp ne i8 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %39
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %102

44:                                               ; preds = %39
  %45 = load ptr, ptr %11, align 8, !tbaa !9
  %46 = call signext i8 @StringsEqual(ptr noundef %45, ptr noundef @.str.4)
  %47 = icmp ne i8 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %101

49:                                               ; preds = %44
  %50 = load ptr, ptr %11, align 8, !tbaa !9
  %51 = call signext i8 @StringsEqual(ptr noundef %50, ptr noundef @.str.5)
  %52 = icmp ne i8 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %49
  br label %100

54:                                               ; preds = %49
  %55 = load ptr, ptr %11, align 8, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %55, i64 0
  %57 = load i8, ptr %56, align 1, !tbaa !13
  %58 = sext i8 %57 to i32
  %59 = icmp eq i32 %58, 45
  br i1 %59, label %60, label %89

60:                                               ; preds = %54
  %61 = load ptr, ptr %11, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %61, i64 1
  %63 = load i8, ptr %62, align 1, !tbaa !13
  %64 = sext i8 %63 to i32
  %65 = icmp eq i32 %64, 45
  br i1 %65, label %66, label %89

66:                                               ; preds = %60
  %67 = load ptr, ptr %11, align 8, !tbaa !9
  %68 = getelementptr inbounds i8, ptr %67, i64 2
  %69 = load i8, ptr %68, align 1, !tbaa !13
  %70 = sext i8 %69 to i32
  %71 = icmp eq i32 %70, 105
  br i1 %71, label %72, label %89

72:                                               ; preds = %66
  %73 = load ptr, ptr %11, align 8, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %73, i64 3
  %75 = load i8, ptr %74, align 1, !tbaa !13
  %76 = sext i8 %75 to i32
  %77 = icmp sge i32 %76, 48
  br i1 %77, label %78, label %89

78:                                               ; preds = %72
  %79 = load ptr, ptr %11, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %79, i64 3
  %81 = load i8, ptr %80, align 1, !tbaa !13
  %82 = sext i8 %81 to i32
  %83 = icmp sle i32 %82, 57
  br i1 %83, label %84, label %89

84:                                               ; preds = %78
  %85 = load ptr, ptr %11, align 8, !tbaa !9
  %86 = getelementptr inbounds i8, ptr %85, i64 3
  %87 = call i32 @atoi(ptr noundef %86) #7
  %88 = getelementptr inbounds %struct.ZopfliOptions, ptr %6, i32 0, i32 2
  store i32 %87, ptr %88, align 4, !tbaa !14
  br label %99

89:                                               ; preds = %78, %72, %66, %60, %54
  %90 = load ptr, ptr %11, align 8, !tbaa !9
  %91 = call signext i8 @StringsEqual(ptr noundef %90, ptr noundef @.str.6)
  %92 = icmp ne i8 %91, 0
  br i1 %92, label %93, label %98

93:                                               ; preds = %89
  %94 = load ptr, ptr @stderr, align 8, !tbaa !9
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef @.str.7) #6
  %96 = load ptr, ptr @stderr, align 8, !tbaa !9
  %97 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.8) #6
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %106

98:                                               ; preds = %89
  br label %99

99:                                               ; preds = %98, %84
  br label %100

100:                                              ; preds = %99, %53
  br label %101

101:                                              ; preds = %100, %48
  br label %102

102:                                              ; preds = %101, %43
  br label %103

103:                                              ; preds = %102, %38
  br label %104

104:                                              ; preds = %103, %33
  br label %105

105:                                              ; preds = %104, %27
  store i32 0, ptr %12, align 4
  br label %106

106:                                              ; preds = %105, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %107 = load i32, ptr %12, align 4
  switch i32 %107, label %195 [
    i32 0, label %108
  ]

108:                                              ; preds = %106
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %10, align 4, !tbaa !5
  br label %14, !llvm.loop !15

112:                                              ; preds = %14
  %113 = getelementptr inbounds %struct.ZopfliOptions, ptr %6, i32 0, i32 2
  %114 = load i32, ptr %113, align 4, !tbaa !14
  %115 = icmp slt i32 %114, 1
  br i1 %115, label %116, label %119

116:                                              ; preds = %112
  %117 = load ptr, ptr @stderr, align 8, !tbaa !9
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef @.str.9) #6
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %195

119:                                              ; preds = %112
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %182, %119
  %121 = load i32, ptr %10, align 4, !tbaa !5
  %122 = load i32, ptr %4, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %124, label %185

124:                                              ; preds = %120
  %125 = load ptr, ptr %5, align 8, !tbaa !9
  %126 = load i32, ptr %10, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %125, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !9
  %130 = getelementptr inbounds i8, ptr %129, i64 0
  %131 = load i8, ptr %130, align 1, !tbaa !13
  %132 = sext i8 %131 to i32
  %133 = icmp ne i32 %132, 45
  br i1 %133, label %134, label %181

134:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %135 = load ptr, ptr %5, align 8, !tbaa !9
  %136 = load i32, ptr %10, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds ptr, ptr %135, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !9
  store ptr %139, ptr %8, align 8, !tbaa !9
  %140 = load i32, ptr %9, align 4, !tbaa !5
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %143

142:                                              ; preds = %134
  store ptr null, ptr %13, align 8, !tbaa !9
  br label %165

143:                                              ; preds = %134
  %144 = load i32, ptr %7, align 4, !tbaa !5
  %145 = icmp eq i32 %144, 0
  br i1 %145, label %146, label %149

146:                                              ; preds = %143
  %147 = load ptr, ptr %8, align 8, !tbaa !9
  %148 = call ptr @AddStrings(ptr noundef %147, ptr noundef @.str.10)
  store ptr %148, ptr %13, align 8, !tbaa !9
  br label %164

149:                                              ; preds = %143
  %150 = load i32, ptr %7, align 4, !tbaa !5
  %151 = icmp eq i32 %150, 1
  br i1 %151, label %152, label %155

152:                                              ; preds = %149
  %153 = load ptr, ptr %8, align 8, !tbaa !9
  %154 = call ptr @AddStrings(ptr noundef %153, ptr noundef @.str.11)
  store ptr %154, ptr %13, align 8, !tbaa !9
  br label %163

155:                                              ; preds = %149
  %156 = load i32, ptr %7, align 4, !tbaa !5
  %157 = icmp eq i32 %156, 2
  br i1 %157, label %158, label %159

158:                                              ; preds = %155
  br label %160

159:                                              ; preds = %155
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.13, i32 noundef 202, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

160:                                              ; preds = %158
  %161 = load ptr, ptr %8, align 8, !tbaa !9
  %162 = call ptr @AddStrings(ptr noundef %161, ptr noundef @.str.14)
  store ptr %162, ptr %13, align 8, !tbaa !9
  br label %163

163:                                              ; preds = %160, %152
  br label %164

164:                                              ; preds = %163, %146
  br label %165

165:                                              ; preds = %164, %142
  %166 = getelementptr inbounds %struct.ZopfliOptions, ptr %6, i32 0, i32 0
  %167 = load i32, ptr %166, align 4, !tbaa !11
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %176

169:                                              ; preds = %165
  %170 = load ptr, ptr %13, align 8, !tbaa !9
  %171 = icmp ne ptr %170, null
  br i1 %171, label %172, label %176

172:                                              ; preds = %169
  %173 = load ptr, ptr @stderr, align 8, !tbaa !9
  %174 = load ptr, ptr %13, align 8, !tbaa !9
  %175 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %173, ptr noundef @.str.15, ptr noundef %174) #6
  br label %176

176:                                              ; preds = %172, %169, %165
  %177 = load i32, ptr %7, align 4, !tbaa !5
  %178 = load ptr, ptr %8, align 8, !tbaa !9
  %179 = load ptr, ptr %13, align 8, !tbaa !9
  call void @CompressFile(ptr noundef %6, i32 noundef %177, ptr noundef %178, ptr noundef %179)
  %180 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %180) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %181

181:                                              ; preds = %176, %124
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %10, align 4, !tbaa !5
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %10, align 4, !tbaa !5
  br label %120, !llvm.loop !17

185:                                              ; preds = %120
  %186 = load ptr, ptr %8, align 8, !tbaa !9
  %187 = icmp ne ptr %186, null
  br i1 %187, label %194, label %188

188:                                              ; preds = %185
  %189 = load ptr, ptr @stderr, align 8, !tbaa !9
  %190 = load ptr, ptr %5, align 8, !tbaa !9
  %191 = getelementptr inbounds ptr, ptr %190, i64 0
  %192 = load ptr, ptr %191, align 8, !tbaa !9
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef @.str.16, ptr noundef %192) #6
  br label %194

194:                                              ; preds = %188, %185
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %195

195:                                              ; preds = %194, %116, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  %196 = load i32, ptr %3, align 4
  ret i32 %196
}

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

declare void @ZopfliInitOptions(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden signext i8 @StringsEqual(ptr noundef, ptr noundef) #0

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @AddStrings(ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @CompressFile(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

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 = { inlinehint nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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}
!11 = !{!12, !6, i64 0}
!12 = !{!"ZopfliOptions", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!13 = !{!7, !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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

%struct.ZopfliOptions = type { i32, i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [276 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [218 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [47 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.ZopfliOptions, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @ZopfliInitOptions(ptr noundef nonnull %3) #6
  %4 = icmp sgt i32 %0, 1
  %5 = getelementptr inbounds i8, ptr %3, i64 8
  br i1 %4, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %2
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %6

6:                                                ; preds = %.lr.ph, %45
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %45 ]
  %.04678 = phi i32 [ 0, %.lr.ph ], [ %.248.ph, %45 ]
  %.05177 = phi i32 [ 0, %.lr.ph ], [ %.253.ph, %45 ]
  %7 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = call signext i8 @StringsEqual(ptr noundef %8, ptr noundef nonnull @.str)
  %.not58 = icmp eq i8 %9, 0
  br i1 %.not58, label %11, label %10

10:                                               ; preds = %6
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %45

11:                                               ; preds = %6
  %12 = call signext i8 @StringsEqual(ptr noundef %8, ptr noundef nonnull @.str.1)
  %.not59 = icmp eq i8 %12, 0
  br i1 %.not59, label %13, label %45

13:                                               ; preds = %11
  %14 = call signext i8 @StringsEqual(ptr noundef %8, ptr noundef nonnull @.str.2)
  %.not60 = icmp eq i8 %14, 0
  br i1 %.not60, label %15, label %45

15:                                               ; preds = %13
  %16 = call signext i8 @StringsEqual(ptr noundef %8, ptr noundef nonnull @.str.3)
  %.not61 = icmp eq i8 %16, 0
  br i1 %.not61, label %17, label %45

17:                                               ; preds = %15
  %18 = call signext i8 @StringsEqual(ptr noundef %8, ptr noundef nonnull @.str.4)
  %.not62 = icmp eq i8 %18, 0
  br i1 %.not62, label %19, label %45

19:                                               ; preds = %17
  %20 = call signext i8 @StringsEqual(ptr noundef %8, ptr noundef nonnull @.str.5)
  %.not63 = icmp eq i8 %20, 0
  br i1 %.not63, label %21, label %45

21:                                               ; preds = %19
  %22 = load i8, ptr %8, align 1, !tbaa !12
  %23 = icmp eq i8 %22, 45
  br i1 %23, label %24, label %38

24:                                               ; preds = %21
  %25 = getelementptr inbounds i8, ptr %8, i64 1
  %26 = load i8, ptr %25, align 1, !tbaa !12
  %27 = icmp eq i8 %26, 45
  br i1 %27, label %28, label %38

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %8, i64 2
  %30 = load i8, ptr %29, align 1, !tbaa !12
  %31 = icmp eq i8 %30, 105
  br i1 %31, label %32, label %38

32:                                               ; preds = %28
  %33 = getelementptr inbounds i8, ptr %8, i64 3
  %34 = load i8, ptr %33, align 1, !tbaa !12
  %35 = add i8 %34, -48
  %or.cond65 = icmp ult i8 %35, 10
  br i1 %or.cond65, label %36, label %38

36:                                               ; preds = %32
  %37 = call i32 @atoi(ptr nocapture noundef %33) #7
  store i32 %37, ptr %5, align 4, !tbaa !13
  br label %45

38:                                               ; preds = %32, %28, %24, %21
  %39 = call signext i8 @StringsEqual(ptr noundef nonnull %8, ptr noundef nonnull @.str.6)
  %.not64 = icmp eq i8 %39, 0
  br i1 %.not64, label %45, label %40

40:                                               ; preds = %38
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.7) #8
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.8) #8
  br label %74

45:                                               ; preds = %17, %15, %13, %11, %19, %38, %36, %10
  %.253.ph = phi i32 [ 0, %17 ], [ 1, %15 ], [ 2, %13 ], [ %.05177, %11 ], [ %.05177, %38 ], [ %.05177, %36 ], [ %.05177, %19 ], [ %.05177, %10 ]
  %.248.ph = phi i32 [ %.04678, %17 ], [ %.04678, %15 ], [ %.04678, %13 ], [ 1, %11 ], [ %.04678, %38 ], [ %.04678, %36 ], [ %.04678, %19 ], [ %.04678, %10 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %6, !llvm.loop !14

._crit_edge:                                      ; preds = %45
  %46 = icmp eq i32 %.248.ph, 0
  %47 = getelementptr inbounds i8, ptr %3, i64 8
  %48 = load i32, ptr %47, align 4, !tbaa !13
  %49 = icmp slt i32 %48, 1
  br i1 %49, label %64, label %.preheader

._crit_edge.thread:                               ; preds = %2
  %50 = load i32, ptr %5, align 4, !tbaa !13
  %51 = icmp slt i32 %50, 1
  br i1 %51, label %64, label %._crit_edge84.thread

.preheader:                                       ; preds = %._crit_edge
  br i1 %4, label %.lr.ph83, label %._crit_edge84.thread

.lr.ph83:                                         ; preds = %.preheader
  %wide.trip.count96 = zext nneg i32 %0 to i64
  br i1 %46, label %.lr.ph83.split.us.preheader, label %.lr.ph83.split

.lr.ph83.split.us.preheader:                      ; preds = %.lr.ph83
  %switch.selectcmp = icmp eq i32 %.253.ph, 1
  %switch.select = select i1 %switch.selectcmp, ptr @.str.11, ptr @.str.14
  %switch.selectcmp107 = icmp eq i32 %.253.ph, 0
  %switch.select108 = select i1 %switch.selectcmp107, ptr @.str.10, ptr %switch.select
  br label %.lr.ph83.split.us

.lr.ph83.split.us:                                ; preds = %.lr.ph83.split.us.preheader, %63
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %63 ], [ 1, %.lr.ph83.split.us.preheader ]
  %.04981.us = phi ptr [ %.150.us, %63 ], [ null, %.lr.ph83.split.us.preheader ]
  %52 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv93
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = load i8, ptr %53, align 1, !tbaa !12
  %.not56.us = icmp eq i8 %54, 45
  br i1 %.not56.us, label %63, label %55

55:                                               ; preds = %.lr.ph83.split.us
  %56 = call ptr @AddStrings(ptr noundef nonnull %53, ptr noundef nonnull %switch.select108)
  %57 = load i32, ptr %3, align 4, !tbaa !9
  %58 = icmp ne i32 %57, 0
  %59 = icmp ne ptr %56, null
  %or.cond.us = select i1 %58, i1 %59, i1 false
  br i1 %or.cond.us, label %60, label %.thread71.us

60:                                               ; preds = %55
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.15, ptr noundef nonnull %56) #8
  br label %.thread71.us

.thread71.us:                                     ; preds = %60, %55
  call void @CompressFile(ptr noundef nonnull %3, i32 noundef %.253.ph, ptr noundef nonnull %53, ptr noundef %56)
  call void @free(ptr noundef %56) #6
  br label %63

63:                                               ; preds = %.thread71.us, %.lr.ph83.split.us
  %.150.us = phi ptr [ %53, %.thread71.us ], [ %.04981.us, %.lr.ph83.split.us ]
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %._crit_edge84, label %.lr.ph83.split.us, !llvm.loop !16

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

.lr.ph83.split:                                   ; preds = %.lr.ph83, %70
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %70 ], [ 1, %.lr.ph83 ]
  %.04981 = phi ptr [ %.150, %70 ], [ null, %.lr.ph83 ]
  %67 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv88
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = load i8, ptr %68, align 1, !tbaa !12
  %.not56 = icmp eq i8 %69, 45
  br i1 %.not56, label %70, label %.thread71

.thread71:                                        ; preds = %.lr.ph83.split
  call void @CompressFile(ptr noundef nonnull %3, i32 noundef %.253.ph, ptr noundef nonnull %68, ptr noundef null)
  br label %70

70:                                               ; preds = %.lr.ph83.split, %.thread71
  %.150 = phi ptr [ %68, %.thread71 ], [ %.04981, %.lr.ph83.split ]
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count96
  br i1 %exitcond92.not, label %._crit_edge84, label %.lr.ph83.split, !llvm.loop !16

._crit_edge84:                                    ; preds = %70, %63
  %.049.lcssa = phi ptr [ %.150.us, %63 ], [ %.150, %70 ]
  %.not = icmp eq ptr %.049.lcssa, null
  br i1 %.not, label %._crit_edge84.thread, label %74

._crit_edge84.thread:                             ; preds = %._crit_edge.thread, %.preheader, %._crit_edge84
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = load ptr, ptr %1, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.16, ptr noundef %72) #8
  br label %74

74:                                               ; preds = %40, %._crit_edge84, %._crit_edge84.thread, %64
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  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 void @ZopfliInitOptions(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden signext i8 @StringsEqual(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @AddStrings(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @CompressFile(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

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 = { inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { cold nounwind }

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

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


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