; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_compiled_0)

; 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.w2c_hermes = type { ptr, ptr, ptr, i32, i32, i32, %struct.wasm_rt_memory_t, %struct.wasm_rt_funcref_table_t }
%struct.wasm_rt_memory_t = type { ptr, i64, i64, i64, i8 }
%struct.wasm_rt_funcref_table_t = type { ptr, i32, i32 }

; 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

; Function Attrs: noreturn
declare void @wasm_rt_trap(i32 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load8_u(ptr noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_reinterpret_f64(double noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @f64_load(ptr noundef, i64 noundef) #2

declare void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28char0x20const0x2A0x29(ptr noundef, i32 noundef) #4

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x3A0x3AHandle0x28hermes0x3A0x3Avm0x3A0x3AHandleRootOwner0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef, i32 noundef, i32 noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_0x28anonymous0x20namespace0x290x3A0x3AHermesABIRuntimeImpl0x3A0x3AmakeHandle0x28HermesABIValue0x20const0x260x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store double 0.000000e+00, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %22 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %22, ptr %12, align 4, !tbaa !9
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.w2c_hermes, ptr %23, i32 0, i32 6
  %25 = load i32, ptr %12, align 4, !tbaa !9
  %26 = zext i32 %25 to i64
  %27 = call i32 @i32_load(ptr noundef %24, i64 noundef %26)
  store i32 %27, ptr %12, align 4, !tbaa !9
  %28 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %28, ptr %9, align 4, !tbaa !9
  store i32 2147483643, ptr %13, align 4, !tbaa !9
  %29 = load i32, ptr %13, align 4, !tbaa !9
  %30 = load i32, ptr %12, align 4, !tbaa !9
  %31 = add i32 %30, %29
  store i32 %31, ptr %12, align 4, !tbaa !9
  %32 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %32, ptr %10, align 4, !tbaa !9
  store i32 4, ptr %13, align 4, !tbaa !9
  %33 = load i32, ptr %12, align 4, !tbaa !9
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = icmp ugt i32 %33, %34
  %36 = zext i1 %35 to i32
  store i32 %36, ptr %12, align 4, !tbaa !9
  %37 = load i32, ptr %12, align 4, !tbaa !9
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %4
  br label %90

40:                                               ; preds = %4
  %41 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %41, ptr %12, align 4, !tbaa !9
  store i32 3, ptr %13, align 4, !tbaa !9
  %42 = load i32, ptr %12, align 4, !tbaa !9
  %43 = load i32, ptr %13, align 4, !tbaa !9
  %44 = icmp eq i32 %42, %43
  %45 = zext i1 %44 to i32
  store i32 %45, ptr %12, align 4, !tbaa !9
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %40
  br label %90

49:                                               ; preds = %40
  %50 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %50, ptr %12, align 4, !tbaa !9
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.w2c_hermes, ptr %51, i32 0, i32 6
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = add i64 %54, 8
  %56 = call i32 @i32_load(ptr noundef %52, i64 noundef %55)
  store i32 %56, ptr %12, align 4, !tbaa !9
  %57 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %57, ptr %8, align 4, !tbaa !9
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.w2c_hermes, ptr %58, i32 0, i32 6
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = add i64 %61, 4
  %63 = call i32 @i32_load(ptr noundef %59, i64 noundef %62)
  store i32 %63, ptr %12, align 4, !tbaa !9
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %84

66:                                               ; preds = %49
  %67 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %67, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.w2c_hermes, ptr %68, i32 0, i32 6
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %69, i64 noundef %71, i32 noundef %72)
  %73 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %73, ptr %12, align 4, !tbaa !9
  %74 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %74, ptr %13, align 4, !tbaa !9
  store i32 8, ptr %14, align 4, !tbaa !9
  %75 = load i32, ptr %14, align 4, !tbaa !9
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = add i32 %76, %75
  store i32 %77, ptr %13, align 4, !tbaa !9
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.w2c_hermes, ptr %78, i32 0, i32 6
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = zext i32 %80 to i64
  %82 = add i64 %81, 4
  %83 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %79, i64 noundef %82, i32 noundef %83)
  br label %199

84:                                               ; preds = %49
  store i32 131111, ptr %12, align 4, !tbaa !9
  store i32 61000, ptr %13, align 4, !tbaa !9
  store i32 95, ptr %14, align 4, !tbaa !9
  store i32 90287, ptr %15, align 4, !tbaa !9
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = load i32, ptr %13, align 4, !tbaa !9
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %85, i32 noundef %86, i32 noundef %87, i32 noundef %88, i32 noundef %89)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

90:                                               ; preds = %48, %39
  %91 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %91, ptr %12, align 4, !tbaa !9
  %92 = load i32, ptr %12, align 4, !tbaa !9
  switch i32 %92, label %98 [
    i32 0, label %93
    i32 1, label %94
    i32 2, label %95
    i32 3, label %96
    i32 4, label %97
  ]

93:                                               ; preds = %90
  br label %185

94:                                               ; preds = %90
  br label %99

95:                                               ; preds = %90
  br label %113

96:                                               ; preds = %90
  br label %182

97:                                               ; preds = %90
  br label %144

98:                                               ; preds = %90
  br label %182

99:                                               ; preds = %94
  %100 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %100, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.w2c_hermes, ptr %101, i32 0, i32 6
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %102, i64 noundef %104, i32 noundef %105)
  %106 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %106, ptr %12, align 4, !tbaa !9
  store i32 217536, ptr %13, align 4, !tbaa !9
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.w2c_hermes, ptr %107, i32 0, i32 6
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = add i64 %110, 4
  %112 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %108, i64 noundef %111, i32 noundef %112)
  br label %199

113:                                              ; preds = %95
  %114 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %114, ptr %12, align 4, !tbaa !9
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.w2c_hermes, ptr %115, i32 0, i32 6
  %117 = load i32, ptr %12, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = add i64 %118, 8
  %120 = call i32 @i32_load8_u(ptr noundef %116, i64 noundef %119)
  store i32 %120, ptr %12, align 4, !tbaa !9
  %121 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %121, ptr %8, align 4, !tbaa !9
  %122 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %122, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.w2c_hermes, ptr %123, i32 0, i32 6
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = zext i32 %125 to i64
  %127 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %124, i64 noundef %126, i32 noundef %127)
  %128 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %128, ptr %12, align 4, !tbaa !9
  store i32 217552, ptr %13, align 4, !tbaa !9
  store i32 217560, ptr %14, align 4, !tbaa !9
  %129 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %129, ptr %15, align 4, !tbaa !9
  %130 = load i32, ptr %15, align 4, !tbaa !9
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %134

132:                                              ; preds = %113
  %133 = load i32, ptr %13, align 4, !tbaa !9
  br label %136

134:                                              ; preds = %113
  %135 = load i32, ptr %14, align 4, !tbaa !9
  br label %136

136:                                              ; preds = %134, %132
  %137 = phi i32 [ %133, %132 ], [ %135, %134 ]
  store i32 %137, ptr %13, align 4, !tbaa !9
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.w2c_hermes, ptr %138, i32 0, i32 6
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = add i64 %141, 4
  %143 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %139, i64 noundef %142, i32 noundef %143)
  br label %199

144:                                              ; preds = %97
  %145 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %145, ptr %12, align 4, !tbaa !9
  %146 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %146, ptr %13, align 4, !tbaa !9
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.w2c_hermes, ptr %147, i32 0, i32 6
  %149 = load i32, ptr %13, align 4, !tbaa !9
  %150 = zext i32 %149 to i64
  %151 = add i64 %150, 4
  %152 = call i32 @i32_load(ptr noundef %148, i64 noundef %151)
  store i32 %152, ptr %13, align 4, !tbaa !9
  store i64 9221120237041090560, ptr %17, align 8, !tbaa !13
  %153 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %153, ptr %15, align 4, !tbaa !9
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.w2c_hermes, ptr %154, i32 0, i32 6
  %156 = load i32, ptr %15, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = add i64 %157, 8
  %159 = call double @f64_load(ptr noundef %155, i64 noundef %158)
  store double %159, ptr %19, align 8, !tbaa !11
  %160 = load double, ptr %19, align 8, !tbaa !11
  store double %160, ptr %11, align 8, !tbaa !11
  %161 = load double, ptr %19, align 8, !tbaa !11
  %162 = call i64 @i64_reinterpret_f64(double noundef %161)
  store i64 %162, ptr %18, align 8, !tbaa !13
  %163 = load double, ptr %11, align 8, !tbaa !11
  store double %163, ptr %20, align 8, !tbaa !11
  %164 = load double, ptr %11, align 8, !tbaa !11
  store double %164, ptr %21, align 8, !tbaa !11
  %165 = load double, ptr %20, align 8, !tbaa !11
  %166 = load double, ptr %21, align 8, !tbaa !11
  %167 = fcmp une double %165, %166
  %168 = zext i1 %167 to i32
  store i32 %168, ptr %16, align 4, !tbaa !9
  %169 = load i32, ptr %16, align 4, !tbaa !9
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %173

171:                                              ; preds = %144
  %172 = load i64, ptr %17, align 8, !tbaa !13
  br label %175

173:                                              ; preds = %144
  %174 = load i64, ptr %18, align 8, !tbaa !13
  br label %175

175:                                              ; preds = %173, %171
  %176 = phi i64 [ %172, %171 ], [ %174, %173 ]
  store i64 %176, ptr %17, align 8, !tbaa !13
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = load i32, ptr %12, align 4, !tbaa !9
  %179 = load i32, ptr %13, align 4, !tbaa !9
  %180 = load i64, ptr %17, align 8, !tbaa !13
  %181 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x3A0x3AHandle0x28hermes0x3A0x3Avm0x3A0x3AHandleRootOwner0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %177, i32 noundef %178, i32 noundef %179, i64 noundef %180)
  store i32 %181, ptr %12, align 4, !tbaa !9
  br label %199

182:                                              ; preds = %98, %96
  store i32 113348, ptr %12, align 4, !tbaa !9
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28char0x20const0x2A0x29(ptr noundef %183, i32 noundef %184)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

185:                                              ; preds = %93
  %186 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %186, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.w2c_hermes, ptr %187, i32 0, i32 6
  %189 = load i32, ptr %12, align 4, !tbaa !9
  %190 = zext i32 %189 to i64
  %191 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %188, i64 noundef %190, i32 noundef %191)
  %192 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %192, ptr %12, align 4, !tbaa !9
  store i32 217528, ptr %13, align 4, !tbaa !9
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.w2c_hermes, ptr %193, i32 0, i32 6
  %195 = load i32, ptr %12, align 4, !tbaa !9
  %196 = zext i32 %195 to i64
  %197 = add i64 %196, 4
  %198 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %194, i64 noundef %197, i32 noundef %198)
  br label %199

199:                                              ; preds = %185, %175, %136, %99, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}


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

; Function Attrs: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load8_u(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_reinterpret_f64(double noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @f64_load(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28char0x20const0x2A0x29(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x3A0x3AHandle0x28hermes0x3A0x3Avm0x3A0x3AHandleRootOwner0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_0x28anonymous0x20namespace0x290x3A0x3AHermesABIRuntimeImpl0x3A0x3AmakeHandle0x28HermesABIValue0x20const0x260x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = zext i32 %3 to i64
  %7 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %8 = add i32 %7, 2147483643
  %9 = icmp ugt i32 %8, 4
  %10 = icmp eq i32 %8, 3
  %or.cond = or i1 %9, %10
  br i1 %or.cond, label %22, label %11

11:                                               ; preds = %4
  %12 = add nuw nsw i64 %6, 8
  %13 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %12)
  %14 = zext i32 %13 to i64
  %15 = add nuw nsw i64 %14, 4
  %16 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %15)
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %21, label %17

17:                                               ; preds = %11
  %18 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %18, i32 noundef 0)
  %19 = add i32 %13, 8
  %20 = add nuw nsw i64 %18, 4
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %20, i32 noundef %19)
  br label %46

21:                                               ; preds = %11
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 131111, i32 noundef 61000, i32 noundef 95, i32 noundef 90287)
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable

22:                                               ; preds = %4
  switch i32 %7, label %42 [
    i32 0, label %43
    i32 1, label %23
    i32 2, label %26
    i32 4, label %32
  ]

23:                                               ; preds = %22
  %24 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %24, i32 noundef 0)
  %25 = add nuw nsw i64 %24, 4
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %25, i32 noundef 217536)
  br label %46

26:                                               ; preds = %22
  %27 = add nuw nsw i64 %6, 8
  %28 = tail call i32 @i32_load8_u(ptr noundef nonnull %5, i64 noundef %27)
  %29 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %29, i32 noundef 0)
  %.not92 = icmp eq i32 %28, 0
  %30 = select i1 %.not92, i32 217560, i32 217552
  %31 = add nuw nsw i64 %29, 4
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %31, i32 noundef %30)
  br label %46

32:                                               ; preds = %22
  %33 = zext i32 %2 to i64
  %34 = add nuw nsw i64 %33, 4
  %35 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %34)
  %36 = add nuw nsw i64 %6, 8
  %37 = tail call double @f64_load(ptr noundef nonnull %5, i64 noundef %36)
  %38 = tail call i64 @i64_reinterpret_f64(double noundef %37)
  %39 = fcmp uno double %37, 0.000000e+00
  %40 = select i1 %39, i64 9221120237041090560, i64 %38
  %41 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x3A0x3AHandle0x28hermes0x3A0x3Avm0x3A0x3AHandleRootOwner0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %0, i32 noundef %1, i32 noundef %35, i64 noundef %40) #5
  br label %46

42:                                               ; preds = %22
  tail call void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28char0x20const0x2A0x29(ptr noundef %0, i32 noundef 113348) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable

43:                                               ; preds = %22
  %44 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %44, i32 noundef 0)
  %45 = add nuw nsw i64 %44, 4
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %45, i32 noundef 217528)
  br label %46

46:                                               ; preds = %43, %32, %26, %23, %17
  ret void
}

attributes #0 = { noreturn "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 = { 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 #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 = { "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 = { noreturn nounwind }
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)"}


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