; 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.4 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_0x5F_cxxabiv10x3A0x3A_0x5Fclass_type_info0x3A0x3Acan_catch0x28_0x5Fcxxabiv10x3A0x3A_0x5Fshim_type_info0x20const0x2A0x2C0x20void0x2A0x260x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %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
  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
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.w2c_hermes, ptr %16, i32 0, i32 3
  %18 = load i32, ptr %17, align 8, !tbaa !11
  store i32 %18, ptr %11, align 4, !tbaa !9
  store i32 -64, ptr %12, align 4, !tbaa !9
  %19 = load i32, ptr %12, align 4, !tbaa !9
  %20 = load i32, ptr %11, align 4, !tbaa !9
  %21 = add i32 %20, %19
  store i32 %21, ptr %11, align 4, !tbaa !9
  %22 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %22, ptr %9, align 4, !tbaa !9
  %23 = load i32, ptr %11, align 4, !tbaa !9
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.w2c_hermes, ptr %24, i32 0, i32 3
  store i32 %23, ptr %25, align 8, !tbaa !11
  store i32 1, ptr %11, align 4, !tbaa !9
  %26 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %26, ptr %10, align 4, !tbaa !9
  %27 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %27, ptr %12, align 4, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %28, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load i32, ptr %12, align 4, !tbaa !9
  %31 = load i32, ptr %13, align 4, !tbaa !9
  %32 = load i32, ptr %14, align 4, !tbaa !9
  %33 = call i32 @w2c_hermes_is_equal0x28std0x3A0x3Atype_info0x20const0x2A0x2C0x20std0x3A0x3Atype_info0x20const0x2A0x2C0x20bool0x29(ptr noundef %29, i32 noundef %30, i32 noundef %31, i32 noundef %32)
  store i32 %33, ptr %12, align 4, !tbaa !9
  %34 = load i32, ptr %12, align 4, !tbaa !9
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %4
  br label %223

37:                                               ; preds = %4
  store i32 0, ptr %11, align 4, !tbaa !9
  %38 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %38, ptr %10, align 4, !tbaa !9
  %39 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %39, ptr %12, align 4, !tbaa !9
  %40 = load i32, ptr %12, align 4, !tbaa !9
  %41 = icmp ne i32 %40, 0
  %42 = xor i1 %41, true
  %43 = zext i1 %42 to i32
  store i32 %43, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %37
  br label %223

47:                                               ; preds = %37
  store i32 0, ptr %11, align 4, !tbaa !9
  %48 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %48, ptr %12, align 4, !tbaa !9
  store i32 213108, ptr %13, align 4, !tbaa !9
  store i32 213156, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = load i32, ptr %14, align 4, !tbaa !9
  %53 = load i32, ptr %15, align 4, !tbaa !9
  %54 = call i32 @w2c_hermes_0x5F_dynamic_cast(ptr noundef %49, i32 noundef %50, i32 noundef %51, i32 noundef %52, i32 noundef %53)
  store i32 %54, ptr %12, align 4, !tbaa !9
  %55 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %55, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = icmp ne i32 %56, 0
  %58 = xor i1 %57, true
  %59 = zext i1 %58 to i32
  store i32 %59, ptr %12, align 4, !tbaa !9
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %47
  br label %223

63:                                               ; preds = %47
  %64 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %64, ptr %11, align 4, !tbaa !9
  store i32 12, ptr %12, align 4, !tbaa !9
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = load i32, ptr %11, align 4, !tbaa !9
  %67 = add i32 %66, %65
  store i32 %67, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  store i32 52, ptr %13, align 4, !tbaa !9
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = load i32, ptr %11, align 4, !tbaa !9
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = call i32 @w2c_hermes_0x5F_memset(ptr noundef %68, i32 noundef %69, i32 noundef %70, i32 noundef %71)
  store i32 %72, ptr %11, align 4, !tbaa !9
  %73 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %73, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.w2c_hermes, ptr %74, i32 0, i32 6
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = add i64 %77, 56
  %79 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %75, i64 noundef %78, i32 noundef %79)
  %80 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %80, ptr %11, align 4, !tbaa !9
  store i32 -1, ptr %12, align 4, !tbaa !9
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.w2c_hermes, ptr %81, i32 0, i32 6
  %83 = load i32, ptr %11, align 4, !tbaa !9
  %84 = zext i32 %83 to i64
  %85 = add i64 %84, 20
  %86 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %82, i64 noundef %85, i32 noundef %86)
  %87 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %87, ptr %11, align 4, !tbaa !9
  %88 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %88, ptr %12, align 4, !tbaa !9
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.w2c_hermes, ptr %89, i32 0, i32 6
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = zext i32 %91 to i64
  %93 = add i64 %92, 16
  %94 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %90, i64 noundef %93, i32 noundef %94)
  %95 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %95, ptr %11, align 4, !tbaa !9
  %96 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %96, ptr %12, 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, 8
  %102 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %98, i64 noundef %101, i32 noundef %102)
  %103 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %103, ptr %11, align 4, !tbaa !9
  %104 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %104, ptr %12, align 4, !tbaa !9
  store i32 8, ptr %13, align 4, !tbaa !9
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = add i32 %106, %105
  store i32 %107, ptr %12, align 4, !tbaa !9
  %108 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %108, ptr %13, align 4, !tbaa !9
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.w2c_hermes, ptr %109, i32 0, i32 6
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = zext i32 %111 to i64
  %113 = call i32 @i32_load(ptr noundef %110, i64 noundef %112)
  store i32 %113, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %114 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %114, ptr %15, align 4, !tbaa !9
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.w2c_hermes, ptr %115, i32 0, i32 6
  %117 = load i32, ptr %15, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = call i32 @i32_load(ptr noundef %116, i64 noundef %118)
  store i32 %119, ptr %15, align 4, !tbaa !9
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.w2c_hermes, ptr %120, i32 0, i32 6
  %122 = load i32, ptr %15, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = add i64 %123, 28
  %125 = call i32 @i32_load(ptr noundef %121, i64 noundef %124)
  store i32 %125, ptr %15, align 4, !tbaa !9
  %126 = load i32, ptr %15, align 4, !tbaa !9
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.w2c_hermes, ptr %127, i32 0, i32 7
  %129 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %128, i32 0, i32 2
  %130 = load i32, ptr %129, align 4, !tbaa !17
  %131 = icmp ult i32 %126, %130
  br i1 %131, label %132, label %154

132:                                              ; preds = %63
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.w2c_hermes, ptr %133, i32 0, i32 7
  %135 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !18
  %137 = load i32, ptr %15, align 4, !tbaa !9
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %139, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !19
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %154

143:                                              ; preds = %132
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.w2c_hermes, ptr %144, i32 0, i32 7
  %146 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %145, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !18
  %148 = load i32, ptr %15, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %147, i64 %149
  %151 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %150, i32 0, i32 0
  %152 = load ptr, ptr %151, align 8, !tbaa !21
  %153 = call zeroext i1 @func_types_eq(ptr noundef @.str.4, ptr noundef %152)
  br label %154

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

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

163:                                              ; No predecessors!
  br label %164

164:                                              ; preds = %163, %154
  %165 = phi i1 [ true, %154 ], [ false, %163 ]
  %166 = zext i1 %165 to i32
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.w2c_hermes, ptr %167, i32 0, i32 7
  %169 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !18
  %171 = load i32, ptr %15, align 4, !tbaa !9
  %172 = zext i32 %171 to i64
  %173 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %170, i64 %172
  %174 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %173, i32 0, i32 1
  %175 = load ptr, ptr %174, align 8, !tbaa !19
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.w2c_hermes, ptr %176, i32 0, i32 7
  %178 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %177, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8, !tbaa !18
  %180 = load i32, ptr %15, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %179, i64 %181
  %183 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %182, i32 0, i32 2
  %184 = load ptr, ptr %183, align 8, !tbaa !22
  %185 = load i32, ptr %11, align 4, !tbaa !9
  %186 = load i32, ptr %12, align 4, !tbaa !9
  %187 = load i32, ptr %13, align 4, !tbaa !9
  %188 = load i32, ptr %14, align 4, !tbaa !9
  call void %175(ptr noundef %184, i32 noundef %185, i32 noundef %186, i32 noundef %187, i32 noundef %188)
  %189 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %189, ptr %11, align 4, !tbaa !9
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.w2c_hermes, ptr %190, i32 0, i32 6
  %192 = load i32, ptr %11, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = add i64 %193, 32
  %195 = call i32 @i32_load(ptr noundef %191, i64 noundef %194)
  store i32 %195, ptr %11, align 4, !tbaa !9
  %196 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %196, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  %197 = load i32, ptr %11, align 4, !tbaa !9
  %198 = load i32, ptr %12, align 4, !tbaa !9
  %199 = icmp eq i32 %197, %198
  %200 = zext i1 %199 to i32
  store i32 %200, ptr %11, align 4, !tbaa !9
  %201 = load i32, ptr %11, align 4, !tbaa !9
  %202 = icmp ne i32 %201, 0
  br i1 %202, label %203, label %217

203:                                              ; preds = %164
  %204 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %204, ptr %11, align 4, !tbaa !9
  %205 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %205, ptr %12, align 4, !tbaa !9
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.w2c_hermes, ptr %206, i32 0, i32 6
  %208 = load i32, ptr %12, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = add i64 %209, 24
  %211 = call i32 @i32_load(ptr noundef %207, i64 noundef %210)
  store i32 %211, ptr %12, align 4, !tbaa !9
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.w2c_hermes, ptr %212, i32 0, i32 6
  %214 = load i32, ptr %11, align 4, !tbaa !9
  %215 = zext i32 %214 to i64
  %216 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %213, i64 noundef %215, i32 noundef %216)
  br label %217

217:                                              ; preds = %203, %164
  %218 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %218, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  %219 = load i32, ptr %11, align 4, !tbaa !9
  %220 = load i32, ptr %12, align 4, !tbaa !9
  %221 = icmp eq i32 %219, %220
  %222 = zext i1 %221 to i32
  store i32 %222, ptr %11, align 4, !tbaa !9
  br label %223

223:                                              ; preds = %217, %62, %46, %36
  %224 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %224, ptr %10, align 4, !tbaa !9
  %225 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %225, ptr %11, align 4, !tbaa !9
  store i32 -64, ptr %12, align 4, !tbaa !9
  %226 = load i32, ptr %12, align 4, !tbaa !9
  %227 = load i32, ptr %11, align 4, !tbaa !9
  %228 = sub i32 %227, %226
  store i32 %228, ptr %11, align 4, !tbaa !9
  %229 = load i32, ptr %11, align 4, !tbaa !9
  %230 = load ptr, ptr %5, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.w2c_hermes, ptr %230, i32 0, i32 3
  store i32 %229, ptr %231, align 8, !tbaa !11
  %232 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %232, ptr %11, align 4, !tbaa !9
  %233 = load i32, ptr %11, align 4, !tbaa !9
  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 i32 %233
}

; 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: 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 i32 @w2c_hermes_0x5F_memset(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #0

declare i32 @w2c_hermes_is_equal0x28std0x3A0x3Atype_info0x20const0x2A0x2C0x20std0x3A0x3Atype_info0x20const0x2A0x2C0x20bool0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_0x5F_dynamic_cast(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 = { "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}


; 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.4 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @w2c_hermes_0x5F_cxxabiv10x3A0x3A_0x5Fclass_type_info0x3A0x3Acan_catch0x28_0x5Fcxxabiv10x3A0x3A_0x5Fshim_type_info0x20const0x2A0x2C0x20void0x2A0x260x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = add i32 %6, -64
  store i32 %7, ptr %5, align 8, !tbaa !5
  %8 = tail call i32 @w2c_hermes_is_equal0x28std0x3A0x3Atype_info0x20const0x2A0x2C0x20std0x3A0x3Atype_info0x20const0x2A0x2C0x20bool0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef 0) #4
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %55

9:                                                ; preds = %4
  %.not103 = icmp eq i32 %2, 0
  br i1 %.not103, label %55, label %10

10:                                               ; preds = %9
  %11 = tail call i32 @w2c_hermes_0x5F_dynamic_cast(ptr noundef nonnull %0, i32 noundef %2, i32 noundef 213108, i32 noundef 213156, i32 noundef 0)
  %.not104 = icmp eq i32 %11, 0
  br i1 %.not104, label %55, label %12

12:                                               ; preds = %10
  %13 = add i32 %6, -52
  %14 = tail call i32 @w2c_hermes_0x5F_memset(ptr noundef nonnull %0, i32 noundef %13, i32 noundef 0, i32 noundef 52)
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  %16 = zext i32 %7 to i64
  %17 = add nuw nsw i64 %16, 56
  tail call void @i32_store(ptr noundef nonnull %15, i64 noundef %17, i32 noundef 1)
  %18 = add nuw nsw i64 %16, 20
  tail call void @i32_store(ptr noundef nonnull %15, i64 noundef %18, i32 noundef -1)
  %19 = add nuw nsw i64 %16, 16
  tail call void @i32_store(ptr noundef nonnull %15, i64 noundef %19, i32 noundef %1)
  %20 = add nuw nsw i64 %16, 8
  tail call void @i32_store(ptr noundef nonnull %15, i64 noundef %20, i32 noundef %11)
  %21 = add i32 %6, -56
  %22 = zext i32 %3 to i64
  %23 = tail call i32 @i32_load(ptr noundef nonnull %15, i64 noundef %22)
  %24 = zext i32 %11 to i64
  %25 = tail call i32 @i32_load(ptr noundef nonnull %15, i64 noundef %24)
  %26 = zext i32 %25 to i64
  %27 = add nuw nsw i64 %26, 28
  %28 = tail call i32 @i32_load(ptr noundef nonnull %15, i64 noundef %27)
  %29 = getelementptr inbounds i8, ptr %0, i64 80
  %30 = getelementptr inbounds i8, ptr %0, i64 92
  %31 = load i32, ptr %30, align 4, !tbaa !15
  %32 = icmp ult i32 %28, %31
  br i1 %32, label %33, label %.critedge, !prof !16

33:                                               ; preds = %12
  %34 = load ptr, ptr %29, align 8, !tbaa !17
  %35 = zext i32 %28 to i64
  %36 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %34, i64 %35
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %.not105 = icmp eq ptr %38, null
  br i1 %.not105, label %.critedge, label %39, !prof !20

39:                                               ; preds = %33
  %40 = load ptr, ptr %36, align 8, !tbaa !21
  %41 = tail call zeroext i1 @func_types_eq(ptr noundef nonnull @.str.4, ptr noundef %40)
  br i1 %41, label %42, label %.critedge, !prof !16

.critedge:                                        ; preds = %33, %12, %39
  tail call void @wasm_rt_trap(i32 noundef 6) #5
  unreachable

42:                                               ; preds = %39
  %43 = load ptr, ptr %29, align 8, !tbaa !17
  %44 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %43, i64 %35
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  %47 = getelementptr inbounds i8, ptr %44, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !22
  tail call void %46(ptr noundef %48, i32 noundef %11, i32 noundef %21, i32 noundef %23, i32 noundef 1) #4
  %49 = add nuw nsw i64 %16, 32
  %50 = tail call i32 @i32_load(ptr noundef nonnull %15, i64 noundef %49)
  %51 = icmp eq i32 %50, 1
  br i1 %51, label %52, label %55

52:                                               ; preds = %42
  %53 = add nuw nsw i64 %16, 24
  %54 = tail call i32 @i32_load(ptr noundef nonnull %15, i64 noundef %53)
  tail call void @i32_store(ptr noundef nonnull %15, i64 noundef %22, i32 noundef %54)
  br label %55

55:                                               ; preds = %42, %52, %10, %9, %4
  %.0 = phi i32 [ 1, %4 ], [ 0, %9 ], [ 0, %10 ], [ 1, %52 ], [ 0, %42 ]
  store i32 %6, ptr %5, align 8, !tbaa !5
  ret i32 %.0
}

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

declare i32 @w2c_hermes_is_equal0x28std0x3A0x3Atype_info0x20const0x2A0x2C0x20std0x3A0x3Atype_info0x20const0x2A0x2C0x20bool0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_0x5F_dynamic_cast(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 = { "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 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