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

; 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 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_void0x2A0x20std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_proxy0x5Babi0x3Av150070x5D0x3Cstd0x3A0x3A_0x5F20x3A0x3Atuple0x3Cstd0x3A0x3A_0x5F20x3A0x3Aunique_ptr0x3Cstd0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x2C0x20std0x3A0x3A_0x5F20x3A0x3Adefault_delete0x3Cstd0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x3E0x3E0x2C0x20void0x200x280x2A0x290x28unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aatomic0x3Cbool0x3E0x2A0x290x2C0x20unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aatomic0x3Cbool0x3E0x2A0x3E0x3E0x28void0x2A0x29(ptr noundef %0, i32 noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 121624, ptr %7, align 4, !tbaa !9
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.w2c_hermes, ptr %11, i32 0, i32 6
  %13 = load i32, ptr %7, align 4, !tbaa !9
  %14 = zext i32 %13 to i64
  %15 = call i32 @i32_load8_u(ptr noundef %12, i64 noundef %14)
  store i32 %15, ptr %7, align 4, !tbaa !9
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %24

18:                                               ; preds = %2
  store i32 121620, ptr %7, align 4, !tbaa !9
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.w2c_hermes, ptr %19, i32 0, i32 6
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = call i32 @i32_load(ptr noundef %20, i64 noundef %22)
  store i32 %23, ptr %7, align 4, !tbaa !9
  br label %104

24:                                               ; preds = %2
  br label %25

25:                                               ; preds = %82, %24
  %26 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %26, ptr %7, align 4, !tbaa !9
  store i32 120752, ptr %8, align 4, !tbaa !9
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = add i32 %28, %27
  store i32 %29, ptr %7, align 4, !tbaa !9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.w2c_hermes, ptr %30, i32 0, i32 6
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = call i32 @i32_load8_u(ptr noundef %31, i64 noundef %33)
  store i32 %34, ptr %7, align 4, !tbaa !9
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = icmp ne i32 %35, 0
  %37 = xor i1 %36, true
  %38 = zext i1 %37 to i32
  store i32 %38, ptr %7, align 4, !tbaa !9
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %70

41:                                               ; preds = %25
  %42 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %42, ptr %7, align 4, !tbaa !9
  store i32 120752, ptr %8, align 4, !tbaa !9
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = add i32 %44, %43
  store i32 %45, ptr %7, align 4, !tbaa !9
  store i32 1, ptr %8, align 4, !tbaa !9
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.w2c_hermes, ptr %46, i32 0, i32 6
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %47, i64 noundef %49, i32 noundef %50)
  %51 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %51, ptr %7, align 4, !tbaa !9
  store i32 2, ptr %8, align 4, !tbaa !9
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = and i32 %52, 31
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = shl i32 %54, %53
  store i32 %55, ptr %7, align 4, !tbaa !9
  store i32 120880, ptr %8, align 4, !tbaa !9
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = add i32 %57, %56
  store i32 %58, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.w2c_hermes, ptr %59, i32 0, i32 6
  %61 = load i32, ptr %7, align 4, !tbaa !9
  %62 = zext i32 %61 to i64
  %63 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %60, i64 noundef %62, i32 noundef %63)
  store i32 121616, ptr %7, align 4, !tbaa !9
  %64 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %64, ptr %8, align 4, !tbaa !9
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.w2c_hermes, ptr %65, i32 0, i32 6
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = zext i32 %67 to i64
  %69 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %66, i64 noundef %68, i32 noundef %69)
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %84

70:                                               ; preds = %25
  %71 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %71, ptr %7, align 4, !tbaa !9
  store i32 1, ptr %8, align 4, !tbaa !9
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = add i32 %73, %72
  store i32 %74, ptr %7, align 4, !tbaa !9
  %75 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %75, ptr %5, align 4, !tbaa !9
  store i32 128, ptr %8, align 4, !tbaa !9
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = icmp ne i32 %76, %77
  %79 = zext i1 %78 to i32
  store i32 %79, ptr %7, align 4, !tbaa !9
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %83

82:                                               ; preds = %70
  br label %25

83:                                               ; preds = %70
  store i32 6, ptr %7, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %83, %41
  %85 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %85, ptr %5, align 4, !tbaa !9
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %93

88:                                               ; preds = %84
  %89 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %89, ptr %7, align 4, !tbaa !9
  store i32 54596, ptr %8, align 4, !tbaa !9
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = load i32, ptr %7, align 4, !tbaa !9
  %92 = load i32, ptr %8, align 4, !tbaa !9
  call void @w2c_hermes_abort_message(ptr noundef %90, i32 noundef %91, i32 noundef %92)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

93:                                               ; preds = %84
  store i32 121624, ptr %7, align 4, !tbaa !9
  store i32 1, ptr %8, align 4, !tbaa !9
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.w2c_hermes, ptr %94, i32 0, i32 6
  %96 = load i32, ptr %7, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %95, i64 noundef %97, i32 noundef %98)
  store i32 121620, ptr %7, align 4, !tbaa !9
  store i32 121616, ptr %8, align 4, !tbaa !9
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.w2c_hermes, ptr %99, i32 0, i32 6
  %101 = load i32, ptr %7, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %100, i64 noundef %102, i32 noundef %103)
  store i32 121616, ptr %7, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %93, %18
  %105 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %105, ptr %5, align 4, !tbaa !9
  %106 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %106, ptr %7, align 4, !tbaa !9
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.w2c_hermes, ptr %107, i32 0, i32 6
  %109 = load i32, ptr %7, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = call i32 @i32_load(ptr noundef %108, i64 noundef %110)
  store i32 %111, ptr %7, align 4, !tbaa !9
  %112 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %112, ptr %6, align 4, !tbaa !9
  %113 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %113, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.w2c_hermes, ptr %114, i32 0, i32 6
  %116 = load i32, ptr %7, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %115, i64 noundef %117, i32 noundef %118)
  %119 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %119, ptr %7, align 4, !tbaa !9
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.w2c_hermes, ptr %120, i32 0, i32 6
  %122 = load i32, ptr %7, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = call i32 @i32_load(ptr noundef %121, i64 noundef %123)
  store i32 %124, ptr %7, align 4, !tbaa !9
  %125 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %125, ptr %5, align 4, !tbaa !9
  store i32 127, ptr %8, align 4, !tbaa !9
  %126 = load i32, ptr %7, align 4, !tbaa !9
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = icmp ugt i32 %126, %127
  %129 = zext i1 %128 to i32
  store i32 %129, ptr %7, align 4, !tbaa !9
  %130 = load i32, ptr %7, align 4, !tbaa !9
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %104
  br label %165

133:                                              ; preds = %104
  %134 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %134, ptr %7, align 4, !tbaa !9
  store i32 120752, ptr %8, align 4, !tbaa !9
  %135 = load i32, ptr %8, align 4, !tbaa !9
  %136 = load i32, ptr %7, align 4, !tbaa !9
  %137 = add i32 %136, %135
  store i32 %137, ptr %7, align 4, !tbaa !9
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.w2c_hermes, ptr %138, i32 0, i32 6
  %140 = load i32, ptr %7, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = call i32 @i32_load8_u(ptr noundef %139, i64 noundef %141)
  store i32 %142, ptr %7, align 4, !tbaa !9
  %143 = load i32, ptr %7, align 4, !tbaa !9
  %144 = icmp ne i32 %143, 0
  %145 = xor i1 %144, true
  %146 = zext i1 %145 to i32
  store i32 %146, ptr %7, align 4, !tbaa !9
  %147 = load i32, ptr %7, align 4, !tbaa !9
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %149, label %150

149:                                              ; preds = %133
  br label %165

150:                                              ; preds = %133
  %151 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %151, ptr %7, align 4, !tbaa !9
  store i32 2, ptr %8, align 4, !tbaa !9
  %152 = load i32, ptr %8, align 4, !tbaa !9
  %153 = and i32 %152, 31
  %154 = load i32, ptr %7, align 4, !tbaa !9
  %155 = shl i32 %154, %153
  store i32 %155, ptr %7, align 4, !tbaa !9
  store i32 120880, ptr %8, align 4, !tbaa !9
  %156 = load i32, ptr %8, align 4, !tbaa !9
  %157 = load i32, ptr %7, align 4, !tbaa !9
  %158 = add i32 %157, %156
  store i32 %158, ptr %7, align 4, !tbaa !9
  %159 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %159, ptr %8, align 4, !tbaa !9
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.w2c_hermes, ptr %160, i32 0, i32 6
  %162 = load i32, ptr %7, align 4, !tbaa !9
  %163 = zext i32 %162 to i64
  %164 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %161, i64 noundef %163, i32 noundef %164)
  br label %165

165:                                              ; preds = %150, %149, %132
  %166 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %166, ptr %7, align 4, !tbaa !9
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.w2c_hermes, ptr %167, i32 0, i32 6
  %169 = load i32, ptr %7, align 4, !tbaa !9
  %170 = zext i32 %169 to i64
  %171 = add i64 %170, 8
  %172 = call i32 @i32_load(ptr noundef %168, i64 noundef %171)
  store i32 %172, ptr %7, align 4, !tbaa !9
  %173 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %173, ptr %8, align 4, !tbaa !9
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.w2c_hermes, ptr %174, i32 0, i32 6
  %176 = load i32, ptr %8, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  %178 = add i64 %177, 12
  %179 = call i32 @i32_load(ptr noundef %175, i64 noundef %178)
  store i32 %179, ptr %8, align 4, !tbaa !9
  %180 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %180, ptr %9, align 4, !tbaa !9
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.w2c_hermes, ptr %181, i32 0, i32 6
  %183 = load i32, ptr %9, align 4, !tbaa !9
  %184 = zext i32 %183 to i64
  %185 = add i64 %184, 16
  %186 = call i32 @i32_load(ptr noundef %182, i64 noundef %185)
  store i32 %186, ptr %9, align 4, !tbaa !9
  %187 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %187, ptr %10, align 4, !tbaa !9
  %188 = load ptr, ptr %3, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.w2c_hermes, ptr %188, i32 0, i32 6
  %190 = load i32, ptr %10, align 4, !tbaa !9
  %191 = zext i32 %190 to i64
  %192 = add i64 %191, 4
  %193 = call i32 @i32_load(ptr noundef %189, i64 noundef %192)
  store i32 %193, ptr %10, align 4, !tbaa !9
  %194 = load i32, ptr %10, align 4, !tbaa !9
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.w2c_hermes, ptr %195, i32 0, i32 7
  %197 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %196, i32 0, i32 2
  %198 = load i32, ptr %197, align 4, !tbaa !11
  %199 = icmp ult i32 %194, %198
  br i1 %199, label %200, label %223

200:                                              ; preds = %165
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.w2c_hermes, ptr %201, i32 0, i32 7
  %203 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %202, i32 0, i32 0
  %204 = load ptr, ptr %203, align 8, !tbaa !17
  %205 = load i32, ptr %10, align 4, !tbaa !9
  %206 = zext i32 %205 to i64
  %207 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %204, i64 %206
  %208 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %207, i32 0, i32 1
  %209 = load ptr, ptr %208, align 8, !tbaa !18
  %210 = icmp ne ptr %209, null
  br i1 %210, label %211, label %223

211:                                              ; preds = %200
  %212 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %213 = load ptr, ptr %3, 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 0
  %221 = load ptr, ptr %220, align 8, !tbaa !20
  %222 = call zeroext i1 @func_types_eq(ptr noundef %212, ptr noundef %221)
  br label %223

223:                                              ; preds = %211, %200, %165
  %224 = phi i1 [ false, %200 ], [ false, %165 ], [ %222, %211 ]
  %225 = xor i1 %224, true
  %226 = xor i1 %225, true
  %227 = zext i1 %226 to i32
  %228 = sext i32 %227 to i64
  %229 = call i64 @llvm.expect.i64(i64 %228, i64 1)
  %230 = icmp ne i64 %229, 0
  br i1 %230, label %233, label %231

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

232:                                              ; No predecessors!
  br label %233

233:                                              ; preds = %232, %223
  %234 = phi i1 [ true, %223 ], [ false, %232 ]
  %235 = zext i1 %234 to i32
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.w2c_hermes, ptr %236, i32 0, i32 7
  %238 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %237, i32 0, i32 0
  %239 = load ptr, ptr %238, align 8, !tbaa !17
  %240 = load i32, ptr %10, align 4, !tbaa !9
  %241 = zext i32 %240 to i64
  %242 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %239, i64 %241
  %243 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %242, i32 0, i32 1
  %244 = load ptr, ptr %243, align 8, !tbaa !18
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.w2c_hermes, ptr %245, i32 0, i32 7
  %247 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %246, i32 0, i32 0
  %248 = load ptr, ptr %247, align 8, !tbaa !17
  %249 = load i32, ptr %10, align 4, !tbaa !9
  %250 = zext i32 %249 to i64
  %251 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %248, i64 %250
  %252 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %251, i32 0, i32 2
  %253 = load ptr, ptr %252, align 8, !tbaa !21
  %254 = load i32, ptr %7, align 4, !tbaa !9
  %255 = load i32, ptr %8, align 4, !tbaa !9
  %256 = load i32, ptr %9, align 4, !tbaa !9
  call void %244(ptr noundef %253, i32 noundef %254, i32 noundef %255, i32 noundef %256)
  %257 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %257, ptr %7, align 4, !tbaa !9
  %258 = load ptr, ptr %3, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.w2c_hermes, ptr %258, i32 0, i32 6
  %260 = load i32, ptr %7, align 4, !tbaa !9
  %261 = zext i32 %260 to i64
  %262 = call i32 @i32_load(ptr noundef %259, i64 noundef %261)
  store i32 %262, ptr %7, align 4, !tbaa !9
  %263 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %263, ptr %5, align 4, !tbaa !9
  %264 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %264, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  %265 = load ptr, ptr %3, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.w2c_hermes, ptr %265, i32 0, i32 6
  %267 = load i32, ptr %7, align 4, !tbaa !9
  %268 = zext i32 %267 to i64
  %269 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %266, i64 noundef %268, i32 noundef %269)
  %270 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %270, ptr %7, align 4, !tbaa !9
  %271 = load i32, ptr %7, align 4, !tbaa !9
  %272 = icmp ne i32 %271, 0
  br i1 %272, label %273, label %280

273:                                              ; preds = %233
  %274 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %274, ptr %7, align 4, !tbaa !9
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = load i32, ptr %7, align 4, !tbaa !9
  %277 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x3A0x3A0x7E_0x5Fthread_struct0x280x29(ptr noundef %275, i32 noundef %276)
  store i32 %277, ptr %7, align 4, !tbaa !9
  %278 = load ptr, ptr %3, align 8, !tbaa !5
  %279 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %278, i32 noundef %279)
  br label %280

280:                                              ; preds = %273, %233
  %281 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %281, ptr %7, align 4, !tbaa !9
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  %283 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %282, i32 noundef %283)
  store i32 0, ptr %7, align 4, !tbaa !9
  %284 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret i32 %284
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #3 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !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_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 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

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

; 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 i32 @i32_load8_u(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @w2c_hermes_void0x2A0x20std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_proxy0x5Babi0x3Av150070x5D0x3Cstd0x3A0x3A_0x5F20x3A0x3Atuple0x3Cstd0x3A0x3A_0x5F20x3A0x3Aunique_ptr0x3Cstd0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x2C0x20std0x3A0x3A_0x5F20x3A0x3Adefault_delete0x3Cstd0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x3E0x3E0x2C0x20void0x200x280x2A0x290x28unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aatomic0x3Cbool0x3E0x2A0x290x2C0x20unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aatomic0x3Cbool0x3E0x2A0x3E0x3E0x28void0x2A0x29(ptr noundef %0, i32 noundef %1) local_unnamed_addr #3 {
  %3 = getelementptr inbounds i8, ptr %0, i64 40
  %4 = tail call i32 @i32_load8_u(ptr noundef nonnull %3, i64 noundef 121624)
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %.preheader, label %5

5:                                                ; preds = %2
  %6 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef 121620)
  %7 = zext i32 %6 to i64
  br label %17

.preheader:                                       ; preds = %2, %10
  %indvars.iv = phi i64 [ %indvars.iv.next, %10 ], [ 0, %2 ]
  %8 = add nuw nsw i64 %indvars.iv, 120752
  %9 = tail call i32 @i32_load8_u(ptr noundef nonnull %3, i64 noundef %8)
  %.not129 = icmp eq i32 %9, 0
  br i1 %.not129, label %12, label %10

10:                                               ; preds = %.preheader
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not130 = icmp eq i64 %indvars.iv.next, 128
  br i1 %.not130, label %11, label %.preheader

11:                                               ; preds = %10
  tail call void @w2c_hermes_abort_message(ptr noundef %0, i32 noundef 6, i32 noundef 54596) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

12:                                               ; preds = %.preheader
  %13 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @i32_store8(ptr noundef nonnull %3, i64 noundef %8, i32 noundef 1)
  %14 = shl i64 %indvars.iv, 2
  %15 = add i64 %14, 120880
  %16 = and i64 %15, 4294967292
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %16, i32 noundef 0)
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef 121616, i32 noundef %13)
  tail call void @i32_store8(ptr noundef nonnull %3, i64 noundef 121624, i32 noundef 1)
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef 121620, i32 noundef 121616)
  br label %17

17:                                               ; preds = %12, %5
  %.1 = phi i64 [ %7, %5 ], [ 121616, %12 ]
  %18 = zext i32 %1 to i64
  %19 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %18)
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %18, i32 noundef 0)
  %20 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %.1)
  %21 = icmp ugt i32 %20, 127
  br i1 %21, label %30, label %22

22:                                               ; preds = %17
  %23 = add nuw nsw i32 %20, 120752
  %24 = zext nneg i32 %23 to i64
  %25 = tail call i32 @i32_load8_u(ptr noundef nonnull %3, i64 noundef %24)
  %.not132 = icmp eq i32 %25, 0
  br i1 %.not132, label %30, label %26

26:                                               ; preds = %22
  %27 = shl nuw nsw i32 %20, 2
  %28 = add nuw nsw i32 %27, 120880
  %29 = zext nneg i32 %28 to i64
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %29, i32 noundef %19)
  br label %30

30:                                               ; preds = %22, %17, %26
  %31 = add nuw nsw i64 %18, 8
  %32 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %31)
  %33 = add nuw nsw i64 %18, 12
  %34 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %33)
  %35 = add nuw nsw i64 %18, 16
  %36 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %35)
  %37 = add nuw nsw i64 %18, 4
  %38 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %37)
  %39 = getelementptr inbounds i8, ptr %0, i64 80
  %40 = getelementptr inbounds i8, ptr %0, i64 92
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = icmp ult i32 %38, %41
  br i1 %42, label %43, label %.critedge, !prof !15

43:                                               ; preds = %30
  %44 = load ptr, ptr %39, align 8, !tbaa !16
  %45 = zext i32 %38 to i64
  %46 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %44, i64 %45
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !17
  %.not133 = icmp eq ptr %48, null
  br i1 %.not133, label %.critedge, label %49, !prof !19

49:                                               ; preds = %43
  %50 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !20
  %51 = load ptr, ptr %46, align 8, !tbaa !21
  %52 = tail call zeroext i1 @func_types_eq(ptr noundef %50, ptr noundef %51)
  br i1 %52, label %53, label %.critedge, !prof !15

.critedge:                                        ; preds = %43, %30, %49
  tail call void @wasm_rt_trap(i32 noundef 6) #5
  unreachable

53:                                               ; preds = %49
  %54 = load ptr, ptr %39, align 8, !tbaa !16
  %55 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %54, i64 %45
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %58 = getelementptr inbounds i8, ptr %55, i64 16
  %59 = load ptr, ptr %58, align 8, !tbaa !22
  tail call void %57(ptr noundef %59, i32 noundef %32, i32 noundef %34, i32 noundef %36) #4
  %60 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %18)
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %18, i32 noundef 0)
  %.not134 = icmp eq i32 %60, 0
  br i1 %.not134, label %63, label %61

61:                                               ; preds = %53
  %62 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x3A0x3A0x7E_0x5Fthread_struct0x280x29(ptr noundef nonnull %0, i32 noundef %60)
  tail call void @w2c_hermes_dlfree(ptr noundef nonnull %0, i32 noundef %62) #4
  br label %63

63:                                               ; preds = %61, %53
  tail call void @w2c_hermes_dlfree(ptr noundef nonnull %0, i32 noundef %1) #4
  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 92}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!16 = !{!6, !7, i64 80}
!17 = !{!18, !7, i64 8}
!18 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!20 = !{!7, !7, i64 0}
!21 = !{!18, !7, i64 0}
!22 = !{!18, !7, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass