; LLVM IR from jgaeddert/liquid-dsp :: examples (interleaver_scatterplot_example)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@optarg = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [97 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() #0

declare i32 @printf(ptr noundef, ...) #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 i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = 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 4, ptr %6) #8
  store i32 8, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 4, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  br label %19

19:                                               ; preds = %34, %2
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = load ptr, ptr %5, align 8, !tbaa !9
  %22 = call i32 @getopt(i32 noundef %20, ptr noundef %21, ptr noundef @.str.4) #8
  store i32 %22, ptr %8, align 4, !tbaa !5
  %23 = icmp ne i32 %22, -1
  br i1 %23, label %24, label %35

24:                                               ; preds = %19
  %25 = load i32, ptr %8, align 4, !tbaa !5
  switch i32 %25, label %33 [
    i32 117, label %26
    i32 104, label %26
    i32 110, label %27
    i32 100, label %30
  ]

26:                                               ; preds = %24, %24
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %174

27:                                               ; preds = %24
  %28 = load ptr, ptr @optarg, align 8, !tbaa !9
  %29 = call i32 @atoi(ptr noundef %28) #9
  store i32 %29, ptr %6, align 4, !tbaa !5
  br label %34

30:                                               ; preds = %24
  %31 = load ptr, ptr @optarg, align 8, !tbaa !9
  %32 = call i32 @atoi(ptr noundef %31) #9
  store i32 %32, ptr %7, align 4, !tbaa !5
  br label %34

33:                                               ; preds = %24
  call void @exit(i32 noundef 1) #10
  unreachable

34:                                               ; preds = %30, %27
  br label %19, !llvm.loop !11

35:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = call ptr @interleaver_create(i32 noundef %36)
  store ptr %37, ptr %10, align 8, !tbaa !9
  %38 = load ptr, ptr %10, align 8, !tbaa !9
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = call i32 @interleaver_set_depth(ptr noundef %38, i32 noundef %39)
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = zext i32 %41 to i64
  %43 = call ptr @llvm.stacksave.p0()
  store ptr %43, ptr %11, align 8
  %44 = alloca i8, i64 %42, align 16
  store i64 %42, ptr %12, align 8
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = zext i32 %45 to i64
  %47 = alloca i8, i64 %46, align 16
  store i64 %46, ptr %13, align 8
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = mul i32 8, %48
  %50 = zext i32 %49 to i64
  %51 = alloca i32, i64 %50, align 16
  store i64 %50, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !5
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = zext i32 %52 to i64
  %54 = mul i64 %53, 1
  call void @llvm.memset.p0.i64(ptr align 16 %44, i8 0, i64 %54, i1 false)
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %88, %35
  %56 = load i32, ptr %15, align 4, !tbaa !5
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = icmp ult i32 %56, %57
  br i1 %58, label %59, label %91

59:                                               ; preds = %55
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %81, %59
  %61 = load i32, ptr %16, align 4, !tbaa !5
  %62 = icmp ult i32 %61, 8
  br i1 %62, label %63, label %84

63:                                               ; preds = %60
  %64 = load i32, ptr %16, align 4, !tbaa !5
  %65 = sub i32 8, %64
  %66 = sub i32 %65, 1
  %67 = shl i32 1, %66
  %68 = trunc i32 %67 to i8
  %69 = load i32, ptr %15, align 4, !tbaa !5
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds i8, ptr %44, i64 %70
  store i8 %68, ptr %71, align 1, !tbaa !13
  %72 = load ptr, ptr %10, align 8, !tbaa !9
  %73 = call i32 @interleaver_encode(ptr noundef %72, ptr noundef %44, ptr noundef %47)
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = call i32 @interleaver_find_bit(ptr noundef %47, i32 noundef %74)
  %76 = load i32, ptr %17, align 4, !tbaa !5
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds i32, ptr %51, i64 %77
  store i32 %75, ptr %78, align 4, !tbaa !5
  %79 = load i32, ptr %17, align 4, !tbaa !5
  %80 = add i32 %79, 1
  store i32 %80, ptr %17, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %63
  %82 = load i32, ptr %16, align 4, !tbaa !5
  %83 = add i32 %82, 1
  store i32 %83, ptr %16, align 4, !tbaa !5
  br label %60, !llvm.loop !14

84:                                               ; preds = %60
  %85 = load i32, ptr %15, align 4, !tbaa !5
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds i8, ptr %44, i64 %86
  store i8 0, ptr %87, align 1, !tbaa !13
  br label %88

88:                                               ; preds = %84
  %89 = load i32, ptr %15, align 4, !tbaa !5
  %90 = add i32 %89, 1
  store i32 %90, ptr %15, align 4, !tbaa !5
  br label %55, !llvm.loop !15

91:                                               ; preds = %55
  %92 = load i32, ptr %17, align 4, !tbaa !5
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = mul i32 8, %93
  %95 = icmp eq i32 %92, %94
  br i1 %95, label %96, label %97

96:                                               ; preds = %91
  br label %98

97:                                               ; preds = %91
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 79, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

98:                                               ; preds = %96
  %99 = load ptr, ptr %10, align 8, !tbaa !9
  %100 = call i32 @interleaver_destroy(ptr noundef %99)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %101 = call noalias ptr @fopen(ptr noundef @.str.7, ptr noundef @.str.8)
  store ptr %101, ptr %18, align 8, !tbaa !9
  %102 = load ptr, ptr %18, align 8, !tbaa !9
  %103 = icmp eq ptr %102, null
  br i1 %103, label %104, label %110

104:                                              ; preds = %98
  %105 = load ptr, ptr @stderr, align 8, !tbaa !9
  %106 = load ptr, ptr %5, align 8, !tbaa !9
  %107 = getelementptr inbounds ptr, ptr %106, i64 0
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef @.str.9, ptr noundef %108, ptr noundef @.str.7) #8
  call void @exit(i32 noundef 1) #10
  unreachable

110:                                              ; preds = %98
  %111 = load ptr, ptr %18, align 8, !tbaa !9
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef @.str.10, ptr noundef @.str.7) #8
  %113 = load ptr, ptr %18, align 8, !tbaa !9
  %114 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %113, ptr noundef @.str.11) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %127, %110
  %116 = load i32, ptr %15, align 4, !tbaa !5
  %117 = load i32, ptr %4, align 4, !tbaa !5
  %118 = icmp ult i32 %116, %117
  br i1 %118, label %119, label %130

119:                                              ; preds = %115
  %120 = load ptr, ptr %18, align 8, !tbaa !9
  %121 = load ptr, ptr %5, align 8, !tbaa !9
  %122 = load i32, ptr %15, align 4, !tbaa !5
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds ptr, ptr %121, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str.12, ptr noundef %125) #8
  br label %127

127:                                              ; preds = %119
  %128 = load i32, ptr %15, align 4, !tbaa !5
  %129 = add i32 %128, 1
  store i32 %129, ptr %15, align 4, !tbaa !5
  br label %115, !llvm.loop !16

130:                                              ; preds = %115
  %131 = load ptr, ptr %18, align 8, !tbaa !9
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %131, ptr noundef @.str.13) #8
  %133 = load ptr, ptr %18, align 8, !tbaa !9
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.14) #8
  %135 = load ptr, ptr %18, align 8, !tbaa !9
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.15) #8
  %137 = load ptr, ptr %18, align 8, !tbaa !9
  %138 = load i32, ptr %6, align 4, !tbaa !5
  %139 = mul i32 8, %138
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.16, i32 noundef %139) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %155, %130
  %142 = load i32, ptr %15, align 4, !tbaa !5
  %143 = load i32, ptr %6, align 4, !tbaa !5
  %144 = mul i32 8, %143
  %145 = icmp ult i32 %142, %144
  br i1 %145, label %146, label %158

146:                                              ; preds = %141
  %147 = load ptr, ptr %18, align 8, !tbaa !9
  %148 = load i32, ptr %15, align 4, !tbaa !5
  %149 = add i32 %148, 1
  %150 = load i32, ptr %15, align 4, !tbaa !5
  %151 = zext i32 %150 to i64
  %152 = getelementptr inbounds i32, ptr %51, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %147, ptr noundef @.str.17, i32 noundef %149, i32 noundef %153) #8
  br label %155

155:                                              ; preds = %146
  %156 = load i32, ptr %15, align 4, !tbaa !5
  %157 = add i32 %156, 1
  store i32 %157, ptr %15, align 4, !tbaa !5
  br label %141, !llvm.loop !17

158:                                              ; preds = %141
  %159 = load ptr, ptr %18, align 8, !tbaa !9
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef @.str.18) #8
  %161 = load ptr, ptr %18, align 8, !tbaa !9
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.19) #8
  %163 = load ptr, ptr %18, align 8, !tbaa !9
  %164 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %163, ptr noundef @.str.20) #8
  %165 = load ptr, ptr %18, align 8, !tbaa !9
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.21) #8
  %167 = load ptr, ptr %18, align 8, !tbaa !9
  %168 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %167, ptr noundef @.str.22) #8
  %169 = load ptr, ptr %18, align 8, !tbaa !9
  %170 = call i32 @fclose(ptr noundef %169)
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, ptr noundef @.str.7)
  %172 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  %173 = load ptr, ptr %11, align 8
  call void @llvm.stackrestore.p0(ptr %173)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %174

174:                                              ; preds = %158, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %175 = load i32, ptr %3, align 4
  ret i32 %175
}

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

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #3

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

declare ptr @interleaver_create(i32 noundef) #1

declare i32 @interleaver_set_depth(ptr noundef, i32 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #6

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

declare i32 @interleaver_encode(ptr noundef, ptr noundef, ptr noundef) #1

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

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

declare i32 @interleaver_destroy(ptr noundef) #1

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

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

declare i32 @fclose(ptr noundef) #1

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #6

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = { nocallback nofree nosync nounwind willreturn }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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

@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [97 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  br label %.outer

.outer:                                           ; preds = %9, %2
  %.059.ph = phi i32 [ %11, %9 ], [ 4, %2 ]
  %.057.ph = phi i32 [ %.057, %9 ], [ 8, %2 ]
  br label %3

3:                                                ; preds = %.outer, %6
  %.057 = phi i32 [ %8, %6 ], [ %.057.ph, %.outer ]
  %4 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.4) #8
  switch i32 %4, label %12 [
    i32 -1, label %13
    i32 117, label %5
    i32 104, label %5
    i32 110, label %6
    i32 100, label %9
  ]

5:                                                ; preds = %3, %3
  tail call void @usage()
  br label %96

6:                                                ; preds = %3
  %7 = load ptr, ptr @optarg, align 8, !tbaa !5
  %8 = tail call i32 @atoi(ptr nocapture noundef %7) #9
  br label %3, !llvm.loop !9

9:                                                ; preds = %3
  %10 = load ptr, ptr @optarg, align 8, !tbaa !5
  %11 = tail call i32 @atoi(ptr nocapture noundef %10) #9
  br label %.outer, !llvm.loop !9

12:                                               ; preds = %3
  tail call void @exit(i32 noundef 1) #10
  unreachable

13:                                               ; preds = %3
  %14 = tail call ptr @interleaver_create(i32 noundef %.057) #8
  %15 = tail call i32 @interleaver_set_depth(ptr noundef %14, i32 noundef %.059.ph) #8
  %16 = zext i32 %.057 to i64
  %17 = tail call ptr @llvm.stacksave.p0()
  %18 = alloca i8, i64 %16, align 16
  %19 = alloca i8, i64 %16, align 16
  %20 = shl i32 %.057, 3
  %21 = zext i32 %20 to i64
  %22 = alloca i32, i64 %21, align 16
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %18, i8 0, i64 %16, i1 false)
  %.not = icmp eq i32 %.057, 0
  br i1 %.not, label %._crit_edge, label %.preheader

.preheader:                                       ; preds = %13, %.preheader
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader ], [ 0, %13 ]
  %.05370 = phi i32 [ %63, %.preheader ], [ 0, %13 ]
  %23 = getelementptr inbounds i8, ptr %18, i64 %indvars.iv
  store i8 -128, ptr %23, align 1, !tbaa !11
  %24 = call i32 @interleaver_encode(ptr noundef %14, ptr noundef nonnull %18, ptr noundef nonnull %19) #8
  %25 = call i32 @interleaver_find_bit(ptr noundef nonnull %19, i32 noundef %.057)
  %26 = zext i32 %.05370 to i64
  %27 = getelementptr inbounds i32, ptr %22, i64 %26
  store i32 %25, ptr %27, align 16, !tbaa !12
  %28 = or disjoint i32 %.05370, 1
  store i8 64, ptr %23, align 1, !tbaa !11
  %29 = call i32 @interleaver_encode(ptr noundef %14, ptr noundef nonnull %18, ptr noundef nonnull %19) #8
  %30 = call i32 @interleaver_find_bit(ptr noundef nonnull %19, i32 noundef %.057)
  %31 = zext i32 %28 to i64
  %32 = getelementptr inbounds i32, ptr %22, i64 %31
  store i32 %30, ptr %32, align 4, !tbaa !12
  %33 = or disjoint i32 %.05370, 2
  store i8 32, ptr %23, align 1, !tbaa !11
  %34 = call i32 @interleaver_encode(ptr noundef %14, ptr noundef nonnull %18, ptr noundef nonnull %19) #8
  %35 = call i32 @interleaver_find_bit(ptr noundef nonnull %19, i32 noundef %.057)
  %36 = zext i32 %33 to i64
  %37 = getelementptr inbounds i32, ptr %22, i64 %36
  store i32 %35, ptr %37, align 8, !tbaa !12
  %38 = or disjoint i32 %.05370, 3
  store i8 16, ptr %23, align 1, !tbaa !11
  %39 = call i32 @interleaver_encode(ptr noundef %14, ptr noundef nonnull %18, ptr noundef nonnull %19) #8
  %40 = call i32 @interleaver_find_bit(ptr noundef nonnull %19, i32 noundef %.057)
  %41 = zext i32 %38 to i64
  %42 = getelementptr inbounds i32, ptr %22, i64 %41
  store i32 %40, ptr %42, align 4, !tbaa !12
  %43 = or disjoint i32 %.05370, 4
  store i8 8, ptr %23, align 1, !tbaa !11
  %44 = call i32 @interleaver_encode(ptr noundef %14, ptr noundef nonnull %18, ptr noundef nonnull %19) #8
  %45 = call i32 @interleaver_find_bit(ptr noundef nonnull %19, i32 noundef %.057)
  %46 = zext i32 %43 to i64
  %47 = getelementptr inbounds i32, ptr %22, i64 %46
  store i32 %45, ptr %47, align 16, !tbaa !12
  %48 = or disjoint i32 %.05370, 5
  store i8 4, ptr %23, align 1, !tbaa !11
  %49 = call i32 @interleaver_encode(ptr noundef %14, ptr noundef nonnull %18, ptr noundef nonnull %19) #8
  %50 = call i32 @interleaver_find_bit(ptr noundef nonnull %19, i32 noundef %.057)
  %51 = zext i32 %48 to i64
  %52 = getelementptr inbounds i32, ptr %22, i64 %51
  store i32 %50, ptr %52, align 4, !tbaa !12
  %53 = or disjoint i32 %.05370, 6
  store i8 2, ptr %23, align 1, !tbaa !11
  %54 = call i32 @interleaver_encode(ptr noundef %14, ptr noundef nonnull %18, ptr noundef nonnull %19) #8
  %55 = call i32 @interleaver_find_bit(ptr noundef nonnull %19, i32 noundef %.057)
  %56 = zext i32 %53 to i64
  %57 = getelementptr inbounds i32, ptr %22, i64 %56
  store i32 %55, ptr %57, align 8, !tbaa !12
  %58 = or disjoint i32 %.05370, 7
  store i8 1, ptr %23, align 1, !tbaa !11
  %59 = call i32 @interleaver_encode(ptr noundef %14, ptr noundef nonnull %18, ptr noundef nonnull %19) #8
  %60 = call i32 @interleaver_find_bit(ptr noundef nonnull %19, i32 noundef %.057)
  %61 = zext i32 %58 to i64
  %62 = getelementptr inbounds i32, ptr %22, i64 %61
  store i32 %60, ptr %62, align 4, !tbaa !12
  %63 = add i32 %.05370, 8
  store i8 0, ptr %23, align 1, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %16
  br i1 %exitcond.not, label %._crit_edge, label %.preheader, !llvm.loop !14

._crit_edge:                                      ; preds = %.preheader, %13
  %.053.lcssa = phi i32 [ 0, %13 ], [ %63, %.preheader ]
  %64 = icmp eq i32 %.053.lcssa, %20
  br i1 %64, label %66, label %65

65:                                               ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 79, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

66:                                               ; preds = %._crit_edge
  %67 = call i32 @interleaver_destroy(ptr noundef %14) #8
  %68 = call noalias ptr @fopen(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8)
  %69 = icmp eq ptr %68, null
  br i1 %69, label %70, label %74

70:                                               ; preds = %66
  %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.9, ptr noundef %72, ptr noundef nonnull @.str.7) #11
  call void @exit(i32 noundef 1) #10
  unreachable

74:                                               ; preds = %66
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.7) #8
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.11) #8
  %.not78 = icmp eq i32 %0, 0
  br i1 %.not78, label %._crit_edge73, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %74
  %wide.trip.count88 = zext i32 %0 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv85 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next86, %.lr.ph ]
  %77 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv85
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.12, ptr noundef %78) #8
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count88
  br i1 %exitcond89.not, label %._crit_edge73, label %.lr.ph, !llvm.loop !15

._crit_edge73:                                    ; preds = %.lr.ph, %74
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.13) #8
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.14) #8
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.15) #8
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.16, i32 noundef %20) #8
  %.not79 = icmp eq i32 %20, 0
  br i1 %.not79, label %._crit_edge77, label %.lr.ph76

.lr.ph76:                                         ; preds = %._crit_edge73, %.lr.ph76
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %.lr.ph76 ], [ 0, %._crit_edge73 ]
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %84 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv90
  %85 = load i32, ptr %84, align 4, !tbaa !12
  %86 = trunc nuw i64 %indvars.iv.next91 to i32
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.17, i32 noundef %86, i32 noundef %85) #8
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %21
  br i1 %exitcond94.not, label %._crit_edge77, label %.lr.ph76, !llvm.loop !16

._crit_edge77:                                    ; preds = %.lr.ph76, %._crit_edge73
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.18) #8
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.19) #8
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.20) #8
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.21) #8
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %68, ptr noundef nonnull @.str.22) #8
  %93 = call i32 @fclose(ptr noundef nonnull %68)
  %94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, ptr noundef nonnull @.str.7)
  %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  call void @llvm.stackrestore.p0(ptr %17)
  br label %96

96:                                               ; preds = %._crit_edge77, %5
  ret i32 0
}

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

declare ptr @interleaver_create(i32 noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #6

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

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

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

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

declare i32 @interleaver_destroy(ptr noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #6

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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