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

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

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

@w2c_hermes_t3 = external constant ptr, align 8

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

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

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

; 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 @i32_store8(ptr noundef, i64 noundef, i32 noundef) #1

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

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

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

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

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

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

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

81:                                               ; preds = %4
  %82 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %82, ptr %10, align 4, !tbaa !9
  %83 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %83, ptr %11, align 4, !tbaa !9
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.w2c_hermes, ptr %84, i32 0, i32 6
  %86 = load i32, ptr %11, align 4, !tbaa !9
  %87 = zext i32 %86 to i64
  %88 = call i32 @i32_load(ptr noundef %85, i64 noundef %87)
  store i32 %88, ptr %11, 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, 40
  %94 = call i32 @i32_load(ptr noundef %90, i64 noundef %93)
  store i32 %94, ptr %11, align 4, !tbaa !9
  %95 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %95, ptr %6, align 4, !tbaa !9
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.w2c_hermes, ptr %96, i32 0, i32 6
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = add i64 %99, 128
  %101 = call i32 @i32_load(ptr noundef %97, i64 noundef %100)
  store i32 %101, ptr %11, align 4, !tbaa !9
  %102 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %102, ptr %7, align 4, !tbaa !9
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %107

105:                                              ; preds = %81
  %106 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %106, ptr %11, align 4, !tbaa !9
  br label %188

107:                                              ; preds = %81
  %108 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %108, ptr %11, align 4, !tbaa !9
  %109 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %109, ptr %12, align 4, !tbaa !9
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.w2c_hermes, ptr %110, i32 0, i32 6
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = call i32 @i32_load(ptr noundef %111, i64 noundef %113)
  store i32 %114, ptr %12, 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 %12, 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 %12, align 4, !tbaa !9
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.w2c_hermes, ptr %121, i32 0, i32 7
  %123 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %122, i32 0, i32 2
  %124 = load i32, ptr %123, align 4, !tbaa !18
  %125 = icmp ult i32 %120, %124
  br i1 %125, label %126, label %149

126:                                              ; preds = %107
  %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 0
  %130 = load ptr, ptr %129, align 8, !tbaa !19
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %130, i64 %132
  %134 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %133, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !20
  %136 = icmp ne ptr %135, null
  br i1 %136, label %137, label %149

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

149:                                              ; preds = %137, %126, %107
  %150 = phi i1 [ false, %126 ], [ false, %107 ], [ %148, %137 ]
  %151 = xor i1 %150, true
  %152 = xor i1 %151, true
  %153 = zext i1 %152 to i32
  %154 = sext i32 %153 to i64
  %155 = call i64 @llvm.expect.i64(i64 %154, i64 1)
  %156 = icmp ne i64 %155, 0
  br i1 %156, label %159, label %157

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

158:                                              ; No predecessors!
  br label %159

159:                                              ; preds = %158, %149
  %160 = phi i1 [ true, %149 ], [ false, %158 ]
  %161 = zext i1 %160 to i32
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.w2c_hermes, ptr %162, i32 0, i32 7
  %164 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !19
  %166 = load i32, ptr %12, align 4, !tbaa !9
  %167 = zext i32 %166 to i64
  %168 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %165, i64 %167
  %169 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %168, i32 0, i32 1
  %170 = load ptr, ptr %169, align 8, !tbaa !20
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.w2c_hermes, ptr %171, i32 0, i32 7
  %173 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %172, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !19
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = zext i32 %175 to i64
  %177 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %174, i64 %176
  %178 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %177, i32 0, i32 2
  %179 = load ptr, ptr %178, align 8, !tbaa !23
  %180 = load i32, ptr %11, align 4, !tbaa !9
  call void %170(ptr noundef %179, i32 noundef %180)
  %181 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %181, ptr %11, align 4, !tbaa !9
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.w2c_hermes, ptr %182, i32 0, i32 6
  %184 = load i32, ptr %11, align 4, !tbaa !9
  %185 = zext i32 %184 to i64
  %186 = add i64 %185, 128
  %187 = call i32 @i32_load(ptr noundef %183, i64 noundef %186)
  store i32 %187, ptr %11, align 4, !tbaa !9
  br label %188

188:                                              ; preds = %159, %105
  %189 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %189, ptr %12, 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 %12, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = add i64 %193, 8
  %195 = call i32 @i32_load(ptr noundef %191, i64 noundef %194)
  store i32 %195, ptr %12, align 4, !tbaa !9
  %196 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %196, ptr %13, align 4, !tbaa !9
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  %198 = load i32, ptr %10, align 4, !tbaa !9
  %199 = load i32, ptr %11, align 4, !tbaa !9
  %200 = load i32, ptr %12, align 4, !tbaa !9
  %201 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ADebugInfo0x3A0x3AgetLocationForAddress0x28unsigned0x20int0x2C0x20unsigned0x20int0x290x20const(ptr noundef %197, i32 noundef %198, i32 noundef %199, i32 noundef %200, i32 noundef %201)
  br label %202

202:                                              ; preds = %188, %46
  %203 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %203, ptr %10, align 4, !tbaa !9
  store i32 16, ptr %11, align 4, !tbaa !9
  %204 = load i32, ptr %11, align 4, !tbaa !9
  %205 = load i32, ptr %10, align 4, !tbaa !9
  %206 = add i32 %205, %204
  store i32 %206, ptr %10, align 4, !tbaa !9
  %207 = load i32, ptr %10, align 4, !tbaa !9
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.w2c_hermes, ptr %208, i32 0, i32 3
  store i32 %207, ptr %209, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret void
}

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

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 = { 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 #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 = !{!14, !14, i64 0}
!18 = !{!12, !10, i64 92}
!19 = !{!12, !6, i64 80}
!20 = !{!21, !6, i64 8}
!21 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!21, !6, i64 0}
!23 = !{!21, !6, i64 16}


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

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

@w2c_hermes_t3 = external local_unnamed_addr constant ptr, align 8

; 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 @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: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #1

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

; 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 void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ACodeBlock0x3A0x3AgetDebugSourceLocationsOffset0x280x290x20const(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

57:                                               ; preds = %54, %13
  store i32 %6, ptr %5, align 8, !tbaa !5
  ret void
}

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

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

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

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


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