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

; 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 }
%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@w2c_hermes_t3 = external constant ptr, align 8

; 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 i32 @i32_load(ptr noundef, i64 noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @func_types_eq(ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i64_store(ptr noundef, i64 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

declare i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef, i32 noundef) #4

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

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

21:                                               ; preds = %2
  br label %191

22:                                               ; preds = %2
  store i32 8, ptr %8, align 4, !tbaa !9
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %23, i32 noundef %24)
  store i32 %25, ptr %8, align 4, !tbaa !9
  %26 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %26, ptr %5, align 4, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !11
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.w2c_hermes, ptr %27, i32 0, i32 6
  %29 = load i32, ptr %8, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = load i64, ptr %11, align 8, !tbaa !11
  call void @i64_store(ptr noundef %28, i64 noundef %30, i64 noundef %31)
  store i32 16, ptr %8, align 4, !tbaa !9
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %32, i32 noundef %33)
  store i32 %34, ptr %8, align 4, !tbaa !9
  %35 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %35, ptr %6, align 4, !tbaa !9
  %36 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %36, ptr %9, align 4, !tbaa !9
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.w2c_hermes, ptr %37, i32 0, i32 6
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = add i64 %40, 12
  %42 = load i32, ptr %9, align 4, !tbaa !9
  call void @i32_store(ptr noundef %38, i64 noundef %41, i32 noundef %42)
  %43 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %43, ptr %8, align 4, !tbaa !9
  store i32 270684, ptr %9, align 4, !tbaa !9
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.w2c_hermes, ptr %44, i32 0, i32 6
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = zext i32 %46 to i64
  %48 = load i32, ptr %9, align 4, !tbaa !9
  call void @i32_store(ptr noundef %45, i64 noundef %47, i32 noundef %48)
  %49 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %49, ptr %8, align 4, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !11
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.w2c_hermes, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = add i64 %53, 4
  %55 = load i64, ptr %11, align 8, !tbaa !11
  call void @i64_store(ptr noundef %51, i64 noundef %54, i64 noundef %55)
  %56 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %56, ptr %8, align 4, !tbaa !9
  %57 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %57, ptr %9, align 4, !tbaa !9
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.w2c_hermes, ptr %58, i32 0, i32 6
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = add i64 %61, 356
  %63 = load i32, ptr %9, align 4, !tbaa !9
  call void @i32_store(ptr noundef %59, i64 noundef %62, i32 noundef %63)
  %64 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %64, ptr %8, align 4, !tbaa !9
  store i32 360, ptr %9, align 4, !tbaa !9
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = add i32 %66, %65
  store i32 %67, ptr %8, align 4, !tbaa !9
  %68 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %68, ptr %7, align 4, !tbaa !9
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.w2c_hermes, ptr %69, i32 0, i32 6
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = call i32 @i32_load(ptr noundef %70, i64 noundef %72)
  store i32 %73, ptr %8, align 4, !tbaa !9
  %74 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %74, ptr %5, align 4, !tbaa !9
  %75 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %75, ptr %8, align 4, !tbaa !9
  %76 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %76, ptr %9, align 4, !tbaa !9
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.w2c_hermes, ptr %77, i32 0, i32 6
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = load i32, ptr %9, align 4, !tbaa !9
  call void @i32_store(ptr noundef %78, i64 noundef %80, i32 noundef %81)
  %82 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %82, ptr %8, align 4, !tbaa !9
  %83 = load i32, ptr %8, align 4, !tbaa !9
  %84 = icmp ne i32 %83, 0
  %85 = xor i1 %84, true
  %86 = zext i1 %85 to i32
  store i32 %86, ptr %8, align 4, !tbaa !9
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %22
  br label %191

90:                                               ; preds = %22
  %91 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %91, ptr %8, align 4, !tbaa !9
  %92 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %92, ptr %9, align 4, !tbaa !9
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.w2c_hermes, ptr %93, i32 0, i32 6
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = add i64 %96, 4
  %98 = call i32 @i32_load(ptr noundef %94, i64 noundef %97)
  store i32 %98, ptr %9, align 4, !tbaa !9
  %99 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %99, ptr %6, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = load i32, ptr %9, align 4, !tbaa !9
  %102 = sub i32 %101, %100
  store i32 %102, ptr %9, align 4, !tbaa !9
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.w2c_hermes, ptr %103, i32 0, i32 6
  %105 = load i32, ptr %8, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = add i64 %106, 4
  %108 = load i32, ptr %9, align 4, !tbaa !9
  call void @i32_store(ptr noundef %104, i64 noundef %107, i32 noundef %108)
  %109 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %109, ptr %8, align 4, !tbaa !9
  %110 = load i32, ptr %8, align 4, !tbaa !9
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %113

112:                                              ; preds = %90
  br label %191

113:                                              ; preds = %90
  %114 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %114, ptr %8, align 4, !tbaa !9
  %115 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %115, ptr %9, align 4, !tbaa !9
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.w2c_hermes, ptr %116, i32 0, i32 6
  %118 = load i32, ptr %9, align 4, !tbaa !9
  %119 = zext i32 %118 to i64
  %120 = call i32 @i32_load(ptr noundef %117, i64 noundef %119)
  store i32 %120, ptr %9, align 4, !tbaa !9
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.w2c_hermes, ptr %121, i32 0, i32 6
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = zext i32 %123 to i64
  %125 = add i64 %124, 8
  %126 = call i32 @i32_load(ptr noundef %122, i64 noundef %125)
  store i32 %126, ptr %9, align 4, !tbaa !9
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.w2c_hermes, ptr %128, i32 0, i32 7
  %130 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %129, i32 0, i32 2
  %131 = load i32, ptr %130, align 4, !tbaa !13
  %132 = icmp ult i32 %127, %131
  br i1 %132, label %133, label %156

133:                                              ; preds = %113
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.w2c_hermes, ptr %134, i32 0, i32 7
  %136 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !18
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %137, i64 %139
  %141 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %140, i32 0, i32 1
  %142 = load ptr, ptr %141, align 8, !tbaa !19
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %156

144:                                              ; preds = %133
  %145 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !5
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.w2c_hermes, ptr %146, i32 0, i32 7
  %148 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %147, i32 0, i32 0
  %149 = load ptr, ptr %148, align 8, !tbaa !18
  %150 = load i32, ptr %9, align 4, !tbaa !9
  %151 = zext i32 %150 to i64
  %152 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %149, i64 %151
  %153 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %152, i32 0, i32 0
  %154 = load ptr, ptr %153, align 8, !tbaa !21
  %155 = call zeroext i1 @func_types_eq(ptr noundef %145, ptr noundef %154)
  br label %156

156:                                              ; preds = %144, %133, %113
  %157 = phi i1 [ false, %133 ], [ false, %113 ], [ %155, %144 ]
  %158 = xor i1 %157, true
  %159 = xor i1 %158, true
  %160 = zext i1 %159 to i32
  %161 = sext i32 %160 to i64
  %162 = call i64 @llvm.expect.i64(i64 %161, i64 1)
  %163 = icmp ne i64 %162, 0
  br i1 %163, label %166, label %164

164:                                              ; preds = %156
  call void @wasm_rt_trap(i32 noundef 6) #7
  unreachable

165:                                              ; No predecessors!
  br label %166

166:                                              ; preds = %165, %156
  %167 = phi i1 [ true, %156 ], [ false, %165 ]
  %168 = zext i1 %167 to i32
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.w2c_hermes, ptr %169, i32 0, i32 7
  %171 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !18
  %173 = load i32, ptr %9, align 4, !tbaa !9
  %174 = zext i32 %173 to i64
  %175 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %172, i64 %174
  %176 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %175, i32 0, i32 1
  %177 = load ptr, ptr %176, align 8, !tbaa !19
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.w2c_hermes, ptr %178, i32 0, i32 7
  %180 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %179, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !18
  %182 = load i32, ptr %9, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %181, i64 %183
  %185 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %184, i32 0, i32 2
  %186 = load ptr, ptr %185, align 8, !tbaa !22
  %187 = load i32, ptr %8, align 4, !tbaa !9
  call void %177(ptr noundef %186, i32 noundef %187)
  %188 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %188, ptr %8, align 4, !tbaa !9
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = load i32, ptr %8, align 4, !tbaa !9
  call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fshared_weak_count0x3A0x3A_0x5Frelease_weak0x280x29(ptr noundef %189, i32 noundef %190)
  br label %191

191:                                              ; preds = %166, %112, %89, %21
  %192 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %192, ptr %8, align 4, !tbaa !9
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.w2c_hermes, ptr %193, i32 0, i32 6
  %195 = load i32, ptr %8, align 4, !tbaa !9
  %196 = zext i32 %195 to i64
  %197 = add i64 %196, 356
  %198 = call i32 @i32_load(ptr noundef %194, i64 noundef %197)
  store i32 %198, ptr %8, align 4, !tbaa !9
  %199 = load i32, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret i32 %199
}

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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #3 = { 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 #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 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 }
attributes #7 = { 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}
!13 = !{!14, !10, i64 92}
!14 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 40, !17, i64 80}
!15 = !{!"", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !16, i64 32}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!18 = !{!14, !6, i64 80}
!19 = !{!20, !6, i64 8}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!20, !6, i64 0}
!22 = !{!20, !6, i64 16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@w2c_hermes_t3 = external local_unnamed_addr constant ptr, align 8

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

; 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 zeroext i1 @func_types_eq(ptr noundef, ptr 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 @i64_store(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

declare void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fshared_weak_count0x3A0x3A_0x5Frelease_weak0x280x29(ptr noundef, i32 noundef) local_unnamed_addr #2

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

7:                                                ; preds = %2
  %8 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef 8) #4
  %9 = zext i32 %8 to i64
  tail call void @i64_store(ptr noundef nonnull %3, i64 noundef %9, i64 noundef 0)
  %10 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef 16) #4
  %11 = zext i32 %10 to i64
  %12 = add nuw nsw i64 %11, 12
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %12, i32 noundef %8)
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %11, i32 noundef 270684)
  %13 = add nuw nsw i64 %11, 4
  tail call void @i64_store(ptr noundef nonnull %3, i64 noundef %13, i64 noundef 0)
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %5, i32 noundef %8)
  %14 = add i32 %1, 360
  %15 = zext i32 %14 to i64
  %16 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %15)
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %15, i32 noundef %10)
  %.not80 = icmp eq i32 %16, 0
  br i1 %.not80, label %48, label %17

17:                                               ; preds = %7
  %18 = zext i32 %16 to i64
  %19 = add nuw nsw i64 %18, 4
  %20 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %19)
  %21 = add i32 %20, -1
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %19, i32 noundef %21)
  %.not81 = icmp eq i32 %20, 0
  br i1 %.not81, label %22, label %48

22:                                               ; preds = %17
  %23 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %18)
  %24 = zext i32 %23 to i64
  %25 = add nuw nsw i64 %24, 8
  %26 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %25)
  %27 = getelementptr inbounds i8, ptr %0, i64 80
  %28 = getelementptr inbounds i8, ptr %0, i64 92
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = icmp ult i32 %26, %29
  br i1 %30, label %31, label %.critedge, !prof !15

31:                                               ; preds = %22
  %32 = load ptr, ptr %27, align 8, !tbaa !16
  %33 = zext i32 %26 to i64
  %34 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %32, i64 %33
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !17
  %.not82 = icmp eq ptr %36, null
  br i1 %.not82, label %.critedge, label %37, !prof !19

37:                                               ; preds = %31
  %38 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !20
  %39 = load ptr, ptr %34, align 8, !tbaa !21
  %40 = tail call zeroext i1 @func_types_eq(ptr noundef %38, ptr noundef %39)
  br i1 %40, label %41, label %.critedge, !prof !15

.critedge:                                        ; preds = %31, %22, %37
  tail call void @wasm_rt_trap(i32 noundef 6) #5
  unreachable

41:                                               ; preds = %37
  %42 = load ptr, ptr %27, align 8, !tbaa !16
  %43 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %42, i64 %33
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !17
  %46 = getelementptr inbounds i8, ptr %43, i64 16
  %47 = load ptr, ptr %46, align 8, !tbaa !22
  tail call void %45(ptr noundef %47, i32 noundef %16) #4
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fshared_weak_count0x3A0x3A_0x5Frelease_weak0x280x29(ptr noundef nonnull %0, i32 noundef %16) #4
  br label %48

48:                                               ; preds = %17, %7, %2, %41
  %49 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %5)
  ret i32 %49
}

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 92}
!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}
!15 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!16 = !{!6, !7, i64 80}
!17 = !{!18, !7, i64 8}
!18 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!20 = !{!7, !7, i64 0}
!21 = !{!18, !7, i64 0}
!22 = !{!18, !7, i64 16}


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