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

; 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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef, i32 noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3ANativeState0x3E0x3A0x3AHandle0x28hermes0x3A0x3Avm0x3A0x3AHandleRootOwner0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeState0x2A0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #4 {
  %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 i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, 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 i64 0, 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 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %18 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %18, ptr %12, align 4, !tbaa !9
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.w2c_hermes, ptr %19, i32 0, i32 6
  %21 = load i32, ptr %12, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = add i64 %22, 4
  %24 = call i32 @i32_load(ptr noundef %20, i64 noundef %23)
  store i32 %24, ptr %12, align 4, !tbaa !9
  %25 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %25, ptr %9, align 4, !tbaa !9
  %26 = load i32, ptr %12, align 4, !tbaa !9
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %174

28:                                               ; preds = %4
  %29 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %29, ptr %12, align 4, !tbaa !9
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.w2c_hermes, ptr %30, i32 0, i32 6
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = add i64 %33, 12
  %35 = call i32 @i32_load(ptr noundef %31, i64 noundef %34)
  store i32 %35, ptr %12, align 4, !tbaa !9
  %36 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %36, ptr %10, align 4, !tbaa !9
  %37 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %37, ptr %13, align 4, !tbaa !9
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.w2c_hermes, ptr %38, i32 0, i32 6
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = add i64 %41, 8
  %43 = call i32 @i32_load(ptr noundef %39, i64 noundef %42)
  store i32 %43, ptr %13, align 4, !tbaa !9
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = icmp uge i32 %44, %45
  %47 = zext i1 %46 to i32
  store i32 %47, ptr %12, align 4, !tbaa !9
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %28
  br label %180

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

67:                                               ; preds = %51
  br label %186

68:                                               ; preds = %51
  %69 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %69, ptr %12, align 4, !tbaa !9
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  store i64 %71, ptr %16, align 8, !tbaa !11
  store i64 -281474976710656, ptr %17, align 8, !tbaa !11
  %72 = load i64, ptr %17, align 8, !tbaa !11
  %73 = load i64, ptr %16, align 8, !tbaa !11
  %74 = or i64 %73, %72
  store i64 %74, ptr %16, align 8, !tbaa !11
  %75 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %75, ptr %11, align 8, !tbaa !11
  %76 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %76, ptr %12, align 4, !tbaa !9
  %77 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %77, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %78 = load i32, ptr %14, align 4, !tbaa !9
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = add i32 %79, %78
  store i32 %80, ptr %13, align 4, !tbaa !9
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.w2c_hermes, ptr %81, i32 0, i32 6
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = zext i32 %83 to i64
  %85 = add i64 %84, 12
  %86 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %82, i64 noundef %85, i32 noundef %86)
  %87 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %87, ptr %12, align 4, !tbaa !9
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.w2c_hermes, ptr %88, i32 0, i32 6
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = zext i32 %90 to i64
  %92 = add i64 %91, 180
  %93 = call i32 @i32_load(ptr noundef %89, i64 noundef %92)
  store i32 %93, ptr %12, align 4, !tbaa !9
  %94 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %94, ptr %8, align 4, !tbaa !9
  %95 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %95, ptr %13, align 4, !tbaa !9
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.w2c_hermes, ptr %96, i32 0, i32 6
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = add i64 %99, 184
  %101 = call i32 @i32_load(ptr noundef %97, i64 noundef %100)
  store i32 %101, ptr %13, align 4, !tbaa !9
  %102 = load i32, ptr %12, align 4, !tbaa !9
  %103 = load i32, ptr %13, align 4, !tbaa !9
  %104 = icmp ult i32 %102, %103
  %105 = zext i1 %104 to i32
  store i32 %105, ptr %12, align 4, !tbaa !9
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %127

108:                                              ; preds = %68
  %109 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %109, ptr %12, align 4, !tbaa !9
  %110 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %110, ptr %13, align 4, !tbaa !9
  store i32 8, ptr %14, align 4, !tbaa !9
  %111 = load i32, ptr %14, align 4, !tbaa !9
  %112 = load i32, ptr %13, align 4, !tbaa !9
  %113 = add i32 %112, %111
  store i32 %113, ptr %13, align 4, !tbaa !9
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.w2c_hermes, ptr %114, i32 0, i32 6
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = add i64 %117, 180
  %119 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %115, i64 noundef %118, i32 noundef %119)
  %120 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %120, ptr %12, align 4, !tbaa !9
  %121 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %121, ptr %17, align 8, !tbaa !11
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.w2c_hermes, ptr %122, i32 0, i32 6
  %124 = load i32, ptr %12, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %123, i64 noundef %125, i64 noundef %126)
  br label %135

127:                                              ; preds = %68
  %128 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %128, ptr %12, align 4, !tbaa !9
  %129 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %129, ptr %17, align 8, !tbaa !11
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = load i64, ptr %17, align 8, !tbaa !11
  %133 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %130, i32 noundef %131, i64 noundef %132)
  store i32 %133, ptr %12, align 4, !tbaa !9
  %134 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %134, ptr %8, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %127, %108
  %136 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %136, ptr %12, align 4, !tbaa !9
  %137 = load i32, ptr %8, align 4, !tbaa !9
  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)
  %144 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %144, ptr %12, align 4, !tbaa !9
  %145 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %145, ptr %13, align 4, !tbaa !9
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.w2c_hermes, ptr %146, i32 0, i32 6
  %148 = load i32, ptr %13, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = add i64 %149, 4
  %151 = call i32 @i32_load(ptr noundef %147, i64 noundef %150)
  store i32 %151, ptr %13, align 4, !tbaa !9
  %152 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %152, ptr %9, align 4, !tbaa !9
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.w2c_hermes, ptr %153, i32 0, i32 6
  %155 = load i32, ptr %12, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %154, i64 noundef %156, i32 noundef %157)
  %158 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %158, ptr %12, align 4, !tbaa !9
  %159 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %159, ptr %13, align 4, !tbaa !9
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.w2c_hermes, ptr %160, i32 0, i32 6
  %162 = load i32, ptr %13, align 4, !tbaa !9
  %163 = zext i32 %162 to i64
  %164 = call i32 @i32_load(ptr noundef %161, i64 noundef %163)
  store i32 %164, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %165 = load i32, ptr %14, align 4, !tbaa !9
  %166 = load i32, ptr %13, align 4, !tbaa !9
  %167 = add i32 %166, %165
  store i32 %167, ptr %13, align 4, !tbaa !9
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.w2c_hermes, ptr %168, i32 0, i32 6
  %170 = load i32, ptr %12, align 4, !tbaa !9
  %171 = zext i32 %170 to i64
  %172 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %169, i64 noundef %171, i32 noundef %172)
  %173 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %173, ptr %12, align 4, !tbaa !9
  br label %192

174:                                              ; preds = %4
  store i32 167881, ptr %12, align 4, !tbaa !9
  store i32 83836, ptr %13, align 4, !tbaa !9
  store i32 102, ptr %14, align 4, !tbaa !9
  store i32 90523, ptr %15, align 4, !tbaa !9
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = load i32, ptr %12, align 4, !tbaa !9
  %177 = load i32, ptr %13, align 4, !tbaa !9
  %178 = load i32, ptr %14, align 4, !tbaa !9
  %179 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %175, i32 noundef %176, i32 noundef %177, i32 noundef %178, i32 noundef %179)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

180:                                              ; preds = %50
  store i32 167802, ptr %12, align 4, !tbaa !9
  store i32 80319, ptr %13, align 4, !tbaa !9
  store i32 446, ptr %14, align 4, !tbaa !9
  store i32 90523, ptr %15, align 4, !tbaa !9
  %181 = load ptr, ptr %5, align 8, !tbaa !5
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = load i32, ptr %13, align 4, !tbaa !9
  %184 = load i32, ptr %14, align 4, !tbaa !9
  %185 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %181, i32 noundef %182, i32 noundef %183, i32 noundef %184, i32 noundef %185)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

186:                                              ; preds = %67
  store i32 189131, ptr %12, align 4, !tbaa !9
  store i32 80319, ptr %13, align 4, !tbaa !9
  store i32 448, ptr %14, align 4, !tbaa !9
  store i32 90523, ptr %15, align 4, !tbaa !9
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = load i32, ptr %12, align 4, !tbaa !9
  %189 = load i32, ptr %13, align 4, !tbaa !9
  %190 = load i32, ptr %14, align 4, !tbaa !9
  %191 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %187, i32 noundef %188, i32 noundef %189, i32 noundef %190, i32 noundef %191)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

192:                                              ; preds = %135
  %193 = load i32, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 i32 %193
}

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

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3ANativeState0x3E0x3A0x3AHandle0x28hermes0x3A0x3Avm0x3A0x3AHandleRootOwner0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeState0x2A0x29(ptr noundef %0, i32 noundef returned %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = zext i32 %2 to i64
  %7 = add nuw nsw i64 %6, 4
  %8 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %7)
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %42, label %9

9:                                                ; preds = %4
  %10 = zext i32 %8 to i64
  %11 = add nuw nsw i64 %10, 12
  %12 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %11)
  %13 = add nuw nsw i64 %10, 8
  %14 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %13)
  %.not102 = icmp ult i32 %12, %14
  br i1 %.not102, label %15, label %43

15:                                               ; preds = %9
  %16 = add nuw nsw i64 %10, 4
  %17 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %16)
  %18 = zext i32 %17 to i64
  %19 = add nuw nsw i64 %18, 8
  %20 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %19)
  %.not103 = icmp eq i32 %20, 0
  br i1 %.not103, label %21, label %44

21:                                               ; preds = %15
  %22 = zext i32 %3 to i64
  %23 = or disjoint i64 %22, -281474976710656
  %24 = add nuw i32 %12, 1
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %11, i32 noundef %24)
  %25 = add nuw nsw i64 %10, 180
  %26 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %25)
  %27 = add nuw nsw i64 %10, 184
  %28 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %27)
  %29 = icmp ult i32 %26, %28
  br i1 %29, label %30, label %33

30:                                               ; preds = %21
  %31 = add i32 %26, 8
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %25, i32 noundef %31)
  %32 = zext i32 %26 to i64
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %32, i64 noundef %23)
  br label %35

33:                                               ; preds = %21
  %34 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %0, i32 noundef %8, i64 noundef %23)
  br label %35

35:                                               ; preds = %33, %30
  %.0 = phi i32 [ %26, %30 ], [ %34, %33 ]
  %36 = zext i32 %1 to i64
  %37 = add nuw nsw i64 %36, 4
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %37, i32 noundef %.0)
  %38 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %7)
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %36, i32 noundef %38)
  %39 = zext i32 %38 to i64
  %40 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %39)
  %41 = add i32 %40, 1
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %39, i32 noundef %41)
  ret i32 %1

42:                                               ; preds = %4
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 167881, i32 noundef 83836, i32 noundef 102, i32 noundef 90523) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

43:                                               ; preds = %9
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 167802, i32 noundef 80319, i32 noundef 446, i32 noundef 90523) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

44:                                               ; preds = %15
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 189131, i32 noundef 80319, i32 noundef 448, i32 noundef 90523) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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)"}


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