; LLVM IR from Discngine/fpocket :: src (tparams)

; 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.s_tparams = type { ptr, ptr, ptr, ptr, ptr, [128 x i8], [128 x i8], float, i32, i32, ptr }

@stdout = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [41 x i8], align 1

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

declare ptr @my_malloc(i64 noundef) #1

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @add_prot(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #4 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %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
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = call ptr @fopen_pdb_check_case(ptr noundef %17, ptr noundef @.str.7)
  store ptr %18, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %176

21:                                               ; preds = %4
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = call i32 @fclose(ptr noundef %22)
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call ptr @fopen_pdb_check_case(ptr noundef %24, ptr noundef @.str.7)
  store ptr %25, ptr %10, align 8, !tbaa !5
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %171

28:                                               ; preds = %21
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = call i64 @strlen(ptr noundef %29) #7
  %31 = trunc i64 %30 to i32
  store i32 %31, ptr %12, align 4, !tbaa !9
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %167

34:                                               ; preds = %28
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = icmp sge i32 %35, 1
  br i1 %36, label %37, label %167

37:                                               ; preds = %34
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %61, %37
  %39 = load i32, ptr %13, align 4, !tbaa !9
  %40 = load i32, ptr %12, align 4, !tbaa !9
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %42, label %64

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %43 = call ptr @__ctype_toupper_loc() #8
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i8, ptr %45, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !11
  %50 = sext i8 %49 to i32
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i32, ptr %44, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !9
  store i32 %53, ptr %14, align 4, !tbaa !9
  %54 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %54, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %55 = load i32, ptr %15, align 4, !tbaa !9
  %56 = trunc i32 %55 to i8
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i8, ptr %57, i64 %59
  store i8 %56, ptr %60, align 1, !tbaa !11
  br label %61

61:                                               ; preds = %42
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %13, align 4, !tbaa !9
  br label %38, !llvm.loop !12

64:                                               ; preds = %38
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.s_tparams, ptr %65, i32 0, i32 8
  %67 = load i32, ptr %66, align 4, !tbaa !14
  store i32 %67, ptr %11, align 4, !tbaa !9
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.s_tparams, ptr %68, i32 0, i32 8
  %70 = load i32, ptr %69, align 4, !tbaa !14
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %69, align 4, !tbaa !14
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.s_tparams, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.s_tparams, ptr %75, i32 0, i32 8
  %77 = load i32, ptr %76, align 4, !tbaa !14
  %78 = sext i32 %77 to i64
  %79 = mul i64 %78, 8
  %80 = call ptr @my_realloc(ptr noundef %74, i64 noundef %79)
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.s_tparams, ptr %81, i32 0, i32 0
  store ptr %80, ptr %82, align 8, !tbaa !17
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.s_tparams, ptr %83, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !18
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.s_tparams, ptr %86, i32 0, i32 8
  %88 = load i32, ptr %87, align 4, !tbaa !14
  %89 = sext i32 %88 to i64
  %90 = mul i64 %89, 8
  %91 = call ptr @my_realloc(ptr noundef %85, i64 noundef %90)
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.s_tparams, ptr %92, i32 0, i32 2
  store ptr %91, ptr %93, align 8, !tbaa !18
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.s_tparams, ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !19
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.s_tparams, ptr %97, i32 0, i32 8
  %99 = load i32, ptr %98, align 4, !tbaa !14
  %100 = sext i32 %99 to i64
  %101 = mul i64 %100, 8
  %102 = call ptr @my_realloc(ptr noundef %96, i64 noundef %101)
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.s_tparams, ptr %103, i32 0, i32 1
  store ptr %102, ptr %104, align 8, !tbaa !19
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = call i64 @strlen(ptr noundef %105) #7
  %107 = add i64 %106, 1
  %108 = mul i64 %107, 1
  %109 = call ptr @my_malloc(i64 noundef %108)
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.s_tparams, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !17
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds ptr, ptr %112, i64 %114
  store ptr %109, ptr %115, align 8, !tbaa !5
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = call i64 @strlen(ptr noundef %116) #7
  %118 = add i64 %117, 1
  %119 = mul i64 %118, 1
  %120 = call ptr @my_malloc(i64 noundef %119)
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.s_tparams, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !19
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds ptr, ptr %123, i64 %125
  store ptr %120, ptr %126, align 8, !tbaa !5
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = call i64 @strlen(ptr noundef %127) #7
  %129 = add i64 %128, 1
  %130 = mul i64 %129, 1
  %131 = call ptr @my_malloc(i64 noundef %130)
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.s_tparams, ptr %132, i32 0, i32 2
  %134 = load ptr, ptr %133, align 8, !tbaa !18
  %135 = load i32, ptr %11, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds ptr, ptr %134, i64 %136
  store ptr %131, ptr %137, align 8, !tbaa !5
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.s_tparams, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !17
  %141 = load i32, ptr %11, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds ptr, ptr %140, i64 %142
  %144 = load ptr, ptr %143, align 8, !tbaa !5
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = call ptr @strcpy(ptr noundef %144, ptr noundef %145) #6
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.s_tparams, ptr %147, i32 0, i32 1
  %149 = load ptr, ptr %148, align 8, !tbaa !19
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds ptr, ptr %149, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = call ptr @strcpy(ptr noundef %153, ptr noundef %154) #6
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.s_tparams, ptr %156, i32 0, i32 2
  %158 = load ptr, ptr %157, align 8, !tbaa !18
  %159 = load i32, ptr %11, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds ptr, ptr %158, i64 %160
  %162 = load ptr, ptr %161, align 8, !tbaa !5
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = call ptr @strcpy(ptr noundef %162, ptr noundef %163) #6
  %165 = load ptr, ptr %10, align 8, !tbaa !5
  %166 = call i32 @fclose(ptr noundef %165)
  br label %170

167:                                              ; preds = %34, %28
  %168 = load ptr, ptr @stdout, align 8, !tbaa !5
  %169 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %168, ptr noundef @.str.11) #6
  store i32 0, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %181

170:                                              ; preds = %64
  br label %175

171:                                              ; preds = %21
  %172 = load ptr, ptr @stdout, align 8, !tbaa !5
  %173 = load ptr, ptr %7, align 8, !tbaa !5
  %174 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef @.str.12, ptr noundef %173) #6
  store i32 0, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %181

175:                                              ; preds = %170
  br label %180

176:                                              ; preds = %4
  %177 = load ptr, ptr @stdout, align 8, !tbaa !5
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  %179 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %177, ptr noundef @.str.13, ptr noundef %178) #6
  store i32 0, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %181

180:                                              ; preds = %175
  store i32 1, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %181

181:                                              ; preds = %180, %176, %171, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %182 = load i32, ptr %5, align 4
  ret i32 %182
}

declare ptr @fopen_pdb_check_case(ptr noundef, ptr noundef) #1

declare i32 @fclose(ptr noundef) #1

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_toupper_loc() #5

declare ptr @my_realloc(ptr noundef, i64 noundef) #1

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

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !10, i64 300}
!15 = !{!"s_tparams", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !7, i64 168, !16, i64 296, !10, i64 300, !10, i64 304, !6, i64 312}
!16 = !{!"float", !7, i64 0}
!17 = !{!15, !6, i64 0}
!18 = !{!15, !6, i64 16}
!19 = !{!15, !6, i64 8}


; 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"

@stdout = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [41 x i8], align 1

declare ptr @my_malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @add_prot(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef %3) local_unnamed_addr #4 {
  %5 = tail call ptr @fopen_pdb_check_case(ptr noundef %0, ptr noundef nonnull @.str.7) #6
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %107, label %6

6:                                                ; preds = %4
  %7 = tail call i32 @fclose(ptr noundef nonnull %5)
  %8 = tail call ptr @fopen_pdb_check_case(ptr noundef %1, ptr noundef nonnull @.str.7) #6
  %.not55 = icmp eq ptr %8, null
  br i1 %.not55, label %104, label %9

9:                                                ; preds = %6
  %10 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #7
  %11 = trunc i64 %10 to i32
  %12 = icmp ne ptr %2, null
  %13 = icmp sgt i32 %11, 0
  %or.cond = select i1 %12, i1 %13, i1 false
  br i1 %or.cond, label %.preheader, label %101

.preheader:                                       ; preds = %9
  %14 = tail call ptr @__ctype_toupper_loc() #8
  %wide.trip.count = and i64 %10, 2147483647
  %15 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %10, 3
  %16 = icmp ult i64 %15, 3
  br i1 %16, label %.unr-lcssa, label %.preheader.new

.preheader.new:                                   ; preds = %.preheader
  %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter
  br label %17

17:                                               ; preds = %17, %.preheader.new
  %indvars.iv = phi i64 [ 0, %.preheader.new ], [ %indvars.iv.next.3, %17 ]
  %niter = phi i64 [ 0, %.preheader.new ], [ %niter.next.3, %17 ]
  %18 = load ptr, ptr %14, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = sext i8 %20 to i64
  %22 = getelementptr inbounds i32, ptr %18, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !10
  %24 = trunc i32 %23 to i8
  store i8 %24, ptr %19, align 1, !tbaa !9
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %25 = load ptr, ptr %14, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next
  %27 = load i8, ptr %26, align 1, !tbaa !9
  %28 = sext i8 %27 to i64
  %29 = getelementptr inbounds i32, ptr %25, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !10
  %31 = trunc i32 %30 to i8
  store i8 %31, ptr %26, align 1, !tbaa !9
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %32 = load ptr, ptr %14, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next.1
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = sext i8 %34 to i64
  %36 = getelementptr inbounds i32, ptr %32, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !10
  %38 = trunc i32 %37 to i8
  store i8 %38, ptr %33, align 1, !tbaa !9
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next.2
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = sext i8 %41 to i64
  %43 = getelementptr inbounds i32, ptr %39, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !10
  %45 = trunc i32 %44 to i8
  store i8 %45, ptr %40, align 1, !tbaa !9
  %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 %.unr-lcssa, label %17, !llvm.loop !12

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

.epil.preheader:                                  ; preds = %.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.unr-lcssa ]
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.epil
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = sext i8 %48 to i64
  %50 = getelementptr inbounds i32, ptr %46, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !10
  %52 = trunc i32 %51 to i8
  store i8 %52, ptr %47, align 1, !tbaa !9
  %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 %.epilog-lcssa, label %.epil.preheader, !llvm.loop !14

.epilog-lcssa:                                    ; preds = %.epil.preheader, %.unr-lcssa
  %53 = getelementptr inbounds i8, ptr %3, i64 300
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %53, align 4, !tbaa !16
  %56 = load ptr, ptr %3, align 8, !tbaa !19
  %57 = sext i32 %55 to i64
  %58 = shl nsw i64 %57, 3
  %59 = tail call ptr @my_realloc(ptr noundef %56, i64 noundef %58) #6
  store ptr %59, ptr %3, align 8, !tbaa !19
  %60 = getelementptr inbounds i8, ptr %3, i64 16
  %61 = load ptr, ptr %60, align 8, !tbaa !20
  %62 = load i32, ptr %53, align 4, !tbaa !16
  %63 = sext i32 %62 to i64
  %64 = shl nsw i64 %63, 3
  %65 = tail call ptr @my_realloc(ptr noundef %61, i64 noundef %64) #6
  store ptr %65, ptr %60, align 8, !tbaa !20
  %66 = getelementptr inbounds i8, ptr %3, i64 8
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = load i32, ptr %53, align 4, !tbaa !16
  %69 = sext i32 %68 to i64
  %70 = shl nsw i64 %69, 3
  %71 = tail call ptr @my_realloc(ptr noundef %67, i64 noundef %70) #6
  store ptr %71, ptr %66, align 8, !tbaa !21
  %72 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #7
  %73 = add i64 %72, 1
  %74 = tail call ptr @my_malloc(i64 noundef %73) #6
  %75 = load ptr, ptr %3, align 8, !tbaa !19
  %76 = sext i32 %54 to i64
  %77 = getelementptr inbounds ptr, ptr %75, i64 %76
  store ptr %74, ptr %77, align 8, !tbaa !5
  %78 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #7
  %79 = add i64 %78, 1
  %80 = tail call ptr @my_malloc(i64 noundef %79) #6
  %81 = load ptr, ptr %66, align 8, !tbaa !21
  %82 = getelementptr inbounds ptr, ptr %81, i64 %76
  store ptr %80, ptr %82, align 8, !tbaa !5
  %83 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #7
  %84 = add i64 %83, 1
  %85 = tail call ptr @my_malloc(i64 noundef %84) #6
  %86 = load ptr, ptr %60, align 8, !tbaa !20
  %87 = getelementptr inbounds ptr, ptr %86, i64 %76
  store ptr %85, ptr %87, align 8, !tbaa !5
  %88 = load ptr, ptr %3, align 8, !tbaa !19
  %89 = getelementptr inbounds ptr, ptr %88, i64 %76
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %90, ptr noundef nonnull dereferenceable(1) %0) #6
  %92 = load ptr, ptr %66, align 8, !tbaa !21
  %93 = getelementptr inbounds ptr, ptr %92, i64 %76
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %94, ptr noundef nonnull dereferenceable(1) %1) #6
  %96 = load ptr, ptr %60, align 8, !tbaa !20
  %97 = getelementptr inbounds ptr, ptr %96, i64 %76
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %98, ptr noundef nonnull dereferenceable(1) %2) #6
  %100 = tail call i32 @fclose(ptr noundef nonnull %8)
  br label %110

101:                                              ; preds = %9
  %102 = load ptr, ptr @stdout, align 8, !tbaa !5
  %103 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef nonnull @.str.11) #6
  br label %110

104:                                              ; preds = %6
  %105 = load ptr, ptr @stdout, align 8, !tbaa !5
  %106 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef nonnull @.str.12, ptr noundef %1) #6
  br label %110

107:                                              ; preds = %4
  %108 = load ptr, ptr @stdout, align 8, !tbaa !5
  %109 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef nonnull @.str.13, ptr noundef %0) #6
  br label %110

110:                                              ; preds = %.epilog-lcssa, %107, %104, %101
  %.0 = phi i32 [ 1, %.epilog-lcssa ], [ 0, %101 ], [ 0, %104 ], [ 0, %107 ]
  ret i32 %.0
}

declare ptr @fopen_pdb_check_case(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

declare ptr @my_realloc(ptr noundef, i64 noundef) local_unnamed_addr #0

attributes #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 nofree nounwind willreturn memory(argmem: readwrite) "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 = { 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 #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 = { 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 #5 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { nounwind willreturn memory(none) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = !{!17, !11, i64 300}
!17 = !{!"s_tparams", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !7, i64 168, !18, i64 296, !11, i64 300, !11, i64 304, !6, i64 312}
!18 = !{!"float", !7, i64 0}
!19 = !{!17, !6, i64 0}
!20 = !{!17, !6, i64 16}
!21 = !{!17, !6, i64 8}


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