; LLVM IR from freakout42/macrocalc :: arx/src (sql_wrip)

; 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.DBF = type { [1024 x i8], [1024 x i8], ptr, ptr, i32, i32, i8, i8, i8, i8, i8, i8, i8, i32, i32, i8, ptr, ptr, %struct.DBFPROLOG }
%struct.DBFPROLOG = type { i8, i8, i8, i8, i32, i16, i16, i16, i8, i8, [12 x i8], i8, [3 x i8] }
%struct.FIELD_RECORD = type { [11 x i8], i8, i32, i8, i8, [14 x i8] }

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @sql_wrip(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.DBF, ptr %6, i32 0, i32 3
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.DBF, ptr %9, i32 0, i32 1
  %11 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %12 = load i8, ptr %11, align 8, !tbaa !14
  %13 = sext i8 %12 to i32
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %1
  br label %20

16:                                               ; preds = %1
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.DBF, ptr %17, i32 0, i32 1
  %19 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  br label %20

20:                                               ; preds = %16, %15
  %21 = phi ptr [ @.str.1, %15 ], [ %19, %16 ]
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef @.str, ptr noundef %21) #5
  store i8 0, ptr %3, align 1, !tbaa !14
  br label %23

23:                                               ; preds = %59, %20
  %24 = load i8, ptr %3, align 1, !tbaa !14
  %25 = zext i8 %24 to i32
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.DBF, ptr %26, i32 0, i32 15
  %28 = load i8, ptr %27, align 8, !tbaa !15
  %29 = zext i8 %28 to i32
  %30 = icmp slt i32 %25, %29
  br i1 %30, label %31, label %62

31:                                               ; preds = %23
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.DBF, ptr %32, i32 0, i32 16
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = load i8, ptr %3, align 1, !tbaa !14
  %36 = zext i8 %35 to i64
  %37 = getelementptr inbounds %struct.FIELD_RECORD, ptr %34, i64 %36
  store ptr %37, ptr %4, align 8, !tbaa !5
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.DBF, ptr %38, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.FIELD_RECORD, ptr %41, i32 0, i32 0
  %43 = getelementptr inbounds [11 x i8], ptr %42, i64 0, i64 0
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef @.str.2, i32 noundef 11, ptr noundef %43) #5
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.DBF, ptr %45, i32 0, i32 3
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  %48 = load i8, ptr %3, align 1, !tbaa !14
  %49 = zext i8 %48 to i32
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.DBF, ptr %50, i32 0, i32 15
  %52 = load i8, ptr %51, align 8, !tbaa !15
  %53 = zext i8 %52 to i32
  %54 = sub nsw i32 %53, 1
  %55 = icmp eq i32 %49, %54
  %56 = zext i1 %55 to i64
  %57 = select i1 %55, ptr @.str.4, ptr @.str.5
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef @.str.3, ptr noundef %57) #5
  br label %59

59:                                               ; preds = %31
  %60 = load i8, ptr %3, align 1, !tbaa !14
  %61 = add i8 %60, 1
  store i8 %61, ptr %3, align 1, !tbaa !14
  br label %23, !llvm.loop !17

62:                                               ; preds = %23
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.DBF, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.6) #5
  store i8 0, ptr %3, align 1, !tbaa !14
  br label %67

67:                                               ; preds = %201, %62
  %68 = load i8, ptr %3, align 1, !tbaa !14
  %69 = zext i8 %68 to i32
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.DBF, ptr %70, i32 0, i32 15
  %72 = load i8, ptr %71, align 8, !tbaa !15
  %73 = zext i8 %72 to i32
  %74 = icmp slt i32 %69, %73
  br i1 %74, label %75, label %204

75:                                               ; preds = %67
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.DBF, ptr %76, i32 0, i32 16
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  %79 = load i8, ptr %3, align 1, !tbaa !14
  %80 = zext i8 %79 to i64
  %81 = getelementptr inbounds %struct.FIELD_RECORD, ptr %78, i64 %80
  store ptr %81, ptr %4, align 8, !tbaa !5
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.DBF, ptr %82, i32 0, i32 17
  %84 = load ptr, ptr %83, align 8, !tbaa !19
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.FIELD_RECORD, ptr %85, i32 0, i32 2
  %87 = load i32, ptr %86, align 4, !tbaa !20
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %84, i64 %88
  store ptr %89, ptr %5, align 8, !tbaa !5
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.FIELD_RECORD, ptr %90, i32 0, i32 1
  %92 = load i8, ptr %91, align 1, !tbaa !22
  %93 = zext i8 %92 to i32
  switch i32 %93, label %186 [
    i32 68, label %94
    i32 78, label %104
    i32 70, label %104
    i32 76, label %118
    i32 67, label %138
  ]

94:                                               ; preds = %75
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.DBF, ptr %95, i32 0, i32 3
  %97 = load ptr, ptr %96, align 8, !tbaa !9
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 4
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %101, i64 6
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.7, ptr noundef %98, ptr noundef %100, ptr noundef %102) #5
  br label %186

104:                                              ; preds = %75, %75
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.DBF, ptr %105, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !9
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = load i8, ptr %108, align 1, !tbaa !14
  %110 = sext i8 %109 to i32
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %112, label %113

112:                                              ; preds = %104
  br label %115

113:                                              ; preds = %104
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %113, %112
  %116 = phi ptr [ @.str.8, %112 ], [ %114, %113 ]
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str.3, ptr noundef %116) #5
  br label %186

118:                                              ; preds = %75
  %119 = load ptr, ptr %2, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.DBF, ptr %119, i32 0, i32 3
  %121 = load ptr, ptr %120, align 8, !tbaa !9
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = load i8, ptr %122, align 1, !tbaa !14
  %124 = sext i8 %123 to i32
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %118
  br label %135

127:                                              ; preds = %118
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = load i8, ptr %128, align 1, !tbaa !14
  %130 = sext i8 %129 to i32
  %131 = call ptr @strchr(ptr noundef @.str.9, i32 noundef %130) #6
  %132 = icmp ne ptr %131, null
  %133 = zext i1 %132 to i64
  %134 = select i1 %132, ptr @.str.10, ptr @.str.11
  br label %135

135:                                              ; preds = %127, %126
  %136 = phi ptr [ @.str.8, %126 ], [ %134, %127 ]
  %137 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.3, ptr noundef %136) #5
  br label %186

138:                                              ; preds = %75
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.DBF, ptr %139, i32 0, i32 3
  %141 = load ptr, ptr %140, align 8, !tbaa !9
  %142 = call i32 @fputc(i32 noundef 39, ptr noundef %141)
  br label %143

143:                                              ; preds = %172, %138
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = load i8, ptr %144, align 1, !tbaa !14
  %146 = icmp ne i8 %145, 0
  br i1 %146, label %147, label %181

147:                                              ; preds = %143
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = load i8, ptr %148, align 1, !tbaa !14
  %150 = sext i8 %149 to i32
  %151 = icmp eq i32 %150, 39
  br i1 %151, label %167, label %152

152:                                              ; preds = %147
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = load i8, ptr %153, align 1, !tbaa !14
  %155 = sext i8 %154 to i32
  %156 = icmp eq i32 %155, 92
  br i1 %156, label %167, label %157

157:                                              ; preds = %152
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = load i8, ptr %158, align 1, !tbaa !14
  %160 = sext i8 %159 to i32
  %161 = icmp eq i32 %160, 37
  br i1 %161, label %167, label %162

162:                                              ; preds = %157
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load i8, ptr %163, align 1, !tbaa !14
  %165 = sext i8 %164 to i32
  %166 = icmp eq i32 %165, 95
  br i1 %166, label %167, label %172

167:                                              ; preds = %162, %157, %152, %147
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.DBF, ptr %168, i32 0, i32 3
  %170 = load ptr, ptr %169, align 8, !tbaa !9
  %171 = call i32 @fputc(i32 noundef 92, ptr noundef %170)
  br label %172

172:                                              ; preds = %167, %162
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds i8, ptr %173, i32 1
  store ptr %174, ptr %5, align 8, !tbaa !5
  %175 = load i8, ptr %173, align 1, !tbaa !14
  %176 = sext i8 %175 to i32
  %177 = load ptr, ptr %2, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.DBF, ptr %177, i32 0, i32 3
  %179 = load ptr, ptr %178, align 8, !tbaa !9
  %180 = call i32 @fputc(i32 noundef %176, ptr noundef %179)
  br label %143, !llvm.loop !23

181:                                              ; preds = %143
  %182 = load ptr, ptr %2, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.DBF, ptr %182, i32 0, i32 3
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %185 = call i32 @fputc(i32 noundef 39, ptr noundef %184)
  br label %186

186:                                              ; preds = %181, %135, %115, %94, %75
  %187 = load ptr, ptr %2, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.DBF, ptr %187, i32 0, i32 3
  %189 = load ptr, ptr %188, align 8, !tbaa !9
  %190 = load i8, ptr %3, align 1, !tbaa !14
  %191 = zext i8 %190 to i32
  %192 = load ptr, ptr %2, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.DBF, ptr %192, i32 0, i32 15
  %194 = load i8, ptr %193, align 8, !tbaa !15
  %195 = zext i8 %194 to i32
  %196 = sub nsw i32 %195, 1
  %197 = icmp eq i32 %191, %196
  %198 = zext i1 %197 to i64
  %199 = select i1 %197, ptr @.str.4, ptr @.str.5
  %200 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef @.str.3, ptr noundef %199) #5
  br label %201

201:                                              ; preds = %186
  %202 = load i8, ptr %3, align 1, !tbaa !14
  %203 = add i8 %202, 1
  store i8 %203, ptr %3, align 1, !tbaa !14
  br label %67, !llvm.loop !24

204:                                              ; preds = %67
  %205 = load ptr, ptr %2, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.DBF, ptr %205, i32 0, i32 3
  %207 = load ptr, ptr %206, align 8, !tbaa !9
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef @.str.12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  ret i32 0
}

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

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

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

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

; 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 = { 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 = { "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 }
attributes #6 = { nounwind willreturn memory(read) }

!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, !6, i64 2056}
!10 = !{!"DBF", !7, i64 0, !7, i64 1024, !6, i64 2048, !6, i64 2056, !11, i64 2064, !11, i64 2068, !7, i64 2072, !7, i64 2073, !7, i64 2074, !7, i64 2075, !7, i64 2076, !7, i64 2077, !7, i64 2078, !11, i64 2080, !11, i64 2084, !7, i64 2088, !6, i64 2096, !6, i64 2104, !12, i64 2112}
!11 = !{!"int", !7, i64 0}
!12 = !{!"DBFPROLOG", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !11, i64 4, !13, i64 8, !13, i64 10, !13, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 28, !7, i64 29}
!13 = !{!"short", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!10, !7, i64 2088}
!16 = !{!10, !6, i64 2096}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!10, !6, i64 2104}
!20 = !{!21, !11, i64 12}
!21 = !{!"FIELD_RECORD", !7, i64 0, !7, i64 11, !11, i64 12, !7, i64 16, !7, i64 17, !7, i64 18}
!22 = !{!21, !7, i64 11}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}


; 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.FIELD_RECORD = type { [11 x i8], i8, i32, i8, i8, [14 x i8] }

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @sql_wrip(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 2056
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 1024
  %5 = load i8, ptr %4, align 8, !tbaa !13
  %6 = icmp eq i8 %5, 0
  %7 = select i1 %6, ptr @.str.1, ptr %4
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef nonnull @.str, ptr noundef nonnull %7) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 2088
  %10 = load i8, ptr %9, align 8, !tbaa !14
  %.not = icmp eq i8 %10, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %11 = getelementptr inbounds i8, ptr %0, i64 2096
  br label %12

12:                                               ; preds = %.lr.ph, %12
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %12 ]
  %13 = trunc nuw i64 %indvars.iv to i32
  %14 = load ptr, ptr %11, align 8, !tbaa !15
  %15 = getelementptr inbounds %struct.FIELD_RECORD, ptr %14, i64 %indvars.iv
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.2, i32 noundef 11, ptr noundef %15) #3
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = load i8, ptr %9, align 8, !tbaa !14
  %20 = zext i8 %19 to i32
  %21 = add nsw i32 %20, -1
  %22 = icmp eq i32 %21, %13
  %23 = select i1 %22, ptr @.str.4, ptr @.str.5
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.3, ptr noundef nonnull %23) #3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i8, ptr %9, align 8, !tbaa !14
  %26 = zext i8 %25 to i64
  %27 = icmp ult i64 %indvars.iv.next, %26
  br i1 %27, label %12, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %12, %1
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.6) #3
  %30 = load i8, ptr %9, align 8, !tbaa !14
  %.not57 = icmp eq i8 %30, 0
  br i1 %.not57, label %._crit_edge56, label %.lr.ph55

.lr.ph55:                                         ; preds = %._crit_edge
  %31 = getelementptr inbounds i8, ptr %0, i64 2096
  %32 = getelementptr inbounds i8, ptr %0, i64 2104
  br label %33

33:                                               ; preds = %.lr.ph55, %79
  %indvars.iv59 = phi i64 [ 0, %.lr.ph55 ], [ %indvars.iv.next60, %79 ]
  %34 = phi i32 [ 0, %.lr.ph55 ], [ %87, %79 ]
  %35 = load ptr, ptr %31, align 8, !tbaa !15
  %36 = getelementptr inbounds %struct.FIELD_RECORD, ptr %35, i64 %indvars.iv59
  %37 = load ptr, ptr %32, align 8, !tbaa !18
  %38 = getelementptr inbounds i8, ptr %36, i64 12
  %39 = load i32, ptr %38, align 4, !tbaa !19
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i8, ptr %37, i64 %40
  %42 = getelementptr inbounds i8, ptr %36, i64 11
  %43 = load i8, ptr %42, align 1, !tbaa !21
  switch i8 %43, label %79 [
    i8 68, label %44
    i8 78, label %49
    i8 70, label %49
    i8 76, label %55
    i8 67, label %.preheader
  ]

44:                                               ; preds = %33
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %41, i64 4
  %47 = getelementptr inbounds i8, ptr %41, i64 6
  %48 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.7, ptr noundef %41, ptr noundef nonnull %46, ptr noundef nonnull %47) #3
  br label %79

49:                                               ; preds = %33, %33
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = load i8, ptr %41, align 1, !tbaa !13
  %52 = icmp eq i8 %51, 0
  %53 = select i1 %52, ptr @.str.8, ptr %41
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull @.str.3, ptr noundef nonnull %53) #3
  br label %79

55:                                               ; preds = %33
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = load i8, ptr %41, align 1, !tbaa !13
  %58 = icmp eq i8 %57, 0
  br i1 %58, label %63, label %59

59:                                               ; preds = %55
  %60 = sext i8 %57 to i32
  %61 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %60) #4
  %.not51 = icmp eq ptr %61, null
  %62 = select i1 %.not51, ptr @.str.11, ptr @.str.10
  br label %63

63:                                               ; preds = %55, %59
  %64 = phi ptr [ %62, %59 ], [ @.str.8, %55 ]
  %65 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.3, ptr noundef nonnull %64) #3
  br label %79

.preheader:                                       ; preds = %33, %72
  %.sink = phi i32 [ %75, %72 ], [ 39, %33 ]
  %.0 = phi ptr [ %74, %72 ], [ %41, %33 ]
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = tail call i32 @fputc(i32 noundef %.sink, ptr noundef %66)
  %68 = load i8, ptr %.0, align 1, !tbaa !13
  switch i8 %68, label %72 [
    i8 0, label %76
    i8 39, label %69
    i8 92, label %69
    i8 37, label %69
    i8 95, label %69
  ]

69:                                               ; preds = %.preheader, %.preheader, %.preheader, %.preheader
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = tail call i32 @fputc(i32 noundef 92, ptr noundef %70)
  %.pre = load i8, ptr %.0, align 1, !tbaa !13
  br label %72

72:                                               ; preds = %.preheader, %69
  %73 = phi i8 [ %68, %.preheader ], [ %.pre, %69 ]
  %74 = getelementptr inbounds i8, ptr %.0, i64 1
  %75 = sext i8 %73 to i32
  br label %.preheader, !llvm.loop !22

76:                                               ; preds = %.preheader
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = tail call i32 @fputc(i32 noundef 39, ptr noundef %77)
  br label %79

79:                                               ; preds = %76, %63, %49, %44, %33
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = load i8, ptr %9, align 8, !tbaa !14
  %82 = zext i8 %81 to i32
  %83 = add nsw i32 %82, -1
  %84 = icmp eq i32 %83, %34
  %85 = select i1 %84, ptr @.str.4, ptr @.str.5
  %86 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.3, ptr noundef nonnull %85) #3
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %87 = trunc nuw i64 %indvars.iv.next60 to i32
  %88 = load i8, ptr %9, align 8, !tbaa !14
  %89 = zext i8 %88 to i64
  %90 = icmp ult i64 %indvars.iv.next60, %89
  br i1 %90, label %33, label %._crit_edge56, !llvm.loop !23

._crit_edge56:                                    ; preds = %79, %._crit_edge
  %91 = load ptr, ptr %2, align 8, !tbaa !5
  %92 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef nonnull @.str.12) #3
  ret i32 0
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strchr(ptr noundef, i32 noundef) local_unnamed_addr #2

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

attributes #0 = { nofree 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 = { 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 = { nounwind }
attributes #4 = { nounwind willreturn memory(read) }

!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, !9, i64 2056}
!6 = !{!"DBF", !7, i64 0, !7, i64 1024, !9, i64 2048, !9, i64 2056, !10, i64 2064, !10, i64 2068, !7, i64 2072, !7, i64 2073, !7, i64 2074, !7, i64 2075, !7, i64 2076, !7, i64 2077, !7, i64 2078, !10, i64 2080, !10, i64 2084, !7, i64 2088, !9, i64 2096, !9, i64 2104, !11, i64 2112}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"DBFPROLOG", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !10, i64 4, !12, i64 8, !12, i64 10, !12, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 28, !7, i64 29}
!12 = !{!"short", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!6, !7, i64 2088}
!15 = !{!6, !9, i64 2096}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!6, !9, i64 2104}
!19 = !{!20, !10, i64 12}
!20 = !{!"FIELD_RECORD", !7, i64 0, !7, i64 11, !10, i64 12, !7, i64 16, !7, i64 17, !7, i64 18}
!21 = !{!20, !7, i64 11}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}


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