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

; 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: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) #1

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

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

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

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

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef, i32 noundef, i64 noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AregExpPrototypeTest0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.w2c_hermes, ptr %19, i32 0, i32 3
  %21 = load i32, ptr %20, align 8, !tbaa !13
  store i32 %21, ptr %12, align 4, !tbaa !9
  store i32 32, ptr %13, align 4, !tbaa !9
  %22 = load i32, ptr %13, align 4, !tbaa !9
  %23 = load i32, ptr %12, align 4, !tbaa !9
  %24 = sub i32 %23, %22
  store i32 %24, ptr %12, align 4, !tbaa !9
  %25 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %25, ptr %8, align 4, !tbaa !9
  %26 = load i32, ptr %12, align 4, !tbaa !9
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.w2c_hermes, ptr %27, i32 0, i32 3
  store i32 %26, ptr %28, align 8, !tbaa !13
  %29 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %29, ptr %12, align 4, !tbaa !9
  %30 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %30, ptr %13, align 4, !tbaa !9
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.w2c_hermes, ptr %31, i32 0, i32 6
  %33 = load i32, ptr %13, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = add i64 %34, 8
  %36 = call i32 @i32_load(ptr noundef %32, i64 noundef %35)
  store i32 %36, ptr %13, align 4, !tbaa !9
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.w2c_hermes, ptr %37, i32 0, i32 6
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = add i64 %40, 8
  %42 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %38, i64 noundef %41, i32 noundef %42)
  %43 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %43, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %44, ptr %13, align 4, !tbaa !9
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.w2c_hermes, ptr %45, i32 0, i32 6
  %47 = load i32, ptr %13, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = call i64 @i64_load(ptr noundef %46, i64 noundef %48)
  store i64 %49, ptr %17, align 8, !tbaa !11
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.w2c_hermes, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %51, i64 noundef %53, i64 noundef %54)
  %55 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %55, ptr %12, align 4, !tbaa !9
  store i32 16, ptr %13, align 4, !tbaa !9
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = add i32 %57, %56
  store i32 %58, ptr %12, align 4, !tbaa !9
  %59 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %59, ptr %13, align 4, !tbaa !9
  %60 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %60, ptr %14, align 4, !tbaa !9
  %61 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %61, ptr %15, align 4, !tbaa !9
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = load i32, ptr %14, align 4, !tbaa !9
  %66 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AregExpPrototypeExec0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(ptr noundef %62, i32 noundef %63, i32 noundef %64, i32 noundef %65, i32 noundef %66)
  %67 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %67, ptr %12, align 4, !tbaa !9
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.w2c_hermes, ptr %68, i32 0, i32 6
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = add i64 %71, 16
  %73 = call i32 @i32_load(ptr noundef %69, i64 noundef %72)
  store i32 %73, ptr %12, align 4, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = icmp ne i32 %74, 0
  %76 = xor i1 %75, true
  %77 = zext i1 %76 to i32
  store i32 %77, ptr %12, align 4, !tbaa !9
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %87

80:                                               ; preds = %5
  %81 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %81, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.w2c_hermes, ptr %82, i32 0, i32 6
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %83, i64 noundef %85, i32 noundef %86)
  br label %186

87:                                               ; preds = %5
  %88 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %88, ptr %12, align 4, !tbaa !9
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.w2c_hermes, ptr %89, i32 0, i32 6
  %91 = load i32, ptr %12, align 4, !tbaa !9
  %92 = zext i32 %91 to i64
  %93 = add i64 %92, 24
  %94 = call i64 @i64_load(ptr noundef %90, i64 noundef %93)
  store i64 %94, ptr %16, align 8, !tbaa !11
  %95 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %95, ptr %11, align 8, !tbaa !11
  %96 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %96, ptr %12, align 4, !tbaa !9
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.w2c_hermes, ptr %97, i32 0, i32 6
  %99 = load i32, ptr %12, align 4, !tbaa !9
  %100 = zext i32 %99 to i64
  %101 = add i64 %100, 4
  %102 = call i32 @i32_load(ptr noundef %98, i64 noundef %101)
  store i32 %102, ptr %12, align 4, !tbaa !9
  %103 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %103, ptr %9, align 4, !tbaa !9
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.w2c_hermes, ptr %104, i32 0, i32 6
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = zext i32 %106 to i64
  %108 = add i64 %107, 164
  %109 = call i32 @i32_load(ptr noundef %105, i64 noundef %108)
  store i32 %109, ptr %12, align 4, !tbaa !9
  %110 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %110, ptr %10, align 4, !tbaa !9
  %111 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %111, ptr %13, align 4, !tbaa !9
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.w2c_hermes, ptr %112, i32 0, i32 6
  %114 = load i32, ptr %13, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = add i64 %115, 168
  %117 = call i32 @i32_load(ptr noundef %113, i64 noundef %116)
  store i32 %117, ptr %13, align 4, !tbaa !9
  %118 = load i32, ptr %12, align 4, !tbaa !9
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = icmp ult i32 %118, %119
  %121 = zext i1 %120 to i32
  store i32 %121, ptr %12, align 4, !tbaa !9
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %143

124:                                              ; preds = %87
  %125 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %125, ptr %12, align 4, !tbaa !9
  %126 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %126, ptr %13, align 4, !tbaa !9
  store i32 8, ptr %14, align 4, !tbaa !9
  %127 = load i32, ptr %14, align 4, !tbaa !9
  %128 = load i32, ptr %13, align 4, !tbaa !9
  %129 = add i32 %128, %127
  store i32 %129, ptr %13, align 4, !tbaa !9
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.w2c_hermes, ptr %130, i32 0, i32 6
  %132 = load i32, ptr %12, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = add i64 %133, 164
  %135 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %131, i64 noundef %134, i32 noundef %135)
  %136 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %136, ptr %12, align 4, !tbaa !9
  %137 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %137, ptr %17, align 8, !tbaa !11
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.w2c_hermes, ptr %138, i32 0, i32 6
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %139, i64 noundef %141, i64 noundef %142)
  br label %156

143:                                              ; preds = %87
  %144 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %144, ptr %12, align 4, !tbaa !9
  %145 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %145, ptr %17, align 8, !tbaa !11
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = load i32, ptr %12, align 4, !tbaa !9
  %148 = load i64, ptr %17, align 8, !tbaa !11
  %149 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %146, i32 noundef %147, i64 noundef %148)
  store i32 %149, ptr %12, align 4, !tbaa !9
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.w2c_hermes, ptr %150, i32 0, i32 6
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = zext i32 %152 to i64
  %154 = call i64 @i64_load(ptr noundef %151, i64 noundef %153)
  store i64 %154, ptr %16, align 8, !tbaa !11
  %155 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %155, ptr %11, align 8, !tbaa !11
  br label %156

156:                                              ; preds = %143, %124
  %157 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %157, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.w2c_hermes, ptr %158, i32 0, i32 6
  %160 = load i32, ptr %12, align 4, !tbaa !9
  %161 = zext i32 %160 to i64
  %162 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %159, i64 noundef %161, i32 noundef %162)
  %163 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %163, ptr %12, align 4, !tbaa !9
  %164 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %164, ptr %17, align 8, !tbaa !11
  store i64 47, ptr %18, align 8, !tbaa !11
  %165 = load i64, ptr %17, align 8, !tbaa !11
  %166 = load i64, ptr %18, align 8, !tbaa !11
  %167 = and i64 %166, 63
  %168 = ashr i64 %165, %167
  store i64 %168, ptr %17, align 8, !tbaa !11
  %169 = load i64, ptr %17, align 8, !tbaa !11
  %170 = trunc i64 %169 to i32
  store i32 %170, ptr %13, align 4, !tbaa !9
  store i32 -11, ptr %14, align 4, !tbaa !9
  %171 = load i32, ptr %13, align 4, !tbaa !9
  %172 = load i32, ptr %14, align 4, !tbaa !9
  %173 = icmp ne i32 %171, %172
  %174 = zext i1 %173 to i32
  store i32 %174, ptr %13, align 4, !tbaa !9
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = zext i32 %175 to i64
  store i64 %176, ptr %17, align 8, !tbaa !11
  store i64 -1407374883553280, ptr %18, align 8, !tbaa !11
  %177 = load i64, ptr %18, align 8, !tbaa !11
  %178 = load i64, ptr %17, align 8, !tbaa !11
  %179 = or i64 %178, %177
  store i64 %179, ptr %17, align 8, !tbaa !11
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.w2c_hermes, ptr %180, i32 0, i32 6
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = add i64 %183, 8
  %185 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %181, i64 noundef %184, i64 noundef %185)
  br label %186

186:                                              ; preds = %156, %80
  %187 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %187, ptr %12, align 4, !tbaa !9
  store i32 32, ptr %13, align 4, !tbaa !9
  %188 = load i32, ptr %13, align 4, !tbaa !9
  %189 = load i32, ptr %12, align 4, !tbaa !9
  %190 = add i32 %189, %188
  store i32 %190, ptr %12, align 4, !tbaa !9
  %191 = load i32, ptr %12, align 4, !tbaa !9
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.w2c_hermes, ptr %192, i32 0, i32 3
  store i32 %191, ptr %193, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  ret void
}

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 = { "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 }

!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}
!13 = !{!14, !10, i64 24}
!14 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 40, !17, i64 80}
!15 = !{!"", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !16, i64 32}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!"", !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"

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

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

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

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

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AregExpPrototypeTest0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #2 {
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = add i32 %7, -32
  store i32 %8, ptr %6, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = zext i32 %4 to i64
  %11 = add nuw nsw i64 %10, 8
  %12 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %11)
  %13 = zext i32 %8 to i64
  %14 = add nuw nsw i64 %13, 8
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %14, i32 noundef %12)
  %15 = tail call i64 @i64_load(ptr noundef nonnull %9, i64 noundef %10)
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %13, i64 noundef %15)
  %16 = add i32 %7, -16
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AregExpPrototypeExec0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(ptr noundef %0, i32 noundef %16, i32 noundef %8, i32 noundef %3, i32 noundef %8)
  %17 = add nuw nsw i64 %13, 16
  %18 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %17)
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %19, label %21

19:                                               ; preds = %5
  %20 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %20, i32 noundef 0)
  br label %46

21:                                               ; preds = %5
  %22 = add nuw nsw i64 %13, 24
  %23 = tail call i64 @i64_load(ptr noundef nonnull %9, i64 noundef %22)
  %24 = zext i32 %3 to i64
  %25 = add nuw nsw i64 %24, 4
  %26 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %25)
  %27 = zext i32 %26 to i64
  %28 = add nuw nsw i64 %27, 164
  %29 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %28)
  %30 = add nuw nsw i64 %27, 168
  %31 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %30)
  %32 = icmp ult i32 %29, %31
  br i1 %32, label %33, label %36

33:                                               ; preds = %21
  %34 = add i32 %29, 8
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %28, i32 noundef %34)
  %35 = zext i32 %29 to i64
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %35, i64 noundef %23)
  br label %40

36:                                               ; preds = %21
  %37 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef nonnull %0, i32 noundef %26, i64 noundef %23) #3
  %38 = zext i32 %37 to i64
  %39 = tail call i64 @i64_load(ptr noundef nonnull %9, i64 noundef %38)
  br label %40

40:                                               ; preds = %36, %33
  %.0 = phi i64 [ %23, %33 ], [ %39, %36 ]
  %41 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %41, i32 noundef 1)
  %.mask = and i64 %.0, -140737488355328
  %42 = icmp ne i64 %.mask, -1548112371908608
  %43 = zext i1 %42 to i64
  %44 = or disjoint i64 %43, -1407374883553280
  %45 = add nuw nsw i64 %41, 8
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %45, i64 noundef %44)
  br label %46

46:                                               ; preds = %40, %19
  store i32 %7, ptr %6, align 8, !tbaa !5
  ret void
}

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