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

; 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: 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 void @i64_store(ptr noundef, i64 noundef, i64 noundef) #1

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

; 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: inlinehint nounwind uwtable
declare hidden i64 @i64_load(ptr noundef, i64 noundef) #1

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

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

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AIdentifierTable0x3A0x3AgetStringPrim0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ASymbolID0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntimeModule0x3A0x3AgetStringPrimFromStringIDMayAllocate0x28unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) #5 {
  %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 i32, align 4
  %17 = 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) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, 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
  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 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.w2c_hermes, ptr %18, i32 0, i32 3
  %20 = load i32, ptr %19, align 8, !tbaa !11
  store i32 %20, ptr %10, align 4, !tbaa !9
  store i32 32, ptr %11, align 4, !tbaa !9
  %21 = load i32, ptr %11, align 4, !tbaa !9
  %22 = load i32, ptr %10, align 4, !tbaa !9
  %23 = sub i32 %22, %21
  store i32 %23, ptr %10, align 4, !tbaa !9
  %24 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %24, ptr %7, align 4, !tbaa !9
  %25 = load i32, ptr %10, align 4, !tbaa !9
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.w2c_hermes, ptr %26, i32 0, i32 3
  store i32 %25, ptr %27, align 8, !tbaa !11
  %28 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %28, ptr %10, align 4, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.w2c_hermes, ptr %29, i32 0, i32 6
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = add i64 %32, 8
  %34 = call i32 @i32_load(ptr noundef %30, i64 noundef %33)
  store i32 %34, ptr %10, align 4, !tbaa !9
  %35 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %35, ptr %8, align 4, !tbaa !9
  store i32 5468, ptr %11, align 4, !tbaa !9
  %36 = load i32, ptr %11, align 4, !tbaa !9
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = add i32 %37, %36
  store i32 %38, ptr %10, align 4, !tbaa !9
  %39 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %39, ptr %11, align 4, !tbaa !9
  %40 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %40, ptr %12, align 4, !tbaa !9
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.w2c_hermes, ptr %41, i32 0, i32 6
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = zext i32 %43 to i64
  %45 = add i64 %44, 12
  %46 = call i32 @i32_load(ptr noundef %42, i64 noundef %45)
  store i32 %46, ptr %12, align 4, !tbaa !9
  %47 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %47, ptr %13, align 4, !tbaa !9
  store i32 2, ptr %14, align 4, !tbaa !9
  %48 = load i32, ptr %14, align 4, !tbaa !9
  %49 = and i32 %48, 31
  %50 = load i32, ptr %13, align 4, !tbaa !9
  %51 = shl i32 %50, %49
  store i32 %51, ptr %13, align 4, !tbaa !9
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = add i32 %53, %52
  store i32 %54, ptr %12, align 4, !tbaa !9
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.w2c_hermes, ptr %55, i32 0, i32 6
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = call i32 @i32_load(ptr noundef %56, i64 noundef %58)
  store i32 %59, ptr %12, align 4, !tbaa !9
  %60 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %60, ptr %8, align 4, !tbaa !9
  store i32 536870910, ptr %13, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = icmp uge i32 %61, %62
  %64 = zext i1 %63 to i32
  store i32 %64, ptr %12, align 4, !tbaa !9
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %198

67:                                               ; preds = %3
  %68 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %68, ptr %12, align 4, !tbaa !9
  store i32 24, ptr %13, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = add i32 %70, %69
  store i32 %71, ptr %12, align 4, !tbaa !9
  %72 = load i32, ptr %12, 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 %13, 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 %13, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = add i64 %77, 40
  %79 = call i32 @i32_load(ptr noundef %75, i64 noundef %78)
  store i32 %79, ptr %13, align 4, !tbaa !9
  %80 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %80, ptr %8, align 4, !tbaa !9
  %81 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %81, ptr %14, align 4, !tbaa !9
  %82 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %82, ptr %15, align 4, !tbaa !9
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.w2c_hermes, ptr %83, i32 0, i32 6
  %85 = load i32, ptr %15, align 4, !tbaa !9
  %86 = zext i32 %85 to i64
  %87 = call i32 @i32_load(ptr noundef %84, i64 noundef %86)
  store i32 %87, ptr %15, align 4, !tbaa !9
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.w2c_hermes, ptr %88, i32 0, i32 6
  %90 = load i32, ptr %15, align 4, !tbaa !9
  %91 = zext i32 %90 to i64
  %92 = add i64 %91, 4
  %93 = call i32 @i32_load(ptr noundef %89, i64 noundef %92)
  store i32 %93, ptr %15, align 4, !tbaa !9
  %94 = load i32, ptr %15, align 4, !tbaa !9
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.w2c_hermes, ptr %95, i32 0, i32 7
  %97 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %96, i32 0, i32 2
  %98 = load i32, ptr %97, align 4, !tbaa !17
  %99 = icmp ult i32 %94, %98
  br i1 %99, label %100, label %123

100:                                              ; preds = %67
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.w2c_hermes, ptr %101, i32 0, i32 7
  %103 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !18
  %105 = load i32, ptr %15, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %104, i64 %106
  %108 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %107, i32 0, i32 1
  %109 = load ptr, ptr %108, align 8, !tbaa !19
  %110 = icmp ne ptr %109, null
  br i1 %110, label %111, label %123

111:                                              ; preds = %100
  %112 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.w2c_hermes, ptr %113, i32 0, i32 7
  %115 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !18
  %117 = load i32, ptr %15, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %116, i64 %118
  %120 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !21
  %122 = call zeroext i1 @func_types_eq(ptr noundef %112, ptr noundef %121)
  br label %123

123:                                              ; preds = %111, %100, %67
  %124 = phi i1 [ false, %100 ], [ false, %67 ], [ %122, %111 ]
  %125 = xor i1 %124, true
  %126 = xor i1 %125, true
  %127 = zext i1 %126 to i32
  %128 = sext i32 %127 to i64
  %129 = call i64 @llvm.expect.i64(i64 %128, i64 1)
  %130 = icmp ne i64 %129, 0
  br i1 %130, label %133, label %131

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

132:                                              ; No predecessors!
  br label %133

133:                                              ; preds = %132, %123
  %134 = phi i1 [ true, %123 ], [ false, %132 ]
  %135 = zext i1 %134 to i32
  %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 !18
  %140 = load i32, ptr %15, 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 1
  %144 = load ptr, ptr %143, align 8, !tbaa !19
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.w2c_hermes, ptr %145, i32 0, i32 7
  %147 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !18
  %149 = load i32, ptr %15, align 4, !tbaa !9
  %150 = zext i32 %149 to i64
  %151 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %148, i64 %150
  %152 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %151, i32 0, i32 2
  %153 = load ptr, ptr %152, align 8, !tbaa !22
  %154 = load i32, ptr %12, align 4, !tbaa !9
  %155 = load i32, ptr %13, align 4, !tbaa !9
  %156 = load i32, ptr %14, align 4, !tbaa !9
  call void %144(ptr noundef %153, i32 noundef %154, i32 noundef %155, i32 noundef %156)
  %157 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %157, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.w2c_hermes, ptr %158, i32 0, i32 6
  %160 = load i32, ptr %12, align 4, !tbaa !9
  %161 = zext i32 %160 to i64
  %162 = add i64 %161, 20
  %163 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %159, i64 noundef %162, i32 noundef %163)
  %164 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %164, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.w2c_hermes, ptr %165, i32 0, i32 6
  %167 = load i32, ptr %12, align 4, !tbaa !9
  %168 = zext i32 %167 to i64
  %169 = add i64 %168, 16
  %170 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %166, i64 noundef %169, i32 noundef %170)
  %171 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %171, ptr %12, align 4, !tbaa !9
  %172 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %172, ptr %13, align 4, !tbaa !9
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.w2c_hermes, ptr %173, i32 0, i32 6
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = zext i32 %175 to i64
  %177 = add i64 %176, 16
  %178 = call i64 @i64_load(ptr noundef %174, i64 noundef %177)
  store i64 %178, ptr %17, align 8, !tbaa !23
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.w2c_hermes, ptr %179, i32 0, i32 6
  %181 = load i32, ptr %12, align 4, !tbaa !9
  %182 = zext i32 %181 to i64
  %183 = add i64 %182, 8
  %184 = load i64, ptr %17, align 8, !tbaa !23
  call void @i64_store(ptr noundef %180, i64 noundef %183, i64 noundef %184)
  %185 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %185, ptr %12, align 4, !tbaa !9
  %186 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %186, ptr %13, align 4, !tbaa !9
  %187 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %187, ptr %14, align 4, !tbaa !9
  %188 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %188, ptr %15, align 4, !tbaa !9
  store i32 8, ptr %16, align 4, !tbaa !9
  %189 = load i32, ptr %16, align 4, !tbaa !9
  %190 = load i32, ptr %15, align 4, !tbaa !9
  %191 = add i32 %190, %189
  store i32 %191, ptr %15, align 4, !tbaa !9
  %192 = load ptr, ptr %4, align 8, !tbaa !5
  %193 = load i32, ptr %12, align 4, !tbaa !9
  %194 = load i32, ptr %13, align 4, !tbaa !9
  %195 = load i32, ptr %14, align 4, !tbaa !9
  %196 = load i32, ptr %15, align 4, !tbaa !9
  %197 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntimeModule0x3A0x3AcreateSymbolFromStringIDMayAllocate0x28unsigned0x20int0x2C0x20hermes0x3A0x3AStringTableEntry0x20const0x260x2C0x20hermes0x3A0x3AOptValue0x3Cunsigned0x20int0x3E0x29(ptr noundef %192, i32 noundef %193, i32 noundef %194, i32 noundef %195, i32 noundef %196)
  store i32 %197, ptr %12, align 4, !tbaa !9
  br label %200

198:                                              ; preds = %3
  %199 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %199, ptr %12, align 4, !tbaa !9
  br label %200

200:                                              ; preds = %198, %133
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = load i32, ptr %10, align 4, !tbaa !9
  %203 = load i32, ptr %11, align 4, !tbaa !9
  %204 = load i32, ptr %12, align 4, !tbaa !9
  %205 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AIdentifierTable0x3A0x3AgetStringPrim0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ASymbolID0x29(ptr noundef %201, i32 noundef %202, i32 noundef %203, i32 noundef %204)
  store i32 %205, ptr %10, align 4, !tbaa !9
  %206 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %206, ptr %5, align 4, !tbaa !9
  %207 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %207, ptr %10, align 4, !tbaa !9
  store i32 32, ptr %11, align 4, !tbaa !9
  %208 = load i32, ptr %11, align 4, !tbaa !9
  %209 = load i32, ptr %10, align 4, !tbaa !9
  %210 = add i32 %209, %208
  store i32 %210, ptr %10, align 4, !tbaa !9
  %211 = load i32, ptr %10, align 4, !tbaa !9
  %212 = load ptr, ptr %4, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.w2c_hermes, ptr %212, i32 0, i32 3
  store i32 %211, ptr %213, align 8, !tbaa !11
  %214 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %214, ptr %10, align 4, !tbaa !9
  %215 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret i32 %215
}

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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(none) }
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 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 = !{!12, !10, i64 92}
!18 = !{!12, !6, i64 80}
!19 = !{!20, !6, i64 8}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!20, !6, i64 0}
!22 = !{!20, !6, i64 16}
!23 = !{!14, !14, i64 0}


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

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

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

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

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AIdentifierTable0x3A0x3AgetStringPrim0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ASymbolID0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntimeModule0x3A0x3AgetStringPrimFromStringIDMayAllocate0x28unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %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, 8
  %10 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %11 = add nuw nsw i64 %8, 12
  %12 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %11)
  %13 = shl i32 %2, 2
  %14 = add i32 %12, %13
  %15 = zext i32 %14 to i64
  %16 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %15)
  %17 = icmp ugt i32 %16, 536870909
  br i1 %17, label %18, label %55

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

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

37:                                               ; preds = %31
  %38 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !21
  %39 = load ptr, ptr %34, align 8, !tbaa !22
  %40 = tail call zeroext i1 @func_types_eq(ptr noundef %38, ptr noundef %39)
  br i1 %40, label %41, label %.critedge, !prof !16

.critedge:                                        ; preds = %31, %18, %37
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

41:                                               ; preds = %37
  %42 = load ptr, ptr %27, align 8, !tbaa !17
  %43 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %42, i64 %33
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %46 = getelementptr inbounds i8, ptr %43, i64 16
  %47 = load ptr, ptr %46, align 8, !tbaa !23
  tail call void %45(ptr noundef %47, i32 noundef %19, i32 noundef %21, i32 noundef %2) #5
  %48 = zext i32 %6 to i64
  %49 = add nuw nsw i64 %48, 20
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %49, i32 noundef 0)
  %50 = add nuw nsw i64 %48, 16
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %50, i32 noundef 0)
  %51 = tail call i64 @i64_load(ptr noundef nonnull %7, i64 noundef %50)
  %52 = add nuw nsw i64 %48, 8
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %52, i64 noundef %51)
  %53 = add i32 %5, -24
  %54 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntimeModule0x3A0x3AcreateSymbolFromStringIDMayAllocate0x28unsigned0x20int0x2C0x20hermes0x3A0x3AStringTableEntry0x20const0x260x2C0x20hermes0x3A0x3AOptValue0x3Cunsigned0x20int0x3E0x29(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %2, i32 noundef %19, i32 noundef %53)
  br label %55

55:                                               ; preds = %3, %41
  %.0 = phi i32 [ %54, %41 ], [ %16, %3 ]
  %56 = add i32 %10, 5468
  %57 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AIdentifierTable0x3A0x3AgetStringPrim0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ASymbolID0x29(ptr noundef nonnull %0, i32 noundef %56, i32 noundef %10, i32 noundef %.0) #5
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret i32 %57
}

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