; LLVM IR from marcobambini/gravity :: src/runtime (gravity_core)

; 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.gravity_value_t = type { ptr, %union.anon }
%union.anon = type { i64 }
%struct.gravity_class_s = type { ptr, %struct.gravity_gc_s, ptr, ptr, i8, i8, i8, i8, ptr, ptr, ptr, ptr, i32, ptr }
%struct.gravity_gc_s = type { i8, i8, ptr, ptr, ptr, ptr }
%struct.gravity_function_t = type { ptr, %struct.gravity_gc_s, ptr, ptr, i16, i16, i16, i16, i32, %union.anon.0 }
%union.anon.0 = type { %struct.anon }
%struct.anon = type { %struct.gravity_value_r, %struct.gravity_value_r, %struct.gravity_value_r, i32, ptr, ptr, float, i8 }
%struct.gravity_value_r = type { i64, i64, ptr }
%struct.gravity_closure_s = type { ptr, %struct.gravity_gc_s, ptr, ptr, ptr, ptr, i32 }
%struct.gravity_range_t = type { ptr, %struct.gravity_gc_s, i64, i64 }
%struct.gravity_instance_t = type { ptr, %struct.gravity_gc_s, ptr, ptr, ptr }
%struct.gravity_delegate_t = type { ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@gravity_class_int = external dso_local global ptr, align 8
@gravity_class_float = external dso_local global ptr, align 8
@gravity_class_bool = external dso_local global ptr, align 8
@gravity_class_null = external dso_local global ptr, align 8
@gravity_class_string = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@gravity_class_class = external dso_local global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@gravity_class_function = external dso_local global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@gravity_class_closure = external dso_local global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@gravity_class_list = external dso_local global ptr, align 8
@gravity_class_map = external dso_local global ptr, align 8
@gravity_class_range = external dso_local global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@gravity_class_fiber = external dso_local global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@gravity_class_instance = external dso_local global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [20 x i8], align 1

; 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) #0

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

declare ptr @gravity_vm_fastlookup(ptr noundef, ptr noundef, i32 noundef) #2

declare ptr @gravity_value_getclass(ptr, i64) #2

declare ptr @gravity_vm_getclosure(ptr noundef) #2

declare zeroext i1 @gravity_vm_runclosure(ptr noundef, ptr noundef, ptr, i64, ptr noundef, i16 noundef zeroext) #2

declare { ptr, i64 } @gravity_vm_result(ptr noundef) #2

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

; Function Attrs: inlinehint nounwind uwtable
define dso_local { ptr, i64 } @convert_value2string(ptr noundef %0, ptr %1, i64 %2) #3 {
  %4 = alloca %struct.gravity_value_t, align 8
  %5 = alloca %struct.gravity_value_t, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [512 x i8], align 16
  %8 = alloca [512 x i8], align 16
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca [512 x i8], align 16
  %16 = alloca [512 x i8], align 16
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca [512 x i8], align 16
  %24 = alloca ptr, align 8
  %25 = alloca %struct.gravity_value_t, align 8
  %26 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  store ptr %1, ptr %26, align 8
  %27 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  store i64 %2, ptr %27, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = load ptr, ptr @gravity_class_string, align 8, !tbaa !5
  %31 = icmp eq ptr %29, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 %5, i64 16, i1 false), !tbaa.struct !11
  br label %390

33:                                               ; preds = %3
  %34 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = load ptr, ptr @gravity_class_int, align 8, !tbaa !5
  %37 = icmp eq ptr %35, %36
  br i1 %37, label %38, label %50

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 512, ptr %7) #6
  %39 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 0
  %40 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %41 = load i64, ptr %40, align 8, !tbaa !12
  %42 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %39, i64 noundef 512, ptr noundef @.str.1, i64 noundef %41) #6
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 0
  %45 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %43, ptr noundef %44, i32 noundef -1)
  %46 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %47 = extractvalue { ptr, i64 } %45, 0
  store ptr %47, ptr %46, align 8
  %48 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %49 = extractvalue { ptr, i64 } %45, 1
  store i64 %49, ptr %48, align 8
  call void @llvm.lifetime.end.p0(i64 512, ptr %7) #6
  br label %390

50:                                               ; preds = %33
  %51 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = load ptr, ptr @gravity_class_bool, align 8, !tbaa !5
  %54 = icmp eq ptr %52, %53
  br i1 %54, label %55, label %67

55:                                               ; preds = %50
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %58 = load i64, ptr %57, align 8, !tbaa !12
  %59 = icmp ne i64 %58, 0
  %60 = zext i1 %59 to i64
  %61 = select i1 %59, ptr @.str.2, ptr @.str
  %62 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %56, ptr noundef %61, i32 noundef -1)
  %63 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %64 = extractvalue { ptr, i64 } %62, 0
  store ptr %64, ptr %63, align 8
  %65 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %66 = extractvalue { ptr, i64 } %62, 1
  store i64 %66, ptr %65, align 8
  br label %390

67:                                               ; preds = %50
  %68 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = load ptr, ptr @gravity_class_null, align 8, !tbaa !5
  %71 = icmp eq ptr %69, %70
  br i1 %71, label %72, label %83

72:                                               ; preds = %67
  %73 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %74 = load i64, ptr %73, align 8, !tbaa !12
  %75 = icmp eq i64 %74, 0
  br i1 %75, label %76, label %83

76:                                               ; preds = %72
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %77, ptr noundef @.str.3, i32 noundef -1)
  %79 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %80 = extractvalue { ptr, i64 } %78, 0
  store ptr %80, ptr %79, align 8
  %81 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %82 = extractvalue { ptr, i64 } %78, 1
  store i64 %82, ptr %81, align 8
  br label %390

83:                                               ; preds = %72, %67
  %84 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = load ptr, ptr @gravity_class_null, align 8, !tbaa !5
  %87 = icmp eq ptr %85, %86
  br i1 %87, label %88, label %99

88:                                               ; preds = %83
  %89 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %90 = load i64, ptr %89, align 8, !tbaa !12
  %91 = icmp eq i64 %90, 1
  br i1 %91, label %92, label %99

92:                                               ; preds = %88
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %93, ptr noundef @.str.4, i32 noundef -1)
  %95 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %96 = extractvalue { ptr, i64 } %94, 0
  store ptr %96, ptr %95, align 8
  %97 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %98 = extractvalue { ptr, i64 } %94, 1
  store i64 %98, ptr %97, align 8
  br label %390

99:                                               ; preds = %88, %83
  %100 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = load ptr, ptr @gravity_class_float, align 8, !tbaa !5
  %103 = icmp eq ptr %101, %102
  br i1 %103, label %104, label %116

104:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 512, ptr %8) #6
  %105 = getelementptr inbounds [512 x i8], ptr %8, i64 0, i64 0
  %106 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %107 = load double, ptr %106, align 8, !tbaa !12
  %108 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %105, i64 noundef 512, ptr noundef @.str.5, double noundef %107) #6
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds [512 x i8], ptr %8, i64 0, i64 0
  %111 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %109, ptr noundef %110, i32 noundef -1)
  %112 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %113 = extractvalue { ptr, i64 } %111, 0
  store ptr %113, ptr %112, align 8
  %114 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %115 = extractvalue { ptr, i64 } %111, 1
  store i64 %115, ptr %114, align 8
  call void @llvm.lifetime.end.p0(i64 512, ptr %8) #6
  br label %390

116:                                              ; preds = %99
  %117 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !9
  %119 = load ptr, ptr @gravity_class_class, align 8, !tbaa !5
  %120 = icmp eq ptr %118, %119
  br i1 %120, label %121, label %137

121:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %122 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !12
  %124 = getelementptr inbounds %struct.gravity_class_s, ptr %123, i32 0, i32 3
  %125 = load ptr, ptr %124, align 8, !tbaa !13
  store ptr %125, ptr %9, align 8, !tbaa !5
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = icmp ne ptr %126, null
  br i1 %127, label %129, label %128

128:                                              ; preds = %121
  store ptr @.str.6, ptr %9, align 8, !tbaa !5
  br label %129

129:                                              ; preds = %128, %121
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %130, ptr noundef %131, i32 noundef -1)
  %133 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %134 = extractvalue { ptr, i64 } %132, 0
  store ptr %134, ptr %133, align 8
  %135 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %136 = extractvalue { ptr, i64 } %132, 1
  store i64 %136, ptr %135, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %390

137:                                              ; preds = %116
  %138 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !9
  %140 = load ptr, ptr @gravity_class_function, align 8, !tbaa !5
  %141 = icmp eq ptr %139, %140
  br i1 %141, label %142, label %158

142:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %143 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8, !tbaa !12
  %145 = getelementptr inbounds %struct.gravity_function_t, ptr %144, i32 0, i32 3
  %146 = load ptr, ptr %145, align 8, !tbaa !18
  store ptr %146, ptr %10, align 8, !tbaa !5
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = icmp ne ptr %147, null
  br i1 %148, label %150, label %149

149:                                              ; preds = %142
  store ptr @.str.7, ptr %10, align 8, !tbaa !5
  br label %150

150:                                              ; preds = %149, %142
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %151, ptr noundef %152, i32 noundef -1)
  %154 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %155 = extractvalue { ptr, i64 } %153, 0
  store ptr %155, ptr %154, align 8
  %156 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %157 = extractvalue { ptr, i64 } %153, 1
  store i64 %157, ptr %156, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %390

158:                                              ; preds = %137
  %159 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !9
  %161 = load ptr, ptr @gravity_class_closure, align 8, !tbaa !5
  %162 = icmp eq ptr %160, %161
  br i1 %162, label %163, label %181

163:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %164 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %165 = load ptr, ptr %164, align 8, !tbaa !12
  %166 = getelementptr inbounds %struct.gravity_closure_s, ptr %165, i32 0, i32 3
  %167 = load ptr, ptr %166, align 8, !tbaa !21
  %168 = getelementptr inbounds %struct.gravity_function_t, ptr %167, i32 0, i32 3
  %169 = load ptr, ptr %168, align 8, !tbaa !18
  store ptr %169, ptr %11, align 8, !tbaa !5
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  %171 = icmp ne ptr %170, null
  br i1 %171, label %173, label %172

172:                                              ; preds = %163
  store ptr @.str.8, ptr %11, align 8, !tbaa !5
  br label %173

173:                                              ; preds = %172, %163
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %174, ptr noundef %175, i32 noundef -1)
  %177 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %178 = extractvalue { ptr, i64 } %176, 0
  store ptr %178, ptr %177, align 8
  %179 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %180 = extractvalue { ptr, i64 } %176, 1
  store i64 %180, ptr %179, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %390

181:                                              ; preds = %158
  %182 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8, !tbaa !9
  %184 = load ptr, ptr @gravity_class_list, align 8, !tbaa !5
  %185 = icmp eq ptr %183, %184
  br i1 %185, label %186, label %196

186:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %187 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %188 = load ptr, ptr %187, align 8, !tbaa !12
  store ptr %188, ptr %12, align 8, !tbaa !5
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = load ptr, ptr %12, align 8, !tbaa !5
  %191 = call { ptr, i64 } @convert_list2string(ptr noundef %189, ptr noundef %190)
  %192 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %193 = extractvalue { ptr, i64 } %191, 0
  store ptr %193, ptr %192, align 8
  %194 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %195 = extractvalue { ptr, i64 } %191, 1
  store i64 %195, ptr %194, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %390

196:                                              ; preds = %181
  %197 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %198 = load ptr, ptr %197, align 8, !tbaa !9
  %199 = load ptr, ptr @gravity_class_map, align 8, !tbaa !5
  %200 = icmp eq ptr %198, %199
  br i1 %200, label %201, label %211

201:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %202 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %203 = load ptr, ptr %202, align 8, !tbaa !12
  store ptr %203, ptr %13, align 8, !tbaa !5
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = load ptr, ptr %13, align 8, !tbaa !5
  %206 = call { ptr, i64 } @convert_map2string(ptr noundef %204, ptr noundef %205)
  %207 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %208 = extractvalue { ptr, i64 } %206, 0
  store ptr %208, ptr %207, align 8
  %209 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %210 = extractvalue { ptr, i64 } %206, 1
  store i64 %210, ptr %209, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %390

211:                                              ; preds = %196
  %212 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8, !tbaa !9
  %214 = load ptr, ptr @gravity_class_range, align 8, !tbaa !5
  %215 = icmp eq ptr %213, %214
  br i1 %215, label %216, label %234

216:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %217 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %218 = load ptr, ptr %217, align 8, !tbaa !12
  store ptr %218, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 512, ptr %15) #6
  %219 = getelementptr inbounds [512 x i8], ptr %15, i64 0, i64 0
  %220 = load ptr, ptr %14, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.gravity_range_t, ptr %220, i32 0, i32 2
  %222 = load i64, ptr %221, align 8, !tbaa !23
  %223 = load ptr, ptr %14, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.gravity_range_t, ptr %223, i32 0, i32 3
  %225 = load i64, ptr %224, align 8, !tbaa !26
  %226 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %219, i64 noundef 512, ptr noundef @.str.9, i64 noundef %222, i64 noundef %225) #6
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds [512 x i8], ptr %15, i64 0, i64 0
  %229 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %227, ptr noundef %228, i32 noundef -1)
  %230 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %231 = extractvalue { ptr, i64 } %229, 0
  store ptr %231, ptr %230, align 8
  %232 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %233 = extractvalue { ptr, i64 } %229, 1
  store i64 %233, ptr %232, align 8
  call void @llvm.lifetime.end.p0(i64 512, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %390

234:                                              ; preds = %211
  %235 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !9
  %237 = load ptr, ptr @gravity_class_fiber, align 8, !tbaa !5
  %238 = icmp eq ptr %236, %237
  br i1 %238, label %239, label %251

239:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 512, ptr %16) #6
  %240 = getelementptr inbounds [512 x i8], ptr %16, i64 0, i64 0
  %241 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %242 = load ptr, ptr %241, align 8, !tbaa !12
  %243 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %240, i64 noundef 512, ptr noundef @.str.10, ptr noundef %242) #6
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = getelementptr inbounds [512 x i8], ptr %16, i64 0, i64 0
  %246 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %244, ptr noundef %245, i32 noundef -1)
  %247 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %248 = extractvalue { ptr, i64 } %246, 0
  store ptr %248, ptr %247, align 8
  %249 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %250 = extractvalue { ptr, i64 } %246, 1
  store i64 %250, ptr %249, align 8
  call void @llvm.lifetime.end.p0(i64 512, ptr %16) #6
  br label %390

251:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %252 = load ptr, ptr %6, align 8, !tbaa !5
  %253 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %254 = load ptr, ptr %253, align 8
  %255 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %256 = load i64, ptr %255, align 8
  %257 = call ptr @gravity_value_getclass(ptr %254, i64 %256)
  %258 = call ptr @gravity_vm_fastlookup(ptr noundef %252, ptr noundef %257, i32 noundef 28)
  store ptr %258, ptr %17, align 8, !tbaa !5
  %259 = load ptr, ptr %17, align 8, !tbaa !5
  %260 = icmp ne ptr %259, null
  br i1 %260, label %261, label %280

261:                                              ; preds = %251
  %262 = load ptr, ptr %17, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.gravity_closure_s, ptr %262, i32 0, i32 3
  %264 = load ptr, ptr %263, align 8, !tbaa !21
  %265 = getelementptr inbounds %struct.gravity_function_t, ptr %264, i32 0, i32 8
  %266 = load i32, ptr %265, align 8, !tbaa !27
  %267 = icmp eq i32 %266, 1
  br i1 %267, label %268, label %275

268:                                              ; preds = %261
  %269 = load ptr, ptr %17, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.gravity_closure_s, ptr %269, i32 0, i32 3
  %271 = load ptr, ptr %270, align 8, !tbaa !21
  %272 = getelementptr inbounds %struct.gravity_function_t, ptr %271, i32 0, i32 9
  %273 = load ptr, ptr %272, align 8, !tbaa !12
  %274 = icmp eq ptr %273, @convert_object_string
  br i1 %274, label %280, label %275

275:                                              ; preds = %268, %261
  %276 = load ptr, ptr %6, align 8, !tbaa !5
  %277 = call ptr @gravity_vm_getclosure(ptr noundef %276)
  %278 = load ptr, ptr %17, align 8, !tbaa !5
  %279 = icmp eq ptr %277, %278
  br i1 %279, label %280, label %358

280:                                              ; preds = %275, %268, %251
  %281 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 0
  %282 = load ptr, ptr %281, align 8, !tbaa !9
  %283 = load ptr, ptr @gravity_class_instance, align 8, !tbaa !5
  %284 = icmp eq ptr %282, %283
  br i1 %284, label %285, label %355

285:                                              ; preds = %280
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %286 = getelementptr inbounds %struct.gravity_value_t, ptr %5, i32 0, i32 1
  %287 = load ptr, ptr %286, align 8, !tbaa !12
  store ptr %287, ptr %18, align 8, !tbaa !5
  %288 = load ptr, ptr %6, align 8, !tbaa !5
  %289 = icmp ne ptr %288, null
  br i1 %289, label %290, label %330

290:                                              ; preds = %285
  %291 = load ptr, ptr %18, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.gravity_instance_t, ptr %291, i32 0, i32 3
  %293 = load ptr, ptr %292, align 8, !tbaa !28
  %294 = icmp ne ptr %293, null
  br i1 %294, label %295, label %330

295:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = call ptr @gravity_vm_delegate(ptr noundef %296)
  store ptr %297, ptr %19, align 8, !tbaa !5
  %298 = load ptr, ptr %19, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.gravity_delegate_t, ptr %298, i32 0, i32 20
  %300 = load ptr, ptr %299, align 8, !tbaa !30
  %301 = icmp ne ptr %300, null
  br i1 %301, label %302, label %326

302:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %303 = load ptr, ptr %19, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.gravity_delegate_t, ptr %303, i32 0, i32 20
  %305 = load ptr, ptr %304, align 8, !tbaa !30
  %306 = load ptr, ptr %6, align 8, !tbaa !5
  %307 = load ptr, ptr %18, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.gravity_instance_t, ptr %307, i32 0, i32 3
  %309 = load ptr, ptr %308, align 8, !tbaa !28
  %310 = call ptr %305(ptr noundef %306, ptr noundef %309, ptr noundef %20)
  store ptr %310, ptr %21, align 8, !tbaa !5
  %311 = load ptr, ptr %21, align 8, !tbaa !5
  %312 = icmp ne ptr %311, null
  br i1 %312, label %313, label %322

313:                                              ; preds = %302
  %314 = load ptr, ptr %6, align 8, !tbaa !5
  %315 = load ptr, ptr %21, align 8, !tbaa !5
  %316 = load i32, ptr %20, align 4, !tbaa !32
  %317 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %314, ptr noundef %315, i32 noundef %316)
  %318 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %319 = extractvalue { ptr, i64 } %317, 0
  store ptr %319, ptr %318, align 8
  %320 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %321 = extractvalue { ptr, i64 } %317, 1
  store i64 %321, ptr %320, align 8
  store i32 1, ptr %22, align 4
  br label %323

322:                                              ; preds = %302
  store i32 0, ptr %22, align 4
  br label %323

323:                                              ; preds = %322, %313
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  %324 = load i32, ptr %22, align 4
  switch i32 %324, label %327 [
    i32 0, label %325
  ]

325:                                              ; preds = %323
  br label %326

326:                                              ; preds = %325, %295
  store i32 0, ptr %22, align 4
  br label %327

327:                                              ; preds = %326, %323
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %328 = load i32, ptr %22, align 4
  switch i32 %328, label %352 [
    i32 0, label %329
  ]

329:                                              ; preds = %327
  br label %351

330:                                              ; preds = %290, %285
  call void @llvm.lifetime.start.p0(i64 512, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %331 = load ptr, ptr %18, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.gravity_instance_t, ptr %331, i32 0, i32 2
  %333 = load ptr, ptr %332, align 8, !tbaa !33
  %334 = getelementptr inbounds %struct.gravity_class_s, ptr %333, i32 0, i32 3
  %335 = load ptr, ptr %334, align 8, !tbaa !13
  store ptr %335, ptr %24, align 8, !tbaa !5
  %336 = load ptr, ptr %24, align 8, !tbaa !5
  %337 = icmp ne ptr %336, null
  br i1 %337, label %339, label %338

338:                                              ; preds = %330
  store ptr @.str.6, ptr %24, align 8, !tbaa !5
  br label %339

339:                                              ; preds = %338, %330
  %340 = getelementptr inbounds [512 x i8], ptr %23, i64 0, i64 0
  %341 = load ptr, ptr %24, align 8, !tbaa !5
  %342 = load ptr, ptr %18, align 8, !tbaa !5
  %343 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %340, i64 noundef 512, ptr noundef @.str.11, ptr noundef %341, ptr noundef %342) #6
  %344 = load ptr, ptr %6, align 8, !tbaa !5
  %345 = getelementptr inbounds [512 x i8], ptr %23, i64 0, i64 0
  %346 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %344, ptr noundef %345, i32 noundef -1)
  %347 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %348 = extractvalue { ptr, i64 } %346, 0
  store ptr %348, ptr %347, align 8
  %349 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %350 = extractvalue { ptr, i64 } %346, 1
  store i64 %350, ptr %349, align 8
  store i32 1, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %23) #6
  br label %352

351:                                              ; preds = %329
  store i32 0, ptr %22, align 4
  br label %352

352:                                              ; preds = %351, %339, %327
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  %353 = load i32, ptr %22, align 4
  switch i32 %353, label %389 [
    i32 0, label %354
  ]

354:                                              ; preds = %352
  br label %355

355:                                              ; preds = %354, %280
  %356 = getelementptr inbounds %struct.gravity_value_t, ptr %4, i32 0, i32 0
  store ptr null, ptr %356, align 8, !tbaa !9
  %357 = getelementptr inbounds %struct.gravity_value_t, ptr %4, i32 0, i32 1
  store ptr null, ptr %357, align 8, !tbaa !12
  store i32 1, ptr %22, align 4
  br label %389

358:                                              ; preds = %275
  %359 = load ptr, ptr %6, align 8, !tbaa !5
  %360 = load ptr, ptr %17, align 8, !tbaa !5
  %361 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %362 = load ptr, ptr %361, align 8
  %363 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %364 = load i64, ptr %363, align 8
  %365 = call zeroext i1 @gravity_vm_runclosure(ptr noundef %359, ptr noundef %360, ptr %362, i64 %364, ptr noundef null, i16 noundef zeroext 0)
  br i1 %365, label %366, label %386

366:                                              ; preds = %358
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  %367 = load ptr, ptr %6, align 8, !tbaa !5
  %368 = call { ptr, i64 } @gravity_vm_result(ptr noundef %367)
  %369 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %370 = extractvalue { ptr, i64 } %368, 0
  store ptr %370, ptr %369, align 8
  %371 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %372 = extractvalue { ptr, i64 } %368, 1
  store i64 %372, ptr %371, align 8
  %373 = getelementptr inbounds %struct.gravity_value_t, ptr %25, i32 0, i32 0
  %374 = load ptr, ptr %373, align 8, !tbaa !9
  %375 = load ptr, ptr @gravity_class_string, align 8, !tbaa !5
  %376 = icmp eq ptr %374, %375
  br i1 %376, label %384, label %377

377:                                              ; preds = %366
  %378 = load ptr, ptr %6, align 8, !tbaa !5
  %379 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %378, ptr noundef @.str.3, i32 noundef -1)
  %380 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %381 = extractvalue { ptr, i64 } %379, 0
  store ptr %381, ptr %380, align 8
  %382 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %383 = extractvalue { ptr, i64 } %379, 1
  store i64 %383, ptr %382, align 8
  store i32 1, ptr %22, align 4
  br label %385

384:                                              ; preds = %366
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %22, align 4
  br label %385

385:                                              ; preds = %384, %377
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  br label %389

386:                                              ; preds = %358
  %387 = getelementptr inbounds %struct.gravity_value_t, ptr %4, i32 0, i32 0
  store ptr null, ptr %387, align 8, !tbaa !9
  %388 = getelementptr inbounds %struct.gravity_value_t, ptr %4, i32 0, i32 1
  store ptr null, ptr %388, align 8, !tbaa !12
  store i32 1, ptr %22, align 4
  br label %389

389:                                              ; preds = %386, %385, %355, %352
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %390

390:                                              ; preds = %389, %239, %216, %201, %186, %173, %150, %129, %104, %92, %76, %55, %38, %32
  %391 = load { ptr, i64 }, ptr %4, align 8
  ret { ptr, i64 } %391
}

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #4

declare { ptr, i64 } @gravity_string_to_value(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden { ptr, i64 } @convert_list2string(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden { ptr, i64 } @convert_map2string(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @convert_object_string(ptr noundef, ptr noundef, i16 noundef zeroext, i32 noundef) #5

declare ptr @gravity_vm_delegate(ptr noundef) #2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync 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 = { 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 "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 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 #6 = { 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 0}
!10 = !{!"", !6, i64 0, !7, i64 8}
!11 = !{i64 0, i64 8, !5, i64 8, i64 8, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !6, i64 56}
!14 = !{!"gravity_class_s", !6, i64 0, !15, i64 8, !6, i64 48, !6, i64 56, !16, i64 64, !16, i64 65, !16, i64 66, !16, i64 67, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !17, i64 104, !6, i64 112}
!15 = !{!"gravity_gc_s", !16, i64 0, !16, i64 1, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!19, !6, i64 56}
!19 = !{!"", !6, i64 0, !15, i64 8, !6, i64 48, !6, i64 56, !20, i64 64, !20, i64 66, !20, i64 68, !20, i64 70, !17, i64 72, !7, i64 80}
!20 = !{!"short", !7, i64 0}
!21 = !{!22, !6, i64 56}
!22 = !{!"gravity_closure_s", !6, i64 0, !15, i64 8, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !17, i64 80}
!23 = !{!24, !25, i64 48}
!24 = !{!"", !6, i64 0, !15, i64 8, !25, i64 48, !25, i64 56}
!25 = !{!"long", !7, i64 0}
!26 = !{!24, !25, i64 56}
!27 = !{!19, !17, i64 72}
!28 = !{!29, !6, i64 56}
!29 = !{!"", !6, i64 0, !15, i64 8, !6, i64 48, !6, i64 56, !6, i64 64}
!30 = !{!31, !6, i64 152}
!31 = !{!"", !6, i64 0, !16, i64 8, !16, i64 9, !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, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184}
!32 = !{!17, !17, i64 0}
!33 = !{!29, !6, i64 48}


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

@gravity_class_int = external dso_local local_unnamed_addr global ptr, align 8
@gravity_class_float = external dso_local local_unnamed_addr global ptr, align 8
@gravity_class_bool = external dso_local local_unnamed_addr global ptr, align 8
@gravity_class_null = external dso_local local_unnamed_addr global ptr, align 8
@gravity_class_string = external dso_local local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@gravity_class_class = external dso_local local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@gravity_class_function = external dso_local local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@gravity_class_closure = external dso_local local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@gravity_class_list = external dso_local local_unnamed_addr global ptr, align 8
@gravity_class_map = external dso_local local_unnamed_addr global ptr, align 8
@gravity_class_range = external dso_local local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@gravity_class_fiber = external dso_local local_unnamed_addr global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@gravity_class_instance = external dso_local local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [20 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

declare ptr @gravity_vm_fastlookup(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @gravity_value_getclass(ptr, i64) local_unnamed_addr #1

declare ptr @gravity_vm_getclosure(ptr noundef) local_unnamed_addr #1

declare zeroext i1 @gravity_vm_runclosure(ptr noundef, ptr noundef, ptr, i64, ptr noundef, i16 noundef zeroext) local_unnamed_addr #1

declare { ptr, i64 } @gravity_vm_result(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint nounwind uwtable
define dso_local { ptr, i64 } @convert_value2string(ptr noundef %0, ptr %1, i64 %2) local_unnamed_addr #2 {
  %4 = alloca [512 x i8], align 16
  %5 = alloca [512 x i8], align 16
  %6 = alloca [512 x i8], align 16
  %7 = alloca [512 x i8], align 16
  %8 = alloca i32, align 4
  %9 = alloca [512 x i8], align 16
  %10 = load ptr, ptr @gravity_class_string, align 8, !tbaa !5
  %11 = icmp eq ptr %10, %1
  br i1 %11, label %.thread, label %12

12:                                               ; preds = %3
  %13 = load ptr, ptr @gravity_class_int, align 8, !tbaa !5
  %14 = icmp eq ptr %13, %1
  br i1 %14, label %15, label %20

15:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %4) #5
  %16 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %4, i64 noundef 512, ptr noundef nonnull @.str.1, i64 noundef %2) #5
  %17 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull %4, i32 noundef -1) #5
  %18 = extractvalue { ptr, i64 } %17, 0
  %19 = extractvalue { ptr, i64 } %17, 1
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %4) #5
  br label %.thread

20:                                               ; preds = %12
  %21 = load ptr, ptr @gravity_class_bool, align 8, !tbaa !5
  %22 = icmp eq ptr %21, %1
  br i1 %22, label %23, label %28

23:                                               ; preds = %20
  %.not104 = icmp eq i64 %2, 0
  %24 = select i1 %.not104, ptr @.str, ptr @.str.2
  %25 = tail call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull %24, i32 noundef -1) #5
  %26 = extractvalue { ptr, i64 } %25, 0
  %27 = extractvalue { ptr, i64 } %25, 1
  br label %.thread

28:                                               ; preds = %20
  %29 = load ptr, ptr @gravity_class_null, align 8, !tbaa !5
  %30 = icmp eq ptr %29, %1
  %31 = icmp eq i64 %2, 0
  %or.cond = select i1 %30, i1 %31, i1 false
  br i1 %or.cond, label %32, label %36

32:                                               ; preds = %28
  %33 = tail call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull @.str.3, i32 noundef -1) #5
  %34 = extractvalue { ptr, i64 } %33, 0
  %35 = extractvalue { ptr, i64 } %33, 1
  br label %.thread

36:                                               ; preds = %28
  %37 = icmp eq i64 %2, 1
  %or.cond7 = select i1 %30, i1 %37, i1 false
  br i1 %or.cond7, label %38, label %42

38:                                               ; preds = %36
  %39 = tail call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull @.str.4, i32 noundef -1) #5
  %40 = extractvalue { ptr, i64 } %39, 0
  %41 = extractvalue { ptr, i64 } %39, 1
  br label %.thread

42:                                               ; preds = %36
  %43 = load ptr, ptr @gravity_class_float, align 8, !tbaa !5
  %44 = icmp eq ptr %43, %1
  br i1 %44, label %45, label %51

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %5) #5
  %46 = bitcast i64 %2 to double
  %47 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 512, ptr noundef nonnull @.str.5, double noundef %46) #5
  %48 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull %5, i32 noundef -1) #5
  %49 = extractvalue { ptr, i64 } %48, 0
  %50 = extractvalue { ptr, i64 } %48, 1
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %5) #5
  br label %.thread

51:                                               ; preds = %42
  %52 = load ptr, ptr @gravity_class_class, align 8, !tbaa !5
  %53 = icmp eq ptr %52, %1
  br i1 %53, label %54, label %61

54:                                               ; preds = %51
  %55 = inttoptr i64 %2 to ptr
  %56 = getelementptr inbounds i8, ptr %55, i64 56
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %.not103 = icmp eq ptr %57, null
  %spec.store.select = select i1 %.not103, ptr @.str.6, ptr %57
  %58 = tail call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull %spec.store.select, i32 noundef -1) #5
  %59 = extractvalue { ptr, i64 } %58, 0
  %60 = extractvalue { ptr, i64 } %58, 1
  br label %.thread

61:                                               ; preds = %51
  %62 = load ptr, ptr @gravity_class_function, align 8, !tbaa !5
  %63 = icmp eq ptr %62, %1
  br i1 %63, label %64, label %71

64:                                               ; preds = %61
  %65 = inttoptr i64 %2 to ptr
  %66 = getelementptr inbounds i8, ptr %65, i64 56
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  %.not102 = icmp eq ptr %67, null
  %spec.store.select8 = select i1 %.not102, ptr @.str.7, ptr %67
  %68 = tail call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull %spec.store.select8, i32 noundef -1) #5
  %69 = extractvalue { ptr, i64 } %68, 0
  %70 = extractvalue { ptr, i64 } %68, 1
  br label %.thread

71:                                               ; preds = %61
  %72 = load ptr, ptr @gravity_class_closure, align 8, !tbaa !5
  %73 = icmp eq ptr %72, %1
  br i1 %73, label %74, label %83

74:                                               ; preds = %71
  %75 = inttoptr i64 %2 to ptr
  %76 = getelementptr inbounds i8, ptr %75, i64 56
  %77 = load ptr, ptr %76, align 8, !tbaa !17
  %78 = getelementptr inbounds i8, ptr %77, i64 56
  %79 = load ptr, ptr %78, align 8, !tbaa !14
  %.not101 = icmp eq ptr %79, null
  %spec.store.select9 = select i1 %.not101, ptr @.str.8, ptr %79
  %80 = tail call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull %spec.store.select9, i32 noundef -1) #5
  %81 = extractvalue { ptr, i64 } %80, 0
  %82 = extractvalue { ptr, i64 } %80, 1
  br label %.thread

83:                                               ; preds = %71
  %84 = load ptr, ptr @gravity_class_list, align 8, !tbaa !5
  %85 = icmp eq ptr %84, %1
  br i1 %85, label %86, label %91

86:                                               ; preds = %83
  %87 = inttoptr i64 %2 to ptr
  %88 = tail call { ptr, i64 } @convert_list2string(ptr noundef %0, ptr noundef %87)
  %89 = extractvalue { ptr, i64 } %88, 0
  %90 = extractvalue { ptr, i64 } %88, 1
  br label %.thread

91:                                               ; preds = %83
  %92 = load ptr, ptr @gravity_class_map, align 8, !tbaa !5
  %93 = icmp eq ptr %92, %1
  br i1 %93, label %94, label %99

94:                                               ; preds = %91
  %95 = inttoptr i64 %2 to ptr
  %96 = tail call { ptr, i64 } @convert_map2string(ptr noundef %0, ptr noundef %95)
  %97 = extractvalue { ptr, i64 } %96, 0
  %98 = extractvalue { ptr, i64 } %96, 1
  br label %.thread

99:                                               ; preds = %91
  %100 = load ptr, ptr @gravity_class_range, align 8, !tbaa !5
  %101 = icmp eq ptr %100, %1
  br i1 %101, label %102, label %112

102:                                              ; preds = %99
  %103 = inttoptr i64 %2 to ptr
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %6) #5
  %104 = getelementptr inbounds i8, ptr %103, i64 48
  %105 = load i64, ptr %104, align 8, !tbaa !19
  %106 = getelementptr inbounds i8, ptr %103, i64 56
  %107 = load i64, ptr %106, align 8, !tbaa !22
  %108 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %6, i64 noundef 512, ptr noundef nonnull @.str.9, i64 noundef %105, i64 noundef %107) #5
  %109 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull %6, i32 noundef -1) #5
  %110 = extractvalue { ptr, i64 } %109, 0
  %111 = extractvalue { ptr, i64 } %109, 1
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %6) #5
  br label %.thread

112:                                              ; preds = %99
  %113 = load ptr, ptr @gravity_class_fiber, align 8, !tbaa !5
  %114 = icmp eq ptr %113, %1
  br i1 %114, label %115, label %121

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %7) #5
  %116 = inttoptr i64 %2 to ptr
  %117 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %7, i64 noundef 512, ptr noundef nonnull @.str.10, ptr noundef %116) #5
  %118 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull %7, i32 noundef -1) #5
  %119 = extractvalue { ptr, i64 } %118, 0
  %120 = extractvalue { ptr, i64 } %118, 1
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %7) #5
  br label %.thread

121:                                              ; preds = %112
  %122 = tail call ptr @gravity_value_getclass(ptr %1, i64 %2) #5
  %123 = tail call ptr @gravity_vm_fastlookup(ptr noundef %0, ptr noundef %122, i32 noundef 28) #5
  %.not = icmp eq ptr %123, null
  br i1 %.not, label %137, label %124

124:                                              ; preds = %121
  %125 = getelementptr inbounds i8, ptr %123, i64 56
  %126 = load ptr, ptr %125, align 8, !tbaa !17
  %127 = getelementptr inbounds i8, ptr %126, i64 72
  %128 = load i32, ptr %127, align 8, !tbaa !23
  %129 = icmp eq i32 %128, 1
  br i1 %129, label %130, label %134

130:                                              ; preds = %124
  %131 = getelementptr inbounds i8, ptr %126, i64 80
  %132 = load ptr, ptr %131, align 8, !tbaa !24
  %133 = icmp eq ptr %132, @convert_object_string
  br i1 %133, label %137, label %134

134:                                              ; preds = %130, %124
  %135 = tail call ptr @gravity_vm_getclosure(ptr noundef %0) #5
  %136 = icmp eq ptr %135, %123
  br i1 %136, label %137, label %165

137:                                              ; preds = %134, %130, %121
  %138 = load ptr, ptr @gravity_class_instance, align 8, !tbaa !5
  %139 = icmp eq ptr %138, %1
  br i1 %139, label %140, label %.thread

140:                                              ; preds = %137
  %141 = inttoptr i64 %2 to ptr
  %.not96 = icmp eq ptr %0, null
  br i1 %.not96, label %.thread108, label %142

142:                                              ; preds = %140
  %143 = getelementptr inbounds i8, ptr %141, i64 56
  %144 = load ptr, ptr %143, align 8, !tbaa !25
  %.not97 = icmp eq ptr %144, null
  br i1 %.not97, label %.thread108, label %145

145:                                              ; preds = %142
  %146 = tail call ptr @gravity_vm_delegate(ptr noundef nonnull %0) #5
  %147 = getelementptr inbounds i8, ptr %146, i64 152
  %148 = load ptr, ptr %147, align 8, !tbaa !27
  %.not99 = icmp eq ptr %148, null
  br i1 %.not99, label %.thread, label %149

149:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 0, ptr %8, align 4, !tbaa !29
  %150 = load ptr, ptr %143, align 8, !tbaa !25
  %151 = call ptr %148(ptr noundef nonnull %0, ptr noundef %150, ptr noundef nonnull %8) #5
  %.not100 = icmp eq ptr %151, null
  br i1 %.not100, label %.thread112, label %160

.thread112:                                       ; preds = %149
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %.thread

.thread108:                                       ; preds = %140, %142
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %9) #5
  %152 = getelementptr inbounds i8, ptr %141, i64 48
  %153 = load ptr, ptr %152, align 8, !tbaa !30
  %154 = getelementptr inbounds i8, ptr %153, i64 56
  %155 = load ptr, ptr %154, align 8, !tbaa !9
  %.not98 = icmp eq ptr %155, null
  %spec.store.select10 = select i1 %.not98, ptr @.str.6, ptr %155
  %156 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 512, ptr noundef nonnull @.str.11, ptr noundef nonnull %spec.store.select10, ptr noundef %141) #5
  %157 = call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull %9, i32 noundef -1) #5
  %158 = extractvalue { ptr, i64 } %157, 0
  %159 = extractvalue { ptr, i64 } %157, 1
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %9) #5
  br label %.thread

160:                                              ; preds = %149
  %161 = load i32, ptr %8, align 4, !tbaa !29
  %162 = call { ptr, i64 } @gravity_string_to_value(ptr noundef nonnull %0, ptr noundef nonnull %151, i32 noundef %161) #5
  %163 = extractvalue { ptr, i64 } %162, 0
  %164 = extractvalue { ptr, i64 } %162, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %.thread

165:                                              ; preds = %134
  %166 = tail call zeroext i1 @gravity_vm_runclosure(ptr noundef %0, ptr noundef nonnull %123, ptr %1, i64 %2, ptr noundef null, i16 noundef zeroext 0) #5
  br i1 %166, label %167, label %.thread

167:                                              ; preds = %165
  %168 = tail call { ptr, i64 } @gravity_vm_result(ptr noundef %0) #5
  %169 = extractvalue { ptr, i64 } %168, 0
  %170 = load ptr, ptr @gravity_class_string, align 8, !tbaa !5
  %171 = icmp eq ptr %169, %170
  br i1 %171, label %175, label %172

172:                                              ; preds = %167
  %173 = tail call { ptr, i64 } @gravity_string_to_value(ptr noundef %0, ptr noundef nonnull @.str.3, i32 noundef -1) #5
  %174 = extractvalue { ptr, i64 } %173, 0
  br label %175

175:                                              ; preds = %167, %172
  %.sroa.089.4 = phi ptr [ %174, %172 ], [ %169, %167 ]
  %.pn = phi { ptr, i64 } [ %173, %172 ], [ %168, %167 ]
  %.sroa.20.4 = extractvalue { ptr, i64 } %.pn, 1
  br label %.thread

.thread:                                          ; preds = %145, %137, %.thread112, %160, %.thread108, %175, %165, %3, %115, %102, %94, %86, %74, %64, %54, %45, %38, %32, %23, %15
  %.sroa.089.6 = phi ptr [ %18, %15 ], [ %26, %23 ], [ %34, %32 ], [ %40, %38 ], [ %49, %45 ], [ %59, %54 ], [ %69, %64 ], [ %81, %74 ], [ %89, %86 ], [ %97, %94 ], [ %110, %102 ], [ %119, %115 ], [ %1, %3 ], [ %163, %160 ], [ %.sroa.089.4, %175 ], [ null, %165 ], [ %158, %.thread108 ], [ null, %.thread112 ], [ null, %137 ], [ null, %145 ]
  %.sroa.20.6 = phi i64 [ %19, %15 ], [ %27, %23 ], [ %35, %32 ], [ %41, %38 ], [ %50, %45 ], [ %60, %54 ], [ %70, %64 ], [ %82, %74 ], [ %90, %86 ], [ %98, %94 ], [ %111, %102 ], [ %120, %115 ], [ %2, %3 ], [ %164, %160 ], [ %.sroa.20.4, %175 ], [ 0, %165 ], [ %159, %.thread108 ], [ 0, %.thread112 ], [ 0, %137 ], [ 0, %145 ]
  %.fca.0.insert = insertvalue { ptr, i64 } poison, ptr %.sroa.089.6, 0
  %.fca.1.insert = insertvalue { ptr, i64 } %.fca.0.insert, i64 %.sroa.20.6, 1
  ret { ptr, i64 } %.fca.1.insert
}

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

declare { ptr, i64 } @gravity_string_to_value(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden { ptr, i64 } @convert_list2string(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden { ptr, i64 } @convert_map2string(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @convert_object_string(ptr noundef, ptr noundef, i16 noundef zeroext, i32 noundef) #4

declare ptr @gravity_vm_delegate(ptr noundef) local_unnamed_addr #1

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 = { 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 #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 = { 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 56}
!10 = !{!"gravity_class_s", !6, i64 0, !11, i64 8, !6, i64 48, !6, i64 56, !12, i64 64, !12, i64 65, !12, i64 66, !12, i64 67, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !13, i64 104, !6, i64 112}
!11 = !{!"gravity_gc_s", !12, i64 0, !12, i64 1, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 56}
!15 = !{!"", !6, i64 0, !11, i64 8, !6, i64 48, !6, i64 56, !16, i64 64, !16, i64 66, !16, i64 68, !16, i64 70, !13, i64 72, !7, i64 80}
!16 = !{!"short", !7, i64 0}
!17 = !{!18, !6, i64 56}
!18 = !{!"gravity_closure_s", !6, i64 0, !11, i64 8, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !13, i64 80}
!19 = !{!20, !21, i64 48}
!20 = !{!"", !6, i64 0, !11, i64 8, !21, i64 48, !21, i64 56}
!21 = !{!"long", !7, i64 0}
!22 = !{!20, !21, i64 56}
!23 = !{!15, !13, i64 72}
!24 = !{!7, !7, i64 0}
!25 = !{!26, !6, i64 56}
!26 = !{!"", !6, i64 0, !11, i64 8, !6, i64 48, !6, i64 56, !6, i64 64}
!27 = !{!28, !6, i64 152}
!28 = !{!"", !6, i64 0, !12, i64 8, !12, i64 9, !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, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184}
!29 = !{!13, !13, i64 0}
!30 = !{!26, !6, i64 48}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass