; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_opt_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 }
%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@w2c_hermes_t2 = 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 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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_load(ptr noundef, i64 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) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3AGCCycle0x3A0x3AGCCycle0x28hermes0x3A0x3Avm0x3A0x3AGCBase0x260x2C0x20std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x29(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 i32, align 4
  %12 = alloca i32, align 4
  %13 = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %14 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %14, ptr %9, align 4, !tbaa !9
  %15 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %15, ptr %10, align 4, !tbaa !9
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.w2c_hermes, ptr %16, i32 0, i32 6
  %18 = load i32, ptr %9, align 4, !tbaa !9
  %19 = zext i32 %18 to i64
  %20 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %17, i64 noundef %19, i32 noundef %20)
  %21 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %21, ptr %9, align 4, !tbaa !9
  %22 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %22, ptr %10, align 4, !tbaa !9
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.w2c_hermes, ptr %23, i32 0, i32 6
  %25 = load i32, ptr %10, align 4, !tbaa !9
  %26 = zext i32 %25 to i64
  %27 = add i64 %26, 8
  %28 = call i32 @i32_load(ptr noundef %24, i64 noundef %27)
  store i32 %28, ptr %10, align 4, !tbaa !9
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.w2c_hermes, ptr %29, i32 0, i32 6
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = add i64 %32, 12
  %34 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %30, i64 noundef %33, i32 noundef %34)
  %35 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %35, ptr %9, align 4, !tbaa !9
  %36 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %36, ptr %10, align 4, !tbaa !9
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.w2c_hermes, ptr %37, i32 0, i32 6
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = call i64 @i64_load(ptr noundef %38, i64 noundef %40)
  store i64 %41, ptr %13, align 8, !tbaa !11
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.w2c_hermes, ptr %42, i32 0, i32 6
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = add i64 %45, 4
  %47 = load i64, ptr %13, align 8, !tbaa !11
  call void @i64_store(ptr noundef %43, i64 noundef %46, i64 noundef %47)
  %48 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %48, ptr %9, align 4, !tbaa !9
  store i64 0, ptr %13, align 8, !tbaa !11
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.w2c_hermes, ptr %49, i32 0, i32 6
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = load i64, ptr %13, align 8, !tbaa !11
  call void @i64_store(ptr noundef %50, i64 noundef %52, i64 noundef %53)
  %54 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %54, ptr %9, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !9
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.w2c_hermes, ptr %55, i32 0, i32 6
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = add i64 %58, 8
  %60 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %56, i64 noundef %59, i32 noundef %60)
  %61 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %61, ptr %9, align 4, !tbaa !9
  %62 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %62, ptr %10, align 4, !tbaa !9
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.w2c_hermes, ptr %63, i32 0, i32 6
  %65 = load i32, ptr %10, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = call i32 @i32_load(ptr noundef %64, i64 noundef %66)
  store i32 %67, ptr %10, align 4, !tbaa !9
  %68 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %68, ptr %7, align 4, !tbaa !9
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.w2c_hermes, ptr %69, i32 0, i32 6
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = add i64 %72, 77
  %74 = call i32 @i32_load8_u(ptr noundef %70, i64 noundef %73)
  store i32 %74, ptr %10, align 4, !tbaa !9
  %75 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %75, ptr %8, align 4, !tbaa !9
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.w2c_hermes, ptr %76, i32 0, i32 6
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = add i64 %79, 16
  %81 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %77, i64 noundef %80, i32 noundef %81)
  %82 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %82, ptr %9, align 4, !tbaa !9
  %83 = load i32, ptr %9, 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 %9, align 4, !tbaa !9
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %189

89:                                               ; preds = %4
  %90 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %90, ptr %9, align 4, !tbaa !9
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.w2c_hermes, ptr %91, i32 0, i32 6
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = add i64 %94, 20
  %96 = call i32 @i32_load(ptr noundef %92, i64 noundef %95)
  store i32 %96, ptr %9, align 4, !tbaa !9
  %97 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %97, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !9
  %98 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %98, ptr %11, align 4, !tbaa !9
  store i32 4, ptr %12, align 4, !tbaa !9
  %99 = load i32, ptr %12, align 4, !tbaa !9
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = add i32 %100, %99
  store i32 %101, ptr %11, align 4, !tbaa !9
  %102 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %102, ptr %12, align 4, !tbaa !9
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.w2c_hermes, ptr %103, i32 0, i32 6
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = call i32 @i32_load(ptr noundef %104, i64 noundef %106)
  store i32 %107, ptr %12, align 4, !tbaa !9
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.w2c_hermes, ptr %108, i32 0, i32 6
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = zext i32 %110 to i64
  %112 = add i64 %111, 52
  %113 = call i32 @i32_load(ptr noundef %109, i64 noundef %112)
  store i32 %113, ptr %12, align 4, !tbaa !9
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.w2c_hermes, ptr %115, i32 0, i32 7
  %117 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %116, i32 0, i32 2
  %118 = load i32, ptr %117, align 4, !tbaa !13
  %119 = icmp ult i32 %114, %118
  br i1 %119, label %120, label %143

120:                                              ; preds = %89
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.w2c_hermes, ptr %121, i32 0, i32 7
  %123 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !18
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %124, i64 %126
  %128 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %127, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8, !tbaa !19
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %143

131:                                              ; preds = %120
  %132 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.w2c_hermes, ptr %133, i32 0, i32 7
  %135 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !18
  %137 = load i32, ptr %12, align 4, !tbaa !9
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %139, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !21
  %142 = call zeroext i1 @func_types_eq(ptr noundef %132, ptr noundef %141)
  br label %143

143:                                              ; preds = %131, %120, %89
  %144 = phi i1 [ false, %120 ], [ false, %89 ], [ %142, %131 ]
  %145 = xor i1 %144, true
  %146 = xor i1 %145, true
  %147 = zext i1 %146 to i32
  %148 = sext i32 %147 to i64
  %149 = call i64 @llvm.expect.i64(i64 %148, i64 1)
  %150 = icmp ne i64 %149, 0
  br i1 %150, label %153, label %151

151:                                              ; preds = %143
  call void @wasm_rt_trap(i32 noundef 6) #6
  unreachable

152:                                              ; No predecessors!
  br label %153

153:                                              ; preds = %152, %143
  %154 = phi i1 [ true, %143 ], [ false, %152 ]
  %155 = zext i1 %154 to i32
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.w2c_hermes, ptr %156, i32 0, i32 7
  %158 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !18
  %160 = load i32, ptr %12, align 4, !tbaa !9
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %159, i64 %161
  %163 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %162, i32 0, i32 1
  %164 = load ptr, ptr %163, align 8, !tbaa !19
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.w2c_hermes, ptr %165, i32 0, i32 7
  %167 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %166, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8, !tbaa !18
  %169 = load i32, ptr %12, align 4, !tbaa !9
  %170 = zext i32 %169 to i64
  %171 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %168, i64 %170
  %172 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %171, i32 0, i32 2
  %173 = load ptr, ptr %172, align 8, !tbaa !22
  %174 = load i32, ptr %9, align 4, !tbaa !9
  %175 = load i32, ptr %10, align 4, !tbaa !9
  %176 = load i32, ptr %11, align 4, !tbaa !9
  call void %164(ptr noundef %173, i32 noundef %174, i32 noundef %175, i32 noundef %176)
  %177 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %177, ptr %9, align 4, !tbaa !9
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.w2c_hermes, ptr %178, i32 0, i32 6
  %180 = load i32, ptr %9, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = call i32 @i32_load(ptr noundef %179, i64 noundef %181)
  store i32 %182, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.w2c_hermes, ptr %183, i32 0, i32 6
  %185 = load i32, ptr %9, align 4, !tbaa !9
  %186 = zext i32 %185 to i64
  %187 = add i64 %186, 77
  %188 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %184, i64 noundef %187, i32 noundef %188)
  br label %189

189:                                              ; preds = %153, %4
  %190 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %190, ptr %9, align 4, !tbaa !9
  %191 = load i32, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret i32 %191
}

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 = { nocallback nofree nosync nounwind willreturn memory(none) }
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}
!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_t2 = 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 void @i64_store(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i32_store8(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_load8_u(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_load(ptr noundef, i64 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: nounwind uwtable
define dso_local noundef i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3AGCCycle0x3A0x3AGCCycle0x28hermes0x3A0x3Avm0x3A0x3AGCBase0x260x2C0x20std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x29(ptr noundef %0, i32 noundef returned %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %6, i32 noundef %2)
  %7 = zext i32 %3 to i64
  %8 = add nuw nsw i64 %7, 8
  %9 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %8)
  %10 = add nuw nsw i64 %6, 12
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %10, i32 noundef %9)
  %11 = tail call i64 @i64_load(ptr noundef nonnull %5, i64 noundef %7)
  %12 = add nuw nsw i64 %6, 4
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %12, i64 noundef %11)
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %7, i64 noundef 0)
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %8, i32 noundef 0)
  %13 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %14 = zext i32 %13 to i64
  %15 = add nuw nsw i64 %14, 77
  %16 = tail call i32 @i32_load8_u(ptr noundef nonnull %5, i64 noundef %15)
  %17 = add nuw nsw i64 %6, 16
  tail call void @i32_store8(ptr noundef nonnull %5, i64 noundef %17, i32 noundef %16)
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %18, label %51

18:                                               ; preds = %4
  %19 = add nuw nsw i64 %14, 20
  %20 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %19)
  %21 = add i32 %1, 4
  %22 = zext i32 %20 to i64
  %23 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %22)
  %24 = zext i32 %23 to i64
  %25 = add nuw nsw i64 %24, 52
  %26 = tail call i32 @i32_load(ptr noundef nonnull %5, 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 = %18
  %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
  %.not73 = icmp eq ptr %36, null
  br i1 %.not73, label %.critedge, label %37, !prof !19

37:                                               ; preds = %31
  %38 = load ptr, ptr @w2c_hermes_t2, 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, %18, %37
  tail call void @wasm_rt_trap(i32 noundef 6) #3
  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 %20, i32 noundef 0, i32 noundef %21) #4
  %48 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %49 = zext i32 %48 to i64
  %50 = add nuw nsw i64 %49, 77
  tail call void @i32_store8(ptr noundef nonnull %5, i64 noundef %50, i32 noundef 1)
  br label %51

51:                                               ; preds = %41, %4
  ret i32 %1
}

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 = { 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 = { noreturn nounwind }
attributes #4 = { 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: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass