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

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

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

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

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

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

31:                                               ; preds = %4
  br label %157

32:                                               ; preds = %4
  %33 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %33, ptr %11, align 4, !tbaa !9
  store i32 4096, ptr %12, align 4, !tbaa !9
  %34 = load i32, ptr %12, align 4, !tbaa !9
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = sub i32 %35, %34
  store i32 %36, ptr %11, align 4, !tbaa !9
  %37 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %37, ptr %12, align 4, !tbaa !9
  %38 = load i32, ptr %11, align 4, !tbaa !9
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = icmp ule i32 %38, %39
  %41 = zext i1 %40 to i32
  store i32 %41, ptr %11, align 4, !tbaa !9
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %45

44:                                               ; preds = %32
  br label %157

45:                                               ; preds = %32
  %46 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %46, ptr %11, align 4, !tbaa !9
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.w2c_hermes, ptr %47, i32 0, i32 6
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = zext i32 %49 to i64
  %51 = call i32 @i32_load(ptr noundef %48, i64 noundef %50)
  store i32 %51, ptr %11, align 4, !tbaa !9
  store i32 16777208, ptr %12, align 4, !tbaa !9
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = and i32 %53, %52
  store i32 %54, ptr %11, align 4, !tbaa !9
  store i32 16, ptr %12, align 4, !tbaa !9
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = sub i32 %56, %55
  store i32 %57, ptr %11, align 4, !tbaa !9
  %58 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %58, ptr %9, align 4, !tbaa !9
  store i32 32776, ptr %12, align 4, !tbaa !9
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = icmp ult i32 %59, %60
  %62 = zext i1 %61 to i32
  store i32 %62, ptr %11, align 4, !tbaa !9
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %66

65:                                               ; preds = %45
  br label %163

66:                                               ; preds = %45
  %67 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %67, ptr %11, align 4, !tbaa !9
  store i32 3, ptr %12, align 4, !tbaa !9
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = and i32 %68, 31
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = lshr i32 %70, %69
  store i32 %71, ptr %11, align 4, !tbaa !9
  store i32 4096, ptr %12, align 4, !tbaa !9
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = sub i32 %73, %72
  store i32 %74, ptr %11, align 4, !tbaa !9
  %75 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %75, ptr %12, align 4, !tbaa !9
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = icmp ule i32 %76, %77
  %79 = zext i1 %78 to i32
  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 = %66
  br label %163

83:                                               ; preds = %66
  %84 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %84, ptr %11, align 4, !tbaa !9
  %85 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %85, ptr %12, align 4, !tbaa !9
  store i32 3, ptr %13, align 4, !tbaa !9
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = and i32 %86, 31
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = shl i32 %88, %87
  store i32 %89, ptr %12, align 4, !tbaa !9
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = add i32 %91, %90
  store i32 %92, ptr %11, align 4, !tbaa !9
  store i32 32784, ptr %12, align 4, !tbaa !9
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = load i32, ptr %11, align 4, !tbaa !9
  %95 = add i32 %94, %93
  store i32 %95, ptr %11, 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 = call i64 @i64_load(ptr noundef %97, i64 noundef %99)
  store i64 %100, ptr %15, align 8, !tbaa !11
  %101 = load i64, ptr %15, align 8, !tbaa !11
  store i64 %101, ptr %10, align 8, !tbaa !11
  store i64 48, ptr %16, align 8, !tbaa !11
  %102 = load i64, ptr %15, align 8, !tbaa !11
  %103 = load i64, ptr %16, align 8, !tbaa !11
  %104 = and i64 %103, 63
  %105 = ashr i64 %102, %104
  store i64 %105, ptr %15, align 8, !tbaa !11
  %106 = load i64, ptr %15, align 8, !tbaa !11
  %107 = trunc i64 %106 to i32
  store i32 %107, ptr %11, align 4, !tbaa !9
  store i32 -1, ptr %12, align 4, !tbaa !9
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = icmp ne i32 %108, %109
  %111 = zext i1 %110 to i32
  store i32 %111, ptr %11, align 4, !tbaa !9
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %83
  br label %169

115:                                              ; preds = %83
  %116 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %116, ptr %15, align 8, !tbaa !11
  store i64 -844424930131969, ptr %16, align 8, !tbaa !11
  %117 = load i64, ptr %15, align 8, !tbaa !11
  %118 = load i64, ptr %16, align 8, !tbaa !11
  %119 = icmp ule i64 %117, %118
  %120 = zext i1 %119 to i32
  store i32 %120, ptr %11, align 4, !tbaa !9
  %121 = load i32, ptr %11, align 4, !tbaa !9
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %115
  br label %175

124:                                              ; preds = %115
  %125 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %125, ptr %15, align 8, !tbaa !11
  %126 = load i64, ptr %15, align 8, !tbaa !11
  %127 = trunc i64 %126 to i32
  store i32 %127, ptr %11, align 4, !tbaa !9
  %128 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %128, ptr %6, align 4, !tbaa !9
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = icmp ne i32 %129, 0
  %131 = xor i1 %130, true
  %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 = %124
  br label %181

136:                                              ; preds = %124
  %137 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %137, ptr %11, align 4, !tbaa !9
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.w2c_hermes, ptr %138, i32 0, i32 6
  %140 = load i32, ptr %11, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = add i64 %141, 3
  %143 = call i32 @i32_load8_u(ptr noundef %139, i64 noundef %142)
  store i32 %143, ptr %11, align 4, !tbaa !9
  store i32 24, ptr %12, align 4, !tbaa !9
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = and i32 %144, 31
  %146 = load i32, ptr %11, align 4, !tbaa !9
  %147 = shl i32 %146, %145
  store i32 %147, ptr %11, align 4, !tbaa !9
  store i32 301989888, ptr %12, align 4, !tbaa !9
  %148 = load i32, ptr %11, align 4, !tbaa !9
  %149 = load i32, ptr %12, align 4, !tbaa !9
  %150 = icmp ne i32 %148, %149
  %151 = zext i1 %150 to i32
  store i32 %151, ptr %11, align 4, !tbaa !9
  %152 = load i32, ptr %11, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %155

154:                                              ; preds = %136
  br label %187

155:                                              ; preds = %136
  %156 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %156, ptr %11, align 4, !tbaa !9
  br label %193

157:                                              ; preds = %44, %31
  store i32 129180, ptr %11, align 4, !tbaa !9
  store i32 76566, ptr %12, align 4, !tbaa !9
  store i32 490, ptr %13, align 4, !tbaa !9
  store i32 39593, ptr %14, align 4, !tbaa !9
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = load i32, ptr %11, align 4, !tbaa !9
  %160 = load i32, ptr %12, align 4, !tbaa !9
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %158, i32 noundef %159, i32 noundef %160, i32 noundef %161, i32 noundef %162)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

163:                                              ; preds = %82, %65
  store i32 129107, ptr %11, align 4, !tbaa !9
  store i32 76566, ptr %12, align 4, !tbaa !9
  store i32 505, ptr %13, align 4, !tbaa !9
  store i32 104756, ptr %14, align 4, !tbaa !9
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = load i32, ptr %11, align 4, !tbaa !9
  %166 = load i32, ptr %12, align 4, !tbaa !9
  %167 = load i32, ptr %13, align 4, !tbaa !9
  %168 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %164, i32 noundef %165, i32 noundef %166, i32 noundef %167, i32 noundef %168)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

169:                                              ; preds = %114
  store i32 118124, ptr %11, align 4, !tbaa !9
  store i32 83341, ptr %12, align 4, !tbaa !9
  store i32 480, ptr %13, align 4, !tbaa !9
  store i32 38798, ptr %14, align 4, !tbaa !9
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = load i32, ptr %12, align 4, !tbaa !9
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %170, i32 noundef %171, i32 noundef %172, i32 noundef %173, i32 noundef %174)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

175:                                              ; preds = %123
  store i32 118273, ptr %11, align 4, !tbaa !9
  store i32 83341, ptr %12, align 4, !tbaa !9
  store i32 438, ptr %13, align 4, !tbaa !9
  store i32 49706, ptr %14, align 4, !tbaa !9
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %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
  %180 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %176, i32 noundef %177, i32 noundef %178, i32 noundef %179, i32 noundef %180)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

181:                                              ; preds = %135
  store i32 147142, ptr %11, align 4, !tbaa !9
  store i32 82611, ptr %12, align 4, !tbaa !9
  store i32 106, ptr %13, align 4, !tbaa !9
  store i32 28119, ptr %14, align 4, !tbaa !9
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = load i32, ptr %11, align 4, !tbaa !9
  %184 = load i32, ptr %12, align 4, !tbaa !9
  %185 = load i32, ptr %13, align 4, !tbaa !9
  %186 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %182, i32 noundef %183, i32 noundef %184, i32 noundef %185, i32 noundef %186)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

187:                                              ; preds = %154
  store i32 205012, ptr %11, align 4, !tbaa !9
  store i32 82611, ptr %12, align 4, !tbaa !9
  store i32 255, ptr %13, align 4, !tbaa !9
  store i32 24720, ptr %14, align 4, !tbaa !9
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = load i32, ptr %11, align 4, !tbaa !9
  %190 = load i32, ptr %12, align 4, !tbaa !9
  %191 = load i32, ptr %13, align 4, !tbaa !9
  %192 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %188, i32 noundef %189, i32 noundef %190, i32 noundef %191, i32 noundef %192)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

193:                                              ; preds = %155
  %194 = load i32, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret i32 %194
}

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 = { "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 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 = { 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, !12, i64 0}
!12 = !{!"long", !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 i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load8_u(ptr noundef, i64 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: inlinehint nounwind uwtable
declare hidden i64 @i64_load(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = zext i32 %1 to i64
  %7 = add nuw nsw i64 %6, 12
  %8 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %7)
  %9 = icmp ugt i32 %8, 4096
  %10 = add i32 %8, -4096
  %.not = icmp ugt i32 %10, %3
  %or.cond = and i1 %9, %.not
  br i1 %or.cond, label %11, label %32

11:                                               ; preds = %4
  %12 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %13 = and i32 %12, 16777208
  %14 = add nsw i32 %13, -16
  %15 = icmp ult i32 %14, 32776
  br i1 %15, label %33, label %16

16:                                               ; preds = %11
  %17 = lshr exact i32 %14, 3
  %18 = add nsw i32 %17, -4096
  %.not102 = icmp ugt i32 %18, %3
  br i1 %.not102, label %19, label %33

19:                                               ; preds = %16
  %20 = shl i32 %3, 3
  %21 = add i32 %1, 32784
  %22 = add i32 %21, %20
  %23 = zext i32 %22 to i64
  %24 = tail call i64 @i64_load(ptr noundef nonnull %5, i64 noundef %23)
  %.not103 = icmp ugt i64 %24, -281474976710657
  br i1 %.not103, label %25, label %34

25:                                               ; preds = %19
  %26 = trunc i64 %24 to i32
  %.not104 = icmp eq i32 %26, 0
  br i1 %.not104, label %35, label %27

27:                                               ; preds = %25
  %28 = and i64 %24, 4294967295
  %29 = add nuw nsw i64 %28, 3
  %30 = tail call i32 @i32_load8_u(ptr noundef nonnull %5, i64 noundef %29)
  %.mask = and i32 %30, 255
  %.not105 = icmp eq i32 %.mask, 18
  br i1 %.not105, label %31, label %36

31:                                               ; preds = %27
  ret i32 %26

32:                                               ; preds = %4
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 129180, i32 noundef 76566, i32 noundef 490, i32 noundef 39593) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

33:                                               ; preds = %16, %11
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 129107, i32 noundef 76566, i32 noundef 505, i32 noundef 104756) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

34:                                               ; preds = %19
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 118124, i32 noundef 83341, i32 noundef 480, i32 noundef 38798) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

35:                                               ; preds = %25
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 147142, i32 noundef 82611, i32 noundef 106, i32 noundef 28119) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

36:                                               ; preds = %27
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 205012, i32 noundef 82611, i32 noundef 255, i32 noundef 24720) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable
}

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 = { "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 = { 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,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass