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

; 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_t5 = 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 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) #2

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

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ABCProviderBase0x3A0x3AgetVirtualOffsetForFunction0x28unsigned0x20int0x290x20const(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
  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
  %15 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %15, ptr %10, align 4, !tbaa !9
  %16 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %16, ptr %11, align 4, !tbaa !9
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.w2c_hermes, ptr %17, i32 0, i32 6
  %19 = load i32, ptr %11, align 4, !tbaa !9
  %20 = zext i32 %19 to i64
  %21 = add i64 %20, 8
  %22 = call i32 @i32_load(ptr noundef %18, i64 noundef %21)
  store i32 %22, ptr %11, align 4, !tbaa !9
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = load i32, ptr %11, align 4, !tbaa !9
  %25 = icmp ult i32 %23, %24
  %26 = zext i1 %25 to i32
  store i32 %26, ptr %10, align 4, !tbaa !9
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %163

29:                                               ; preds = %3
  %30 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %30, ptr %10, align 4, !tbaa !9
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = icmp ne i32 %31, 0
  %33 = xor i1 %32, true
  %34 = zext i1 %33 to i32
  store i32 %34, ptr %10, align 4, !tbaa !9
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %29
  br label %180

38:                                               ; preds = %29
  br label %39

39:                                               ; preds = %161, %38
  %40 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %40, ptr %10, align 4, !tbaa !9
  %41 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %41, ptr %11, align 4, !tbaa !9
  %42 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %42, ptr %12, align 4, !tbaa !9
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.w2c_hermes, ptr %43, i32 0, i32 6
  %45 = load i32, ptr %12, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = call i32 @i32_load(ptr noundef %44, i64 noundef %46)
  store i32 %47, ptr %12, align 4, !tbaa !9
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.w2c_hermes, ptr %48, i32 0, i32 6
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = zext i32 %50 to i64
  %52 = add i64 %51, 16
  %53 = call i32 @i32_load(ptr noundef %49, i64 noundef %52)
  store i32 %53, ptr %12, align 4, !tbaa !9
  %54 = load i32, 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 7
  %57 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !11
  %59 = icmp ult i32 %54, %58
  br i1 %59, label %60, label %83

60:                                               ; preds = %39
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.w2c_hermes, ptr %61, i32 0, i32 7
  %63 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !17
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %64, i64 %66
  %68 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %67, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !18
  %70 = icmp ne ptr %69, null
  br i1 %70, label %71, label %83

71:                                               ; preds = %60
  %72 = load ptr, ptr @w2c_hermes_t5, align 8, !tbaa !5
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.w2c_hermes, ptr %73, i32 0, i32 7
  %75 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !17
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %76, i64 %78
  %80 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !20
  %82 = call zeroext i1 @func_types_eq(ptr noundef %72, ptr noundef %81)
  br label %83

83:                                               ; preds = %71, %60, %39
  %84 = phi i1 [ false, %60 ], [ false, %39 ], [ %82, %71 ]
  %85 = xor i1 %84, true
  %86 = xor i1 %85, true
  %87 = zext i1 %86 to i32
  %88 = sext i32 %87 to i64
  %89 = call i64 @llvm.expect.i64(i64 %88, i64 1)
  %90 = icmp ne i64 %89, 0
  br i1 %90, label %93, label %91

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

92:                                               ; No predecessors!
  br label %93

93:                                               ; preds = %92, %83
  %94 = phi i1 [ true, %83 ], [ false, %92 ]
  %95 = zext i1 %94 to i32
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.w2c_hermes, ptr %96, i32 0, i32 7
  %98 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !17
  %100 = load i32, ptr %12, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %99, i64 %101
  %103 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !18
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.w2c_hermes, ptr %105, i32 0, i32 7
  %107 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !17
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %108, i64 %110
  %112 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !21
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = call i32 %104(ptr noundef %113, i32 noundef %114, i32 noundef %115)
  store i32 %116, ptr %10, align 4, !tbaa !9
  %117 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %117, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %11, align 4, !tbaa !9
  %118 = load i32, ptr %11, align 4, !tbaa !9
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = and i32 %119, %118
  store i32 %120, ptr %10, align 4, !tbaa !9
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %131

123:                                              ; preds = %93
  %124 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %124, ptr %10, align 4, !tbaa !9
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.w2c_hermes, ptr %125, i32 0, i32 6
  %127 = load i32, ptr %10, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = add i64 %128, 7
  %130 = call i32 @i32_load(ptr noundef %126, i64 noundef %129)
  store i32 %130, ptr %10, align 4, !tbaa !9
  br label %142

131:                                              ; preds = %93
  %132 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %132, ptr %10, align 4, !tbaa !9
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.w2c_hermes, ptr %133, i32 0, i32 6
  %135 = load i32, ptr %10, align 4, !tbaa !9
  %136 = zext i32 %135 to i64
  %137 = add i64 %136, 4
  %138 = call i32 @i32_load(ptr noundef %134, i64 noundef %137)
  store i32 %138, ptr %10, align 4, !tbaa !9
  store i32 32767, ptr %11, align 4, !tbaa !9
  %139 = load i32, ptr %11, align 4, !tbaa !9
  %140 = load i32, ptr %10, align 4, !tbaa !9
  %141 = and i32 %140, %139
  store i32 %141, ptr %10, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %131, %123
  %143 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %143, ptr %9, align 4, !tbaa !9
  %144 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %144, ptr %11, align 4, !tbaa !9
  %145 = load i32, ptr %11, align 4, !tbaa !9
  %146 = load i32, ptr %10, align 4, !tbaa !9
  %147 = add i32 %146, %145
  store i32 %147, ptr %10, align 4, !tbaa !9
  %148 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %148, ptr %8, align 4, !tbaa !9
  %149 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %149, ptr %10, align 4, !tbaa !9
  %150 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %150, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = load i32, ptr %11, align 4, !tbaa !9
  %153 = add i32 %152, %151
  store i32 %153, ptr %11, align 4, !tbaa !9
  %154 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %154, ptr %7, align 4, !tbaa !9
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = load i32, ptr %11, align 4, !tbaa !9
  %157 = icmp ne i32 %155, %156
  %158 = zext i1 %157 to i32
  store i32 %158, ptr %10, align 4, !tbaa !9
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %162

161:                                              ; preds = %142
  br label %39

162:                                              ; preds = %142
  br label %180

163:                                              ; preds = %3
  store i32 0, ptr %10, align 4, !tbaa !9
  store i32 185630, ptr %11, align 4, !tbaa !9
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = load i32, ptr %10, align 4, !tbaa !9
  %166 = add i32 %165, %164
  store i32 %166, ptr %10, align 4, !tbaa !9
  %167 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %167, ptr %11, align 4, !tbaa !9
  store i32 58178, ptr %12, align 4, !tbaa !9
  %168 = load i32, ptr %12, align 4, !tbaa !9
  %169 = load i32, ptr %11, align 4, !tbaa !9
  %170 = add i32 %169, %168
  store i32 %170, ptr %11, align 4, !tbaa !9
  store i32 344, ptr %12, align 4, !tbaa !9
  %171 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %171, ptr %13, align 4, !tbaa !9
  store i32 65918, ptr %14, align 4, !tbaa !9
  %172 = load i32, ptr %14, align 4, !tbaa !9
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = add i32 %173, %172
  store i32 %174, ptr %13, align 4, !tbaa !9
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = load i32, ptr %10, align 4, !tbaa !9
  %177 = load i32, ptr %11, align 4, !tbaa !9
  %178 = load i32, ptr %12, align 4, !tbaa !9
  %179 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %175, i32 noundef %176, i32 noundef %177, i32 noundef %178, i32 noundef %179)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

180:                                              ; preds = %162, %37
  %181 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %181, ptr %10, align 4, !tbaa !9
  %182 = load i32, ptr %10, align 4, !tbaa !9
  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 %182
}

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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #3 = { 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 #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 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_t5 = 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 zeroext i1 @func_types_eq(ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ABCProviderBase0x3A0x3AgetVirtualOffsetForFunction0x28unsigned0x20int0x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %1 to i64
  %6 = add nuw nsw i64 %5, 8
  %7 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %6)
  %8 = icmp ugt i32 %7, %2
  br i1 %8, label %9, label %49

9:                                                ; preds = %3
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %9
  %10 = getelementptr inbounds i8, ptr %0, i64 80
  %11 = getelementptr inbounds i8, ptr %0, i64 92
  %12 = load ptr, ptr @w2c_hermes_t5, align 8
  br label %13

13:                                               ; preds = %.preheader, %46
  %.068 = phi i32 [ %47, %46 ], [ 0, %.preheader ]
  %.0 = phi i32 [ %48, %46 ], [ 0, %.preheader ]
  %14 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %5)
  %15 = zext i32 %14 to i64
  %16 = add nuw nsw i64 %15, 16
  %17 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %16)
  %18 = load i32, ptr %11, align 4, !tbaa !5
  %19 = icmp ult i32 %17, %18
  br i1 %19, label %20, label %.critedge, !prof !15

20:                                               ; preds = %13
  %21 = load ptr, ptr %10, align 8, !tbaa !16
  %22 = zext i32 %17 to i64
  %23 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %21, i64 %22
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !17
  %.not73 = icmp eq ptr %25, null
  br i1 %.not73, label %.critedge, label %26, !prof !19

26:                                               ; preds = %20
  %27 = load ptr, ptr %23, align 8, !tbaa !20
  %28 = tail call zeroext i1 @func_types_eq(ptr noundef %12, ptr noundef %27)
  br i1 %28, label %29, label %.critedge, !prof !15

.critedge:                                        ; preds = %20, %13, %26
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

29:                                               ; preds = %26
  %30 = load ptr, ptr %10, align 8, !tbaa !16
  %31 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %30, i64 %22
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = getelementptr inbounds i8, ptr %31, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !21
  %36 = tail call i32 %33(ptr noundef %35, i32 noundef %1, i32 noundef %.0) #5
  %37 = and i32 %36, 1
  %.not74 = icmp eq i32 %37, 0
  %38 = zext i32 %36 to i64
  br i1 %.not74, label %42, label %39

39:                                               ; preds = %29
  %40 = add nuw nsw i64 %38, 7
  %41 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %40)
  br label %46

42:                                               ; preds = %29
  %43 = add nuw nsw i64 %38, 4
  %44 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %43)
  %45 = and i32 %44, 32767
  br label %46

46:                                               ; preds = %42, %39
  %.069 = phi i32 [ %41, %39 ], [ %45, %42 ]
  %47 = add i32 %.069, %.068
  %48 = add nuw i32 %.0, 1
  %.not75 = icmp eq i32 %48, %2
  br i1 %.not75, label %.loopexit, label %13

49:                                               ; preds = %3
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 185630, i32 noundef 58178, i32 noundef 344, i32 noundef 65918) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable

.loopexit:                                        ; preds = %46, %9
  %.1 = phi i32 [ 0, %9 ], [ %47, %46 ]
  ret i32 %.1
}

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 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 = !{!18, !7, i64 0}
!21 = !{!18, !7, i64 16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,SROAPass,SimplifyCFGPass,TailCallElimPass