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

; 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 }

@.str.5 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3A0x28anonymous0x20namespace0x290x3A0x3ADumpModule0x3A0x3ArunOnModule0x28hermes0x3A0x3AModule0x2A0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %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
  %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 %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
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  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 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %17 = load ptr, ptr %4, 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 32, 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 %7, align 4, !tbaa !9
  %24 = load i32, ptr %11, align 4, !tbaa !9
  %25 = load ptr, ptr %4, 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 %5, align 4, !tbaa !9
  store i32 %27, ptr %11, align 4, !tbaa !9
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.w2c_hermes, ptr %28, i32 0, i32 6
  %30 = load i32, ptr %11, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = add i64 %31, 16
  %33 = call i32 @i32_load(ptr noundef %29, i64 noundef %32)
  store i32 %33, ptr %11, align 4, !tbaa !9
  %34 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %34, ptr %8, align 4, !tbaa !9
  %35 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %35, ptr %11, align 4, !tbaa !9
  store i32 22, ptr %12, align 4, !tbaa !9
  %36 = load ptr, ptr %4, 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, 28
  %41 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %37, i64 noundef %40, i32 noundef %41)
  %42 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %42, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  store i32 41097, ptr %13, align 4, !tbaa !9
  %43 = load i32, ptr %13, align 4, !tbaa !9
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = add i32 %44, %43
  store i32 %45, ptr %12, align 4, !tbaa !9
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.w2c_hermes, ptr %46, i32 0, i32 6
  %48 = load i32, ptr %11, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = add i64 %49, 24
  %51 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %47, i64 noundef %50, i32 noundef %51)
  %52 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %52, ptr %11, align 4, !tbaa !9
  %53 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %53, ptr %12, align 4, !tbaa !9
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.w2c_hermes, ptr %54, i32 0, i32 6
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = add i64 %57, 24
  %59 = call i64 @i64_load(ptr noundef %55, i64 noundef %58)
  store i64 %59, ptr %16, align 8, !tbaa !17
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.w2c_hermes, ptr %60, i32 0, i32 6
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = add i64 %63, 8
  %65 = load i64, ptr %16, align 8, !tbaa !17
  call void @i64_store(ptr noundef %61, i64 noundef %64, i64 noundef %65)
  %66 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %66, ptr %11, align 4, !tbaa !9
  %67 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %67, ptr %12, align 4, !tbaa !9
  %68 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %68, ptr %13, align 4, !tbaa !9
  store i32 12, ptr %14, align 4, !tbaa !9
  %69 = load i32, ptr %14, align 4, !tbaa !9
  %70 = load i32, ptr %13, align 4, !tbaa !9
  %71 = add i32 %70, %69
  store i32 %71, ptr %13, align 4, !tbaa !9
  %72 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %72, ptr %14, align 4, !tbaa !9
  store i32 8, ptr %15, align 4, !tbaa !9
  %73 = load i32, ptr %15, align 4, !tbaa !9
  %74 = load i32, ptr %14, align 4, !tbaa !9
  %75 = add i32 %74, %73
  store i32 %75, ptr %14, align 4, !tbaa !9
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = load i32, ptr %11, align 4, !tbaa !9
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3A0x28anonymous0x20namespace0x290x3A0x3ADumpModule0x3A0x3AdumpIfEnabled0x28hermes0x3A0x3AModule0x2A0x2C0x20hermes0x3A0x3ACodeGenerationSettings_DumpSettings0x20const0x260x2C0x20llvh0x3A0x3AStringRef0x290x20const(ptr noundef %76, i32 noundef %77, i32 noundef %78, i32 noundef %79, i32 noundef %80)
  %81 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %81, ptr %11, align 4, !tbaa !9
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.w2c_hermes, ptr %82, i32 0, i32 6
  %84 = load i32, ptr %11, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = add i64 %85, 24
  %87 = call i32 @i32_load(ptr noundef %83, i64 noundef %86)
  store i32 %87, ptr %11, align 4, !tbaa !9
  %88 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %88, ptr %8, align 4, !tbaa !9
  %89 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %89, ptr %12, align 4, !tbaa !9
  %90 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %90, ptr %13, align 4, !tbaa !9
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.w2c_hermes, ptr %91, i32 0, i32 6
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = call i32 @i32_load(ptr noundef %92, i64 noundef %94)
  store i32 %95, ptr %13, align 4, !tbaa !9
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.w2c_hermes, ptr %96, i32 0, i32 6
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = add i64 %99, 8
  %101 = call i32 @i32_load(ptr noundef %97, i64 noundef %100)
  store i32 %101, ptr %13, align 4, !tbaa !9
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.w2c_hermes, ptr %103, i32 0, i32 7
  %105 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %104, i32 0, i32 2
  %106 = load i32, ptr %105, align 4, !tbaa !18
  %107 = icmp ult i32 %102, %106
  br i1 %107, label %108, label %130

108:                                              ; preds = %3
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.w2c_hermes, ptr %109, i32 0, i32 7
  %111 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !19
  %113 = load i32, ptr %13, align 4, !tbaa !9
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %112, i64 %114
  %116 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !20
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %130

119:                                              ; preds = %108
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.w2c_hermes, ptr %120, i32 0, i32 7
  %122 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !19
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %123, i64 %125
  %127 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !22
  %129 = call zeroext i1 @func_types_eq(ptr noundef @.str.5, ptr noundef %128)
  br label %130

130:                                              ; preds = %119, %108, %3
  %131 = phi i1 [ false, %108 ], [ false, %3 ], [ %129, %119 ]
  %132 = xor i1 %131, true
  %133 = xor i1 %132, true
  %134 = zext i1 %133 to i32
  %135 = sext i32 %134 to i64
  %136 = call i64 @llvm.expect.i64(i64 %135, i64 1)
  %137 = icmp ne i64 %136, 0
  br i1 %137, label %140, label %138

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

139:                                              ; No predecessors!
  br label %140

140:                                              ; preds = %139, %130
  %141 = phi i1 [ true, %130 ], [ false, %139 ]
  %142 = zext i1 %141 to i32
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.w2c_hermes, ptr %143, i32 0, i32 7
  %145 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !19
  %147 = load i32, ptr %13, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %146, i64 %148
  %150 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %149, i32 0, i32 1
  %151 = load ptr, ptr %150, align 8, !tbaa !20
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.w2c_hermes, ptr %152, i32 0, i32 7
  %154 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !19
  %156 = load i32, ptr %13, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %155, i64 %157
  %159 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %158, i32 0, i32 2
  %160 = load ptr, ptr %159, align 8, !tbaa !23
  %161 = load i32, ptr %11, align 4, !tbaa !9
  %162 = load i32, ptr %12, align 4, !tbaa !9
  %163 = call i32 %151(ptr noundef %160, i32 noundef %161, i32 noundef %162)
  store i32 %163, ptr %11, align 4, !tbaa !9
  %164 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %164, ptr %8, align 4, !tbaa !9
  %165 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %165, ptr %11, align 4, !tbaa !9
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.w2c_hermes, ptr %166, i32 0, i32 6
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = add i64 %169, 16
  %171 = call i32 @i32_load(ptr noundef %167, i64 noundef %170)
  store i32 %171, ptr %11, align 4, !tbaa !9
  %172 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %172, ptr %10, align 4, !tbaa !9
  %173 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %173, ptr %11, align 4, !tbaa !9
  store i32 21, ptr %12, align 4, !tbaa !9
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.w2c_hermes, ptr %174, i32 0, i32 6
  %176 = load i32, ptr %11, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  %178 = add i64 %177, 20
  %179 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %175, i64 noundef %178, i32 noundef %179)
  %180 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %180, ptr %11, align 4, !tbaa !9
  %181 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %181, ptr %12, align 4, !tbaa !9
  store i32 41075, ptr %13, align 4, !tbaa !9
  %182 = load i32, ptr %13, align 4, !tbaa !9
  %183 = load i32, ptr %12, align 4, !tbaa !9
  %184 = add i32 %183, %182
  store i32 %184, ptr %12, align 4, !tbaa !9
  %185 = load ptr, ptr %4, 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, 16
  %190 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %186, i64 noundef %189, i32 noundef %190)
  %191 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %191, ptr %11, align 4, !tbaa !9
  %192 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %192, ptr %12, align 4, !tbaa !9
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.w2c_hermes, ptr %193, i32 0, i32 6
  %195 = load i32, ptr %12, align 4, !tbaa !9
  %196 = zext i32 %195 to i64
  %197 = add i64 %196, 16
  %198 = call i64 @i64_load(ptr noundef %194, i64 noundef %197)
  store i64 %198, ptr %16, align 8, !tbaa !17
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.w2c_hermes, ptr %199, i32 0, i32 6
  %201 = load i32, ptr %11, align 4, !tbaa !9
  %202 = zext i32 %201 to i64
  %203 = load i64, ptr %16, align 8, !tbaa !17
  call void @i64_store(ptr noundef %200, i64 noundef %202, i64 noundef %203)
  %204 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %204, ptr %11, align 4, !tbaa !9
  %205 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %205, ptr %12, align 4, !tbaa !9
  %206 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %206, ptr %13, align 4, !tbaa !9
  store i32 96, ptr %14, align 4, !tbaa !9
  %207 = load i32, ptr %14, align 4, !tbaa !9
  %208 = load i32, ptr %13, align 4, !tbaa !9
  %209 = add i32 %208, %207
  store i32 %209, ptr %13, align 4, !tbaa !9
  %210 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %210, ptr %14, align 4, !tbaa !9
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = load i32, ptr %11, align 4, !tbaa !9
  %213 = load i32, ptr %12, align 4, !tbaa !9
  %214 = load i32, ptr %13, align 4, !tbaa !9
  %215 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3A0x28anonymous0x20namespace0x290x3A0x3ADumpModule0x3A0x3AdumpIfEnabled0x28hermes0x3A0x3AModule0x2A0x2C0x20hermes0x3A0x3ACodeGenerationSettings_DumpSettings0x20const0x260x2C0x20llvh0x3A0x3AStringRef0x290x20const(ptr noundef %211, i32 noundef %212, i32 noundef %213, i32 noundef %214, i32 noundef %215)
  %216 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %216, ptr %11, align 4, !tbaa !9
  store i32 32, ptr %12, align 4, !tbaa !9
  %217 = load i32, ptr %12, align 4, !tbaa !9
  %218 = load i32, ptr %11, align 4, !tbaa !9
  %219 = add i32 %218, %217
  store i32 %219, ptr %11, align 4, !tbaa !9
  %220 = load i32, ptr %11, align 4, !tbaa !9
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.w2c_hermes, ptr %221, i32 0, i32 3
  store i32 %220, ptr %222, align 8, !tbaa !11
  %223 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %223, ptr %11, align 4, !tbaa !9
  %224 = load i32, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret i32 %224
}

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

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

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

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

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

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }
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 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 }

@.str.5 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3A0x28anonymous0x20namespace0x290x3A0x3ADumpModule0x3A0x3ArunOnModule0x28hermes0x3A0x3AModule0x2A0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = add i32 %5, -32
  store i32 %6, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = zext i32 %1 to i64
  %9 = add nuw nsw i64 %8, 16
  %10 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %11 = zext i32 %6 to i64
  %12 = add nuw nsw i64 %11, 28
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %12, i32 noundef 22)
  %13 = add nuw nsw i64 %11, 24
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %13, i32 noundef 41097)
  %14 = tail call i64 @i64_load(ptr noundef nonnull %7, i64 noundef %13)
  %15 = add nuw nsw i64 %11, 8
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %15, i64 noundef %14)
  %16 = add i32 %10, 12
  %17 = add i32 %5, -24
  tail call void @w2c_hermes_hermes0x3A0x3A0x28anonymous0x20namespace0x290x3A0x3ADumpModule0x3A0x3AdumpIfEnabled0x28hermes0x3A0x3AModule0x2A0x2C0x20hermes0x3A0x3ACodeGenerationSettings_DumpSettings0x20const0x260x2C0x20llvh0x3A0x3AStringRef0x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %16, i32 noundef %17)
  %18 = add nuw nsw i64 %8, 24
  %19 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %18)
  %20 = zext i32 %19 to i64
  %21 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %20)
  %22 = zext i32 %21 to i64
  %23 = add nuw nsw i64 %22, 8
  %24 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %23)
  %25 = getelementptr inbounds i8, ptr %0, i64 80
  %26 = getelementptr inbounds i8, ptr %0, i64 92
  %27 = load i32, ptr %26, align 4, !tbaa !15
  %28 = icmp ult i32 %24, %27
  br i1 %28, label %29, label %.critedge, !prof !16

29:                                               ; preds = %3
  %30 = load ptr, ptr %25, align 8, !tbaa !17
  %31 = zext i32 %24 to i64
  %32 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %30, i64 %31
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !18
  %.not = icmp eq ptr %34, null
  br i1 %.not, label %.critedge, label %35, !prof !20

35:                                               ; preds = %29
  %36 = load ptr, ptr %32, align 8, !tbaa !21
  %37 = tail call zeroext i1 @func_types_eq(ptr noundef nonnull @.str.5, ptr noundef %36)
  br i1 %37, label %38, label %.critedge, !prof !16

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

38:                                               ; preds = %35
  %39 = load ptr, ptr %25, align 8, !tbaa !17
  %40 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %39, i64 %31
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  %43 = getelementptr inbounds i8, ptr %40, i64 16
  %44 = load ptr, ptr %43, align 8, !tbaa !22
  %45 = tail call i32 %42(ptr noundef %44, i32 noundef %19, i32 noundef %2) #4
  %46 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %47 = add nuw nsw i64 %11, 20
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %47, i32 noundef 21)
  %48 = add nuw nsw i64 %11, 16
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %48, i32 noundef 41075)
  %49 = tail call i64 @i64_load(ptr noundef nonnull %7, i64 noundef %48)
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %11, i64 noundef %49)
  %50 = add i32 %46, 96
  tail call void @w2c_hermes_hermes0x3A0x3A0x28anonymous0x20namespace0x290x3A0x3ADumpModule0x3A0x3AdumpIfEnabled0x28hermes0x3A0x3AModule0x2A0x2C0x20hermes0x3A0x3ACodeGenerationSettings_DumpSettings0x20const0x260x2C0x20llvh0x3A0x3AStringRef0x290x20const(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %2, i32 noundef %50, i32 noundef %6)
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret i32 %45
}

; Function Attrs: noreturn
declare void @wasm_rt_trap(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 #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_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: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #2

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

attributes #0 = { 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 = { 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 = { 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 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 = !{!19, !7, i64 0}
!22 = !{!19, !7, i64 16}


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