; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_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 }

; 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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCHermesValueBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x260x20hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AatRef0x3C0x28hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AInline0x2900x3E0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x29(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 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
  %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 %11, align 4, !tbaa !9
  store i32 16, ptr %12, align 4, !tbaa !9
  %18 = load i32, ptr %12, align 4, !tbaa !9
  %19 = load i32, ptr %11, align 4, !tbaa !9
  %20 = sub i32 %19, %18
  store i32 %20, ptr %11, align 4, !tbaa !9
  %21 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %21, ptr %9, align 4, !tbaa !9
  %22 = load i32, ptr %11, 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 %6, align 4, !tbaa !9
  store i32 %25, ptr %11, align 4, !tbaa !9
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.w2c_hermes, ptr %26, i32 0, i32 6
  %28 = load i32, ptr %11, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = add i64 %29, 12
  %31 = call i32 @i32_load(ptr noundef %27, i64 noundef %30)
  store i32 %31, ptr %11, align 4, !tbaa !9
  %32 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %32, ptr %10, align 4, !tbaa !9
  store i32 4096, ptr %12, align 4, !tbaa !9
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = load i32, ptr %12, align 4, !tbaa !9
  %35 = icmp ule i32 %33, %34
  %36 = zext i1 %35 to i32
  store i32 %36, ptr %11, align 4, !tbaa !9
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %64

39:                                               ; preds = %4
  %40 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %40, ptr %11, align 4, !tbaa !9
  %41 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %41, ptr %12, align 4, !tbaa !9
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.w2c_hermes, ptr %42, i32 0, i32 6
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = add i64 %45, 12
  %47 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %43, i64 noundef %46, i32 noundef %47)
  %48 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %48, ptr %11, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %49, ptr %12, align 4, !tbaa !9
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.w2c_hermes, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = add i64 %53, 8
  %55 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %51, i64 noundef %54, i32 noundef %55)
  %56 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %56, ptr %11, align 4, !tbaa !9
  %57 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %57, ptr %12, align 4, !tbaa !9
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.w2c_hermes, ptr %58, i32 0, i32 6
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = add i64 %61, 4
  %63 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %59, i64 noundef %62, i32 noundef %63)
  br label %147

64:                                               ; preds = %4
  %65 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %65, ptr %11, align 4, !tbaa !9
  %66 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %66, ptr %12, align 4, !tbaa !9
  %67 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %67, ptr %13, align 4, !tbaa !9
  store i32 4097, ptr %14, align 4, !tbaa !9
  %68 = load i32, ptr %14, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = sub i32 %69, %68
  store i32 %70, ptr %13, align 4, !tbaa !9
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = load i32, ptr %12, align 4, !tbaa !9
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef %71, i32 noundef %72, i32 noundef %73, i32 noundef %74)
  store i32 %75, ptr %11, align 4, !tbaa !9
  %76 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %76, ptr %11, align 4, !tbaa !9
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.w2c_hermes, ptr %77, i32 0, i32 6
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = add i64 %80, 12
  %82 = call i32 @i32_load(ptr noundef %78, i64 noundef %81)
  store i32 %82, ptr %11, align 4, !tbaa !9
  %83 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %83, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %84, ptr %11, align 4, !tbaa !9
  %85 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %85, ptr %12, align 4, !tbaa !9
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.w2c_hermes, ptr %86, i32 0, i32 6
  %88 = load i32, ptr %11, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = add i64 %89, 12
  %91 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %87, i64 noundef %90, i32 noundef %91)
  %92 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %92, ptr %11, align 4, !tbaa !9
  %93 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %93, ptr %12, align 4, !tbaa !9
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.w2c_hermes, ptr %94, i32 0, i32 6
  %96 = load i32, ptr %11, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = add i64 %97, 8
  %99 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %95, i64 noundef %98, i32 noundef %99)
  %100 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %100, ptr %11, align 4, !tbaa !9
  %101 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %101, ptr %12, align 4, !tbaa !9
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.w2c_hermes, ptr %102, i32 0, i32 6
  %104 = load i32, ptr %11, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = add i64 %105, 4
  %107 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %103, i64 noundef %106, i32 noundef %107)
  %108 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %108, ptr %11, align 4, !tbaa !9
  store i32 4097, ptr %12, align 4, !tbaa !9
  %109 = load i32, ptr %11, align 4, !tbaa !9
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = icmp ult i32 %109, %110
  %112 = zext i1 %111 to i32
  store i32 %112, ptr %11, align 4, !tbaa !9
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %116

115:                                              ; preds = %64
  br label %147

116:                                              ; preds = %64
  %117 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %117, ptr %11, align 4, !tbaa !9
  store i32 4097, ptr %12, align 4, !tbaa !9
  %118 = load i32, ptr %12, align 4, !tbaa !9
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = sub i32 %119, %118
  store i32 %120, ptr %11, align 4, !tbaa !9
  %121 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %121, ptr %10, align 4, !tbaa !9
  store i32 10, ptr %12, align 4, !tbaa !9
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = and i32 %122, 31
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = shl i32 %124, %123
  store i32 %125, ptr %11, align 4, !tbaa !9
  %126 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %126, ptr %12, align 4, !tbaa !9
  %127 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %127, ptr %13, align 4, !tbaa !9
  %128 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %128, ptr %14, align 4, !tbaa !9
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = load i32, ptr %14, align 4, !tbaa !9
  %133 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef %129, i32 noundef %130, i32 noundef %131, i32 noundef %132)
  store i32 %133, ptr %12, align 4, !tbaa !9
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.w2c_hermes, ptr %134, i32 0, i32 6
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = add i64 %137, 12
  %139 = call i32 @i32_load(ptr noundef %135, i64 noundef %138)
  store i32 %139, ptr %12, align 4, !tbaa !9
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = load i32, ptr %11, align 4, !tbaa !9
  %142 = add i32 %141, %140
  store i32 %142, ptr %11, align 4, !tbaa !9
  store i32 4096, ptr %12, align 4, !tbaa !9
  %143 = load i32, ptr %12, align 4, !tbaa !9
  %144 = load i32, ptr %11, align 4, !tbaa !9
  %145 = add i32 %144, %143
  store i32 %145, ptr %11, align 4, !tbaa !9
  %146 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %146, ptr %10, align 4, !tbaa !9
  br label %147

147:                                              ; preds = %116, %115, %39
  %148 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %148, ptr %11, align 4, !tbaa !9
  %149 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %149, ptr %12, align 4, !tbaa !9
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = icmp ugt i32 %150, %151
  %153 = zext i1 %152 to i32
  store i32 %153, ptr %11, align 4, !tbaa !9
  %154 = load i32, ptr %11, align 4, !tbaa !9
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %162

156:                                              ; preds = %147
  store i32 171387, ptr %11, align 4, !tbaa !9
  store i32 76566, ptr %12, align 4, !tbaa !9
  store i32 184, ptr %13, align 4, !tbaa !9
  store i32 47897, ptr %14, align 4, !tbaa !9
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = load i32, ptr %11, align 4, !tbaa !9
  %159 = load i32, ptr %12, align 4, !tbaa !9
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %157, i32 noundef %158, i32 noundef %159, i32 noundef %160, i32 noundef %161)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

162:                                              ; preds = %147
  %163 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %163, ptr %11, align 4, !tbaa !9
  store i32 4, ptr %12, align 4, !tbaa !9
  %164 = load i32, ptr %12, align 4, !tbaa !9
  %165 = load i32, ptr %11, align 4, !tbaa !9
  %166 = add i32 %165, %164
  store i32 %166, ptr %11, align 4, !tbaa !9
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3Aiterator0x3A0x3Aoperator0x2A0x280x29(ptr noundef %167, i32 noundef %168)
  store i32 %169, ptr %11, align 4, !tbaa !9
  %170 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %170, ptr %6, align 4, !tbaa !9
  %171 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %171, ptr %11, align 4, !tbaa !9
  store i32 16, ptr %12, align 4, !tbaa !9
  %172 = load i32, ptr %12, align 4, !tbaa !9
  %173 = load i32, ptr %11, align 4, !tbaa !9
  %174 = add i32 %173, %172
  store i32 %174, ptr %11, align 4, !tbaa !9
  %175 = load i32, ptr %11, align 4, !tbaa !9
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.w2c_hermes, ptr %176, i32 0, i32 3
  store i32 %175, ptr %177, align 8, !tbaa !11
  %178 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %178, ptr %11, align 4, !tbaa !9
  %179 = load i32, ptr %11, align 4, !tbaa !9
  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 i32 %179
}

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3Aiterator0x3A0x3Aoperator0x2A0x280x29(ptr noundef, i32 noundef) #1

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


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

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 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 void @i32_store(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCHermesValueBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x260x20hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AatRef0x3C0x28hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AInline0x2900x3E0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %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 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = zext i32 %1 to i64
  %10 = add nuw nsw i64 %9, 12
  %11 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %10)
  %12 = icmp ult i32 %11, 4097
  br i1 %12, label %13, label %18

13:                                               ; preds = %4
  %14 = zext i32 %7 to i64
  %15 = add nuw nsw i64 %14, 12
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %15, i32 noundef %2)
  %16 = add nuw nsw i64 %14, 8
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %16, i32 noundef %3)
  %17 = add nuw nsw i64 %14, 4
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %17, i32 noundef %1)
  br label %36

18:                                               ; preds = %4
  %19 = add i32 %11, -4097
  %20 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %2, i32 noundef %19) #4
  %21 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %10)
  %22 = zext i32 %7 to i64
  %23 = add nuw nsw i64 %22, 12
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %23, i32 noundef %2)
  %24 = add nuw nsw i64 %22, 8
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %24, i32 noundef %3)
  %25 = add nuw nsw i64 %22, 4
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %25, i32 noundef %1)
  %26 = icmp ult i32 %21, 4097
  br i1 %26, label %36, label %27

27:                                               ; preds = %18
  %28 = add i32 %21, -4097
  %29 = shl i32 %28, 10
  %30 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %2, i32 noundef %28) #4
  %31 = zext i32 %30 to i64
  %32 = add nuw nsw i64 %31, 12
  %33 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %32)
  %34 = add i32 %29, 4096
  %35 = add i32 %34, %33
  br label %36

36:                                               ; preds = %18, %27, %13
  %.0 = phi i32 [ %11, %13 ], [ %21, %18 ], [ %35, %27 ]
  %37 = icmp ult i32 %.0, %3
  br i1 %37, label %38, label %39

38:                                               ; preds = %36
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef nonnull %0, i32 noundef 171387, i32 noundef 76566, i32 noundef 184, i32 noundef 47897) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

39:                                               ; preds = %36
  %40 = add i32 %6, -12
  %41 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3Aiterator0x3A0x3Aoperator0x2A0x280x29(ptr noundef nonnull %0, i32 noundef %40) #4
  store i32 %6, ptr %5, align 8, !tbaa !5
  ret i32 %41
}

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3Aiterator0x3A0x3Aoperator0x2A0x280x29(ptr noundef, i32 noundef) local_unnamed_addr #0

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


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