; LLVM IR from caryll/otfcc :: lib/table/vdmx (funcs)

; 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.otfcc_Options = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, ptr, ptr }
%struct.otfcc_ILogger = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.table_VDMX = type { i16, %struct.vdmx_RatioRagneList }
%struct.vdmx_RatioRagneList = type { i64, i64, ptr }
%struct.vdmx_RatioRange = type { i8, i8, i8, i8, %struct.vdmx_Group }
%struct.vdmx_Group = type { i64, i64, ptr }
%struct.vdmx_Record = type { i16, i16, i16 }

@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 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

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

declare ptr @sdscatprintf(ptr noundef, ptr noundef, ...) #1

declare ptr @sdsempty() #1

; Function Attrs: nounwind uwtable
define dso_local void @otfcc_dumpVDMX(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %23, label %22

22:                                               ; preds = %3
  br label %214

23:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #3
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.otfcc_Options, ptr %24, i32 0, i32 24
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.otfcc_ILogger, ptr %26, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !12
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.otfcc_Options, ptr %29, i32 0, i32 24
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call ptr @sdsempty()
  %33 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %32, ptr noundef @.str.1)
  call void %28(ptr noundef %31, ptr noundef %33)
  store i8 1, ptr %7, align 1, !tbaa !14
  br label %34

34:                                               ; preds = %205, %23
  %35 = load i8, ptr %7, align 1, !tbaa !14, !range !15, !noundef !16
  %36 = trunc i8 %35 to i1
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #3
  br label %214

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %39 = call ptr @json_object_new(i64 noundef 2)
  store ptr %39, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.table_VDMX, ptr %41, i32 0, i32 0
  %43 = load i16, ptr %42, align 8, !tbaa !17
  %44 = zext i16 %43 to i64
  %45 = call ptr @json_integer_new(i64 noundef %44)
  %46 = call ptr @json_object_push(ptr noundef %40, ptr noundef @.str.2, ptr noundef %45)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.table_VDMX, ptr %47, i32 0, i32 1
  %49 = getelementptr inbounds %struct.vdmx_RatioRagneList, ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !22
  %51 = call ptr @json_array_new(i64 noundef %50)
  store ptr %51, ptr %10, align 8, !tbaa !5
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = call ptr @json_object_push(ptr noundef %52, ptr noundef @.str.3, ptr noundef %53)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 0, ptr %11, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 1, ptr %12, align 8, !tbaa !23
  br label %55

55:                                               ; preds = %193, %38
  %56 = load i64, ptr %12, align 8, !tbaa !23
  %57 = icmp ne i64 %56, 0
  br i1 %57, label %58, label %65

58:                                               ; preds = %55
  %59 = load i64, ptr %11, align 8, !tbaa !23
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.table_VDMX, ptr %60, i32 0, i32 1
  %62 = getelementptr inbounds %struct.vdmx_RatioRagneList, ptr %61, i32 0, i32 0
  %63 = load i64, ptr %62, align 8, !tbaa !22
  %64 = icmp ult i64 %59, %63
  br label %65

65:                                               ; preds = %58, %55
  %66 = phi i1 [ false, %55 ], [ %64, %58 ]
  br i1 %66, label %68, label %67

67:                                               ; preds = %65
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %201

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.table_VDMX, ptr %69, i32 0, i32 1
  %71 = getelementptr inbounds %struct.vdmx_RatioRagneList, ptr %70, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !24
  %73 = load i64, ptr %11, align 8, !tbaa !23
  %74 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %72, i64 %73
  store ptr %74, ptr %13, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %186, %68
  %76 = load i64, ptr %12, align 8, !tbaa !23
  %77 = icmp ne i64 %76, 0
  br i1 %77, label %79, label %78

78:                                               ; preds = %75
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %192

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %80 = call ptr @json_object_new(i64 noundef 5)
  store ptr %80, ptr %14, align 8, !tbaa !5
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = call ptr @json_array_push(ptr noundef %81, ptr noundef %82)
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %85, i32 0, i32 0
  %87 = load i8, ptr %86, align 8, !tbaa !25
  %88 = zext i8 %87 to i64
  %89 = call ptr @json_integer_new(i64 noundef %88)
  %90 = call ptr @json_object_push(ptr noundef %84, ptr noundef @.str.4, ptr noundef %89)
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %92, i32 0, i32 1
  %94 = load i8, ptr %93, align 1, !tbaa !27
  %95 = zext i8 %94 to i64
  %96 = call ptr @json_integer_new(i64 noundef %95)
  %97 = call ptr @json_object_push(ptr noundef %91, ptr noundef @.str.5, ptr noundef %96)
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %99, i32 0, i32 2
  %101 = load i8, ptr %100, align 2, !tbaa !28
  %102 = zext i8 %101 to i64
  %103 = call ptr @json_integer_new(i64 noundef %102)
  %104 = call ptr @json_object_push(ptr noundef %98, ptr noundef @.str.6, ptr noundef %103)
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %106, i32 0, i32 3
  %108 = load i8, ptr %107, align 1, !tbaa !29
  %109 = zext i8 %108 to i64
  %110 = call ptr @json_integer_new(i64 noundef %109)
  %111 = call ptr @json_object_push(ptr noundef %105, ptr noundef @.str.7, ptr noundef %110)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %112, i32 0, i32 4
  %114 = getelementptr inbounds %struct.vdmx_Group, ptr %113, i32 0, i32 0
  %115 = load i64, ptr %114, align 8, !tbaa !30
  %116 = call ptr @json_array_new(i64 noundef %115)
  store ptr %116, ptr %15, align 8, !tbaa !5
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = call ptr @json_object_push(ptr noundef %117, ptr noundef @.str.8, ptr noundef %118)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 0, ptr %16, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store i64 1, ptr %17, align 8, !tbaa !23
  br label %120

120:                                              ; preds = %177, %79
  %121 = load i64, ptr %17, align 8, !tbaa !23
  %122 = icmp ne i64 %121, 0
  br i1 %122, label %123, label %130

123:                                              ; preds = %120
  %124 = load i64, ptr %16, align 8, !tbaa !23
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %125, i32 0, i32 4
  %127 = getelementptr inbounds %struct.vdmx_Group, ptr %126, i32 0, i32 0
  %128 = load i64, ptr %127, align 8, !tbaa !30
  %129 = icmp ult i64 %124, %128
  br label %130

130:                                              ; preds = %123, %120
  %131 = phi i1 [ false, %120 ], [ %129, %123 ]
  br i1 %131, label %133, label %132

132:                                              ; preds = %130
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %185

133:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %134, i32 0, i32 4
  %136 = getelementptr inbounds %struct.vdmx_Group, ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !31
  %138 = load i64, ptr %16, align 8, !tbaa !23
  %139 = getelementptr inbounds %struct.vdmx_Record, ptr %137, i64 %138
  store ptr %139, ptr %18, align 8, !tbaa !5
  br label %140

140:                                              ; preds = %170, %133
  %141 = load i64, ptr %17, align 8, !tbaa !23
  %142 = icmp ne i64 %141, 0
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  br label %176

144:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %145 = call ptr @json_object_new(i64 noundef 3)
  store ptr %145, ptr %19, align 8, !tbaa !5
  %146 = load ptr, ptr %15, align 8, !tbaa !5
  %147 = load ptr, ptr %19, align 8, !tbaa !5
  %148 = call ptr @json_array_push(ptr noundef %146, ptr noundef %147)
  %149 = load ptr, ptr %19, align 8, !tbaa !5
  %150 = load ptr, ptr %18, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.vdmx_Record, ptr %150, i32 0, i32 0
  %152 = load i16, ptr %151, align 2, !tbaa !32
  %153 = zext i16 %152 to i64
  %154 = call ptr @json_integer_new(i64 noundef %153)
  %155 = call ptr @json_object_push(ptr noundef %149, ptr noundef @.str.9, ptr noundef %154)
  %156 = load ptr, ptr %19, align 8, !tbaa !5
  %157 = load ptr, ptr %18, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.vdmx_Record, ptr %157, i32 0, i32 1
  %159 = load i16, ptr %158, align 2, !tbaa !34
  %160 = sext i16 %159 to i64
  %161 = call ptr @json_integer_new(i64 noundef %160)
  %162 = call ptr @json_object_push(ptr noundef %156, ptr noundef @.str.10, ptr noundef %161)
  %163 = load ptr, ptr %19, align 8, !tbaa !5
  %164 = load ptr, ptr %18, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.vdmx_Record, ptr %164, i32 0, i32 2
  %166 = load i16, ptr %165, align 2, !tbaa !35
  %167 = sext i16 %166 to i64
  %168 = call ptr @json_integer_new(i64 noundef %167)
  %169 = call ptr @json_object_push(ptr noundef %163, ptr noundef @.str.11, ptr noundef %168)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  br label %170

170:                                              ; preds = %144
  %171 = load i64, ptr %17, align 8, !tbaa !23
  %172 = icmp ne i64 %171, 0
  %173 = xor i1 %172, true
  %174 = zext i1 %173 to i32
  %175 = sext i32 %174 to i64
  store i64 %175, ptr %17, align 8, !tbaa !23
  br label %140, !llvm.loop !36

176:                                              ; preds = %143
  br label %177

177:                                              ; preds = %176
  %178 = load i64, ptr %17, align 8, !tbaa !23
  %179 = icmp ne i64 %178, 0
  %180 = xor i1 %179, true
  %181 = zext i1 %180 to i32
  %182 = sext i32 %181 to i64
  store i64 %182, ptr %17, align 8, !tbaa !23
  %183 = load i64, ptr %16, align 8, !tbaa !23
  %184 = add i64 %183, 1
  store i64 %184, ptr %16, align 8, !tbaa !23
  br label %120, !llvm.loop !38

185:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %186

186:                                              ; preds = %185
  %187 = load i64, ptr %12, align 8, !tbaa !23
  %188 = icmp ne i64 %187, 0
  %189 = xor i1 %188, true
  %190 = zext i1 %189 to i32
  %191 = sext i32 %190 to i64
  store i64 %191, ptr %12, align 8, !tbaa !23
  br label %75, !llvm.loop !39

192:                                              ; preds = %78
  br label %193

193:                                              ; preds = %192
  %194 = load i64, ptr %12, align 8, !tbaa !23
  %195 = icmp ne i64 %194, 0
  %196 = xor i1 %195, true
  %197 = zext i1 %196 to i32
  %198 = sext i32 %197 to i64
  store i64 %198, ptr %12, align 8, !tbaa !23
  %199 = load i64, ptr %11, align 8, !tbaa !23
  %200 = add i64 %199, 1
  store i64 %200, ptr %11, align 8, !tbaa !23
  br label %55, !llvm.loop !40

201:                                              ; preds = %67
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = load ptr, ptr %9, align 8, !tbaa !5
  %204 = call ptr @json_object_push(ptr noundef %202, ptr noundef @.str.1, ptr noundef %203)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %205

205:                                              ; preds = %201
  store i8 0, ptr %7, align 1, !tbaa !14
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.otfcc_Options, ptr %206, i32 0, i32 24
  %208 = load ptr, ptr %207, align 8, !tbaa !9
  %209 = getelementptr inbounds %struct.otfcc_ILogger, ptr %208, i32 0, i32 8
  %210 = load ptr, ptr %209, align 8, !tbaa !41
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.otfcc_Options, ptr %211, i32 0, i32 24
  %213 = load ptr, ptr %212, align 8, !tbaa !9
  call void %210(ptr noundef %213)
  br label %34, !llvm.loop !42

214:                                              ; preds = %37, %22
  ret void
}

declare ptr @json_object_new(i64 noundef) #1

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

declare ptr @json_integer_new(i64 noundef) #1

declare ptr @json_array_new(i64 noundef) #1

declare ptr @json_array_push(ptr noundef, ptr 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 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 #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"", !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3, !11, i64 4, !11, i64 5, !11, i64 6, !11, i64 7, !11, i64 8, !11, i64 9, !11, i64 10, !11, i64 11, !11, i64 12, !11, i64 13, !11, i64 14, !11, i64 15, !11, i64 16, !11, i64 17, !11, i64 18, !11, i64 19, !11, i64 20, !11, i64 21, !11, i64 22, !6, i64 24, !6, i64 32}
!11 = !{!"_Bool", !7, i64 0}
!12 = !{!13, !6, i64 32}
!13 = !{!"otfcc_ILogger", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!14 = !{!11, !11, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !19, i64 0}
!18 = !{!"", !19, i64 0, !20, i64 8}
!19 = !{!"short", !7, i64 0}
!20 = !{!"", !21, i64 0, !21, i64 8, !6, i64 16}
!21 = !{!"long", !7, i64 0}
!22 = !{!18, !21, i64 8}
!23 = !{!21, !21, i64 0}
!24 = !{!18, !6, i64 24}
!25 = !{!26, !7, i64 0}
!26 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !20, i64 8}
!27 = !{!26, !7, i64 1}
!28 = !{!26, !7, i64 2}
!29 = !{!26, !7, i64 3}
!30 = !{!26, !21, i64 8}
!31 = !{!26, !6, i64 24}
!32 = !{!33, !19, i64 0}
!33 = !{!"", !19, i64 0, !19, i64 2, !19, i64 4}
!34 = !{!33, !19, i64 2}
!35 = !{!33, !19, i64 4}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}
!39 = distinct !{!39, !37}
!40 = distinct !{!40, !37}
!41 = !{!13, !6, i64 64}
!42 = distinct !{!42, !37}


; 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.vdmx_RatioRange = type { i8, i8, i8, i8, %struct.vdmx_Group }
%struct.vdmx_Group = type { i64, i64, ptr }
%struct.vdmx_Record = type { i16, i16, i16 }

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

declare ptr @sdscatprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #0

declare ptr @sdsempty() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @otfcc_dumpVDMX(ptr noundef readonly %0, ptr noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %78, label %.critedge62

.critedge62:                                      ; preds = %3
  %4 = getelementptr inbounds i8, ptr %2, i64 32
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 32
  %7 = load ptr, ptr %6, align 8, !tbaa !11
  %8 = tail call ptr @sdsempty() #2
  %9 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %8, ptr noundef nonnull @.str.1) #2
  tail call void %7(ptr noundef %5, ptr noundef %9) #2
  %10 = tail call ptr @json_object_new(i64 noundef 2) #2
  %11 = load i16, ptr %0, align 8, !tbaa !13
  %12 = zext i16 %11 to i64
  %13 = tail call ptr @json_integer_new(i64 noundef %12) #2
  %14 = tail call ptr @json_object_push(ptr noundef %10, ptr noundef nonnull @.str.2, ptr noundef %13) #2
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load i64, ptr %15, align 8, !tbaa !18
  %17 = tail call ptr @json_array_new(i64 noundef %16) #2
  %18 = tail call ptr @json_object_push(ptr noundef %10, ptr noundef nonnull @.str.3, ptr noundef %17) #2
  %19 = load i64, ptr %15, align 8, !tbaa !18
  %.not69 = icmp eq i64 %19, 0
  br i1 %.not69, label %.critedge, label %.critedge64.lr.ph

.critedge64.lr.ph:                                ; preds = %.critedge62
  %20 = getelementptr inbounds i8, ptr %0, i64 24
  br label %.critedge64

.critedge:                                        ; preds = %.critedge2, %.critedge62
  %21 = tail call ptr @json_object_push(ptr noundef %1, ptr noundef nonnull @.str.1, ptr noundef %10) #2
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 64
  %24 = load ptr, ptr %23, align 8, !tbaa !19
  tail call void %24(ptr noundef %22) #2
  br label %78

.critedge64:                                      ; preds = %.critedge64.lr.ph, %.critedge2
  %.05568 = phi i64 [ 0, %.critedge64.lr.ph ], [ %54, %.critedge2 ]
  %25 = load ptr, ptr %20, align 8, !tbaa !20
  %26 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %25, i64 %.05568
  %27 = tail call ptr @json_object_new(i64 noundef 5) #2
  %28 = tail call ptr @json_array_push(ptr noundef %17, ptr noundef %27) #2
  %29 = load i8, ptr %26, align 8, !tbaa !21
  %30 = zext i8 %29 to i64
  %31 = tail call ptr @json_integer_new(i64 noundef %30) #2
  %32 = tail call ptr @json_object_push(ptr noundef %27, ptr noundef nonnull @.str.4, ptr noundef %31) #2
  %33 = getelementptr inbounds i8, ptr %26, i64 1
  %34 = load i8, ptr %33, align 1, !tbaa !23
  %35 = zext i8 %34 to i64
  %36 = tail call ptr @json_integer_new(i64 noundef %35) #2
  %37 = tail call ptr @json_object_push(ptr noundef %27, ptr noundef nonnull @.str.5, ptr noundef %36) #2
  %38 = getelementptr inbounds i8, ptr %26, i64 2
  %39 = load i8, ptr %38, align 2, !tbaa !24
  %40 = zext i8 %39 to i64
  %41 = tail call ptr @json_integer_new(i64 noundef %40) #2
  %42 = tail call ptr @json_object_push(ptr noundef %27, ptr noundef nonnull @.str.6, ptr noundef %41) #2
  %43 = getelementptr inbounds i8, ptr %26, i64 3
  %44 = load i8, ptr %43, align 1, !tbaa !25
  %45 = zext i8 %44 to i64
  %46 = tail call ptr @json_integer_new(i64 noundef %45) #2
  %47 = tail call ptr @json_object_push(ptr noundef %27, ptr noundef nonnull @.str.7, ptr noundef %46) #2
  %48 = getelementptr inbounds i8, ptr %26, i64 8
  %49 = load i64, ptr %48, align 8, !tbaa !26
  %50 = tail call ptr @json_array_new(i64 noundef %49) #2
  %51 = tail call ptr @json_object_push(ptr noundef %27, ptr noundef nonnull @.str.8, ptr noundef %50) #2
  %52 = load i64, ptr %48, align 8, !tbaa !26
  %.not70 = icmp eq i64 %52, 0
  br i1 %.not70, label %.critedge2, label %.critedge66.lr.ph

.critedge66.lr.ph:                                ; preds = %.critedge64
  %53 = getelementptr inbounds i8, ptr %26, i64 24
  br label %.critedge66

.critedge2:                                       ; preds = %.critedge66, %.critedge64
  %54 = add nuw i64 %.05568, 1
  %55 = load i64, ptr %15, align 8, !tbaa !18
  %56 = icmp ult i64 %54, %55
  br i1 %56, label %.critedge64, label %.critedge, !llvm.loop !27

.critedge66:                                      ; preds = %.critedge66.lr.ph, %.critedge66
  %.05467 = phi i64 [ 0, %.critedge66.lr.ph ], [ %75, %.critedge66 ]
  %57 = load ptr, ptr %53, align 8, !tbaa !29
  %58 = getelementptr inbounds %struct.vdmx_Record, ptr %57, i64 %.05467
  %59 = tail call ptr @json_object_new(i64 noundef 3) #2
  %60 = tail call ptr @json_array_push(ptr noundef %50, ptr noundef %59) #2
  %61 = load i16, ptr %58, align 2, !tbaa !30
  %62 = zext i16 %61 to i64
  %63 = tail call ptr @json_integer_new(i64 noundef %62) #2
  %64 = tail call ptr @json_object_push(ptr noundef %59, ptr noundef nonnull @.str.9, ptr noundef %63) #2
  %65 = getelementptr inbounds i8, ptr %58, i64 2
  %66 = load i16, ptr %65, align 2, !tbaa !32
  %67 = sext i16 %66 to i64
  %68 = tail call ptr @json_integer_new(i64 noundef %67) #2
  %69 = tail call ptr @json_object_push(ptr noundef %59, ptr noundef nonnull @.str.10, ptr noundef %68) #2
  %70 = getelementptr inbounds i8, ptr %58, i64 4
  %71 = load i16, ptr %70, align 2, !tbaa !33
  %72 = sext i16 %71 to i64
  %73 = tail call ptr @json_integer_new(i64 noundef %72) #2
  %74 = tail call ptr @json_object_push(ptr noundef %59, ptr noundef nonnull @.str.11, ptr noundef %73) #2
  %75 = add nuw i64 %.05467, 1
  %76 = load i64, ptr %48, align 8, !tbaa !26
  %77 = icmp ult i64 %75, %76
  br i1 %77, label %.critedge66, label %.critedge2, !llvm.loop !34

78:                                               ; preds = %3, %.critedge
  ret void
}

declare ptr @json_object_new(i64 noundef) local_unnamed_addr #0

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

declare ptr @json_integer_new(i64 noundef) local_unnamed_addr #0

declare ptr @json_array_new(i64 noundef) local_unnamed_addr #0

declare ptr @json_array_push(ptr noundef, ptr 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 = { 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 #2 = { 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, !10, i64 32}
!6 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !7, i64 22, !10, i64 24, !10, i64 32}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"otfcc_ILogger", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88}
!13 = !{!14, !15, i64 0}
!14 = !{!"", !15, i64 0, !16, i64 8}
!15 = !{!"short", !8, i64 0}
!16 = !{!"", !17, i64 0, !17, i64 8, !10, i64 16}
!17 = !{!"long", !8, i64 0}
!18 = !{!14, !17, i64 8}
!19 = !{!12, !10, i64 64}
!20 = !{!14, !10, i64 24}
!21 = !{!22, !8, i64 0}
!22 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !16, i64 8}
!23 = !{!22, !8, i64 1}
!24 = !{!22, !8, i64 2}
!25 = !{!22, !8, i64 3}
!26 = !{!22, !17, i64 8}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!22, !10, i64 24}
!30 = !{!31, !15, i64 0}
!31 = !{!"", !15, i64 0, !15, i64 2, !15, i64 4}
!32 = !{!31, !15, i64 2}
!33 = !{!31, !15, i64 4}
!34 = distinct !{!34, !28}


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