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

@w2c_hermes_t1 = 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: 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) #1

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

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

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

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

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

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

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

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

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

91:                                               ; preds = %4
  %92 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %92, ptr %9, align 4, !tbaa !9
  %93 = load ptr, ptr %5, 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, 56
  %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 %8, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !9
  %100 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %100, ptr %11, align 4, !tbaa !9
  store i32 4, ptr %12, align 4, !tbaa !9
  %101 = load i32, ptr %12, align 4, !tbaa !9
  %102 = load i32, ptr %11, align 4, !tbaa !9
  %103 = add i32 %102, %101
  store i32 %103, ptr %11, align 4, !tbaa !9
  %104 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %104, ptr %12, align 4, !tbaa !9
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.w2c_hermes, ptr %105, i32 0, i32 6
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = call i32 @i32_load(ptr noundef %106, i64 noundef %108)
  store i32 %109, ptr %12, align 4, !tbaa !9
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.w2c_hermes, ptr %110, i32 0, i32 6
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = add i64 %113, 52
  %115 = call i32 @i32_load(ptr noundef %111, i64 noundef %114)
  store i32 %115, ptr %12, align 4, !tbaa !9
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.w2c_hermes, ptr %117, i32 0, i32 7
  %119 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %118, i32 0, i32 2
  %120 = load i32, ptr %119, align 4, !tbaa !13
  %121 = icmp ult i32 %116, %120
  br i1 %121, label %122, label %145

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

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

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

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

154:                                              ; No predecessors!
  br label %155

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

191:                                              ; preds = %155, %4
  %192 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %192, ptr %9, align 4, !tbaa !9
  %193 = 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 %193
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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_t1 = external local_unnamed_addr constant ptr, align 8

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

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

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

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

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

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

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

; 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 = add i32 %3, 8
  %8 = zext i32 %7 to i64
  %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 = zext i32 %3 to i64
  %12 = tail call i64 @i64_load(ptr noundef nonnull %5, i64 noundef %11)
  %13 = add nuw nsw i64 %6, 4
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %13, i64 noundef %12)
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %11, i64 noundef 0)
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %8, i32 noundef 0)
  %14 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %15 = zext i32 %14 to i64
  %16 = add nuw nsw i64 %15, 117
  %17 = tail call i32 @i32_load8_u(ptr noundef nonnull %5, i64 noundef %16)
  %18 = add nuw nsw i64 %6, 16
  tail call void @i32_store8(ptr noundef nonnull %5, i64 noundef %18, i32 noundef %17)
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %19, label %52

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

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

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

.critedge:                                        ; preds = %32, %19, %38
  tail call void @wasm_rt_trap(i32 noundef 6) #3
  unreachable

42:                                               ; preds = %38
  %43 = load ptr, ptr %28, align 8, !tbaa !16
  %44 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %43, i64 %34
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  %47 = getelementptr inbounds i8, ptr %44, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !22
  tail call void %46(ptr noundef %48, i32 noundef %21, i32 noundef 0, i32 noundef %22) #4
  %49 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %50 = zext i32 %49 to i64
  %51 = add nuw nsw i64 %50, 117
  tail call void @i32_store8(ptr noundef nonnull %5, i64 noundef %51, i32 noundef 1)
  br label %52

52:                                               ; preds = %42, %4
  ret i32 %1
}

attributes #0 = { 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 #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 = { 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