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

; 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 i32 @i32_load(ptr 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: nounwind uwtable
declare dso_local i32 @w2c_hermes_memcmp(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_llvh0x3A0x3AStringRef0x3A0x3Acount0x28llvh0x3A0x3AStringRef0x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %23 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %23, ptr %16, align 4, !tbaa !9
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.w2c_hermes, ptr %24, i32 0, i32 6
  %26 = load i32, ptr %16, align 4, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = add i64 %27, 4
  %29 = call i32 @i32_load(ptr noundef %25, i64 noundef %28)
  store i32 %29, ptr %16, align 4, !tbaa !9
  %30 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %30, ptr %8, align 4, !tbaa !9
  %31 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %31, ptr %17, align 4, !tbaa !9
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.w2c_hermes, ptr %32, i32 0, i32 6
  %34 = load i32, ptr %17, align 4, !tbaa !9
  %35 = zext i32 %34 to i64
  %36 = add i64 %35, 4
  %37 = call i32 @i32_load(ptr noundef %33, i64 noundef %36)
  store i32 %37, ptr %17, align 4, !tbaa !9
  %38 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %38, ptr %9, align 4, !tbaa !9
  %39 = load i32, ptr %16, align 4, !tbaa !9
  %40 = load i32, ptr %17, align 4, !tbaa !9
  %41 = icmp ult i32 %39, %40
  %42 = zext i1 %41 to i32
  store i32 %42, ptr %16, align 4, !tbaa !9
  %43 = load i32, ptr %16, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %3
  br label %177

46:                                               ; preds = %3
  %47 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %47, ptr %16, align 4, !tbaa !9
  %48 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %48, ptr %17, align 4, !tbaa !9
  %49 = load i32, ptr %17, align 4, !tbaa !9
  %50 = load i32, ptr %16, align 4, !tbaa !9
  %51 = sub i32 %50, %49
  store i32 %51, ptr %16, align 4, !tbaa !9
  %52 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %52, ptr %11, align 4, !tbaa !9
  store i32 -1, ptr %17, align 4, !tbaa !9
  %53 = load i32, ptr %16, align 4, !tbaa !9
  %54 = load i32, ptr %17, align 4, !tbaa !9
  %55 = icmp eq i32 %53, %54
  %56 = zext i1 %55 to i32
  store i32 %56, ptr %16, align 4, !tbaa !9
  %57 = load i32, ptr %16, align 4, !tbaa !9
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %60

59:                                               ; preds = %46
  br label %177

60:                                               ; preds = %46
  %61 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %61, ptr %16, align 4, !tbaa !9
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.w2c_hermes, ptr %62, i32 0, i32 6
  %64 = load i32, ptr %16, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = call i64 @i64_load(ptr noundef %63, i64 noundef %65)
  store i64 %66, ptr %21, align 8, !tbaa !11
  %67 = load i64, ptr %21, align 8, !tbaa !11
  store i64 %67, ptr %15, align 8, !tbaa !11
  store i64 32, ptr %22, align 8, !tbaa !11
  %68 = load i64, ptr %22, align 8, !tbaa !11
  %69 = and i64 %68, 63
  %70 = load i64, ptr %21, align 8, !tbaa !11
  %71 = lshr i64 %70, %69
  store i64 %71, ptr %21, align 8, !tbaa !11
  %72 = load i64, ptr %21, align 8, !tbaa !11
  %73 = trunc i64 %72 to i32
  store i32 %73, ptr %16, align 4, !tbaa !9
  %74 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %74, ptr %10, align 4, !tbaa !9
  %75 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %75, ptr %16, align 4, !tbaa !9
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.w2c_hermes, ptr %76, i32 0, i32 6
  %78 = load i32, ptr %16, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = call i32 @i32_load(ptr noundef %77, i64 noundef %79)
  store i32 %80, ptr %16, align 4, !tbaa !9
  %81 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %81, ptr %12, align 4, !tbaa !9
  %82 = load i64, ptr %15, align 8, !tbaa !11
  store i64 %82, ptr %21, align 8, !tbaa !11
  %83 = load i64, ptr %21, align 8, !tbaa !11
  %84 = trunc i64 %83 to i32
  store i32 %84, ptr %16, align 4, !tbaa !9
  %85 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %85, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  %86 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %86, ptr %5, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %175, %60
  %88 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %88, ptr %16, align 4, !tbaa !9
  %89 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %89, ptr %17, align 4, !tbaa !9
  %90 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %90, ptr %18, align 4, !tbaa !9
  %91 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %91, ptr %6, align 4, !tbaa !9
  %92 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %92, ptr %19, align 4, !tbaa !9
  %93 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %93, ptr %20, align 4, !tbaa !9
  %94 = load i32, ptr %19, align 4, !tbaa !9
  %95 = load i32, ptr %20, align 4, !tbaa !9
  %96 = icmp ugt i32 %94, %95
  %97 = zext i1 %96 to i32
  store i32 %97, ptr %19, align 4, !tbaa !9
  %98 = load i32, ptr %19, align 4, !tbaa !9
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %102

100:                                              ; preds = %87
  %101 = load i32, ptr %17, align 4, !tbaa !9
  br label %104

102:                                              ; preds = %87
  %103 = load i32, ptr %18, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %102, %100
  %105 = phi i32 [ %101, %100 ], [ %103, %102 ]
  store i32 %105, ptr %17, align 4, !tbaa !9
  %106 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %106, ptr %14, align 4, !tbaa !9
  %107 = load i32, ptr %17, align 4, !tbaa !9
  %108 = load i32, ptr %16, align 4, !tbaa !9
  %109 = sub i32 %108, %107
  store i32 %109, ptr %16, align 4, !tbaa !9
  %110 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %110, ptr %5, align 4, !tbaa !9
  %111 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %111, ptr %17, align 4, !tbaa !9
  %112 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %112, ptr %18, align 4, !tbaa !9
  %113 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %113, ptr %19, align 4, !tbaa !9
  %114 = load i32, ptr %18, align 4, !tbaa !9
  %115 = load i32, ptr %19, align 4, !tbaa !9
  %116 = icmp ult i32 %114, %115
  %117 = zext i1 %116 to i32
  store i32 %117, ptr %18, align 4, !tbaa !9
  %118 = load i32, ptr %18, align 4, !tbaa !9
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %122

120:                                              ; preds = %104
  %121 = load i32, ptr %16, align 4, !tbaa !9
  br label %124

122:                                              ; preds = %104
  %123 = load i32, ptr %17, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %122, %120
  %125 = phi i32 [ %121, %120 ], [ %123, %122 ]
  store i32 %125, ptr %16, align 4, !tbaa !9
  %126 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %126, ptr %17, align 4, !tbaa !9
  %127 = load i32, ptr %16, align 4, !tbaa !9
  %128 = load i32, ptr %17, align 4, !tbaa !9
  %129 = icmp ne i32 %127, %128
  %130 = zext i1 %129 to i32
  store i32 %130, ptr %16, align 4, !tbaa !9
  %131 = load i32, ptr %16, align 4, !tbaa !9
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %134

133:                                              ; preds = %124
  br label %161

134:                                              ; preds = %124
  %135 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %135, ptr %16, align 4, !tbaa !9
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %155

138:                                              ; preds = %134
  %139 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %139, ptr %16, align 4, !tbaa !9
  %140 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %140, ptr %17, align 4, !tbaa !9
  %141 = load i32, ptr %17, align 4, !tbaa !9
  %142 = load i32, ptr %16, align 4, !tbaa !9
  %143 = add i32 %142, %141
  store i32 %143, ptr %16, align 4, !tbaa !9
  %144 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %144, ptr %17, align 4, !tbaa !9
  %145 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %145, ptr %18, align 4, !tbaa !9
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = load i32, ptr %16, align 4, !tbaa !9
  %148 = load i32, ptr %17, align 4, !tbaa !9
  %149 = load i32, ptr %18, align 4, !tbaa !9
  %150 = call i32 @w2c_hermes_memcmp(ptr noundef %146, i32 noundef %147, i32 noundef %148, i32 noundef %149)
  store i32 %150, ptr %16, align 4, !tbaa !9
  %151 = load i32, ptr %16, align 4, !tbaa !9
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %138
  br label %161

154:                                              ; preds = %138
  br label %155

155:                                              ; preds = %154, %134
  %156 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %156, ptr %16, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = load i32, ptr %16, align 4, !tbaa !9
  %159 = add i32 %158, %157
  store i32 %159, ptr %16, align 4, !tbaa !9
  %160 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %160, ptr %7, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %155, %153, %133
  %162 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %162, ptr %16, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  %163 = load i32, ptr %17, align 4, !tbaa !9
  %164 = load i32, ptr %16, align 4, !tbaa !9
  %165 = add i32 %164, %163
  store i32 %165, ptr %16, align 4, !tbaa !9
  %166 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %166, ptr %5, align 4, !tbaa !9
  %167 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %167, ptr %16, align 4, !tbaa !9
  %168 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %168, ptr %17, align 4, !tbaa !9
  %169 = load i32, ptr %16, align 4, !tbaa !9
  %170 = load i32, ptr %17, align 4, !tbaa !9
  %171 = icmp ne i32 %169, %170
  %172 = zext i1 %171 to i32
  store i32 %172, ptr %16, align 4, !tbaa !9
  %173 = load i32, ptr %16, align 4, !tbaa !9
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %175, label %176

175:                                              ; preds = %161
  br label %87

176:                                              ; preds = %161
  br label %177

177:                                              ; preds = %176, %59, %45
  %178 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %178, ptr %16, align 4, !tbaa !9
  %179 = load i32, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret i32 %179
}

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 = { 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, !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: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_memcmp(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

12:                                               ; preds = %3
  %13 = sub i32 %7, %10
  %14 = icmp eq i32 %13, -1
  br i1 %14, label %.loopexit, label %15

15:                                               ; preds = %12
  %16 = tail call i64 @i64_load(ptr noundef nonnull %4, i64 noundef %8)
  %.fr = freeze i64 %16
  %17 = lshr i64 %.fr, 32
  %18 = trunc nuw i64 %17 to i32
  %19 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %5)
  %20 = trunc i64 %.fr to i32
  %.not94 = icmp ult i64 %.fr, 4294967296
  br i1 %.not94, label %.split.us.preheader, label %.split

.split.us.preheader:                              ; preds = %15
  %21 = add i32 %7, 1
  %22 = sub i32 %21, %10
  %min.iters.check = icmp ult i32 %22, 8
  br i1 %min.iters.check, label %.split.us.preheader107, label %vector.ph

vector.ph:                                        ; preds = %.split.us.preheader
  %n.vec = and i32 %22, -8
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %7, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert103 = insertelement <4 x i32> poison, i32 %10, i64 0
  %broadcast.splat104 = shufflevector <4 x i32> %broadcast.splatinsert103, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert105 = insertelement <4 x i32> poison, i32 %18, i64 0
  %broadcast.splat106 = shufflevector <4 x i32> %broadcast.splatinsert105, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %31, %vector.body ]
  %vec.phi101 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %32, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %23 = tail call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %broadcast.splat, <4 x i32> %vec.ind)
  %24 = tail call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %broadcast.splat, <4 x i32> %step.add)
  %25 = tail call <4 x i32> @llvm.umin.v4i32(<4 x i32> %23, <4 x i32> %broadcast.splat104)
  %26 = tail call <4 x i32> @llvm.umin.v4i32(<4 x i32> %24, <4 x i32> %broadcast.splat104)
  %27 = icmp eq <4 x i32> %25, %broadcast.splat106
  %28 = icmp eq <4 x i32> %26, %broadcast.splat106
  %29 = zext <4 x i1> %27 to <4 x i32>
  %30 = zext <4 x i1> %28 to <4 x i32>
  %31 = add <4 x i32> %vec.phi, %29
  %32 = add <4 x i32> %vec.phi101, %30
  %index.next = add nuw i32 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %33 = icmp eq i32 %index.next, %n.vec
  br i1 %33, label %middle.block, label %vector.body, !llvm.loop !5

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %32, %31
  %34 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i32 %22, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.split.us.preheader107

.split.us.preheader107:                           ; preds = %middle.block, %.split.us.preheader
  %.089.us.ph = phi i32 [ 0, %.split.us.preheader ], [ %34, %middle.block ]
  %.0.us.ph = phi i32 [ 0, %.split.us.preheader ], [ %n.vec, %middle.block ]
  br label %.split.us

.split.us:                                        ; preds = %.split.us.preheader107, %.split.us
  %.089.us = phi i32 [ %spec.select, %.split.us ], [ %.089.us.ph, %.split.us.preheader107 ]
  %.0.us = phi i32 [ %38, %.split.us ], [ %.0.us.ph, %.split.us.preheader107 ]
  %35 = tail call i32 @llvm.usub.sat.i32(i32 %7, i32 %.0.us)
  %36 = tail call i32 @llvm.umin.i32(i32 %35, i32 %10)
  %.not.us = icmp eq i32 %36, %18
  %37 = zext i1 %.not.us to i32
  %spec.select = add i32 %.089.us, %37
  %38 = add i32 %.0.us, 1
  %.not96.us = icmp eq i32 %.0.us, %13
  br i1 %.not96.us, label %.loopexit, label %.split.us, !llvm.loop !8

.split:                                           ; preds = %15, %46
  %.089 = phi i32 [ %.1, %46 ], [ 0, %15 ]
  %.0 = phi i32 [ %47, %46 ], [ 0, %15 ]
  %39 = tail call i32 @llvm.umin.i32(i32 %.0, i32 %7)
  %40 = sub i32 %7, %39
  %41 = tail call i32 @llvm.umin.i32(i32 %40, i32 %10)
  %.not = icmp eq i32 %41, %18
  br i1 %.not, label %42, label %46

42:                                               ; preds = %.split
  %43 = add i32 %39, %19
  %44 = tail call i32 @w2c_hermes_memcmp(ptr noundef %0, i32 noundef %43, i32 noundef %20, i32 noundef %18)
  %.not95 = icmp eq i32 %44, 0
  %45 = zext i1 %.not95 to i32
  %spec.select97 = add i32 %.089, %45
  br label %46

46:                                               ; preds = %42, %.split
  %.1 = phi i32 [ %.089, %.split ], [ %spec.select97, %42 ]
  %47 = add i32 %.0, 1
  %.not96 = icmp eq i32 %.0, %13
  br i1 %.not96, label %.loopexit, label %.split

.loopexit:                                        ; preds = %46, %.split.us, %middle.block, %12, %3
  %.2 = phi i32 [ 0, %3 ], [ 0, %12 ], [ %34, %middle.block ], [ %spec.select, %.split.us ], [ %.1, %46 ]
  ret i32 %.2
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.usub.sat.i32(i32, i32) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.usub.sat.v4i32(<4 x i32>, <4 x i32>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.umin.v4i32(<4 x i32>, <4 x i32>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #2

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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = distinct !{!5, !6, !7}
!6 = !{!"llvm.loop.isvectorized", i32 1}
!7 = !{!"llvm.loop.unroll.runtime.disable"}
!8 = distinct !{!8, !7, !6}


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