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

; 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_t0 = external constant ptr, align 8
@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: 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 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: nounwind uwtable
define dso_local void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Ffunction0x3A0x3A_0x5Ffunc0x3Cstd0x3A0x3A_0x5F20x3A0x3Afunction0x3Cbool0x200x28hermes0x3A0x3AFunction0x20const0x2A0x290x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cstd0x3A0x3A_0x5F20x3A0x3Afunction0x3Cbool0x200x28hermes0x3A0x3AFunction0x20const0x2A0x290x3E0x3E0x2C0x20bool0x200x28hermes0x3A0x3AFunction0x2A0x290x3E0x3A0x3A_0x5Fclone0x28std0x3A0x3A_0x5F20x3A0x3A_0x5Ffunction0x3A0x3A_0x5Fbase0x3Cbool0x200x28hermes0x3A0x3AFunction0x2A0x290x3E0x2A0x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2) #4 {
  %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
  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) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %11 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %11, ptr %8, align 4, !tbaa !9
  store i32 271268, ptr %9, align 4, !tbaa !9
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.w2c_hermes, ptr %12, i32 0, i32 6
  %14 = load i32, ptr %8, align 4, !tbaa !9
  %15 = zext i32 %14 to i64
  %16 = load i32, ptr %9, align 4, !tbaa !9
  call void @i32_store(ptr noundef %13, i64 noundef %15, i32 noundef %16)
  %17 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %17, ptr %8, align 4, !tbaa !9
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.w2c_hermes, ptr %18, i32 0, i32 6
  %20 = load i32, ptr %8, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = add i64 %21, 24
  %23 = call i32 @i32_load(ptr noundef %19, i64 noundef %22)
  store i32 %23, ptr %8, align 4, !tbaa !9
  %24 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %24, ptr %7, align 4, !tbaa !9
  %25 = load i32, ptr %8, align 4, !tbaa !9
  %26 = icmp ne i32 %25, 0
  %27 = xor i1 %26, true
  %28 = zext i1 %27 to i32
  store i32 %28, ptr %8, align 4, !tbaa !9
  %29 = load i32, ptr %8, align 4, !tbaa !9
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %39

31:                                               ; preds = %3
  %32 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %32, ptr %8, align 4, !tbaa !9
  store i32 0, 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 %8, align 4, !tbaa !9
  %36 = zext i32 %35 to i64
  %37 = add i64 %36, 24
  %38 = load i32, ptr %9, align 4, !tbaa !9
  call void @i32_store(ptr noundef %34, i64 noundef %37, i32 noundef %38)
  br label %230

39:                                               ; preds = %3
  %40 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %40, ptr %8, align 4, !tbaa !9
  store i32 8, ptr %9, align 4, !tbaa !9
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = add i32 %42, %41
  store i32 %43, ptr %8, align 4, !tbaa !9
  %44 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %44, ptr %9, align 4, !tbaa !9
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = icmp eq i32 %45, %46
  %48 = zext i1 %47 to i32
  store i32 %48, ptr %8, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %147

51:                                               ; preds = %39
  %52 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %52, ptr %8, align 4, !tbaa !9
  %53 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %53, ptr %9, align 4, !tbaa !9
  store i32 8, ptr %10, align 4, !tbaa !9
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = add i32 %55, %54
  store i32 %56, ptr %9, align 4, !tbaa !9
  %57 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %57, ptr %6, align 4, !tbaa !9
  %58 = load ptr, ptr %4, 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, 24
  %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 %5, align 4, !tbaa !9
  store i32 %64, ptr %8, align 4, !tbaa !9
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.w2c_hermes, ptr %65, i32 0, i32 6
  %67 = load i32, ptr %8, align 4, !tbaa !9
  %68 = zext i32 %67 to i64
  %69 = add i64 %68, 24
  %70 = call i32 @i32_load(ptr noundef %66, i64 noundef %69)
  store i32 %70, ptr %8, align 4, !tbaa !9
  %71 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %71, ptr %5, align 4, !tbaa !9
  %72 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %72, ptr %9, align 4, !tbaa !9
  %73 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %73, ptr %10, align 4, !tbaa !9
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.w2c_hermes, ptr %74, i32 0, i32 6
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = call i32 @i32_load(ptr noundef %75, i64 noundef %77)
  store i32 %78, ptr %10, align 4, !tbaa !9
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.w2c_hermes, ptr %79, i32 0, i32 6
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = add i64 %82, 12
  %84 = call i32 @i32_load(ptr noundef %80, i64 noundef %83)
  store i32 %84, ptr %10, align 4, !tbaa !9
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.w2c_hermes, ptr %86, i32 0, i32 7
  %88 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 4, !tbaa !11
  %90 = icmp ult i32 %85, %89
  br i1 %90, label %91, label %114

91:                                               ; preds = %51
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.w2c_hermes, ptr %92, i32 0, i32 7
  %94 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !17
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %95, i64 %97
  %99 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %98, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !18
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %114

102:                                              ; preds = %91
  %103 = load ptr, ptr @w2c_hermes_t0, align 8, !tbaa !5
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.w2c_hermes, ptr %104, i32 0, i32 7
  %106 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !17
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %107, i64 %109
  %111 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !20
  %113 = call zeroext i1 @func_types_eq(ptr noundef %103, ptr noundef %112)
  br label %114

114:                                              ; preds = %102, %91, %51
  %115 = phi i1 [ false, %91 ], [ false, %51 ], [ %113, %102 ]
  %116 = xor i1 %115, true
  %117 = xor i1 %116, true
  %118 = zext i1 %117 to i32
  %119 = sext i32 %118 to i64
  %120 = call i64 @llvm.expect.i64(i64 %119, i64 1)
  %121 = icmp ne i64 %120, 0
  br i1 %121, label %124, label %122

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

123:                                              ; No predecessors!
  br label %124

124:                                              ; preds = %123, %114
  %125 = phi i1 [ true, %114 ], [ false, %123 ]
  %126 = zext i1 %125 to i32
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.w2c_hermes, ptr %127, i32 0, i32 7
  %129 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !17
  %131 = load i32, ptr %10, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %130, i64 %132
  %134 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %133, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !18
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.w2c_hermes, ptr %136, i32 0, i32 7
  %138 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !17
  %140 = load i32, ptr %10, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %139, i64 %141
  %143 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %142, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = load i32, ptr %8, align 4, !tbaa !9
  %146 = load i32, ptr %9, align 4, !tbaa !9
  call void %135(ptr noundef %144, i32 noundef %145, i32 noundef %146)
  br label %230

147:                                              ; preds = %39
  %148 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %148, ptr %8, align 4, !tbaa !9
  %149 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %149, ptr %9, align 4, !tbaa !9
  %150 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %150, ptr %10, align 4, !tbaa !9
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.w2c_hermes, ptr %151, i32 0, i32 6
  %153 = load i32, ptr %10, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = call i32 @i32_load(ptr noundef %152, i64 noundef %154)
  store i32 %155, ptr %10, align 4, !tbaa !9
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.w2c_hermes, ptr %156, i32 0, i32 6
  %158 = load i32, ptr %10, align 4, !tbaa !9
  %159 = zext i32 %158 to i64
  %160 = add i64 %159, 8
  %161 = call i32 @i32_load(ptr noundef %157, i64 noundef %160)
  store i32 %161, ptr %10, align 4, !tbaa !9
  %162 = load i32, ptr %10, align 4, !tbaa !9
  %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 2
  %166 = load i32, ptr %165, align 4, !tbaa !11
  %167 = icmp ult i32 %162, %166
  br i1 %167, label %168, label %191

168:                                              ; preds = %147
  %169 = load ptr, ptr %4, 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 !17
  %173 = load i32, ptr %10, 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 !18
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %191

179:                                              ; preds = %168
  %180 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.w2c_hermes, ptr %181, i32 0, i32 7
  %183 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %182, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8, !tbaa !17
  %185 = load i32, ptr %10, align 4, !tbaa !9
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %184, i64 %186
  %188 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %187, i32 0, i32 0
  %189 = load ptr, ptr %188, align 8, !tbaa !20
  %190 = call zeroext i1 @func_types_eq(ptr noundef %180, ptr noundef %189)
  br label %191

191:                                              ; preds = %179, %168, %147
  %192 = phi i1 [ false, %168 ], [ false, %147 ], [ %190, %179 ]
  %193 = xor i1 %192, true
  %194 = xor i1 %193, true
  %195 = zext i1 %194 to i32
  %196 = sext i32 %195 to i64
  %197 = call i64 @llvm.expect.i64(i64 %196, i64 1)
  %198 = icmp ne i64 %197, 0
  br i1 %198, label %201, label %199

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

200:                                              ; No predecessors!
  br label %201

201:                                              ; preds = %200, %191
  %202 = phi i1 [ true, %191 ], [ false, %200 ]
  %203 = zext i1 %202 to i32
  %204 = load ptr, ptr %4, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.w2c_hermes, ptr %204, i32 0, i32 7
  %206 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %205, i32 0, i32 0
  %207 = load ptr, ptr %206, align 8, !tbaa !17
  %208 = load i32, ptr %10, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %207, i64 %209
  %211 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %210, i32 0, i32 1
  %212 = load ptr, ptr %211, align 8, !tbaa !18
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.w2c_hermes, ptr %213, i32 0, i32 7
  %215 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %214, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8, !tbaa !17
  %217 = load i32, ptr %10, align 4, !tbaa !9
  %218 = zext i32 %217 to i64
  %219 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %216, i64 %218
  %220 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %219, i32 0, i32 2
  %221 = load ptr, ptr %220, align 8, !tbaa !21
  %222 = load i32, ptr %9, align 4, !tbaa !9
  %223 = call i32 %212(ptr noundef %221, i32 noundef %222)
  store i32 %223, ptr %9, align 4, !tbaa !9
  %224 = load ptr, ptr %4, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.w2c_hermes, ptr %224, i32 0, i32 6
  %226 = load i32, ptr %8, align 4, !tbaa !9
  %227 = zext i32 %226 to i64
  %228 = add i64 %227, 24
  %229 = load i32, ptr %9, align 4, !tbaa !9
  call void @i32_store(ptr noundef %225, i64 noundef %228, i32 noundef %229)
  br label %230

230:                                              ; preds = %201, %124, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

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 = { 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, !10, i64 92}
!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, !6, i64 80}
!18 = !{!19, !6, i64 8}
!19 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!19, !6, i64 0}
!21 = !{!19, !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_t0 = external local_unnamed_addr constant ptr, align 8
@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 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: nounwind uwtable
define dso_local void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Ffunction0x3A0x3A_0x5Ffunc0x3Cstd0x3A0x3A_0x5F20x3A0x3Afunction0x3Cbool0x200x28hermes0x3A0x3AFunction0x20const0x2A0x290x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cstd0x3A0x3A_0x5F20x3A0x3Afunction0x3Cbool0x200x28hermes0x3A0x3AFunction0x20const0x2A0x290x3E0x3E0x2C0x20bool0x200x28hermes0x3A0x3AFunction0x2A0x290x3E0x3A0x3A_0x5Fclone0x28std0x3A0x3A_0x5F20x3A0x3A_0x5Ffunction0x3A0x3A_0x5Fbase0x3Cbool0x200x28hermes0x3A0x3AFunction0x2A0x290x3E0x2A0x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %2 to i64
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %5, i32 noundef 271268)
  %6 = zext i32 %1 to i64
  %7 = add nuw nsw i64 %6, 24
  %8 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %7)
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %11

9:                                                ; preds = %3
  %10 = add nuw nsw i64 %5, 24
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %10, i32 noundef 0)
  br label %73

11:                                               ; preds = %3
  %12 = add i32 %1, 8
  %13 = icmp eq i32 %12, %8
  br i1 %13, label %14, label %44

14:                                               ; preds = %11
  %15 = add i32 %2, 8
  %16 = add nuw nsw i64 %5, 24
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %16, i32 noundef %15)
  %17 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %7)
  %18 = zext i32 %17 to i64
  %19 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %18)
  %20 = zext i32 %19 to i64
  %21 = add nuw nsw i64 %20, 12
  %22 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %21)
  %23 = getelementptr inbounds i8, ptr %0, i64 80
  %24 = getelementptr inbounds i8, ptr %0, i64 92
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = icmp ult i32 %22, %25
  br i1 %26, label %27, label %.critedge, !prof !15

27:                                               ; preds = %14
  %28 = load ptr, ptr %23, align 8, !tbaa !16
  %29 = zext i32 %22 to i64
  %30 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %28, i64 %29
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  %.not74 = icmp eq ptr %32, null
  br i1 %.not74, label %.critedge, label %33, !prof !19

33:                                               ; preds = %27
  %34 = load ptr, ptr @w2c_hermes_t0, align 8, !tbaa !20
  %35 = load ptr, ptr %30, align 8, !tbaa !21
  %36 = tail call zeroext i1 @func_types_eq(ptr noundef %34, ptr noundef %35)
  br i1 %36, label %37, label %.critedge, !prof !15

.critedge:                                        ; preds = %27, %14, %33
  tail call void @wasm_rt_trap(i32 noundef 6) #3
  unreachable

37:                                               ; preds = %33
  %38 = load ptr, ptr %23, align 8, !tbaa !16
  %39 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %38, i64 %29
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  %42 = getelementptr inbounds i8, ptr %39, i64 16
  %43 = load ptr, ptr %42, align 8, !tbaa !22
  tail call void %41(ptr noundef %43, i32 noundef %17, i32 noundef %15) #4
  br label %73

44:                                               ; preds = %11
  %45 = zext i32 %8 to i64
  %46 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %45)
  %47 = zext i32 %46 to i64
  %48 = add nuw nsw i64 %47, 8
  %49 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %48)
  %50 = getelementptr inbounds i8, ptr %0, i64 80
  %51 = getelementptr inbounds i8, ptr %0, i64 92
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = icmp ult i32 %49, %52
  br i1 %53, label %54, label %.critedge76, !prof !15

54:                                               ; preds = %44
  %55 = load ptr, ptr %50, align 8, !tbaa !16
  %56 = zext i32 %49 to i64
  %57 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %55, i64 %56
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  %.not73 = icmp eq ptr %59, null
  br i1 %.not73, label %.critedge76, label %60, !prof !19

60:                                               ; preds = %54
  %61 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !20
  %62 = load ptr, ptr %57, align 8, !tbaa !21
  %63 = tail call zeroext i1 @func_types_eq(ptr noundef %61, ptr noundef %62)
  br i1 %63, label %64, label %.critedge76, !prof !15

.critedge76:                                      ; preds = %54, %44, %60
  tail call void @wasm_rt_trap(i32 noundef 6) #3
  unreachable

64:                                               ; preds = %60
  %65 = load ptr, ptr %50, align 8, !tbaa !16
  %66 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %65, i64 %56
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  %68 = load ptr, ptr %67, align 8, !tbaa !17
  %69 = getelementptr inbounds i8, ptr %66, i64 16
  %70 = load ptr, ptr %69, align 8, !tbaa !22
  %71 = tail call i32 %68(ptr noundef %70, i32 noundef %8) #4
  %72 = add nuw nsw i64 %5, 24
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %72, i32 noundef %71)
  br label %73

73:                                               ; preds = %64, %37, %9
  ret void
}

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,SROAPass,SimplifyCFGPass,TailCallElimPass