; LLVM IR from joltwallet/jolt_wallet :: components/console/argtable3 (argtable3)

; 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.arg_rex = type { %struct.arg_hdr, i32, ptr }
%struct.arg_hdr = type { i8, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.privhdr = type { ptr, i32 }

@.str.8 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @dbg_printf(ptr noundef, ...) #0

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @arg_rexn(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, ptr noundef %7) #0 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store i32 %4, ptr %14, align 4, !tbaa !9
  store i32 %5, ptr %15, align 4, !tbaa !9
  store i32 %6, ptr %16, align 4, !tbaa !9
  store ptr %7, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  store ptr null, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  store ptr null, ptr %23, align 8, !tbaa !5
  %25 = load ptr, ptr %12, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %30, label %27

27:                                               ; preds = %8
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  store ptr null, ptr %9, align 8
  store i32 1, ptr %24, align 4
  br label %169

30:                                               ; preds = %8
  %31 = load i32, ptr %15, align 4, !tbaa !9
  %32 = load i32, ptr %14, align 4, !tbaa !9
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %34, label %36

34:                                               ; preds = %30
  %35 = load i32, ptr %14, align 4, !tbaa !9
  br label %38

36:                                               ; preds = %30
  %37 = load i32, ptr %15, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %36, %34
  %39 = phi i32 [ %35, %34 ], [ %37, %36 ]
  store i32 %39, ptr %15, align 4, !tbaa !9
  %40 = load i32, ptr %15, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = mul i64 %41, 8
  %43 = add i64 128, %42
  store i64 %43, ptr %18, align 8, !tbaa !11
  %44 = load i64, ptr %18, align 8, !tbaa !11
  %45 = call noalias ptr @malloc(i64 noundef %44) #5
  store ptr %45, ptr %19, align 8, !tbaa !5
  %46 = load ptr, ptr %19, align 8, !tbaa !5
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %50

48:                                               ; preds = %38
  %49 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %49, ptr %9, align 8
  store i32 1, ptr %24, align 4
  br label %169

50:                                               ; preds = %38
  %51 = load ptr, ptr %19, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.arg_rex, ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %struct.arg_hdr, ptr %52, i32 0, i32 0
  store i8 2, ptr %53, align 8, !tbaa !13
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = load ptr, ptr %19, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.arg_rex, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %struct.arg_hdr, ptr %56, i32 0, i32 1
  store ptr %54, ptr %57, align 8, !tbaa !16
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = load ptr, ptr %19, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.arg_rex, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds %struct.arg_hdr, ptr %60, i32 0, i32 2
  store ptr %58, ptr %61, align 8, !tbaa !17
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %64, label %66

64:                                               ; preds = %50
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  br label %68

66:                                               ; preds = %50
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %66, %64
  %69 = phi ptr [ %65, %64 ], [ %67, %66 ]
  %70 = load ptr, ptr %19, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.arg_rex, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds %struct.arg_hdr, ptr %71, i32 0, i32 3
  store ptr %69, ptr %72, align 8, !tbaa !18
  %73 = load ptr, ptr %17, align 8, !tbaa !5
  %74 = load ptr, ptr %19, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.arg_rex, ptr %74, i32 0, i32 0
  %76 = getelementptr inbounds %struct.arg_hdr, ptr %75, i32 0, i32 4
  store ptr %73, ptr %76, align 8, !tbaa !19
  %77 = load i32, ptr %14, align 4, !tbaa !9
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.arg_rex, ptr %78, i32 0, i32 0
  %80 = getelementptr inbounds %struct.arg_hdr, ptr %79, i32 0, i32 5
  store i32 %77, ptr %80, align 8, !tbaa !20
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = load ptr, ptr %19, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.arg_rex, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds %struct.arg_hdr, ptr %83, i32 0, i32 6
  store i32 %81, ptr %84, align 4, !tbaa !21
  %85 = load ptr, ptr %19, align 8, !tbaa !5
  %86 = load ptr, ptr %19, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.arg_rex, ptr %86, i32 0, i32 0
  %88 = getelementptr inbounds %struct.arg_hdr, ptr %87, i32 0, i32 7
  store ptr %85, ptr %88, align 8, !tbaa !22
  %89 = load ptr, ptr %19, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.arg_rex, ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds %struct.arg_hdr, ptr %90, i32 0, i32 8
  store ptr @arg_rex_resetfn, ptr %91, align 8, !tbaa !23
  %92 = load ptr, ptr %19, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.arg_rex, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.arg_hdr, ptr %93, i32 0, i32 9
  store ptr @arg_rex_scanfn, ptr %94, align 8, !tbaa !24
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.arg_rex, ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds %struct.arg_hdr, ptr %96, i32 0, i32 10
  store ptr @arg_rex_checkfn, ptr %97, align 8, !tbaa !25
  %98 = load ptr, ptr %19, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.arg_rex, ptr %98, i32 0, i32 0
  %100 = getelementptr inbounds %struct.arg_hdr, ptr %99, i32 0, i32 11
  store ptr @arg_rex_errorfn, ptr %100, align 8, !tbaa !26
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.arg_rex, ptr %101, i64 1
  %103 = load ptr, ptr %19, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.arg_rex, ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds %struct.arg_hdr, ptr %104, i32 0, i32 12
  store ptr %102, ptr %105, align 8, !tbaa !27
  %106 = load ptr, ptr %19, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.arg_rex, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds %struct.arg_hdr, ptr %107, i32 0, i32 12
  %109 = load ptr, ptr %108, align 8, !tbaa !27
  store ptr %109, ptr %20, align 8, !tbaa !5
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = load ptr, ptr %20, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.privhdr, ptr %111, i32 0, i32 0
  store ptr %110, ptr %112, align 8, !tbaa !28
  %113 = load i32, ptr %16, align 4, !tbaa !9
  %114 = load ptr, ptr %20, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.privhdr, ptr %114, i32 0, i32 1
  store i32 %113, ptr %115, align 8, !tbaa !30
  %116 = load ptr, ptr %20, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.privhdr, ptr %116, i64 1
  %118 = load ptr, ptr %19, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.arg_rex, ptr %118, i32 0, i32 2
  store ptr %117, ptr %119, align 8, !tbaa !31
  %120 = load ptr, ptr %19, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.arg_rex, ptr %120, i32 0, i32 1
  store i32 0, ptr %121, align 8, !tbaa !32
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %133, %68
  %123 = load i32, ptr %21, align 4, !tbaa !9
  %124 = load i32, ptr %15, align 4, !tbaa !9
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %126, label %136

126:                                              ; preds = %122
  %127 = load ptr, ptr %19, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.arg_rex, ptr %127, i32 0, i32 2
  %129 = load ptr, ptr %128, align 8, !tbaa !31
  %130 = load i32, ptr %21, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds ptr, ptr %129, i64 %131
  store ptr @.str.8, ptr %132, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %126
  %134 = load i32, ptr %21, align 4, !tbaa !9
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %21, align 4, !tbaa !9
  br label %122, !llvm.loop !33

136:                                              ; preds = %122
  %137 = load ptr, ptr %20, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.privhdr, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !28
  %140 = load ptr, ptr %20, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.privhdr, ptr %140, i32 0, i32 1
  %142 = load i32, ptr %141, align 8, !tbaa !30
  %143 = call ptr @trex_compile(ptr noundef %139, ptr noundef %22, i32 noundef %142)
  store ptr %143, ptr %23, align 8, !tbaa !5
  %144 = load ptr, ptr %23, align 8, !tbaa !5
  %145 = icmp eq ptr %144, null
  br i1 %145, label %146, label %163

146:                                              ; preds = %136
  br label %147

147:                                              ; preds = %146
  %148 = load ptr, ptr %22, align 8, !tbaa !5
  %149 = icmp ne ptr %148, null
  br i1 %149, label %150, label %152

150:                                              ; preds = %147
  %151 = load ptr, ptr %22, align 8, !tbaa !5
  br label %153

152:                                              ; preds = %147
  br label %153

153:                                              ; preds = %152, %150
  %154 = phi ptr [ %151, %150 ], [ @.str.13, %152 ]
  %155 = load ptr, ptr %20, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.privhdr, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !28
  call void (ptr, ...) @dbg_printf(ptr noundef @.str.12, ptr noundef %154, ptr noundef %157)
  br label %158

158:                                              ; preds = %153
  br label %159

159:                                              ; preds = %158
  br label %160

160:                                              ; preds = %159
  call void (ptr, ...) @dbg_printf(ptr noundef @.str.11)
  br label %161

161:                                              ; preds = %160
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162, %136
  %164 = load ptr, ptr %23, align 8, !tbaa !5
  call void @trex_free(ptr noundef %164)
  br label %165

165:                                              ; preds = %163
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %168, ptr %9, align 8
  store i32 1, ptr %24, align 4
  br label %169

169:                                              ; preds = %167, %48, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  %170 = load ptr, ptr %9, align 8
  ret ptr %170
}

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @trex_free(ptr noundef) #0

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 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"arg_rex", !15, i64 0, !10, i64 96, !6, i64 104}
!15 = !{!"arg_hdr", !7, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!16 = !{!14, !6, i64 8}
!17 = !{!14, !6, i64 16}
!18 = !{!14, !6, i64 24}
!19 = !{!14, !6, i64 32}
!20 = !{!14, !10, i64 40}
!21 = !{!14, !10, i64 44}
!22 = !{!14, !6, i64 48}
!23 = !{!14, !6, i64 56}
!24 = !{!14, !6, i64 64}
!25 = !{!14, !6, i64 72}
!26 = !{!14, !6, i64 80}
!27 = !{!14, !6, i64 88}
!28 = !{!29, !6, i64 0}
!29 = !{!"privhdr", !6, i64 0, !10, i64 8}
!30 = !{!29, !10, i64 8}
!31 = !{!14, !6, i64 104}
!32 = !{!14, !10, i64 96}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


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

@.str.8 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @dbg_printf(ptr noundef, ...) local_unnamed_addr #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @arg_rexn(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, ptr noundef %7) local_unnamed_addr #0 {
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  store ptr null, ptr %9, align 8, !tbaa !5
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %10, label %13

10:                                               ; preds = %8
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  br label %59

13:                                               ; preds = %8
  %14 = tail call i32 @llvm.smax.i32(i32 %5, i32 %4)
  %15 = sext i32 %14 to i64
  %16 = shl nsw i64 %15, 3
  %17 = add nsw i64 %16, 128
  %18 = tail call noalias ptr @malloc(i64 noundef %17) #6
  %19 = icmp eq ptr %18, null
  br i1 %19, label %59, label %20

20:                                               ; preds = %13
  store i8 2, ptr %18, align 8, !tbaa !9
  %21 = getelementptr inbounds i8, ptr %18, i64 8
  store ptr %0, ptr %21, align 8, !tbaa !13
  %22 = getelementptr inbounds i8, ptr %18, i64 16
  store ptr %1, ptr %22, align 8, !tbaa !14
  %.not54 = icmp eq ptr %3, null
  %23 = select i1 %.not54, ptr %2, ptr %3
  %24 = getelementptr inbounds i8, ptr %18, i64 24
  store ptr %23, ptr %24, align 8, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %18, i64 32
  store ptr %7, ptr %25, align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %18, i64 40
  store i32 %4, ptr %26, align 8, !tbaa !17
  %27 = getelementptr inbounds i8, ptr %18, i64 44
  store i32 %14, ptr %27, align 4, !tbaa !18
  %28 = getelementptr inbounds i8, ptr %18, i64 48
  store ptr %18, ptr %28, align 8, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %18, i64 56
  store ptr @arg_rex_resetfn, ptr %29, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %18, i64 64
  store ptr @arg_rex_scanfn, ptr %30, align 8, !tbaa !21
  %31 = getelementptr inbounds i8, ptr %18, i64 72
  store ptr @arg_rex_checkfn, ptr %31, align 8, !tbaa !22
  %32 = getelementptr inbounds i8, ptr %18, i64 80
  store ptr @arg_rex_errorfn, ptr %32, align 8, !tbaa !23
  %33 = getelementptr inbounds i8, ptr %18, i64 112
  %34 = getelementptr inbounds i8, ptr %18, i64 88
  store ptr %33, ptr %34, align 8, !tbaa !24
  store ptr %2, ptr %33, align 8, !tbaa !25
  %35 = getelementptr inbounds i8, ptr %18, i64 120
  store i32 %6, ptr %35, align 8, !tbaa !27
  %36 = getelementptr inbounds i8, ptr %18, i64 128
  %37 = getelementptr inbounds i8, ptr %18, i64 104
  store ptr %36, ptr %37, align 8, !tbaa !28
  %38 = getelementptr inbounds i8, ptr %18, i64 96
  store i32 0, ptr %38, align 8, !tbaa !29
  %39 = icmp sgt i32 %14, 0
  br i1 %39, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %20
  %wide.trip.count = zext nneg i32 %14 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %40 = icmp ult i32 %14, 4
  br i1 %40, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %41 = load ptr, ptr %37, align 8, !tbaa !28
  %42 = getelementptr inbounds ptr, ptr %41, i64 %indvars.iv
  store ptr @.str.8, ptr %42, align 8, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %43 = load ptr, ptr %37, align 8, !tbaa !28
  %44 = getelementptr inbounds ptr, ptr %43, i64 %indvars.iv.next
  store ptr @.str.8, ptr %44, align 8, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %45 = load ptr, ptr %37, align 8, !tbaa !28
  %46 = getelementptr inbounds ptr, ptr %45, i64 %indvars.iv.next.1
  store ptr @.str.8, ptr %46, align 8, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %47 = load ptr, ptr %37, align 8, !tbaa !28
  %48 = getelementptr inbounds ptr, ptr %47, i64 %indvars.iv.next.2
  store ptr @.str.8, ptr %48, align 8, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !30

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.loopexit, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %49 = load ptr, ptr %37, align 8, !tbaa !28
  %50 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv.epil
  store ptr @.str.8, ptr %50, align 8, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.loopexit, label %.lr.ph.epil, !llvm.loop !32

._crit_edge.loopexit:                             ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa
  %.pre = load ptr, ptr %33, align 8, !tbaa !25
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %20
  %51 = phi ptr [ %.pre, %._crit_edge.loopexit ], [ %2, %20 ]
  %52 = call ptr @trex_compile(ptr noundef %51, ptr noundef nonnull %9, i32 noundef %6)
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %58

54:                                               ; preds = %._crit_edge
  %55 = load ptr, ptr %9, align 8
  %.not55 = icmp eq ptr %55, null
  %56 = select i1 %.not55, ptr @.str.13, ptr %55
  %57 = load ptr, ptr %33, align 8, !tbaa !25
  call void (ptr, ...) @dbg_printf(ptr noundef nonnull @.str.12, ptr noundef nonnull %56, ptr noundef %57)
  call void (ptr, ...) @dbg_printf(ptr noundef nonnull @.str.11)
  br label %58

58:                                               ; preds = %54, %._crit_edge
  call void @trex_free(ptr noundef %52)
  br label %59

59:                                               ; preds = %13, %58, %10
  %.051 = phi ptr [ %18, %58 ], [ null, %10 ], [ null, %13 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  ret ptr %.051
}

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @trex_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !7, i64 0}
!10 = !{!"arg_rex", !11, i64 0, !12, i64 96, !6, i64 104}
!11 = !{!"arg_hdr", !7, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!10, !6, i64 16}
!15 = !{!10, !6, i64 24}
!16 = !{!10, !6, i64 32}
!17 = !{!10, !12, i64 40}
!18 = !{!10, !12, i64 44}
!19 = !{!10, !6, i64 48}
!20 = !{!10, !6, i64 56}
!21 = !{!10, !6, i64 64}
!22 = !{!10, !6, i64 72}
!23 = !{!10, !6, i64 80}
!24 = !{!10, !6, i64 88}
!25 = !{!26, !6, i64 0}
!26 = !{!"privhdr", !6, i64 0, !12, i64 8}
!27 = !{!26, !12, i64 8}
!28 = !{!10, !6, i64 104}
!29 = !{!10, !12, i64 96}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.unroll.disable"}


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