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

; 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: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) #1

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

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

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AhermesBuiltinEnsureObject0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #4 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %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 i32, align 4
  %18 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  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 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.w2c_hermes, ptr %19, i32 0, i32 3
  %21 = load i32, ptr %20, align 8, !tbaa !11
  store i32 %21, ptr %13, align 4, !tbaa !9
  store i32 16, ptr %14, align 4, !tbaa !9
  %22 = load i32, ptr %14, align 4, !tbaa !9
  %23 = load i32, ptr %13, align 4, !tbaa !9
  %24 = sub i32 %23, %22
  store i32 %24, ptr %13, align 4, !tbaa !9
  %25 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %25, ptr %11, align 4, !tbaa !9
  %26 = load i32, ptr %13, align 4, !tbaa !9
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.w2c_hermes, ptr %27, i32 0, i32 3
  store i32 %26, ptr %28, align 8, !tbaa !11
  %29 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %29, ptr %13, align 4, !tbaa !9
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.w2c_hermes, ptr %30, i32 0, i32 6
  %32 = load i32, ptr %13, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = call i32 @i32_load(ptr noundef %31, i64 noundef %33)
  store i32 %34, ptr %13, align 4, !tbaa !9
  %35 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %35, ptr %12, align 4, !tbaa !9
  %36 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %36, ptr %13, align 4, !tbaa !9
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.w2c_hermes, ptr %37, i32 0, i32 6
  %39 = load i32, ptr %13, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = add i64 %40, 4
  %42 = call i32 @i32_load(ptr noundef %38, i64 noundef %41)
  store i32 %42, ptr %13, align 4, !tbaa !9
  %43 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %43, ptr %10, align 4, !tbaa !9
  %44 = load i32, ptr %13, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  %46 = xor i1 %45, true
  %47 = zext i1 %46 to i32
  store i32 %47, ptr %13, align 4, !tbaa !9
  %48 = load i32, ptr %13, align 4, !tbaa !9
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %5
  br label %82

51:                                               ; preds = %5
  %52 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %52, ptr %13, align 4, !tbaa !9
  store i32 2, ptr %14, align 4, !tbaa !9
  %53 = load i32, ptr %14, align 4, !tbaa !9
  %54 = load i32, ptr %13, align 4, !tbaa !9
  %55 = sub i32 %54, %53
  store i32 %55, ptr %13, align 4, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.w2c_hermes, ptr %56, i32 0, i32 6
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = call i32 @i32_load16_s(ptr noundef %57, i64 noundef %59)
  store i32 %60, ptr %13, align 4, !tbaa !9
  store i32 -1, ptr %14, align 4, !tbaa !9
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = load i32, ptr %14, align 4, !tbaa !9
  %63 = icmp ne i32 %61, %62
  %64 = zext i1 %63 to i32
  store i32 %64, ptr %13, align 4, !tbaa !9
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %51
  br label %82

68:                                               ; preds = %51
  %69 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %69, ptr %13, align 4, !tbaa !9
  store i64 -1688849860263936, ptr %18, align 8, !tbaa !17
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.w2c_hermes, ptr %70, i32 0, i32 6
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = add i64 %73, 8
  %75 = load i64, ptr %18, align 8, !tbaa !17
  call void @i64_store(ptr noundef %71, i64 noundef %74, i64 noundef %75)
  %76 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %76, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.w2c_hermes, ptr %77, i32 0, i32 6
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %78, i64 noundef %80, i32 noundef %81)
  br label %170

82:                                               ; preds = %67, %50
  %83 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %83, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.w2c_hermes, ptr %84, i32 0, i32 6
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = zext i32 %86 to i64
  %88 = add i64 %87, 8
  %89 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %85, i64 noundef %88, i32 noundef %89)
  %90 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %90, ptr %13, align 4, !tbaa !9
  store i32 217528, ptr %14, align 4, !tbaa !9
  %91 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %91, ptr %15, align 4, !tbaa !9
  store i32 16, ptr %16, align 4, !tbaa !9
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = load i32, ptr %15, align 4, !tbaa !9
  %94 = sub i32 %93, %92
  store i32 %94, ptr %15, align 4, !tbaa !9
  %95 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %95, ptr %16, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  %96 = load i32, ptr %16, align 4, !tbaa !9
  %97 = load i32, ptr %17, align 4, !tbaa !9
  %98 = icmp ule i32 %96, %97
  %99 = zext i1 %98 to i32
  store i32 %99, ptr %16, align 4, !tbaa !9
  %100 = load i32, ptr %16, align 4, !tbaa !9
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %82
  %103 = load i32, ptr %14, align 4, !tbaa !9
  br label %106

104:                                              ; preds = %82
  %105 = load i32, ptr %15, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %104, %102
  %107 = phi i32 [ %103, %102 ], [ %105, %104 ]
  store i32 %107, ptr %14, align 4, !tbaa !9
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.w2c_hermes, ptr %108, i32 0, i32 6
  %110 = load i32, ptr %13, align 4, !tbaa !9
  %111 = zext i32 %110 to i64
  %112 = add i64 %111, 12
  %113 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %109, i64 noundef %112, i32 noundef %113)
  %114 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %114, ptr %13, align 4, !tbaa !9
  %115 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %115, ptr %14, align 4, !tbaa !9
  %116 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %116, ptr %15, align 4, !tbaa !9
  store i32 8, ptr %16, align 4, !tbaa !9
  %117 = load i32, ptr %16, align 4, !tbaa !9
  %118 = load i32, ptr %15, align 4, !tbaa !9
  %119 = add i32 %118, %117
  store i32 %119, ptr %15, align 4, !tbaa !9
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = load i32, ptr %14, align 4, !tbaa !9
  %122 = load i32, ptr %15, align 4, !tbaa !9
  %123 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef %120, i32 noundef %121, i32 noundef %122)
  store i32 %123, ptr %14, align 4, !tbaa !9
  %124 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %124, ptr %10, align 4, !tbaa !9
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.w2c_hermes, ptr %125, i32 0, i32 6
  %127 = load i32, ptr %13, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %126, i64 noundef %128, i32 noundef %129)
  %130 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %130, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = load i32, ptr %14, align 4, !tbaa !9
  %133 = icmp eq i32 %131, %132
  %134 = zext i1 %133 to i32
  store i32 %134, ptr %13, align 4, !tbaa !9
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %138

137:                                              ; preds = %106
  br label %178

138:                                              ; preds = %106
  %139 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %139, ptr %13, align 4, !tbaa !9
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.w2c_hermes, ptr %140, i32 0, i32 6
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = add i64 %143, 8
  %145 = call i32 @i32_load(ptr noundef %141, i64 noundef %144)
  store i32 %145, ptr %13, align 4, !tbaa !9
  %146 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %146, ptr %10, align 4, !tbaa !9
  %147 = load i32, ptr %13, align 4, !tbaa !9
  %148 = icmp ne i32 %147, 0
  %149 = xor i1 %148, true
  %150 = zext i1 %149 to i32
  store i32 %150, ptr %13, align 4, !tbaa !9
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %138
  br label %170

154:                                              ; preds = %138
  %155 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %155, ptr %13, align 4, !tbaa !9
  %156 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %156, ptr %14, align 4, !tbaa !9
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.w2c_hermes, ptr %157, i32 0, i32 6
  %159 = load i32, ptr %14, align 4, !tbaa !9
  %160 = zext i32 %159 to i64
  %161 = call i32 @i32_load(ptr noundef %158, i64 noundef %160)
  store i32 %161, ptr %14, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  %162 = load i32, ptr %15, align 4, !tbaa !9
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = sub i32 %163, %162
  store i32 %164, ptr %14, align 4, !tbaa !9
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.w2c_hermes, ptr %165, i32 0, i32 6
  %167 = load i32, ptr %13, align 4, !tbaa !9
  %168 = zext i32 %167 to i64
  %169 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %166, i64 noundef %168, i32 noundef %169)
  br label %170

170:                                              ; preds = %154, %153, %68
  %171 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %171, ptr %13, align 4, !tbaa !9
  store i32 16, ptr %14, align 4, !tbaa !9
  %172 = load i32, ptr %14, align 4, !tbaa !9
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = add i32 %173, %172
  store i32 %174, ptr %13, align 4, !tbaa !9
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.w2c_hermes, ptr %176, i32 0, i32 3
  store i32 %175, ptr %177, align 8, !tbaa !11
  br label %196

178:                                              ; preds = %137
  store i32 0, ptr %13, align 4, !tbaa !9
  %179 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %179, ptr %11, align 4, !tbaa !9
  store i32 109717, ptr %14, align 4, !tbaa !9
  %180 = load i32, ptr %14, align 4, !tbaa !9
  %181 = load i32, ptr %13, align 4, !tbaa !9
  %182 = add i32 %181, %180
  store i32 %182, ptr %13, align 4, !tbaa !9
  %183 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %183, ptr %14, align 4, !tbaa !9
  store i32 77564, ptr %15, align 4, !tbaa !9
  %184 = load i32, ptr %15, align 4, !tbaa !9
  %185 = load i32, ptr %14, align 4, !tbaa !9
  %186 = add i32 %185, %184
  store i32 %186, ptr %14, align 4, !tbaa !9
  store i32 168, ptr %15, align 4, !tbaa !9
  %187 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %187, ptr %16, align 4, !tbaa !9
  store i32 28083, ptr %17, align 4, !tbaa !9
  %188 = load i32, ptr %17, align 4, !tbaa !9
  %189 = load i32, ptr %16, align 4, !tbaa !9
  %190 = add i32 %189, %188
  store i32 %190, ptr %16, align 4, !tbaa !9
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = load i32, ptr %14, align 4, !tbaa !9
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = load i32, ptr %16, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %191, i32 noundef %192, i32 noundef %193, i32 noundef %194, i32 noundef %195)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

196:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %11) #5
  ret void
}

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef, i32 noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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 }
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, !10, i64 24}
!12 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !13, i64 40, !16, i64 80}
!13 = !{!"", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !15, i64 32}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!17 = !{!14, !14, 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: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

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

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

declare 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 void @i64_store(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AhermesBuiltinEnsureObject0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #3 {
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = add i32 %7, -16
  store i32 %8, ptr %6, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = zext i32 %4 to i64
  %11 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %10)
  %12 = add nuw nsw i64 %10, 4
  %13 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %12)
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %21, label %14

14:                                               ; preds = %5
  %15 = add i32 %11, -2
  %16 = zext i32 %15 to i64
  %17 = tail call i32 @i32_load16_s(ptr noundef nonnull %9, i64 noundef %16)
  %.not98 = icmp eq i32 %17, -1
  br i1 %.not98, label %18, label %21

18:                                               ; preds = %14
  %19 = zext i32 %1 to i64
  %20 = add nuw nsw i64 %19, 8
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %20, i64 noundef -1688849860263936)
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %19, i32 noundef 1)
  br label %38

21:                                               ; preds = %14, %5
  %22 = zext i32 %8 to i64
  %23 = add nuw nsw i64 %22, 8
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %23, i32 noundef 0)
  %24 = add i32 %11, -16
  %25 = icmp ult i32 %13, 2
  %26 = select i1 %25, i32 217528, i32 %24
  %27 = add nuw nsw i64 %22, 12
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %27, i32 noundef %26)
  %28 = add i32 %7, -8
  %29 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef nonnull %0, i32 noundef %3, i32 noundef %28) #4
  %30 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %30, i32 noundef %29)
  %31 = icmp eq i32 %29, 1
  br i1 %31, label %39, label %32

32:                                               ; preds = %21
  %33 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %23)
  %.not99 = icmp eq i32 %33, 0
  br i1 %.not99, label %38, label %34

34:                                               ; preds = %32
  %35 = zext i32 %33 to i64
  %36 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %35)
  %37 = add i32 %36, -1
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %35, i32 noundef %37)
  br label %38

38:                                               ; preds = %32, %34, %18
  store i32 %7, ptr %6, align 8, !tbaa !5
  ret void

39:                                               ; preds = %21
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef nonnull %0, i32 noundef 109717, i32 noundef 77564, i32 noundef 168, i32 noundef 28083) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable
}

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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


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