; LLVM IR from ionescu007/minlzma :: minlzdec (minlzdec)

; 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.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@.str = external hidden unnamed_addr constant [57 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [72 x i8], align 1
@stdin = external global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [37 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 ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca %struct.stat, align 8
  %16 = alloca i8, align 1
  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 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 144, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  store ptr null, ptr %6, align 8, !tbaa !9
  store ptr null, ptr %7, align 8, !tbaa !9
  store ptr null, ptr %12, align 8, !tbaa !9
  store ptr null, ptr %13, align 8, !tbaa !9
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp ne i32 %19, 3
  br i1 %20, label %21, label %25

21:                                               ; preds = %2
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %24 = call ptr @__errno_location() #7
  store i32 22, ptr %24, align 4, !tbaa !5
  br label %151

25:                                               ; preds = %2
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = getelementptr inbounds ptr, ptr %26, i64 1
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = call noalias ptr @fopen(ptr noundef %28, ptr noundef @.str.4)
  store ptr %29, ptr %6, align 8, !tbaa !9
  %30 = load ptr, ptr %6, align 8, !tbaa !9
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %37

32:                                               ; preds = %25
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  %34 = getelementptr inbounds ptr, ptr %33, i64 1
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef %35)
  br label %151

37:                                               ; preds = %25
  %38 = load ptr, ptr %6, align 8, !tbaa !9
  %39 = call i32 @fileno(ptr noundef %38) #6
  %40 = call i32 @fstat(i32 noundef %39, ptr noundef %15) #6
  %41 = getelementptr inbounds %struct.stat, ptr %15, i32 0, i32 8
  %42 = load i64, ptr %41, align 8, !tbaa !11
  store i64 %42, ptr %8, align 8, !tbaa !15
  %43 = load i64, ptr %8, align 8, !tbaa !15
  %44 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i64 noundef %43)
  %45 = load i64, ptr %8, align 8, !tbaa !15
  %46 = call noalias ptr @malloc(i64 noundef %45) #8
  store ptr %46, ptr %12, align 8, !tbaa !9
  %47 = load ptr, ptr %12, align 8, !tbaa !9
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %51

49:                                               ; preds = %37
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %151

51:                                               ; preds = %37
  %52 = load ptr, ptr %12, align 8, !tbaa !9
  %53 = load i64, ptr %8, align 8, !tbaa !15
  %54 = load ptr, ptr %6, align 8, !tbaa !9
  %55 = call i64 @fread(ptr noundef %52, i64 noundef 1, i64 noundef %53, ptr noundef %54)
  store i64 %55, ptr %9, align 8, !tbaa !15
  %56 = load i64, ptr %9, align 8, !tbaa !15
  %57 = load i64, ptr %8, align 8, !tbaa !15
  %58 = icmp ne i64 %56, %57
  br i1 %58, label %59, label %63

59:                                               ; preds = %51
  %60 = load i64, ptr %9, align 8, !tbaa !15
  %61 = load i64, ptr %8, align 8, !tbaa !15
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %60, i64 noundef %61)
  br label %151

63:                                               ; preds = %51
  %64 = load i64, ptr %8, align 8, !tbaa !15
  %65 = trunc i64 %64 to i32
  store i32 %65, ptr %10, align 4, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !5
  %66 = load ptr, ptr %12, align 8, !tbaa !9
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = load ptr, ptr %13, align 8, !tbaa !9
  %69 = call zeroext i1 @XzDecode(ptr noundef %66, i32 noundef %67, ptr noundef %68, ptr noundef %11)
  %70 = zext i1 %69 to i8
  store i8 %70, ptr %16, align 1, !tbaa !16
  %71 = load i8, ptr %16, align 1, !tbaa !16, !range !18, !noundef !19
  %72 = trunc i8 %71 to i1
  %73 = zext i1 %72 to i32
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %79

75:                                               ; preds = %63
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %76)
  %78 = call ptr @__errno_location() #7
  store i32 95, ptr %78, align 4, !tbaa !5
  br label %151

79:                                               ; preds = %63
  %80 = call zeroext i1 @XzChecksumError()
  br i1 %80, label %81, label %91

81:                                               ; preds = %79
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %83 = load ptr, ptr @stdin, align 8, !tbaa !9
  %84 = call ptr @fgets(ptr noundef %14, i32 noundef 1, ptr noundef %83)
  %85 = load i8, ptr %14, align 1, !tbaa !20
  %86 = sext i8 %85 to i32
  %87 = icmp ne i32 %86, 89
  br i1 %87, label %88, label %90

88:                                               ; preds = %81
  %89 = call ptr @__errno_location() #7
  store i32 5, ptr %89, align 4, !tbaa !5
  br label %151

90:                                               ; preds = %81
  br label %91

91:                                               ; preds = %90, %79
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = load i32, ptr %10, align 4, !tbaa !5
  %95 = uitofp i32 %94 to double
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = uitofp i32 %96 to double
  %98 = fdiv double %95, %97
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %93, double noundef %98)
  %100 = load i32, ptr %11, align 4, !tbaa !5
  %101 = zext i32 %100 to i64
  %102 = call noalias ptr @malloc(i64 noundef %101) #8
  store ptr %102, ptr %13, align 8, !tbaa !9
  %103 = load ptr, ptr %13, align 8, !tbaa !9
  %104 = icmp eq ptr %103, null
  br i1 %104, label %105, label %107

105:                                              ; preds = %92
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  br label %151

107:                                              ; preds = %92
  %108 = load ptr, ptr %12, align 8, !tbaa !9
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = load ptr, ptr %13, align 8, !tbaa !9
  %111 = call zeroext i1 @XzDecode(ptr noundef %108, i32 noundef %109, ptr noundef %110, ptr noundef %11)
  %112 = zext i1 %111 to i8
  store i8 %112, ptr %16, align 1, !tbaa !16
  %113 = load i8, ptr %16, align 1, !tbaa !16, !range !18, !noundef !19
  %114 = trunc i8 %113 to i1
  %115 = zext i1 %114 to i32
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %121

117:                                              ; preds = %107
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %118)
  %120 = call ptr @__errno_location() #7
  store i32 95, ptr %120, align 4, !tbaa !5
  br label %151

121:                                              ; preds = %107
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %122)
  %124 = load ptr, ptr %5, align 8, !tbaa !9
  %125 = getelementptr inbounds ptr, ptr %124, i64 2
  %126 = load ptr, ptr %125, align 8, !tbaa !9
  %127 = call noalias ptr @fopen(ptr noundef %126, ptr noundef @.str.14)
  store ptr %127, ptr %7, align 8, !tbaa !9
  %128 = load ptr, ptr %7, align 8, !tbaa !9
  %129 = icmp eq ptr %128, null
  br i1 %129, label %130, label %135

130:                                              ; preds = %121
  %131 = load ptr, ptr %5, align 8, !tbaa !9
  %132 = getelementptr inbounds ptr, ptr %131, i64 1
  %133 = load ptr, ptr %132, align 8, !tbaa !9
  %134 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, ptr noundef %133)
  br label %151

135:                                              ; preds = %121
  %136 = load ptr, ptr %13, align 8, !tbaa !9
  %137 = load i32, ptr %11, align 4, !tbaa !5
  %138 = zext i32 %137 to i64
  %139 = load ptr, ptr %7, align 8, !tbaa !9
  %140 = call i64 @fwrite(ptr noundef %136, i64 noundef 1, i64 noundef %138, ptr noundef %139)
  store i64 %140, ptr %8, align 8, !tbaa !15
  %141 = load i64, ptr %8, align 8, !tbaa !15
  %142 = load i32, ptr %11, align 4, !tbaa !5
  %143 = zext i32 %142 to i64
  %144 = icmp ne i64 %141, %143
  br i1 %144, label %145, label %149

145:                                              ; preds = %135
  %146 = load i64, ptr %8, align 8, !tbaa !15
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i64 noundef %146, i32 noundef %147)
  br label %151

149:                                              ; preds = %135
  %150 = call ptr @__errno_location() #7
  store i32 0, ptr %150, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %149, %145, %130, %117, %105, %88, %75, %59, %49, %32, %21
  %152 = load ptr, ptr %13, align 8, !tbaa !9
  %153 = icmp ne ptr %152, null
  br i1 %153, label %154, label %156

154:                                              ; preds = %151
  %155 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %155) #6
  br label %156

156:                                              ; preds = %154, %151
  %157 = load ptr, ptr %12, align 8, !tbaa !9
  %158 = icmp ne ptr %157, null
  br i1 %158, label %159, label %161

159:                                              ; preds = %156
  %160 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %160) #6
  br label %161

161:                                              ; preds = %159, %156
  %162 = load ptr, ptr %7, align 8, !tbaa !9
  %163 = icmp ne ptr %162, null
  br i1 %163, label %164, label %169

164:                                              ; preds = %161
  %165 = load ptr, ptr %7, align 8, !tbaa !9
  %166 = call i32 @fflush(ptr noundef %165)
  %167 = load ptr, ptr %7, align 8, !tbaa !9
  %168 = call i32 @fclose(ptr noundef %167)
  br label %169

169:                                              ; preds = %164, %161
  %170 = load ptr, ptr %6, align 8, !tbaa !9
  %171 = icmp ne ptr %170, null
  br i1 %171, label %172, label %175

172:                                              ; preds = %169
  %173 = load ptr, ptr %6, align 8, !tbaa !9
  %174 = call i32 @fclose(ptr noundef %173)
  br label %175

175:                                              ; preds = %172, %169
  %176 = call ptr @__errno_location() #7
  %177 = load i32, ptr %176, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 144, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  ret i32 %177
}

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

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #3

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

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

; Function Attrs: nounwind
declare i32 @fileno(ptr noundef) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare zeroext i1 @XzDecode(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare zeroext i1 @XzChecksumError() #2

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

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

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

declare i32 @fflush(ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

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

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

!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, !13, i64 48}
!12 = !{!"stat", !13, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !14, i64 72, !14, i64 88, !14, i64 104, !7, i64 120}
!13 = !{!"long", !7, i64 0}
!14 = !{!"timespec", !13, i64 0, !13, i64 8}
!15 = !{!13, !13, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"_Bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!7, !7, i64 0}


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

%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@.str = external hidden unnamed_addr constant [57 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [72 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca %struct.stat, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %5) #7
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %.not = icmp eq i32 %0, 3
  br i1 %.not, label %12, label %8

8:                                                ; preds = %2
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %11 = tail call ptr @__errno_location() #8
  store i32 22, ptr %11, align 4, !tbaa !5
  br label %.thread102

12:                                               ; preds = %2
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = tail call noalias ptr @fopen(ptr noundef %14, ptr noundef nonnull @.str.4)
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %20

17:                                               ; preds = %12
  %18 = load ptr, ptr %13, align 8, !tbaa !9
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef %18)
  br label %.thread102

20:                                               ; preds = %12
  %21 = tail call i32 @fileno(ptr noundef nonnull %15) #7
  %22 = call i32 @fstat(i32 noundef %21, ptr noundef nonnull %5) #7
  %23 = getelementptr inbounds i8, ptr %5, i64 48
  %24 = load i64, ptr %23, align 8, !tbaa !11
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i64 noundef %24)
  %26 = tail call noalias ptr @malloc(i64 noundef %24) #9
  %27 = icmp eq ptr %26, null
  br i1 %27, label %89, label %28

28:                                               ; preds = %20
  %29 = tail call i64 @fread(ptr noundef nonnull %26, i64 noundef 1, i64 noundef %24, ptr noundef nonnull %15)
  %.not55 = icmp eq i64 %29, %24
  br i1 %.not55, label %32, label %30

30:                                               ; preds = %28
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %29, i64 noundef %24)
  br label %.thread91

32:                                               ; preds = %28
  %33 = trunc i64 %24 to i32
  store i32 0, ptr %3, align 4, !tbaa !5
  %34 = call zeroext i1 @XzDecode(ptr noundef nonnull %26, i32 noundef %33, ptr noundef null, ptr noundef nonnull %3) #7
  br i1 %34, label %39, label %35

35:                                               ; preds = %32
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %36)
  %38 = tail call ptr @__errno_location() #8
  store i32 95, ptr %38, align 4, !tbaa !5
  br label %.thread91

39:                                               ; preds = %32
  %40 = call zeroext i1 @XzChecksumError() #7
  br i1 %40, label %41, label %48

41:                                               ; preds = %39
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %43 = load ptr, ptr @stdin, align 8, !tbaa !9
  %44 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 1, ptr noundef %43)
  %45 = load i8, ptr %4, align 1, !tbaa !15
  %.not56 = icmp eq i8 %45, 89
  br i1 %.not56, label %48, label %46

46:                                               ; preds = %41
  %47 = tail call ptr @__errno_location() #8
  store i32 5, ptr %47, align 4, !tbaa !5
  br label %.thread91

48:                                               ; preds = %39, %41
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = uitofp i32 %33 to double
  %51 = uitofp i32 %49 to double
  %52 = fdiv double %50, %51
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %49, double noundef %52)
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = zext i32 %54 to i64
  %56 = call noalias ptr @malloc(i64 noundef %55) #9
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %60

58:                                               ; preds = %48
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  br label %.thread91

60:                                               ; preds = %48
  %61 = call zeroext i1 @XzDecode(ptr noundef nonnull %26, i32 noundef %33, ptr noundef nonnull %56, ptr noundef nonnull %3) #7
  %62 = load i32, ptr %3, align 4, !tbaa !5
  br i1 %61, label %66, label %63

63:                                               ; preds = %60
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %62)
  %65 = tail call ptr @__errno_location() #8
  store i32 95, ptr %65, align 4, !tbaa !5
  br label %85

66:                                               ; preds = %60
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %62)
  %68 = getelementptr inbounds i8, ptr %1, i64 16
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = call noalias ptr @fopen(ptr noundef %69, ptr noundef nonnull @.str.14)
  %71 = icmp eq ptr %70, null
  br i1 %71, label %72, label %75

72:                                               ; preds = %66
  %73 = load ptr, ptr %13, align 8, !tbaa !9
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, ptr noundef %73)
  br label %85

75:                                               ; preds = %66
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = zext i32 %76 to i64
  %78 = call i64 @fwrite(ptr noundef nonnull %56, i64 noundef 1, i64 noundef %77, ptr noundef nonnull %70)
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = zext i32 %79 to i64
  %.not57 = icmp eq i64 %78, %80
  br i1 %.not57, label %83, label %81

81:                                               ; preds = %75
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i64 noundef %78, i32 noundef %79)
  br label %85

83:                                               ; preds = %75
  %84 = tail call ptr @__errno_location() #8
  store i32 0, ptr %84, align 4, !tbaa !5
  br label %85

.thread91:                                        ; preds = %30, %35, %46, %58
  call void @free(ptr noundef nonnull %26) #7
  br label %.thread97

85:                                               ; preds = %83, %81, %72, %63
  %.043 = phi ptr [ null, %63 ], [ null, %72 ], [ %70, %81 ], [ %70, %83 ]
  call void @free(ptr noundef nonnull %56) #7
  call void @free(ptr noundef nonnull %26) #7
  %.not60 = icmp eq ptr %.043, null
  br i1 %.not60, label %.thread97, label %86

86:                                               ; preds = %85
  %87 = call i32 @fflush(ptr noundef nonnull %.043)
  %88 = call i32 @fclose(ptr noundef nonnull %.043)
  br label %.thread97

89:                                               ; preds = %20
  %90 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %.thread97

.thread97:                                        ; preds = %.thread91, %85, %86, %89
  %91 = call i32 @fclose(ptr noundef nonnull %15)
  br label %.thread102

.thread102:                                       ; preds = %17, %8, %.thread97
  %92 = tail call ptr @__errno_location() #8
  %93 = load i32, ptr %92, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret i32 %93
}

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

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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

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

declare zeroext i1 @XzDecode(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare zeroext i1 @XzChecksumError() local_unnamed_addr #5

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

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

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

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

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

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

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 = { 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 #3 = { 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 #4 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #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 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { nounwind allocsize(0) }

!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, !13, i64 48}
!12 = !{!"stat", !13, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !14, i64 72, !14, i64 88, !14, i64 104, !7, i64 120}
!13 = !{!"long", !7, i64 0}
!14 = !{!"timespec", !13, i64 0, !13, i64 8}
!15 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass