; 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_t3 = external constant ptr, align 8

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 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) #3

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

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

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

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

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

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

declare void @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ADebugInfo0x3A0x3AgetLocationForAddress0x28unsigned0x20int0x2C0x20unsigned0x20int0x290x20const(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

48:                                               ; preds = %4
  %49 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %49, ptr %11, align 4, !tbaa !9
  store i64 0, ptr %16, align 8, !tbaa !17
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.w2c_hermes, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = load i64, ptr %16, align 8, !tbaa !17
  call void @i64_store(ptr noundef %51, i64 noundef %53, i64 noundef %54)
  %55 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %55, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.w2c_hermes, ptr %56, i32 0, i32 6
  %58 = load i32, ptr %11, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = add i64 %59, 32
  %61 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %57, i64 noundef %60, i32 noundef %61)
  %62 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %62, ptr %11, align 4, !tbaa !9
  store i64 0, ptr %16, align 8, !tbaa !17
  %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 %11, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = add i64 %66, 16
  %68 = load i64, ptr %16, align 8, !tbaa !17
  call void @i64_store(ptr noundef %64, i64 noundef %67, i64 noundef %68)
  %69 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %69, ptr %11, align 4, !tbaa !9
  store i64 0, ptr %16, align 8, !tbaa !17
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.w2c_hermes, ptr %70, i32 0, i32 6
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = add i64 %73, 8
  %75 = load i64, ptr %16, align 8, !tbaa !17
  call void @i64_store(ptr noundef %71, i64 noundef %74, i64 noundef %75)
  %76 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %76, ptr %11, align 4, !tbaa !9
  store i64 -4294967296, ptr %16, align 8, !tbaa !17
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.w2c_hermes, ptr %77, i32 0, i32 6
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = add i64 %80, 24
  %82 = load i64, ptr %16, align 8, !tbaa !17
  call void @i64_store(ptr noundef %78, i64 noundef %81, i64 noundef %82)
  br label %223

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

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

129:                                              ; preds = %110
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.w2c_hermes, ptr %130, i32 0, i32 7
  %132 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = load i32, ptr %12, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %133, i64 %135
  %137 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %136, i32 0, i32 1
  %138 = load ptr, ptr %137, align 8, !tbaa !20
  %139 = icmp ne ptr %138, null
  br i1 %139, label %140, label %152

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

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

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

161:                                              ; No predecessors!
  br label %162

162:                                              ; preds = %161, %152
  %163 = phi i1 [ true, %152 ], [ false, %161 ]
  %164 = zext i1 %163 to i32
  %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 !19
  %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 1
  %173 = load ptr, ptr %172, align 8, !tbaa !20
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.w2c_hermes, ptr %174, i32 0, i32 7
  %176 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8, !tbaa !19
  %178 = load i32, ptr %12, align 4, !tbaa !9
  %179 = zext i32 %178 to i64
  %180 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %177, i64 %179
  %181 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %180, i32 0, i32 2
  %182 = load ptr, ptr %181, align 8, !tbaa !23
  %183 = load i32, ptr %11, align 4, !tbaa !9
  call void %173(ptr noundef %182, i32 noundef %183)
  %184 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %184, ptr %11, 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 %11, align 4, !tbaa !9
  %188 = zext i32 %187 to i64
  %189 = add i64 %188, 12
  %190 = call i32 @i32_load8_u(ptr noundef %186, i64 noundef %189)
  store i32 %190, ptr %11, align 4, !tbaa !9
  %191 = load i32, ptr %11, align 4, !tbaa !9
  %192 = icmp ne i32 %191, 0
  %193 = xor i1 %192, true
  %194 = zext i1 %193 to i32
  store i32 %194, ptr %11, align 4, !tbaa !9
  %195 = load i32, ptr %11, align 4, !tbaa !9
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %198

197:                                              ; preds = %162
  br label %231

198:                                              ; preds = %162
  %199 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %199, ptr %11, align 4, !tbaa !9
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.w2c_hermes, ptr %200, i32 0, i32 6
  %202 = load i32, ptr %11, align 4, !tbaa !9
  %203 = zext i32 %202 to i64
  %204 = add i64 %203, 128
  %205 = call i32 @i32_load(ptr noundef %201, i64 noundef %204)
  store i32 %205, ptr %11, align 4, !tbaa !9
  %206 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %206, ptr %7, align 4, !tbaa !9
  br label %207

207:                                              ; preds = %198, %83
  %208 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %208, ptr %11, align 4, !tbaa !9
  %209 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %209, ptr %12, align 4, !tbaa !9
  %210 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %210, ptr %13, align 4, !tbaa !9
  %211 = load ptr, ptr %5, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.w2c_hermes, ptr %211, i32 0, i32 6
  %213 = load i32, ptr %13, align 4, !tbaa !9
  %214 = zext i32 %213 to i64
  %215 = add i64 %214, 8
  %216 = call i32 @i32_load(ptr noundef %212, i64 noundef %215)
  store i32 %216, ptr %13, align 4, !tbaa !9
  %217 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %217, ptr %14, align 4, !tbaa !9
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = load i32, ptr %11, align 4, !tbaa !9
  %220 = load i32, ptr %12, align 4, !tbaa !9
  %221 = load i32, ptr %13, align 4, !tbaa !9
  %222 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ADebugInfo0x3A0x3AgetLocationForAddress0x28unsigned0x20int0x2C0x20unsigned0x20int0x290x20const(ptr noundef %218, i32 noundef %219, i32 noundef %220, i32 noundef %221, i32 noundef %222)
  br label %223

223:                                              ; preds = %207, %48
  %224 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %224, ptr %11, align 4, !tbaa !9
  store i32 16, ptr %12, align 4, !tbaa !9
  %225 = load i32, ptr %12, align 4, !tbaa !9
  %226 = load i32, ptr %11, align 4, !tbaa !9
  %227 = add i32 %226, %225
  store i32 %227, ptr %11, align 4, !tbaa !9
  %228 = load i32, ptr %11, align 4, !tbaa !9
  %229 = load ptr, ptr %5, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.w2c_hermes, ptr %229, i32 0, i32 3
  store i32 %228, ptr %230, align 8, !tbaa !11
  br label %249

231:                                              ; preds = %197
  store i32 0, ptr %11, align 4, !tbaa !9
  %232 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %232, ptr %9, align 4, !tbaa !9
  store i32 118714, ptr %12, align 4, !tbaa !9
  %233 = load i32, ptr %12, align 4, !tbaa !9
  %234 = load i32, ptr %11, align 4, !tbaa !9
  %235 = add i32 %234, %233
  store i32 %235, ptr %11, align 4, !tbaa !9
  %236 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %236, ptr %12, align 4, !tbaa !9
  store i32 83198, ptr %13, align 4, !tbaa !9
  %237 = load i32, ptr %13, align 4, !tbaa !9
  %238 = load i32, ptr %12, align 4, !tbaa !9
  %239 = add i32 %238, %237
  store i32 %239, ptr %12, align 4, !tbaa !9
  store i32 58, ptr %13, align 4, !tbaa !9
  %240 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %240, ptr %14, align 4, !tbaa !9
  store i32 90402, ptr %15, align 4, !tbaa !9
  %241 = load i32, ptr %15, align 4, !tbaa !9
  %242 = load i32, ptr %14, align 4, !tbaa !9
  %243 = add i32 %242, %241
  store i32 %243, ptr %14, align 4, !tbaa !9
  %244 = load ptr, ptr %5, align 8, !tbaa !5
  %245 = load i32, ptr %11, align 4, !tbaa !9
  %246 = load i32, ptr %12, align 4, !tbaa !9
  %247 = load i32, ptr %13, align 4, !tbaa !9
  %248 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %244, i32 noundef %245, i32 noundef %246, i32 noundef %247, i32 noundef %248)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

249:                                              ; preds = %223
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !13, i64 40, !16, i64 80}
!13 = !{!"", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !15, i64 32}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!17 = !{!14, !14, i64 0}
!18 = !{!12, !10, i64 92}
!19 = !{!12, !6, i64 80}
!20 = !{!21, !6, i64 8}
!21 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!21, !6, i64 0}
!23 = !{!21, !6, i64 16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@w2c_hermes_t3 = external local_unnamed_addr constant ptr, align 8

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 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 #2

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

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

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

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

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

declare void @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ADebugInfo0x3A0x3AgetLocationForAddress0x28unsigned0x20int0x2C0x20unsigned0x20int0x290x20const(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

13:                                               ; preds = %4
  %14 = zext i32 %1 to i64
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %14, i64 noundef 0)
  %15 = add nuw nsw i64 %14, 32
  tail call void @i32_store8(ptr noundef nonnull %9, i64 noundef %15, i32 noundef 0)
  %16 = add nuw nsw i64 %14, 16
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %16, i64 noundef 0)
  %17 = add nuw nsw i64 %14, 8
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %17, i64 noundef 0)
  %18 = add nuw nsw i64 %14, 24
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %18, i64 noundef -4294967296)
  br label %59

19:                                               ; preds = %4
  %20 = zext i32 %2 to i64
  %21 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %20)
  %22 = zext i32 %21 to i64
  %23 = add nuw nsw i64 %22, 40
  %24 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %23)
  %25 = zext i32 %24 to i64
  %26 = add nuw nsw i64 %25, 128
  %27 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %26)
  %.not105 = icmp eq i32 %27, 0
  br i1 %.not105, label %28, label %56

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

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

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

.critedge:                                        ; preds = %36, %28, %42
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

46:                                               ; preds = %42
  %47 = load ptr, ptr %32, align 8, !tbaa !17
  %48 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %47, i64 %38
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = getelementptr inbounds i8, ptr %48, i64 16
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  tail call void %50(ptr noundef %52, i32 noundef %24) #5
  %53 = tail call i32 @i32_load8_u(ptr noundef nonnull %9, i64 noundef %11)
  %.not107 = icmp eq i32 %53, 0
  br i1 %.not107, label %60, label %54

54:                                               ; preds = %46
  %55 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %26)
  br label %56

56:                                               ; preds = %54, %19
  %.0 = phi i32 [ %55, %54 ], [ %27, %19 ]
  %57 = add nuw nsw i64 %10, 8
  %58 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %57)
  tail call void @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ADebugInfo0x3A0x3AgetLocationForAddress0x28unsigned0x20int0x2C0x20unsigned0x20int0x290x20const(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %.0, i32 noundef %58, i32 noundef %3) #5
  br label %59

59:                                               ; preds = %56, %13
  store i32 %6, ptr %5, align 8, !tbaa !5
  ret void

60:                                               ; preds = %46
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef nonnull %0, i32 noundef 118714, i32 noundef 83198, i32 noundef 58, i32 noundef 90402) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable
}

attributes #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 = { 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 = { 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 = { noreturn nounwind }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 24}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!6, !10, i64 92}
!16 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!17 = !{!6, !7, i64 80}
!18 = !{!19, !7, i64 8}
!19 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!21 = !{!7, !7, i64 0}
!22 = !{!19, !7, i64 0}
!23 = !{!19, !7, i64 16}


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