; LLVM IR from reworks-org/galaxy :: deps/sfml_deps/flac-src/oss-fuzz (tool_metaflac)

; 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._G_fpos_t = type { i64, %struct.__mbstate_t }
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }

@__const.LLVMFuzzerTestOneInput.exename = external hidden unnamed_addr constant [9 x i8], align 1
@__const.LLVMFuzzerTestOneInput.filename = external hidden unnamed_addr constant [16 x i8], align 16
@__const.LLVMFuzzerTestOneInput.filename_stdin = external hidden unnamed_addr constant [16 x i8], align 16
@share__opterr = external global i32, align 4
@share__optind = external global i32, align 4
@stdout = external global ptr, align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LLVMFuzzerTestOneInput(ptr noundef %0, i64 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca [64 x ptr], align 16
  %9 = alloca [9 x i8], align 1
  %10 = alloca [16 x i8], align 16
  %11 = alloca [16 x i8], align 16
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct._G_fpos_t, align 8
  %18 = alloca i8, align 1
  %19 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %20 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %20, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 512, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 9, ptr %9) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %9, ptr align 1 @__const.LLVMFuzzerTestOneInput.exename, i64 9, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 @__const.LLVMFuzzerTestOneInput.filename, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 @__const.LLVMFuzzerTestOneInput.filename_stdin, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  store i8 0, ptr %18, align 1, !tbaa !13
  store i32 0, ptr @share__opterr, align 4, !tbaa !11
  store i32 0, ptr @share__optind, align 4, !tbaa !11
  %21 = load i64, ptr %5, align 8, !tbaa !9
  %22 = icmp ult i64 %21, 2
  br i1 %22, label %23, label %24

23:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  store i32 1, ptr %19, align 4
  br label %189

24:                                               ; preds = %2
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 0
  %27 = load i8, ptr %26, align 1, !tbaa !15
  %28 = zext i8 %27 to i32
  %29 = and i32 %28, 15
  store i32 %29, ptr %13, align 4, !tbaa !11
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 0
  %32 = load i8, ptr %31, align 1, !tbaa !15
  %33 = zext i8 %32 to i32
  %34 = and i32 %33, 16
  %35 = icmp ne i32 %34, 0
  %36 = zext i1 %35 to i8
  store i8 %36, ptr %18, align 1, !tbaa !13
  %37 = load i64, ptr %6, align 8, !tbaa !9
  %38 = add i64 %37, -1
  store i64 %38, ptr %6, align 8, !tbaa !9
  %39 = getelementptr inbounds [9 x i8], ptr %9, i64 0, i64 0
  %40 = getelementptr inbounds [64 x ptr], ptr %8, i64 0, i64 0
  store ptr %39, ptr %40, align 16, !tbaa !5
  %41 = load i32, ptr %12, align 4, !tbaa !11
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %12, align 4, !tbaa !11
  br label %43

43:                                               ; preds = %59, %24
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = load i64, ptr %5, align 8, !tbaa !9
  %46 = load i64, ptr %6, align 8, !tbaa !9
  %47 = sub i64 %45, %46
  %48 = getelementptr inbounds i8, ptr %44, i64 %47
  %49 = load i64, ptr %6, align 8, !tbaa !9
  %50 = call i64 @strnlen(ptr noundef %48, i64 noundef %49) #8
  store i64 %50, ptr %7, align 8, !tbaa !9
  %51 = load i64, ptr %6, align 8, !tbaa !9
  %52 = icmp ult i64 %50, %51
  br i1 %52, label %53, label %57

53:                                               ; preds = %43
  %54 = load i32, ptr %12, align 4, !tbaa !11
  %55 = load i32, ptr %13, align 4, !tbaa !11
  %56 = icmp slt i32 %54, %55
  br label %57

57:                                               ; preds = %53, %43
  %58 = phi i1 [ false, %43 ], [ %56, %53 ]
  br i1 %58, label %59, label %73

59:                                               ; preds = %57
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = load i64, ptr %5, align 8, !tbaa !9
  %62 = load i64, ptr %6, align 8, !tbaa !9
  %63 = sub i64 %61, %62
  %64 = getelementptr inbounds i8, ptr %60, i64 %63
  %65 = load i32, ptr %12, align 4, !tbaa !11
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %12, align 4, !tbaa !11
  %67 = sext i32 %65 to i64
  %68 = getelementptr inbounds [64 x ptr], ptr %8, i64 0, i64 %67
  store ptr %64, ptr %68, align 8, !tbaa !5
  %69 = load i64, ptr %7, align 8, !tbaa !9
  %70 = add i64 %69, 1
  %71 = load i64, ptr %6, align 8, !tbaa !9
  %72 = sub i64 %71, %70
  store i64 %72, ptr %6, align 8, !tbaa !9
  br label %43, !llvm.loop !16

73:                                               ; preds = %57
  %74 = getelementptr inbounds [16 x i8], ptr %10, i64 0, i64 0
  %75 = call i32 @mkstemp(ptr noundef %74)
  store i32 %75, ptr %14, align 4, !tbaa !11
  %76 = load i32, ptr %14, align 4, !tbaa !11
  %77 = icmp slt i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %73
  call void @abort() #9
  unreachable

79:                                               ; preds = %73
  %80 = load i8, ptr %18, align 1, !tbaa !13, !range !18, !noundef !19
  %81 = trunc i8 %80 to i1
  br i1 %81, label %82, label %96

82:                                               ; preds = %79
  %83 = load i32, ptr %14, align 4, !tbaa !11
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = load i64, ptr %5, align 8, !tbaa !9
  %86 = load i64, ptr %6, align 8, !tbaa !9
  %87 = sub i64 %85, %86
  %88 = getelementptr inbounds i8, ptr %84, i64 %87
  %89 = load i64, ptr %6, align 8, !tbaa !9
  %90 = udiv i64 %89, 2
  %91 = call i64 @write(i32 noundef %83, ptr noundef %88, i64 noundef %90)
  %92 = load i64, ptr %6, align 8, !tbaa !9
  %93 = udiv i64 %92, 2
  %94 = load i64, ptr %6, align 8, !tbaa !9
  %95 = sub i64 %94, %93
  store i64 %95, ptr %6, align 8, !tbaa !9
  br label %105

96:                                               ; preds = %79
  %97 = load i32, ptr %14, align 4, !tbaa !11
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = load i64, ptr %5, align 8, !tbaa !9
  %100 = load i64, ptr %6, align 8, !tbaa !9
  %101 = sub i64 %99, %100
  %102 = getelementptr inbounds i8, ptr %98, i64 %101
  %103 = load i64, ptr %6, align 8, !tbaa !9
  %104 = call i64 @write(i32 noundef %97, ptr noundef %102, i64 noundef %103)
  br label %105

105:                                              ; preds = %96, %82
  %106 = load i32, ptr %14, align 4, !tbaa !11
  %107 = call i32 @close(i32 noundef %106)
  %108 = getelementptr inbounds [16 x i8], ptr %10, i64 0, i64 0
  %109 = load i32, ptr %12, align 4, !tbaa !11
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %12, align 4, !tbaa !11
  %111 = sext i32 %109 to i64
  %112 = getelementptr inbounds [64 x ptr], ptr %8, i64 0, i64 %111
  store ptr %108, ptr %112, align 8, !tbaa !5
  %113 = load i8, ptr %18, align 1, !tbaa !13, !range !18, !noundef !19
  %114 = trunc i8 %113 to i1
  br i1 %114, label %115, label %132

115:                                              ; preds = %105
  %116 = getelementptr inbounds [16 x i8], ptr %11, i64 0, i64 0
  %117 = call i32 @mkstemp(ptr noundef %116)
  store i32 %117, ptr %14, align 4, !tbaa !11
  %118 = load i32, ptr %14, align 4, !tbaa !11
  %119 = icmp slt i32 %118, 0
  br i1 %119, label %120, label %121

120:                                              ; preds = %115
  call void @abort() #9
  unreachable

121:                                              ; preds = %115
  %122 = load i32, ptr %14, align 4, !tbaa !11
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = load i64, ptr %5, align 8, !tbaa !9
  %125 = load i64, ptr %6, align 8, !tbaa !9
  %126 = sub i64 %124, %125
  %127 = getelementptr inbounds i8, ptr %123, i64 %126
  %128 = load i64, ptr %6, align 8, !tbaa !9
  %129 = call i64 @write(i32 noundef %122, ptr noundef %127, i64 noundef %128)
  %130 = load i32, ptr %14, align 4, !tbaa !11
  %131 = call i32 @close(i32 noundef %130)
  br label %132

132:                                              ; preds = %121, %105
  %133 = load ptr, ptr @stdout, align 8, !tbaa !5
  %134 = call i32 @fflush(ptr noundef %133)
  %135 = load ptr, ptr @stdout, align 8, !tbaa !5
  %136 = call i32 @fgetpos(ptr noundef %135, ptr noundef %17)
  %137 = load ptr, ptr @stdout, align 8, !tbaa !5
  %138 = call i32 @fileno(ptr noundef %137) #7
  %139 = call i32 @dup(i32 noundef %138) #7
  store i32 %139, ptr %15, align 4, !tbaa !11
  %140 = load ptr, ptr @stdout, align 8, !tbaa !5
  %141 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %140)
  %142 = load ptr, ptr @stdin, align 8, !tbaa !5
  %143 = call i32 @fileno(ptr noundef %142) #7
  %144 = call i32 @dup(i32 noundef %143) #7
  store i32 %144, ptr %16, align 4, !tbaa !11
  %145 = load i8, ptr %18, align 1, !tbaa !13, !range !18, !noundef !19
  %146 = trunc i8 %145 to i1
  br i1 %146, label %147, label %151

147:                                              ; preds = %132
  %148 = getelementptr inbounds [16 x i8], ptr %11, i64 0, i64 0
  %149 = load ptr, ptr @stdin, align 8, !tbaa !5
  %150 = call ptr @freopen(ptr noundef %148, ptr noundef @.str.2, ptr noundef %149)
  br label %159

151:                                              ; preds = %132
  %152 = load ptr, ptr @stdin, align 8, !tbaa !5
  %153 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.2, ptr noundef %152)
  %154 = getelementptr inbounds [16 x i8], ptr %10, i64 0, i64 0
  %155 = load i32, ptr %12, align 4, !tbaa !11
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %12, align 4, !tbaa !11
  %157 = sext i32 %155 to i64
  %158 = getelementptr inbounds [64 x ptr], ptr %8, i64 0, i64 %157
  store ptr %154, ptr %158, align 8, !tbaa !5
  br label %159

159:                                              ; preds = %151, %147
  %160 = load i32, ptr %12, align 4, !tbaa !11
  %161 = getelementptr inbounds [64 x ptr], ptr %8, i64 0, i64 0
  %162 = call i32 @main_to_fuzz(i32 noundef %160, ptr noundef %161)
  %163 = load ptr, ptr @stdout, align 8, !tbaa !5
  %164 = call i32 @fflush(ptr noundef %163)
  %165 = load i32, ptr %15, align 4, !tbaa !11
  %166 = load ptr, ptr @stdout, align 8, !tbaa !5
  %167 = call i32 @fileno(ptr noundef %166) #7
  %168 = call i32 @dup2(i32 noundef %165, i32 noundef %167) #7
  %169 = load i32, ptr %15, align 4, !tbaa !11
  %170 = call i32 @close(i32 noundef %169)
  %171 = load ptr, ptr @stdout, align 8, !tbaa !5
  call void @clearerr(ptr noundef %171) #7
  %172 = load ptr, ptr @stdout, align 8, !tbaa !5
  %173 = call i32 @fsetpos(ptr noundef %172, ptr noundef %17)
  %174 = load i32, ptr %16, align 4, !tbaa !11
  %175 = load ptr, ptr @stdin, align 8, !tbaa !5
  %176 = call i32 @fileno(ptr noundef %175) #7
  %177 = call i32 @dup2(i32 noundef %174, i32 noundef %176) #7
  %178 = load i32, ptr %16, align 4, !tbaa !11
  %179 = call i32 @close(i32 noundef %178)
  %180 = load ptr, ptr @stdin, align 8, !tbaa !5
  call void @clearerr(ptr noundef %180) #7
  %181 = getelementptr inbounds [16 x i8], ptr %10, i64 0, i64 0
  %182 = call i32 @unlink(ptr noundef %181) #7
  %183 = load i8, ptr %18, align 1, !tbaa !13, !range !18, !noundef !19
  %184 = trunc i8 %183 to i1
  br i1 %184, label %185, label %188

185:                                              ; preds = %159
  %186 = getelementptr inbounds [16 x i8], ptr %11, i64 0, i64 0
  %187 = call i32 @unlink(ptr noundef %186) #7
  br label %188

188:                                              ; preds = %185, %159
  store i32 0, ptr %3, align 4
  store i32 1, ptr %19, align 4
  br label %189

189:                                              ; preds = %188, %23
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, 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 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 9, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %190 = load i32, ptr %3, align 4
  ret i32 %190
}

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strnlen(ptr noundef, i64 noundef) #3

declare i32 @mkstemp(ptr noundef) #4

; Function Attrs: noreturn nounwind
declare void @abort() #5

declare i64 @write(i32 noundef, ptr noundef, i64 noundef) #4

declare i32 @close(i32 noundef) #4

declare i32 @fflush(ptr noundef) #4

declare i32 @fgetpos(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i32 @dup(i32 noundef) #6

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #4

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

; Function Attrs: nounwind
declare i32 @dup2(i32 noundef, i32 noundef) #6

; Function Attrs: nounwind
declare void @clearerr(ptr noundef) #6

declare i32 @fsetpos(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i32 @unlink(ptr noundef) #6

; 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { "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 "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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{i8 0, i8 2}
!19 = !{}


; 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._G_fpos_t = type { i64, %struct.__mbstate_t }
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }

@__const.LLVMFuzzerTestOneInput.exename = external hidden unnamed_addr constant [9 x i8], align 1
@__const.LLVMFuzzerTestOneInput.filename = external hidden unnamed_addr constant [16 x i8], align 16
@__const.LLVMFuzzerTestOneInput.filename_stdin = external hidden unnamed_addr constant [16 x i8], align 16
@share__opterr = external local_unnamed_addr global i32, align 4
@share__optind = external local_unnamed_addr global i32, align 4
@stdout = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @LLVMFuzzerTestOneInput(ptr noundef %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = alloca [64 x ptr], align 16
  %4 = alloca [9 x i8], align 1
  %5 = alloca [16 x i8], align 16
  %6 = alloca [16 x i8], align 16
  %7 = alloca %struct._G_fpos_t, align 8
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 9, ptr nonnull %4) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(9) %4, ptr noundef nonnull align 1 dereferenceable(9) @__const.LLVMFuzzerTestOneInput.exename, i64 9, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) @__const.LLVMFuzzerTestOneInput.filename, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) @__const.LLVMFuzzerTestOneInput.filename_stdin, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #9
  store i32 0, ptr @share__opterr, align 4, !tbaa !5
  store i32 0, ptr @share__optind, align 4, !tbaa !5
  %8 = icmp ult i64 %1, 2
  br i1 %8, label %96, label %9

9:                                                ; preds = %2
  %10 = load i8, ptr %0, align 1, !tbaa !9
  %11 = zext i8 %10 to i32
  %12 = and i32 %11, 15
  %13 = and i32 %11, 16
  %.not = icmp eq i32 %13, 0
  %14 = add i64 %1, -1
  store ptr %4, ptr %3, align 16, !tbaa !10
  %15 = getelementptr inbounds i8, ptr %0, i64 1
  %16 = call i64 @strnlen(ptr noundef nonnull %15, i64 noundef %14) #10
  %17 = icmp ult i64 %16, %14
  %18 = icmp ugt i32 %12, 1
  %19 = select i1 %17, i1 %18, i1 false
  br i1 %19, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %9
  %20 = zext nneg i32 %12 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %21 = phi i64 [ %16, %.lr.ph.preheader ], [ %27, %.lr.ph ]
  %22 = phi ptr [ %15, %.lr.ph.preheader ], [ %26, %.lr.ph ]
  %.05159 = phi i64 [ %14, %.lr.ph.preheader ], [ %24, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = getelementptr inbounds [64 x ptr], ptr %3, i64 0, i64 %indvars.iv
  store ptr %22, ptr %23, align 8, !tbaa !10
  %.neg = xor i64 %21, -1
  %24 = add i64 %.05159, %.neg
  %25 = sub i64 %1, %24
  %26 = getelementptr inbounds i8, ptr %0, i64 %25
  %27 = call i64 @strnlen(ptr noundef nonnull %26, i64 noundef %24) #10
  %28 = icmp ult i64 %27, %24
  %29 = icmp ult i64 %indvars.iv.next, %20
  %30 = select i1 %28, i1 %29, i1 false
  br i1 %30, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !12

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %31 = trunc nuw nsw i64 %indvars.iv.next to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %9
  %.052.lcssa = phi i32 [ 1, %9 ], [ %31, %._crit_edge.loopexit ]
  %.051.lcssa = phi i64 [ %14, %9 ], [ %24, %._crit_edge.loopexit ]
  %.lcssa = phi ptr [ %15, %9 ], [ %26, %._crit_edge.loopexit ]
  %32 = call i32 @mkstemp(ptr noundef nonnull %5) #9
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %._crit_edge
  call void @abort() #11
  unreachable

35:                                               ; preds = %._crit_edge
  br i1 %.not, label %.thread, label %40

.thread:                                          ; preds = %35
  %36 = call i64 @write(i32 noundef %32, ptr noundef nonnull %.lcssa, i64 noundef %.051.lcssa) #9
  %37 = call i32 @close(i32 noundef %32) #9
  %38 = zext nneg i32 %.052.lcssa to i64
  %39 = getelementptr inbounds [64 x ptr], ptr %3, i64 0, i64 %38
  store ptr %5, ptr %39, align 8, !tbaa !10
  br label %55

40:                                               ; preds = %35
  %41 = lshr i64 %.051.lcssa, 1
  %42 = call i64 @write(i32 noundef %32, ptr noundef nonnull %.lcssa, i64 noundef %41) #9
  %43 = call i32 @close(i32 noundef %32) #9
  %44 = zext nneg i32 %.052.lcssa to i64
  %45 = getelementptr inbounds [64 x ptr], ptr %3, i64 0, i64 %44
  store ptr %5, ptr %45, align 8, !tbaa !10
  %46 = call i32 @mkstemp(ptr noundef nonnull %6) #9
  %47 = icmp slt i32 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %40
  call void @abort() #11
  unreachable

49:                                               ; preds = %40
  %50 = sub i64 %.051.lcssa, %41
  %51 = sub i64 %1, %50
  %52 = getelementptr inbounds i8, ptr %0, i64 %51
  %53 = call i64 @write(i32 noundef %46, ptr noundef nonnull %52, i64 noundef %50) #9
  %54 = call i32 @close(i32 noundef %46) #9
  br label %55

55:                                               ; preds = %.thread, %49
  %56 = add nuw nsw i32 %.052.lcssa, 1
  %57 = load ptr, ptr @stdout, align 8, !tbaa !10
  %58 = call i32 @fflush(ptr noundef %57)
  %59 = load ptr, ptr @stdout, align 8, !tbaa !10
  %60 = call i32 @fgetpos(ptr noundef %59, ptr noundef nonnull %7)
  %61 = load ptr, ptr @stdout, align 8, !tbaa !10
  %62 = call i32 @fileno(ptr noundef %61) #9
  %63 = call i32 @dup(i32 noundef %62) #9
  %64 = load ptr, ptr @stdout, align 8, !tbaa !10
  %65 = call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %64) #9
  %66 = load ptr, ptr @stdin, align 8, !tbaa !10
  %67 = call i32 @fileno(ptr noundef %66) #9
  %68 = call i32 @dup(i32 noundef %67) #9
  %69 = load ptr, ptr @stdin, align 8, !tbaa !10
  br i1 %.not, label %72, label %70

70:                                               ; preds = %55
  %71 = call ptr @freopen(ptr noundef nonnull %6, ptr noundef nonnull @.str.2, ptr noundef %69) #9
  br label %77

72:                                               ; preds = %55
  %73 = call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, ptr noundef %69) #9
  %74 = add nuw nsw i32 %.052.lcssa, 2
  %75 = zext nneg i32 %56 to i64
  %76 = getelementptr inbounds [64 x ptr], ptr %3, i64 0, i64 %75
  store ptr %5, ptr %76, align 8, !tbaa !10
  br label %77

77:                                               ; preds = %72, %70
  %.153 = phi i32 [ %56, %70 ], [ %74, %72 ]
  %78 = call i32 @main_to_fuzz(i32 noundef %.153, ptr noundef nonnull %3)
  %79 = load ptr, ptr @stdout, align 8, !tbaa !10
  %80 = call i32 @fflush(ptr noundef %79)
  %81 = load ptr, ptr @stdout, align 8, !tbaa !10
  %82 = call i32 @fileno(ptr noundef %81) #9
  %83 = call i32 @dup2(i32 noundef %63, i32 noundef %82) #9
  %84 = call i32 @close(i32 noundef %63) #9
  %85 = load ptr, ptr @stdout, align 8, !tbaa !10
  call void @clearerr(ptr noundef %85) #9
  %86 = load ptr, ptr @stdout, align 8, !tbaa !10
  %87 = call i32 @fsetpos(ptr noundef %86, ptr noundef nonnull %7)
  %88 = load ptr, ptr @stdin, align 8, !tbaa !10
  %89 = call i32 @fileno(ptr noundef %88) #9
  %90 = call i32 @dup2(i32 noundef %68, i32 noundef %89) #9
  %91 = call i32 @close(i32 noundef %68) #9
  %92 = load ptr, ptr @stdin, align 8, !tbaa !10
  call void @clearerr(ptr noundef %92) #9
  %93 = call i32 @unlink(ptr noundef nonnull %5) #9
  br i1 %.not, label %96, label %94

94:                                               ; preds = %77
  %95 = call i32 @unlink(ptr noundef nonnull %6) #9
  br label %96

96:                                               ; preds = %77, %94, %2
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #9
  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

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

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

declare i32 @mkstemp(ptr noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #5

; Function Attrs: nofree
declare noundef i64 @write(i32 noundef, ptr nocapture noundef readonly, i64 noundef) local_unnamed_addr #6

declare i32 @close(i32 noundef) local_unnamed_addr #4

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

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

; Function Attrs: nounwind
declare i32 @dup(i32 noundef) local_unnamed_addr #8

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind
declare i32 @dup2(i32 noundef, i32 noundef) local_unnamed_addr #8

; Function Attrs: nofree nounwind
declare void @clearerr(ptr nocapture noundef) local_unnamed_addr #7

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

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

; 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { "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 = { nofree "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 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass