; 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 }

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3ACompactArray0x3A0x3Aset0x28unsigned0x20int0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #3 {
  %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) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %16 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %16, ptr %11, align 4, !tbaa !9
  %17 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %17, ptr %12, align 4, !tbaa !9
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.w2c_hermes, ptr %18, i32 0, i32 6
  %20 = load i32, ptr %12, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = call i32 @i32_load(ptr noundef %19, i64 noundef %21)
  store i32 %22, ptr %12, align 4, !tbaa !9
  %23 = load i32, ptr %11, align 4, !tbaa !9
  %24 = load i32, ptr %12, align 4, !tbaa !9
  %25 = icmp ult i32 %23, %24
  %26 = zext i1 %25 to i32
  store i32 %26, ptr %11, align 4, !tbaa !9
  %27 = load i32, ptr %11, align 4, !tbaa !9
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %137

29:                                               ; preds = %4
  %30 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %30, ptr %11, align 4, !tbaa !9
  store i32 255, ptr %12, align 4, !tbaa !9
  %31 = load i32, ptr %11, align 4, !tbaa !9
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = icmp ugt i32 %31, %32
  %34 = zext i1 %33 to i32
  store i32 %34, ptr %11, align 4, !tbaa !9
  %35 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %35, ptr %9, align 4, !tbaa !9
  %36 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %36, ptr %11, align 4, !tbaa !9
  store i32 65535, ptr %12, align 4, !tbaa !9
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = icmp ugt i32 %37, %38
  %40 = zext i1 %39 to i32
  store i32 %40, ptr %11, align 4, !tbaa !9
  %41 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %41, ptr %10, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %135, %29
  %43 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %43, ptr %11, align 4, !tbaa !9
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.w2c_hermes, ptr %44, i32 0, i32 6
  %46 = load i32, ptr %11, align 4, !tbaa !9
  %47 = zext i32 %46 to i64
  %48 = add i64 %47, 4
  %49 = call i32 @i32_load(ptr noundef %45, i64 noundef %48)
  store i32 %49, ptr %11, align 4, !tbaa !9
  %50 = load i32, ptr %11, align 4, !tbaa !9
  switch i32 %50, label %54 [
    i32 0, label %51
    i32 1, label %52
    i32 2, label %53
  ]

51:                                               ; preds = %42
  br label %55

52:                                               ; preds = %42
  br label %78

53:                                               ; preds = %42
  br label %155

54:                                               ; preds = %42
  br label %105

55:                                               ; preds = %51
  %56 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %56, ptr %11, align 4, !tbaa !9
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %60

59:                                               ; preds = %55
  br label %118

60:                                               ; preds = %55
  %61 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %61, ptr %11, align 4, !tbaa !9
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.w2c_hermes, ptr %62, i32 0, i32 6
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = add i64 %65, 8
  %67 = call i32 @i32_load(ptr noundef %63, i64 noundef %66)
  store i32 %67, ptr %11, align 4, !tbaa !9
  %68 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %68, ptr %12, align 4, !tbaa !9
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = add i32 %70, %69
  store i32 %71, ptr %11, align 4, !tbaa !9
  %72 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %72, ptr %12, align 4, !tbaa !9
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.w2c_hermes, ptr %73, i32 0, i32 6
  %75 = load i32, ptr %11, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %74, i64 noundef %76, i32 noundef %77)
  br label %177

78:                                               ; preds = %52
  %79 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %79, ptr %11, align 4, !tbaa !9
  %80 = load i32, ptr %11, align 4, !tbaa !9
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %83

82:                                               ; preds = %78
  br label %118

83:                                               ; preds = %78
  %84 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %84, ptr %11, align 4, !tbaa !9
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.w2c_hermes, ptr %85, i32 0, i32 6
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = add i64 %88, 8
  %90 = call i32 @i32_load(ptr noundef %86, i64 noundef %89)
  store i32 %90, ptr %11, align 4, !tbaa !9
  %91 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %91, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = and i32 %92, 31
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = shl i32 %94, %93
  store i32 %95, ptr %12, align 4, !tbaa !9
  %96 = load i32, ptr %12, align 4, !tbaa !9
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = add i32 %97, %96
  store i32 %98, ptr %11, align 4, !tbaa !9
  %99 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %99, ptr %12, align 4, !tbaa !9
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.w2c_hermes, ptr %100, i32 0, i32 6
  %102 = load i32, ptr %11, align 4, !tbaa !9
  %103 = zext i32 %102 to i64
  %104 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store16(ptr noundef %101, i64 noundef %103, i32 noundef %104)
  br label %177

105:                                              ; preds = %54
  store i32 0, ptr %11, align 4, !tbaa !9
  %106 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %106, ptr %6, align 4, !tbaa !9
  store i32 99504, ptr %12, align 4, !tbaa !9
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = add i32 %108, %107
  store i32 %109, ptr %11, align 4, !tbaa !9
  %110 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %110, ptr %12, align 4, !tbaa !9
  store i32 76496, ptr %13, align 4, !tbaa !9
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = add i32 %112, %111
  store i32 %113, ptr %12, align 4, !tbaa !9
  store i32 109, ptr %13, align 4, !tbaa !9
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_llvh0x3A0x3Allvm_unreachable_internal0x28char0x20const0x2A0x2C0x20char0x20const0x2A0x2C0x20unsigned0x20int0x29(ptr noundef %114, i32 noundef %115, i32 noundef %116, i32 noundef %117)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

118:                                              ; preds = %82, %59
  %119 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %119, ptr %11, align 4, !tbaa !9
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = load i32, ptr %11, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3ACompactArray0x3A0x3AscaleUp0x280x29(ptr noundef %120, i32 noundef %121)
  %122 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %122, ptr %11, align 4, !tbaa !9
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.w2c_hermes, ptr %123, i32 0, i32 6
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = zext i32 %125 to i64
  %127 = call i32 @i32_load(ptr noundef %124, i64 noundef %126)
  store i32 %127, ptr %11, align 4, !tbaa !9
  %128 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %128, ptr %12, align 4, !tbaa !9
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = icmp ugt i32 %129, %130
  %132 = zext i1 %131 to i32
  store i32 %132, ptr %11, align 4, !tbaa !9
  %133 = load i32, ptr %11, align 4, !tbaa !9
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %136

135:                                              ; preds = %118
  br label %42

136:                                              ; preds = %118
  br label %137

137:                                              ; preds = %136, %4
  store i32 0, ptr %11, align 4, !tbaa !9
  %138 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %138, ptr %6, align 4, !tbaa !9
  store i32 108064, ptr %12, align 4, !tbaa !9
  %139 = load i32, ptr %12, align 4, !tbaa !9
  %140 = load i32, ptr %11, align 4, !tbaa !9
  %141 = add i32 %140, %139
  store i32 %141, ptr %11, align 4, !tbaa !9
  %142 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %142, ptr %12, align 4, !tbaa !9
  store i32 76496, ptr %13, align 4, !tbaa !9
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = add i32 %144, %143
  store i32 %145, ptr %12, align 4, !tbaa !9
  store i32 100, ptr %13, align 4, !tbaa !9
  %146 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %146, ptr %14, align 4, !tbaa !9
  store i32 35618, ptr %15, align 4, !tbaa !9
  %147 = load i32, ptr %15, align 4, !tbaa !9
  %148 = load i32, ptr %14, align 4, !tbaa !9
  %149 = add i32 %148, %147
  store i32 %149, ptr %14, align 4, !tbaa !9
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = load i32, ptr %11, align 4, !tbaa !9
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = load i32, ptr %13, align 4, !tbaa !9
  %154 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %150, i32 noundef %151, i32 noundef %152, i32 noundef %153, i32 noundef %154)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

155:                                              ; preds = %53
  %156 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %156, ptr %11, align 4, !tbaa !9
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.w2c_hermes, ptr %157, i32 0, i32 6
  %159 = load i32, ptr %11, align 4, !tbaa !9
  %160 = zext i32 %159 to i64
  %161 = add i64 %160, 8
  %162 = call i32 @i32_load(ptr noundef %158, i64 noundef %161)
  store i32 %162, ptr %11, align 4, !tbaa !9
  %163 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %163, ptr %12, align 4, !tbaa !9
  store i32 2, ptr %13, align 4, !tbaa !9
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = and i32 %164, 31
  %166 = load i32, ptr %12, align 4, !tbaa !9
  %167 = shl i32 %166, %165
  store i32 %167, 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
  %171 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %171, ptr %12, align 4, !tbaa !9
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.w2c_hermes, ptr %172, i32 0, i32 6
  %174 = load i32, ptr %11, align 4, !tbaa !9
  %175 = zext i32 %174 to i64
  %176 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %173, i64 noundef %175, i32 noundef %176)
  br label %177

177:                                              ; preds = %155, %83, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { "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}


; 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"

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_hermes0x3A0x3ACompactArray0x3A0x3AscaleUp0x280x29(ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

9:                                                ; preds = %4
  %10 = icmp ugt i32 %3, 65535
  %11 = add nuw nsw i64 %6, 4
  br i1 %10, label %.split.us.split.us, label %.split

.split.us.split.us:                               ; preds = %9, %13
  %12 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %11)
  switch i32 %12, label %.split92.us [
    i32 0, label %13
    i32 1, label %13
    i32 2, label %.split94.us
  ]

13:                                               ; preds = %.split.us.split.us, %.split.us.split.us
  tail call void @w2c_hermes_hermes0x3A0x3ACompactArray0x3A0x3AscaleUp0x280x29(ptr noundef %0, i32 noundef %1)
  %14 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %15 = icmp ugt i32 %14, %2
  br i1 %15, label %.split.us.split.us, label %.loopexit

.split:                                           ; preds = %9
  %16 = icmp ugt i32 %3, 255
  br i1 %16, label %.split.split.us, label %.split.split

.split.split.us:                                  ; preds = %.split, %18
  %17 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %11)
  switch i32 %17, label %.split92.us [
    i32 0, label %18
    i32 1, label %.split98.us
    i32 2, label %.split94.us
  ]

18:                                               ; preds = %.split.split.us
  tail call void @w2c_hermes_hermes0x3A0x3ACompactArray0x3A0x3AscaleUp0x280x29(ptr noundef %0, i32 noundef %1)
  %19 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %20 = icmp ugt i32 %19, %2
  br i1 %20, label %.split.split.us, label %.loopexit

.split.split:                                     ; preds = %.split
  %21 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %11)
  switch i32 %21, label %.split92.us [
    i32 0, label %.split96.us
    i32 1, label %.split98.us
    i32 2, label %.split94.us
  ]

.split96.us:                                      ; preds = %.split.split
  %22 = add nuw nsw i64 %6, 8
  %23 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %22)
  %24 = add i32 %23, %2
  %25 = zext i32 %24 to i64
  tail call void @i32_store8(ptr noundef nonnull %5, i64 noundef %25, i32 noundef %3)
  br label %36

.split98.us:                                      ; preds = %.split.split.us, %.split.split
  %26 = add nuw nsw i64 %6, 8
  %27 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %26)
  %28 = shl i32 %2, 1
  %29 = add i32 %27, %28
  %30 = zext i32 %29 to i64
  tail call void @i32_store16(ptr noundef nonnull %5, i64 noundef %30, i32 noundef %3)
  br label %36

.split92.us:                                      ; preds = %.split.split.us, %.split.us.split.us, %.split.split
  tail call void @w2c_hermes_llvh0x3A0x3Allvm_unreachable_internal0x28char0x20const0x2A0x2C0x20char0x20const0x2A0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef 99504, i32 noundef 76496, i32 noundef 109) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

.loopexit:                                        ; preds = %18, %13, %4
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 108064, i32 noundef 76496, i32 noundef 100, i32 noundef 35618)
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

.split94.us:                                      ; preds = %.split.split.us, %.split.us.split.us, %.split.split
  %31 = add nuw nsw i64 %6, 8
  %32 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %31)
  %33 = shl i32 %2, 2
  %34 = add i32 %32, %33
  %35 = zext i32 %34 to i64
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %35, i32 noundef %3)
  br label %36

36:                                               ; preds = %.split94.us, %.split98.us, %.split96.us
  ret void
}

attributes #0 = { 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 #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 = { 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)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass