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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.w2c_hermes = type { ptr, ptr, ptr, i32, i32, i32, %struct.wasm_rt_memory_t, %struct.wasm_rt_funcref_table_t }
%struct.wasm_rt_memory_t = type { ptr, i64, i64, i64, i8 }
%struct.wasm_rt_funcref_table_t = type { ptr, i32, i32 }
%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@w2c_hermes_t0 = external constant ptr, align 8
@w2c_hermes_t5 = external constant ptr, align 8

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Ffunction0x3A0x3A_0x5Ffunc0x3Cstd0x3A0x3A_0x5F20x3A0x3Afunction0x3Cbool0x200x28hermes0x3A0x3AFunction0x20const0x2A0x290x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cstd0x3A0x3A_0x5F20x3A0x3Afunction0x3Cbool0x200x28hermes0x3A0x3AFunction0x20const0x2A0x290x3E0x3E0x2C0x20bool0x200x28hermes0x3A0x3AFunction0x2A0x290x3E0x3A0x3A_0x5Fclone0x280x290x20const(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 32, ptr %7, align 4, !tbaa !9
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = load i32, ptr %7, align 4, !tbaa !9
  %12 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %10, i32 noundef %11)
  store i32 %12, ptr %7, align 4, !tbaa !9
  %13 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %13, ptr %5, align 4, !tbaa !9
  store i32 113460, ptr %8, align 4, !tbaa !9
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.w2c_hermes, ptr %14, i32 0, i32 6
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = zext i32 %16 to i64
  %18 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %15, i64 noundef %17, i32 noundef %18)
  %19 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %19, ptr %7, align 4, !tbaa !9
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.w2c_hermes, ptr %20, i32 0, i32 6
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = zext i32 %22 to i64
  %24 = add i64 %23, 24
  %25 = call i32 @i32_load(ptr noundef %21, i64 noundef %24)
  store i32 %25, ptr %7, align 4, !tbaa !9
  %26 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %26, ptr %6, align 4, !tbaa !9
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = icmp ne i32 %27, 0
  %29 = xor i1 %28, true
  %30 = zext i1 %29 to i32
  store i32 %30, ptr %7, align 4, !tbaa !9
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %42

33:                                               ; preds = %2
  %34 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %34, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.w2c_hermes, ptr %35, i32 0, i32 6
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = add i64 %38, 24
  %40 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %36, i64 noundef %39, i32 noundef %40)
  %41 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %41, ptr %7, align 4, !tbaa !9
  br label %228

42:                                               ; preds = %2
  %43 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %43, ptr %7, align 4, !tbaa !9
  store i32 8, ptr %8, align 4, !tbaa !9
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = add i32 %45, %44
  store i32 %46, ptr %7, align 4, !tbaa !9
  %47 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %47, ptr %8, align 4, !tbaa !9
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = icmp eq i32 %48, %49
  %51 = zext i1 %50 to i32
  store i32 %51, ptr %7, align 4, !tbaa !9
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %144

54:                                               ; preds = %42
  %55 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %55, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %56, ptr %8, align 4, !tbaa !9
  store i32 8, ptr %9, align 4, !tbaa !9
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = add i32 %58, %57
  store i32 %59, ptr %8, align 4, !tbaa !9
  %60 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %60, ptr %4, align 4, !tbaa !9
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.w2c_hermes, ptr %61, i32 0, i32 6
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = add i64 %64, 24
  %66 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %62, i64 noundef %65, i32 noundef %66)
  %67 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %67, ptr %7, align 4, !tbaa !9
  %68 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %68, ptr %8, align 4, !tbaa !9
  %69 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %69, ptr %9, align 4, !tbaa !9
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.w2c_hermes, ptr %70, i32 0, i32 6
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = call i32 @i32_load(ptr noundef %71, i64 noundef %73)
  store i32 %74, ptr %9, align 4, !tbaa !9
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.w2c_hermes, ptr %75, i32 0, i32 6
  %77 = load i32, ptr %9, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = add i64 %78, 12
  %80 = call i32 @i32_load(ptr noundef %76, i64 noundef %79)
  store i32 %80, ptr %9, align 4, !tbaa !9
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.w2c_hermes, ptr %82, i32 0, i32 7
  %84 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %84, align 4, !tbaa !11
  %86 = icmp ult i32 %81, %85
  br i1 %86, label %87, label %110

87:                                               ; preds = %54
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.w2c_hermes, ptr %88, i32 0, i32 7
  %90 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !17
  %92 = load i32, ptr %9, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %91, i64 %93
  %95 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !18
  %97 = icmp ne ptr %96, null
  br i1 %97, label %98, label %110

98:                                               ; preds = %87
  %99 = load ptr, ptr @w2c_hermes_t0, align 8, !tbaa !5
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.w2c_hermes, ptr %100, i32 0, i32 7
  %102 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %103, i64 %105
  %107 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !20
  %109 = call zeroext i1 @func_types_eq(ptr noundef %99, ptr noundef %108)
  br label %110

110:                                              ; preds = %98, %87, %54
  %111 = phi i1 [ false, %87 ], [ false, %54 ], [ %109, %98 ]
  %112 = xor i1 %111, true
  %113 = xor i1 %112, true
  %114 = zext i1 %113 to i32
  %115 = sext i32 %114 to i64
  %116 = call i64 @llvm.expect.i64(i64 %115, i64 1)
  %117 = icmp ne i64 %116, 0
  br i1 %117, label %120, label %118

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

119:                                              ; No predecessors!
  br label %120

120:                                              ; preds = %119, %110
  %121 = phi i1 [ true, %110 ], [ false, %119 ]
  %122 = zext i1 %121 to i32
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.w2c_hermes, ptr %123, i32 0, i32 7
  %125 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !17
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %126, i64 %128
  %130 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %129, i32 0, i32 1
  %131 = load ptr, ptr %130, align 8, !tbaa !18
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.w2c_hermes, ptr %132, i32 0, i32 7
  %134 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %133, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !17
  %136 = load i32, ptr %9, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %135, i64 %137
  %139 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %138, i32 0, i32 2
  %140 = load ptr, ptr %139, align 8, !tbaa !21
  %141 = load i32, ptr %7, align 4, !tbaa !9
  %142 = load i32, ptr %8, align 4, !tbaa !9
  call void %131(ptr noundef %140, i32 noundef %141, i32 noundef %142)
  %143 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %143, ptr %7, align 4, !tbaa !9
  br label %228

144:                                              ; preds = %42
  %145 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %145, ptr %7, align 4, !tbaa !9
  %146 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %146, ptr %8, align 4, !tbaa !9
  %147 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %147, ptr %9, align 4, !tbaa !9
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.w2c_hermes, ptr %148, i32 0, i32 6
  %150 = load i32, ptr %9, align 4, !tbaa !9
  %151 = zext i32 %150 to i64
  %152 = call i32 @i32_load(ptr noundef %149, i64 noundef %151)
  store i32 %152, ptr %9, align 4, !tbaa !9
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.w2c_hermes, ptr %153, i32 0, i32 6
  %155 = load i32, ptr %9, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = add i64 %156, 8
  %158 = call i32 @i32_load(ptr noundef %154, i64 noundef %157)
  store i32 %158, ptr %9, align 4, !tbaa !9
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.w2c_hermes, ptr %160, i32 0, i32 7
  %162 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %161, i32 0, i32 2
  %163 = load i32, ptr %162, align 4, !tbaa !11
  %164 = icmp ult i32 %159, %163
  br i1 %164, label %165, label %188

165:                                              ; preds = %144
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.w2c_hermes, ptr %166, i32 0, i32 7
  %168 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %167, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8, !tbaa !17
  %170 = load i32, ptr %9, align 4, !tbaa !9
  %171 = zext i32 %170 to i64
  %172 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %169, i64 %171
  %173 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %172, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !18
  %175 = icmp ne ptr %174, null
  br i1 %175, label %176, label %188

176:                                              ; preds = %165
  %177 = load ptr, ptr @w2c_hermes_t5, align 8, !tbaa !5
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.w2c_hermes, ptr %178, i32 0, i32 7
  %180 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %179, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !17
  %182 = load i32, ptr %9, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %181, i64 %183
  %185 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %184, i32 0, i32 0
  %186 = load ptr, ptr %185, align 8, !tbaa !20
  %187 = call zeroext i1 @func_types_eq(ptr noundef %177, ptr noundef %186)
  br label %188

188:                                              ; preds = %176, %165, %144
  %189 = phi i1 [ false, %165 ], [ false, %144 ], [ %187, %176 ]
  %190 = xor i1 %189, true
  %191 = xor i1 %190, true
  %192 = zext i1 %191 to i32
  %193 = sext i32 %192 to i64
  %194 = call i64 @llvm.expect.i64(i64 %193, i64 1)
  %195 = icmp ne i64 %194, 0
  br i1 %195, label %198, label %196

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

197:                                              ; No predecessors!
  br label %198

198:                                              ; preds = %197, %188
  %199 = phi i1 [ true, %188 ], [ false, %197 ]
  %200 = zext i1 %199 to i32
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.w2c_hermes, ptr %201, i32 0, i32 7
  %203 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %202, i32 0, i32 0
  %204 = load ptr, ptr %203, align 8, !tbaa !17
  %205 = load i32, ptr %9, align 4, !tbaa !9
  %206 = zext i32 %205 to i64
  %207 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %204, i64 %206
  %208 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %207, i32 0, i32 1
  %209 = load ptr, ptr %208, align 8, !tbaa !18
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.w2c_hermes, ptr %210, i32 0, i32 7
  %212 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %211, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8, !tbaa !17
  %214 = load i32, ptr %9, align 4, !tbaa !9
  %215 = zext i32 %214 to i64
  %216 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %213, i64 %215
  %217 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %216, i32 0, i32 2
  %218 = load ptr, ptr %217, align 8, !tbaa !21
  %219 = load i32, ptr %8, align 4, !tbaa !9
  %220 = call i32 %209(ptr noundef %218, i32 noundef %219)
  store i32 %220, ptr %8, align 4, !tbaa !9
  %221 = load ptr, ptr %3, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.w2c_hermes, ptr %221, i32 0, i32 6
  %223 = load i32, ptr %7, align 4, !tbaa !9
  %224 = zext i32 %223 to i64
  %225 = add i64 %224, 24
  %226 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %222, i64 noundef %225, i32 noundef %226)
  %227 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %227, ptr %7, align 4, !tbaa !9
  br label %228

228:                                              ; preds = %198, %120, %33
  %229 = load i32, ptr %7, align 4, !tbaa !9
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i32 %229
}

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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #4 = { 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 #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 92}
!12 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !13, i64 40, !16, i64 80}
!13 = !{!"", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !15, i64 32}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!17 = !{!12, !6, i64 80}
!18 = !{!19, !6, i64 8}
!19 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!19, !6, i64 0}
!21 = !{!19, !6, i64 16}


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

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

@w2c_hermes_t0 = external local_unnamed_addr constant ptr, align 8
@w2c_hermes_t5 = external local_unnamed_addr constant ptr, align 8

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Ffunction0x3A0x3A_0x5Ffunc0x3Cstd0x3A0x3A_0x5F20x3A0x3Afunction0x3Cbool0x200x28hermes0x3A0x3AFunction0x20const0x2A0x290x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cstd0x3A0x3A_0x5F20x3A0x3Afunction0x3Cbool0x200x28hermes0x3A0x3AFunction0x20const0x2A0x290x3E0x3E0x2C0x20bool0x200x28hermes0x3A0x3AFunction0x2A0x290x3E0x3A0x3A_0x5Fclone0x280x290x20const(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef 32)
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %3 to i64
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %5, i32 noundef 113460)
  %6 = zext i32 %1 to i64
  %7 = add nuw nsw i64 %6, 24
  %8 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %7)
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %11

9:                                                ; preds = %2
  %10 = add nuw nsw i64 %5, 24
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %10, i32 noundef 0)
  br label %72

11:                                               ; preds = %2
  %12 = add i32 %1, 8
  %13 = icmp eq i32 %12, %8
  br i1 %13, label %14, label %43

14:                                               ; preds = %11
  %15 = add i32 %3, 8
  %16 = add nuw nsw i64 %5, 24
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %16, i32 noundef %15)
  %17 = zext i32 %8 to i64
  %18 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %17)
  %19 = zext i32 %18 to i64
  %20 = add nuw nsw i64 %19, 12
  %21 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %20)
  %22 = getelementptr inbounds i8, ptr %0, i64 80
  %23 = getelementptr inbounds i8, ptr %0, i64 92
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = icmp ult i32 %21, %24
  br i1 %25, label %26, label %.critedge, !prof !15

26:                                               ; preds = %14
  %27 = load ptr, ptr %22, align 8, !tbaa !16
  %28 = zext i32 %21 to i64
  %29 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %27, i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %.not77 = icmp eq ptr %31, null
  br i1 %.not77, label %.critedge, label %32, !prof !19

32:                                               ; preds = %26
  %33 = load ptr, ptr @w2c_hermes_t0, align 8, !tbaa !20
  %34 = load ptr, ptr %29, align 8, !tbaa !21
  %35 = tail call zeroext i1 @func_types_eq(ptr noundef %33, ptr noundef %34)
  br i1 %35, label %36, label %.critedge, !prof !15

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

36:                                               ; preds = %32
  %37 = load ptr, ptr %22, align 8, !tbaa !16
  %38 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %37, i64 %28
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = getelementptr inbounds i8, ptr %38, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !22
  tail call void %40(ptr noundef %42, i32 noundef %8, i32 noundef %15) #4
  br label %72

43:                                               ; preds = %11
  %44 = zext i32 %8 to i64
  %45 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %44)
  %46 = zext i32 %45 to i64
  %47 = add nuw nsw i64 %46, 8
  %48 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %47)
  %49 = getelementptr inbounds i8, ptr %0, i64 80
  %50 = getelementptr inbounds i8, ptr %0, i64 92
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = icmp ult i32 %48, %51
  br i1 %52, label %53, label %.critedge79, !prof !15

53:                                               ; preds = %43
  %54 = load ptr, ptr %49, align 8, !tbaa !16
  %55 = zext i32 %48 to i64
  %56 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %54, i64 %55
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %.not76 = icmp eq ptr %58, null
  br i1 %.not76, label %.critedge79, label %59, !prof !19

59:                                               ; preds = %53
  %60 = load ptr, ptr @w2c_hermes_t5, align 8, !tbaa !20
  %61 = load ptr, ptr %56, align 8, !tbaa !21
  %62 = tail call zeroext i1 @func_types_eq(ptr noundef %60, ptr noundef %61)
  br i1 %62, label %63, label %.critedge79, !prof !15

.critedge79:                                      ; preds = %53, %43, %59
  tail call void @wasm_rt_trap(i32 noundef 6) #3
  unreachable

63:                                               ; preds = %59
  %64 = load ptr, ptr %49, align 8, !tbaa !16
  %65 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %64, i64 %55
  %66 = getelementptr inbounds i8, ptr %65, i64 8
  %67 = load ptr, ptr %66, align 8, !tbaa !17
  %68 = getelementptr inbounds i8, ptr %65, i64 16
  %69 = load ptr, ptr %68, align 8, !tbaa !22
  %70 = tail call i32 %67(ptr noundef %69, i32 noundef %8) #4
  %71 = add nuw nsw i64 %5, 24
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %71, i32 noundef %70)
  br label %72

72:                                               ; preds = %63, %36, %9
  ret i32 %3
}

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 = { 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 = { 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 92}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!16 = !{!6, !7, i64 80}
!17 = !{!18, !7, i64 8}
!18 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!20 = !{!7, !7, i64 0}
!21 = !{!18, !7, i64 0}
!22 = !{!18, !7, i64 16}


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