; 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.__caryll_elementinterface_table_VDMX = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_elementinterface_vdmx_RatioRange = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_vectorinterface_vdmx_Group = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_vectorinterface_vdmx_RatioRagneList = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, 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 }
%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._json_value = type { ptr, i32, %union.anon, %union.anon.2 }
%union.anon = type { %struct.anon }
%struct.anon = type { i32, ptr }
%union.anon.2 = type { ptr }
%struct.anon.1 = type { i32, ptr }

@table_iVDMX = external constant %struct.__caryll_elementinterface_table_VDMX, align 8
@vdmx_iRatioRange = external constant %struct.__caryll_elementinterface_vdmx_RatioRange, align 8
@vdmx_iGroup = external constant %struct.__caryll_vectorinterface_vdmx_Group, align 8
@vdmx_iRatioRangeList = external constant %struct.__caryll_vectorinterface_vdmx_RatioRagneList, align 8
@.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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; 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, ...) #2

declare ptr @sdsempty() #2

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

22:                                               ; preds = %2
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %168

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

36:                                               ; preds = %157, %23
  %37 = load i8, ptr %9, align 1, !tbaa !16, !range !17, !noundef !18
  %38 = trunc i8 %37 to i1
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  br label %166

40:                                               ; preds = %36
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = call double @json_obj_getnum(ptr noundef %41, ptr noundef @.str.2)
  %43 = fptoui double %42 to i16
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.table_VDMX, ptr %44, i32 0, i32 0
  store i16 %43, ptr %45, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = call ptr @json_obj_get_type(ptr noundef %46, ptr noundef @.str.3, i32 noundef 2)
  store ptr %47, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !24
  br label %48

48:                                               ; preds = %153, %40
  %49 = load i64, ptr %11, align 8, !tbaa !24
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._json_value, ptr %50, i32 0, i32 2
  %52 = getelementptr inbounds %struct.anon.1, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !25
  %54 = zext i32 %53 to i64
  %55 = icmp ult i64 %49, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %48
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %156

57:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._json_value, ptr %58, i32 0, i32 2
  %60 = getelementptr inbounds %struct.anon.1, ptr %59, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !25
  %62 = load i64, ptr %11, align 8, !tbaa !24
  %63 = getelementptr inbounds ptr, ptr %61, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  store ptr %64, ptr %12, align 8, !tbaa !5
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %72

67:                                               ; preds = %57
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._json_value, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 8, !tbaa !26
  %71 = icmp ne i32 %70, 1
  br i1 %71, label %72, label %73

72:                                               ; preds = %67, %57
  store i32 7, ptr %7, align 4
  br label %150

73:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  %74 = load ptr, ptr @vdmx_iRatioRange, align 8, !tbaa !29
  call void %74(ptr noundef %13)
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = call double @json_obj_getnum(ptr noundef %75, ptr noundef @.str.4)
  %77 = fptoui double %76 to i8
  %78 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %13, i32 0, i32 0
  store i8 %77, ptr %78, align 8, !tbaa !31
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = call double @json_obj_getnum(ptr noundef %79, ptr noundef @.str.5)
  %81 = fptoui double %80 to i8
  %82 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %13, i32 0, i32 1
  store i8 %81, ptr %82, align 1, !tbaa !33
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = call double @json_obj_getnum(ptr noundef %83, ptr noundef @.str.6)
  %85 = fptoui double %84 to i8
  %86 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %13, i32 0, i32 2
  store i8 %85, ptr %86, align 2, !tbaa !34
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = call double @json_obj_getnum(ptr noundef %87, ptr noundef @.str.7)
  %89 = fptoui double %88 to i8
  %90 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %13, i32 0, i32 3
  store i8 %89, ptr %90, align 1, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = call ptr @json_obj_get_type(ptr noundef %91, ptr noundef @.str.8, i32 noundef 2)
  store ptr %92, ptr %14, align 8, !tbaa !5
  %93 = load ptr, ptr %14, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %97, label %95

95:                                               ; preds = %73
  %96 = load ptr, ptr getelementptr inbounds (%struct.__caryll_elementinterface_vdmx_RatioRange, ptr @vdmx_iRatioRange, i32 0, i32 3), align 8, !tbaa !36
  call void %96(ptr noundef %13)
  store i32 7, ptr %7, align 4
  br label %149

97:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !24
  br label %98

98:                                               ; preds = %142, %97
  %99 = load i64, ptr %15, align 8, !tbaa !24
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._json_value, ptr %100, i32 0, i32 2
  %102 = getelementptr inbounds %struct.anon.1, ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 8, !tbaa !25
  %104 = zext i32 %103 to i64
  %105 = icmp ult i64 %99, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %98
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %145

107:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._json_value, ptr %108, i32 0, i32 2
  %110 = getelementptr inbounds %struct.anon.1, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !25
  %112 = load i64, ptr %15, align 8, !tbaa !24
  %113 = getelementptr inbounds ptr, ptr %111, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  store ptr %114, ptr %16, align 8, !tbaa !5
  %115 = load ptr, ptr %16, align 8, !tbaa !5
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %122

117:                                              ; preds = %107
  %118 = load ptr, ptr %16, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._json_value, ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 8, !tbaa !26
  %121 = icmp ne i32 %120, 1
  br i1 %121, label %122, label %123

122:                                              ; preds = %117, %107
  store i32 10, ptr %7, align 4
  br label %139

123:                                              ; preds = %117
  %124 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_vdmx_Group, ptr @vdmx_iGroup, i32 0, i32 13), align 8, !tbaa !37
  %125 = getelementptr inbounds %struct.vdmx_RatioRange, ptr %13, i32 0, i32 4
  %126 = getelementptr inbounds %struct.vdmx_Record, ptr %17, i32 0, i32 0
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = call double @json_obj_getnum(ptr noundef %127, ptr noundef @.str.9)
  %129 = fptoui double %128 to i16
  store i16 %129, ptr %126, align 2, !tbaa !39
  %130 = getelementptr inbounds %struct.vdmx_Record, ptr %17, i32 0, i32 1
  %131 = load ptr, ptr %16, align 8, !tbaa !5
  %132 = call double @json_obj_getnum(ptr noundef %131, ptr noundef @.str.10)
  %133 = fptosi double %132 to i16
  store i16 %133, ptr %130, align 2, !tbaa !41
  %134 = getelementptr inbounds %struct.vdmx_Record, ptr %17, i32 0, i32 2
  %135 = load ptr, ptr %16, align 8, !tbaa !5
  %136 = call double @json_obj_getnum(ptr noundef %135, ptr noundef @.str.11)
  %137 = fptosi double %136 to i16
  store i16 %137, ptr %134, align 2, !tbaa !42
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 2 %17, i64 6, i1 false)
  %138 = load i48, ptr %18, align 8
  call void %124(ptr noundef %125, i48 %138)
  store i32 0, ptr %7, align 4
  br label %139

139:                                              ; preds = %123, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %140 = load i32, ptr %7, align 4
  switch i32 %140, label %170 [
    i32 0, label %141
    i32 10, label %142
  ]

141:                                              ; preds = %139
  br label %142

142:                                              ; preds = %141, %139
  %143 = load i64, ptr %15, align 8, !tbaa !24
  %144 = add i64 %143, 1
  store i64 %144, ptr %15, align 8, !tbaa !24
  br label %98, !llvm.loop !43

145:                                              ; preds = %106
  %146 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_vdmx_RatioRagneList, ptr @vdmx_iRatioRangeList, i32 0, i32 13), align 8, !tbaa !45
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.table_VDMX, ptr %147, i32 0, i32 1
  call void %146(ptr noundef %148, ptr noundef byval(%struct.vdmx_RatioRange) align 8 %13)
  store i32 0, ptr %7, align 4
  br label %149

149:                                              ; preds = %145, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  br label %150

150:                                              ; preds = %149, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %151 = load i32, ptr %7, align 4
  switch i32 %151, label %170 [
    i32 0, label %152
    i32 7, label %153
  ]

152:                                              ; preds = %150
  br label %153

153:                                              ; preds = %152, %150
  %154 = load i64, ptr %11, align 8, !tbaa !24
  %155 = add i64 %154, 1
  store i64 %155, ptr %11, align 8, !tbaa !24
  br label %48, !llvm.loop !47

156:                                              ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %157

157:                                              ; preds = %156
  store i8 0, ptr %9, align 1, !tbaa !16
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.otfcc_Options, ptr %158, i32 0, i32 24
  %160 = load ptr, ptr %159, align 8, !tbaa !11
  %161 = getelementptr inbounds %struct.otfcc_ILogger, ptr %160, i32 0, i32 8
  %162 = load ptr, ptr %161, align 8, !tbaa !48
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.otfcc_Options, ptr %163, i32 0, i32 24
  %165 = load ptr, ptr %164, align 8, !tbaa !11
  call void %162(ptr noundef %165)
  br label %36, !llvm.loop !49

166:                                              ; preds = %39
  %167 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %167, ptr %3, align 8
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %168

168:                                              ; preds = %166, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %169 = load ptr, ptr %3, align 8
  ret ptr %169

170:                                              ; preds = %150, %139
  unreachable
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @json_obj_get_type(ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @json_obj_getnum(ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint 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 }

!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 48}
!10 = !{!"__caryll_elementinterface_table_VDMX", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!11 = !{!12, !6, i64 32}
!12 = !{!"", !13, i64 0, !13, i64 1, !13, i64 2, !13, i64 3, !13, i64 4, !13, i64 5, !13, i64 6, !13, i64 7, !13, i64 8, !13, i64 9, !13, i64 10, !13, i64 11, !13, i64 12, !13, i64 13, !13, i64 14, !13, i64 15, !13, i64 16, !13, i64 17, !13, i64 18, !13, i64 19, !13, i64 20, !13, i64 21, !13, i64 22, !6, i64 24, !6, i64 32}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!15, !6, i64 32}
!15 = !{!"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}
!16 = !{!13, !13, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!20, !21, i64 0}
!20 = !{!"", !21, i64 0, !22, i64 8}
!21 = !{!"short", !7, i64 0}
!22 = !{!"", !23, i64 0, !23, i64 8, !6, i64 16}
!23 = !{!"long", !7, i64 0}
!24 = !{!23, !23, i64 0}
!25 = !{!7, !7, i64 0}
!26 = !{!27, !28, i64 8}
!27 = !{!"_json_value", !6, i64 0, !28, i64 8, !7, i64 16, !7, i64 32}
!28 = !{!"int", !7, i64 0}
!29 = !{!30, !6, i64 0}
!30 = !{!"__caryll_elementinterface_vdmx_RatioRange", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!31 = !{!32, !7, i64 0}
!32 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !22, i64 8}
!33 = !{!32, !7, i64 1}
!34 = !{!32, !7, i64 2}
!35 = !{!32, !7, i64 3}
!36 = !{!30, !6, i64 24}
!37 = !{!38, !6, i64 104}
!38 = !{!"__caryll_vectorinterface_vdmx_Group", !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, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144}
!39 = !{!40, !21, i64 0}
!40 = !{!"", !21, i64 0, !21, i64 2, !21, i64 4}
!41 = !{!40, !21, i64 2}
!42 = !{!40, !21, i64 4}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = !{!46, !6, i64 104}
!46 = !{!"__caryll_vectorinterface_vdmx_RatioRagneList", !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, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144}
!47 = distinct !{!47, !44}
!48 = !{!15, !6, i64 64}
!49 = distinct !{!49, !44}


; 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.__caryll_elementinterface_table_VDMX = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_elementinterface_vdmx_RatioRange = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_vectorinterface_vdmx_Group = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_vectorinterface_vdmx_RatioRagneList = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.vdmx_RatioRange = type { i8, i8, i8, i8, %struct.vdmx_Group }
%struct.vdmx_Group = type { i64, i64, ptr }

@table_iVDMX = external local_unnamed_addr constant %struct.__caryll_elementinterface_table_VDMX, align 8
@vdmx_iRatioRange = external local_unnamed_addr constant %struct.__caryll_elementinterface_vdmx_RatioRange, align 8
@vdmx_iGroup = external local_unnamed_addr constant %struct.__caryll_vectorinterface_vdmx_Group, align 8
@vdmx_iRatioRangeList = external local_unnamed_addr constant %struct.__caryll_vectorinterface_vdmx_RatioRagneList, align 8
@.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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress 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, ...) local_unnamed_addr #1

declare ptr @sdsempty() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_parseVDMX(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #2 {
  %3 = alloca %struct.vdmx_RatioRange, align 8
  %4 = tail call ptr @json_obj_get_type(ptr noundef %0, ptr noundef nonnull @.str.1, i32 noundef 1)
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %79, label %.critedge

.critedge:                                        ; preds = %2
  %5 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iVDMX, i64 48), align 8, !tbaa !5
  %6 = tail call ptr (...) %5() #4
  %7 = getelementptr inbounds i8, ptr %1, i64 32
  %8 = load ptr, ptr %7, align 8, !tbaa !10
  %9 = getelementptr inbounds i8, ptr %8, i64 32
  %10 = load ptr, ptr %9, align 8, !tbaa !13
  %11 = tail call ptr @sdsempty() #4
  %12 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %11, ptr noundef nonnull @.str.1) #4
  tail call void %10(ptr noundef %8, ptr noundef %12) #4
  %13 = tail call double @json_obj_getnum(ptr noundef nonnull %4, ptr noundef nonnull @.str.2)
  %14 = fptoui double %13 to i16
  store i16 %14, ptr %6, align 8, !tbaa !15
  %15 = tail call ptr @json_obj_get_type(ptr noundef nonnull %4, ptr noundef nonnull @.str.3, i32 noundef 2)
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  %17 = load i32, ptr %16, align 8, !tbaa !20
  %.not51 = icmp eq i32 %17, 0
  br i1 %.not51, label %._crit_edge50, label %.lr.ph49

.lr.ph49:                                         ; preds = %.critedge
  %18 = getelementptr inbounds i8, ptr %15, i64 24
  %19 = load ptr, ptr @vdmx_iRatioRange, align 8
  %20 = getelementptr inbounds i8, ptr %3, i64 1
  %21 = getelementptr inbounds i8, ptr %3, i64 2
  %22 = getelementptr inbounds i8, ptr %3, i64 3
  %23 = load ptr, ptr getelementptr inbounds (i8, ptr @vdmx_iGroup, i64 104), align 8
  %24 = getelementptr inbounds i8, ptr %3, i64 8
  %25 = load ptr, ptr getelementptr inbounds (i8, ptr @vdmx_iRatioRangeList, i64 104), align 8
  %26 = getelementptr inbounds i8, ptr %6, i64 8
  %27 = load ptr, ptr getelementptr inbounds (i8, ptr @vdmx_iRatioRange, i64 24), align 8
  br label %31

._crit_edge50:                                    ; preds = %74, %.critedge
  %28 = load ptr, ptr %7, align 8, !tbaa !10
  %29 = getelementptr inbounds i8, ptr %28, i64 64
  %30 = load ptr, ptr %29, align 8, !tbaa !21
  call void %30(ptr noundef %28) #4
  br label %79

31:                                               ; preds = %.lr.ph49, %74
  %32 = phi i32 [ %17, %.lr.ph49 ], [ %75, %74 ]
  %.03648 = phi i64 [ 0, %.lr.ph49 ], [ %76, %74 ]
  %33 = load ptr, ptr %18, align 8, !tbaa !20
  %34 = getelementptr inbounds ptr, ptr %33, i64 %.03648
  %35 = load ptr, ptr %34, align 8, !tbaa !22
  %.not42 = icmp eq ptr %35, null
  br i1 %.not42, label %74, label %36

36:                                               ; preds = %31
  %37 = getelementptr inbounds i8, ptr %35, i64 8
  %38 = load i32, ptr %37, align 8, !tbaa !23
  %.not43 = icmp eq i32 %38, 1
  br i1 %.not43, label %39, label %74

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #4
  call void %19(ptr noundef nonnull %3) #4
  %40 = call double @json_obj_getnum(ptr noundef nonnull %35, ptr noundef nonnull @.str.4)
  %41 = fptoui double %40 to i8
  store i8 %41, ptr %3, align 8, !tbaa !26
  %42 = call double @json_obj_getnum(ptr noundef nonnull %35, ptr noundef nonnull @.str.5)
  %43 = fptoui double %42 to i8
  store i8 %43, ptr %20, align 1, !tbaa !28
  %44 = call double @json_obj_getnum(ptr noundef nonnull %35, ptr noundef nonnull @.str.6)
  %45 = fptoui double %44 to i8
  store i8 %45, ptr %21, align 2, !tbaa !29
  %46 = call double @json_obj_getnum(ptr noundef nonnull %35, ptr noundef nonnull @.str.7)
  %47 = fptoui double %46 to i8
  store i8 %47, ptr %22, align 1, !tbaa !30
  %48 = call ptr @json_obj_get_type(ptr noundef nonnull %35, ptr noundef nonnull @.str.8, i32 noundef 2)
  %.not44 = icmp eq ptr %48, null
  br i1 %.not44, label %52, label %.preheader

.preheader:                                       ; preds = %39
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load i32, ptr %49, align 8, !tbaa !20
  %.not52 = icmp eq i32 %50, 0
  br i1 %.not52, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %51 = getelementptr inbounds i8, ptr %48, i64 24
  br label %53

52:                                               ; preds = %39
  call void %27(ptr noundef nonnull %3) #4
  br label %73

._crit_edge:                                      ; preds = %68, %.preheader
  call void %25(ptr noundef nonnull %26, ptr noundef nonnull byval(%struct.vdmx_RatioRange) align 8 %3) #4
  br label %73

53:                                               ; preds = %.lr.ph, %68
  %54 = phi i32 [ %50, %.lr.ph ], [ %69, %68 ]
  %.03747 = phi i64 [ 0, %.lr.ph ], [ %70, %68 ]
  %55 = load ptr, ptr %51, align 8, !tbaa !20
  %56 = getelementptr inbounds ptr, ptr %55, i64 %.03747
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %.not45 = icmp eq ptr %57, null
  br i1 %.not45, label %68, label %58

58:                                               ; preds = %53
  %59 = getelementptr inbounds i8, ptr %57, i64 8
  %60 = load i32, ptr %59, align 8, !tbaa !23
  %.not46 = icmp eq i32 %60, 1
  br i1 %.not46, label %61, label %68

61:                                               ; preds = %58
  %62 = call double @json_obj_getnum(ptr noundef nonnull %57, ptr noundef nonnull @.str.9)
  %63 = fptoui double %62 to i16
  %64 = call double @json_obj_getnum(ptr noundef nonnull %57, ptr noundef nonnull @.str.10)
  %65 = fptosi double %64 to i16
  %66 = call double @json_obj_getnum(ptr noundef nonnull %57, ptr noundef nonnull @.str.11)
  %67 = fptosi double %66 to i16
  %.sroa.3.0.insert.ext = zext i16 %67 to i48
  %.sroa.3.0.insert.shift = shl nuw i48 %.sroa.3.0.insert.ext, 32
  %.sroa.2.0.insert.ext = zext i16 %65 to i48
  %.sroa.2.0.insert.shift = shl nuw nsw i48 %.sroa.2.0.insert.ext, 16
  %.sroa.2.0.insert.insert = or disjoint i48 %.sroa.3.0.insert.shift, %.sroa.2.0.insert.shift
  %.sroa.0.0.insert.ext = zext i16 %63 to i48
  %.sroa.0.0.insert.insert = or disjoint i48 %.sroa.2.0.insert.insert, %.sroa.0.0.insert.ext
  call void %23(ptr noundef nonnull %24, i48 %.sroa.0.0.insert.insert) #4
  %.pre = load i32, ptr %49, align 8, !tbaa !20
  br label %68

68:                                               ; preds = %53, %58, %61
  %69 = phi i32 [ %54, %53 ], [ %54, %58 ], [ %.pre, %61 ]
  %70 = add nuw nsw i64 %.03747, 1
  %71 = zext i32 %69 to i64
  %72 = icmp ult i64 %70, %71
  br i1 %72, label %53, label %._crit_edge, !llvm.loop !31

73:                                               ; preds = %._crit_edge, %52
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  %.pre53 = load i32, ptr %16, align 8, !tbaa !20
  br label %74

74:                                               ; preds = %31, %36, %73
  %75 = phi i32 [ %32, %31 ], [ %32, %36 ], [ %.pre53, %73 ]
  %76 = add nuw nsw i64 %.03648, 1
  %77 = zext i32 %75 to i64
  %78 = icmp ult i64 %76, %77
  br i1 %78, label %31, label %._crit_edge50, !llvm.loop !33

79:                                               ; preds = %2, %._crit_edge50
  %.0 = phi ptr [ %6, %._crit_edge50 ], [ null, %2 ]
  ret ptr %.0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @json_obj_get_type(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @json_obj_getnum(ptr noundef, ptr noundef) local_unnamed_addr #3

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


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