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

; 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 void @i32_store(ptr noundef, i64 noundef, i32 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

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

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

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

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

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

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

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

42:                                               ; preds = %3
  store i32 8, ptr %9, align 4, !tbaa !9
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %43, i32 noundef %44)
  store i32 %45, ptr %9, align 4, !tbaa !9
  %46 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %46, ptr %6, align 4, !tbaa !9
  %47 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %47, ptr %10, align 4, !tbaa !9
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.w2c_hermes, ptr %48, i32 0, i32 6
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = zext i32 %50 to i64
  %52 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %49, i64 noundef %51, i32 noundef %52)
  %53 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %53, ptr %9, align 4, !tbaa !9
  %54 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %54, ptr %10, align 4, !tbaa !9
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.w2c_hermes, ptr %55, i32 0, i32 6
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = add i64 %58, 12
  %60 = call i32 @i32_load(ptr noundef %56, i64 noundef %59)
  store i32 %60, ptr %10, align 4, !tbaa !9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.w2c_hermes, ptr %61, i32 0, i32 6
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = add i64 %64, 4
  %66 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %62, i64 noundef %65, i32 noundef %66)
  br label %185

67:                                               ; preds = %3
  store i32 0, ptr %9, align 4, !tbaa !9
  %68 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %68, ptr %6, align 4, !tbaa !9
  %69 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %69, ptr %9, align 4, !tbaa !9
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.w2c_hermes, ptr %70, i32 0, i32 6
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = add i64 %73, 12
  %75 = call i32 @i32_load(ptr noundef %71, i64 noundef %74)
  store i32 %75, ptr %9, align 4, !tbaa !9
  %76 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %76, ptr %5, align 4, !tbaa !9
  %77 = load i32, ptr %9, align 4, !tbaa !9
  %78 = icmp ne i32 %77, 0
  %79 = xor i1 %78, true
  %80 = zext i1 %79 to i32
  store i32 %80, ptr %9, align 4, !tbaa !9
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %67
  br label %185

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

106:                                              ; preds = %84
  br label %185

107:                                              ; preds = %84
  %108 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %108, ptr %9, align 4, !tbaa !9
  %109 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %109, ptr %10, align 4, !tbaa !9
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.w2c_hermes, ptr %110, i32 0, i32 6
  %112 = load i32, ptr %10, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = call i32 @i32_load(ptr noundef %111, i64 noundef %113)
  store i32 %114, ptr %10, align 4, !tbaa !9
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.w2c_hermes, ptr %115, i32 0, i32 6
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = add i64 %118, 8
  %120 = call i32 @i32_load(ptr noundef %116, i64 noundef %119)
  store i32 %120, ptr %10, align 4, !tbaa !9
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.w2c_hermes, ptr %122, i32 0, i32 7
  %124 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %123, i32 0, i32 2
  %125 = load i32, ptr %124, align 4, !tbaa !17
  %126 = icmp ult i32 %121, %125
  br i1 %126, label %127, label %150

127:                                              ; preds = %107
  %128 = load ptr, ptr %4, 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 0
  %131 = load ptr, ptr %130, align 8, !tbaa !18
  %132 = load i32, ptr %10, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %131, i64 %133
  %135 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %134, i32 0, i32 1
  %136 = load ptr, ptr %135, align 8, !tbaa !19
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %150

138:                                              ; preds = %127
  %139 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !5
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.w2c_hermes, ptr %140, i32 0, i32 7
  %142 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !18
  %144 = load i32, ptr %10, align 4, !tbaa !9
  %145 = zext i32 %144 to i64
  %146 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %143, i64 %145
  %147 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !21
  %149 = call zeroext i1 @func_types_eq(ptr noundef %139, ptr noundef %148)
  br label %150

150:                                              ; preds = %138, %127, %107
  %151 = phi i1 [ false, %127 ], [ false, %107 ], [ %149, %138 ]
  %152 = xor i1 %151, true
  %153 = xor i1 %152, true
  %154 = zext i1 %153 to i32
  %155 = sext i32 %154 to i64
  %156 = call i64 @llvm.expect.i64(i64 %155, i64 1)
  %157 = icmp ne i64 %156, 0
  br i1 %157, label %160, label %158

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

159:                                              ; No predecessors!
  br label %160

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

185:                                              ; preds = %160, %106, %83, %42
  %186 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %186, ptr %9, align 4, !tbaa !9
  store i32 16, ptr %10, align 4, !tbaa !9
  %187 = load i32, ptr %10, align 4, !tbaa !9
  %188 = load i32, ptr %9, align 4, !tbaa !9
  %189 = add i32 %188, %187
  store i32 %189, ptr %9, align 4, !tbaa !9
  %190 = load i32, ptr %9, align 4, !tbaa !9
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.w2c_hermes, ptr %191, i32 0, i32 3
  store i32 %190, ptr %192, align 8, !tbaa !11
  %193 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %193, ptr %9, align 4, !tbaa !9
  %194 = load i32, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret i32 %194
}

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 = { nocallback nofree nosync nounwind willreturn memory(none) }
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, !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 = !{!12, !10, i64 92}
!18 = !{!12, !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 void @i32_store(ptr noundef, i64 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 i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

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

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

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

12:                                               ; preds = %3
  %13 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef 8) #4
  %14 = zext i32 %13 to i64
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %14, i32 noundef %11)
  %15 = add nuw nsw i64 %9, 12
  %16 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %15)
  %17 = add nuw nsw i64 %14, 4
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %17, i32 noundef %16)
  br label %52

18:                                               ; preds = %3
  %19 = add nuw nsw i64 %9, 12
  %20 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %19)
  %.not81 = icmp eq i32 %20, 0
  br i1 %.not81, label %52, label %21

21:                                               ; preds = %18
  %22 = zext i32 %20 to i64
  %23 = add nuw nsw i64 %22, 4
  %24 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %23)
  %25 = add i32 %24, -1
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %23, i32 noundef %25)
  %.not82 = icmp eq i32 %24, 0
  br i1 %.not82, label %26, label %52

26:                                               ; preds = %21
  %27 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %22)
  %28 = zext i32 %27 to i64
  %29 = add nuw nsw i64 %28, 8
  %30 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %29)
  %31 = getelementptr inbounds i8, ptr %0, i64 80
  %32 = getelementptr inbounds i8, ptr %0, i64 92
  %33 = load i32, ptr %32, align 4, !tbaa !15
  %34 = icmp ult i32 %30, %33
  br i1 %34, label %35, label %.critedge, !prof !16

35:                                               ; preds = %26
  %36 = load ptr, ptr %31, align 8, !tbaa !17
  %37 = zext i32 %30 to i64
  %38 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %36, i64 %37
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  %.not83 = icmp eq ptr %40, null
  br i1 %.not83, label %.critedge, label %41, !prof !20

41:                                               ; preds = %35
  %42 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !21
  %43 = load ptr, ptr %38, align 8, !tbaa !22
  %44 = tail call zeroext i1 @func_types_eq(ptr noundef %42, ptr noundef %43)
  br i1 %44, label %45, label %.critedge, !prof !16

.critedge:                                        ; preds = %35, %26, %41
  tail call void @wasm_rt_trap(i32 noundef 6) #5
  unreachable

45:                                               ; preds = %41
  %46 = load ptr, ptr %31, align 8, !tbaa !17
  %47 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %46, i64 %37
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  %50 = getelementptr inbounds i8, ptr %47, i64 16
  %51 = load ptr, ptr %50, align 8, !tbaa !23
  tail call void %49(ptr noundef %51, i32 noundef %20) #4
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fshared_weak_count0x3A0x3A_0x5Frelease_weak0x280x29(ptr noundef nonnull %0, i32 noundef %20) #4
  br label %52

52:                                               ; preds = %21, %18, %45, %12
  %.0 = phi i32 [ %13, %12 ], [ 0, %18 ], [ 0, %21 ], [ 0, %45 ]
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret i32 %.0
}

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


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