; LLVM IR from artagnon/phoenixfs :: xdiff (xdiffi)

; 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.s_xdalgoenv = type { i64, i64, i64 }
%struct.s_diffdata = type { i64, ptr, ptr, ptr }
%struct.s_xpparam = type { i64 }
%struct.s_xdfenv = type { %struct.s_xdfile, %struct.s_xdfile }
%struct.s_xdfile = type { %struct.s_chastore, i64, i32, ptr, i64, i64, ptr, ptr, ptr, i64, ptr }
%struct.s_chastore = type { ptr, ptr, i64, i64, ptr, ptr, i64 }

; Function Attrs: nounwind uwtable
declare dso_local i32 @xdl_recs_cmp(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @xdl_do_diff(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.s_xdalgoenv, align 8
  %15 = alloca %struct.s_diffdata, align 8
  %16 = alloca %struct.s_diffdata, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.s_xpparam, ptr %18, i32 0, i32 0
  %20 = load i64, ptr %19, align 8, !tbaa !9
  %21 = and i64 %20, 32
  %22 = icmp ne i64 %21, 0
  br i1 %22, label %23, label %29

23:                                               ; preds = %4
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = call i32 @xdl_do_patience_diff(ptr noundef %24, ptr noundef %25, ptr noundef %26, ptr noundef %27)
  store i32 %28, ptr %5, align 4
  store i32 1, ptr %17, align 4
  br label %145

29:                                               ; preds = %4
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = call i32 @xdl_prepare_env(ptr noundef %30, ptr noundef %31, ptr noundef %32, ptr noundef %33)
  %35 = icmp slt i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %29
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %17, align 4
  br label %145

37:                                               ; preds = %29
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.s_xdfenv, ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %struct.s_xdfile, ptr %39, i32 0, i32 9
  %41 = load i64, ptr %40, align 8, !tbaa !12
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.s_xdfenv, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds %struct.s_xdfile, ptr %43, i32 0, i32 9
  %45 = load i64, ptr %44, align 8, !tbaa !17
  %46 = add nsw i64 %41, %45
  %47 = add nsw i64 %46, 3
  store i64 %47, ptr %10, align 8, !tbaa !18
  %48 = load i64, ptr %10, align 8, !tbaa !18
  %49 = mul nsw i64 2, %48
  %50 = add nsw i64 %49, 2
  %51 = mul i64 %50, 8
  %52 = call noalias ptr @malloc(i64 noundef %51) #6
  store ptr %52, ptr %11, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %56, label %54

54:                                               ; preds = %37
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  call void @xdl_free_env(ptr noundef %55)
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %17, align 4
  br label %145

56:                                               ; preds = %37
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %57, ptr %12, align 8, !tbaa !5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = load i64, ptr %10, align 8, !tbaa !18
  %60 = getelementptr inbounds i64, ptr %58, i64 %59
  store ptr %60, ptr %13, align 8, !tbaa !5
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.s_xdfenv, ptr %61, i32 0, i32 1
  %63 = getelementptr inbounds %struct.s_xdfile, ptr %62, i32 0, i32 9
  %64 = load i64, ptr %63, align 8, !tbaa !17
  %65 = add nsw i64 %64, 1
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = getelementptr inbounds i64, ptr %66, i64 %65
  store ptr %67, ptr %12, align 8, !tbaa !5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.s_xdfenv, ptr %68, i32 0, i32 1
  %70 = getelementptr inbounds %struct.s_xdfile, ptr %69, i32 0, i32 9
  %71 = load i64, ptr %70, align 8, !tbaa !17
  %72 = add nsw i64 %71, 1
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = getelementptr inbounds i64, ptr %73, i64 %72
  store ptr %74, ptr %13, align 8, !tbaa !5
  %75 = load i64, ptr %10, align 8, !tbaa !18
  %76 = call i64 @xdl_bogosqrt(i64 noundef %75)
  %77 = getelementptr inbounds %struct.s_xdalgoenv, ptr %14, i32 0, i32 0
  store i64 %76, ptr %77, align 8, !tbaa !19
  %78 = getelementptr inbounds %struct.s_xdalgoenv, ptr %14, i32 0, i32 0
  %79 = load i64, ptr %78, align 8, !tbaa !19
  %80 = icmp slt i64 %79, 256
  br i1 %80, label %81, label %83

81:                                               ; preds = %56
  %82 = getelementptr inbounds %struct.s_xdalgoenv, ptr %14, i32 0, i32 0
  store i64 256, ptr %82, align 8, !tbaa !19
  br label %83

83:                                               ; preds = %81, %56
  %84 = getelementptr inbounds %struct.s_xdalgoenv, ptr %14, i32 0, i32 1
  store i64 20, ptr %84, align 8, !tbaa !21
  %85 = getelementptr inbounds %struct.s_xdalgoenv, ptr %14, i32 0, i32 2
  store i64 256, ptr %85, align 8, !tbaa !22
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.s_xdfenv, ptr %86, i32 0, i32 0
  %88 = getelementptr inbounds %struct.s_xdfile, ptr %87, i32 0, i32 9
  %89 = load i64, ptr %88, align 8, !tbaa !12
  %90 = getelementptr inbounds %struct.s_diffdata, ptr %15, i32 0, i32 0
  store i64 %89, ptr %90, align 8, !tbaa !23
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.s_xdfenv, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct.s_xdfile, ptr %92, i32 0, i32 10
  %94 = load ptr, ptr %93, align 8, !tbaa !25
  %95 = getelementptr inbounds %struct.s_diffdata, ptr %15, i32 0, i32 1
  store ptr %94, ptr %95, align 8, !tbaa !26
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.s_xdfenv, ptr %96, i32 0, i32 0
  %98 = getelementptr inbounds %struct.s_xdfile, ptr %97, i32 0, i32 7
  %99 = load ptr, ptr %98, align 8, !tbaa !27
  %100 = getelementptr inbounds %struct.s_diffdata, ptr %15, i32 0, i32 3
  store ptr %99, ptr %100, align 8, !tbaa !28
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.s_xdfenv, ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds %struct.s_xdfile, ptr %102, i32 0, i32 8
  %104 = load ptr, ptr %103, align 8, !tbaa !29
  %105 = getelementptr inbounds %struct.s_diffdata, ptr %15, i32 0, i32 2
  store ptr %104, ptr %105, align 8, !tbaa !30
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.s_xdfenv, ptr %106, i32 0, i32 1
  %108 = getelementptr inbounds %struct.s_xdfile, ptr %107, i32 0, i32 9
  %109 = load i64, ptr %108, align 8, !tbaa !17
  %110 = getelementptr inbounds %struct.s_diffdata, ptr %16, i32 0, i32 0
  store i64 %109, ptr %110, align 8, !tbaa !23
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.s_xdfenv, ptr %111, i32 0, i32 1
  %113 = getelementptr inbounds %struct.s_xdfile, ptr %112, i32 0, i32 10
  %114 = load ptr, ptr %113, align 8, !tbaa !31
  %115 = getelementptr inbounds %struct.s_diffdata, ptr %16, i32 0, i32 1
  store ptr %114, ptr %115, align 8, !tbaa !26
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.s_xdfenv, ptr %116, i32 0, i32 1
  %118 = getelementptr inbounds %struct.s_xdfile, ptr %117, i32 0, i32 7
  %119 = load ptr, ptr %118, align 8, !tbaa !32
  %120 = getelementptr inbounds %struct.s_diffdata, ptr %16, i32 0, i32 3
  store ptr %119, ptr %120, align 8, !tbaa !28
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.s_xdfenv, ptr %121, i32 0, i32 1
  %123 = getelementptr inbounds %struct.s_xdfile, ptr %122, i32 0, i32 8
  %124 = load ptr, ptr %123, align 8, !tbaa !33
  %125 = getelementptr inbounds %struct.s_diffdata, ptr %16, i32 0, i32 2
  store ptr %124, ptr %125, align 8, !tbaa !30
  %126 = getelementptr inbounds %struct.s_diffdata, ptr %15, i32 0, i32 0
  %127 = load i64, ptr %126, align 8, !tbaa !23
  %128 = getelementptr inbounds %struct.s_diffdata, ptr %16, i32 0, i32 0
  %129 = load i64, ptr %128, align 8, !tbaa !23
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.s_xpparam, ptr %132, i32 0, i32 0
  %134 = load i64, ptr %133, align 8, !tbaa !9
  %135 = and i64 %134, 2
  %136 = icmp ne i64 %135, 0
  %137 = zext i1 %136 to i32
  %138 = call i32 @xdl_recs_cmp(ptr noundef %15, i64 noundef 0, i64 noundef %127, ptr noundef %16, i64 noundef 0, i64 noundef %129, ptr noundef %130, ptr noundef %131, i32 noundef %137, ptr noundef %14)
  %139 = icmp slt i32 %138, 0
  br i1 %139, label %140, label %143

140:                                              ; preds = %83
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %141) #5
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  call void @xdl_free_env(ptr noundef %142)
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %17, align 4
  br label %145

143:                                              ; preds = %83
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %144) #5
  store i32 0, ptr %5, align 4
  store i32 1, ptr %17, align 4
  br label %145

145:                                              ; preds = %143, %140, %54, %36, %23
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %146 = load i32, ptr %5, align 4
  ret i32 %146
}

declare i32 @xdl_do_patience_diff(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @xdl_prepare_env(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare void @xdl_free_env(ptr noundef) #2

declare i64 @xdl_bogosqrt(i64 noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

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

!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, !11, i64 0}
!10 = !{!"s_xpparam", !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 120}
!13 = !{!"s_xdfenv", !14, i64 0, !14, i64 136}
!14 = !{!"s_xdfile", !15, i64 0, !11, i64 56, !16, i64 64, !6, i64 72, !11, i64 80, !11, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !11, i64 120, !6, i64 128}
!15 = !{!"s_chastore", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 24, !6, i64 32, !6, i64 40, !11, i64 48}
!16 = !{!"int", !7, i64 0}
!17 = !{!13, !11, i64 256}
!18 = !{!11, !11, i64 0}
!19 = !{!20, !11, i64 0}
!20 = !{!"s_xdalgoenv", !11, i64 0, !11, i64 8, !11, i64 16}
!21 = !{!20, !11, i64 8}
!22 = !{!20, !11, i64 16}
!23 = !{!24, !11, i64 0}
!24 = !{!"s_diffdata", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!13, !6, i64 128}
!26 = !{!24, !6, i64 8}
!27 = !{!13, !6, i64 104}
!28 = !{!24, !6, i64 24}
!29 = !{!13, !6, i64 112}
!30 = !{!24, !6, i64 16}
!31 = !{!13, !6, i64 264}
!32 = !{!13, !6, i64 240}
!33 = !{!13, !6, i64 248}


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

%struct.s_xdalgoenv = type { i64, i64, i64 }
%struct.s_diffdata = type { i64, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
declare dso_local i32 @xdl_recs_cmp(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @xdl_do_diff(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca %struct.s_xdalgoenv, align 8
  %6 = alloca %struct.s_diffdata, align 8
  %7 = alloca %struct.s_diffdata, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  %8 = load i64, ptr %2, align 8, !tbaa !5
  %9 = and i64 %8, 32
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %12, label %10

10:                                               ; preds = %4
  %11 = tail call i32 @xdl_do_patience_diff(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3) #6
  br label %57

12:                                               ; preds = %4
  %13 = tail call i32 @xdl_prepare_env(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3) #6
  %14 = icmp slt i32 %13, 0
  br i1 %14, label %57, label %15

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %3, i64 120
  %17 = load i64, ptr %16, align 8, !tbaa !10
  %18 = getelementptr inbounds i8, ptr %3, i64 256
  %19 = load i64, ptr %18, align 8, !tbaa !16
  %20 = add i64 %17, 3
  %21 = add i64 %20, %19
  %22 = shl i64 %21, 4
  %23 = add i64 %22, 16
  %24 = tail call noalias ptr @malloc(i64 noundef %23) #7
  %.not36 = icmp eq ptr %24, null
  br i1 %.not36, label %25, label %26

25:                                               ; preds = %15
  tail call void @xdl_free_env(ptr noundef nonnull %3) #6
  br label %57

26:                                               ; preds = %15
  %27 = getelementptr inbounds i64, ptr %24, i64 %21
  %28 = add nsw i64 %19, 1
  %29 = getelementptr inbounds i64, ptr %24, i64 %28
  %30 = getelementptr inbounds i64, ptr %27, i64 %28
  %31 = tail call i64 @xdl_bogosqrt(i64 noundef %21) #6
  %spec.select = tail call i64 @llvm.smax.i64(i64 %31, i64 256)
  store i64 %spec.select, ptr %5, align 8, !tbaa !17
  %32 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 20, ptr %32, align 8, !tbaa !19
  %33 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 256, ptr %33, align 8, !tbaa !20
  %34 = load i64, ptr %16, align 8, !tbaa !10
  store i64 %34, ptr %6, align 8, !tbaa !21
  %35 = getelementptr inbounds i8, ptr %3, i64 128
  %36 = load ptr, ptr %35, align 8, !tbaa !23
  %37 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %36, ptr %37, align 8, !tbaa !24
  %38 = getelementptr inbounds i8, ptr %3, i64 104
  %39 = getelementptr inbounds i8, ptr %6, i64 16
  %40 = load <2 x ptr>, ptr %38, align 8, !tbaa !25
  %41 = shufflevector <2 x ptr> %40, <2 x ptr> poison, <2 x i32> <i32 1, i32 0>
  store <2 x ptr> %41, ptr %39, align 8, !tbaa !25
  %42 = load i64, ptr %18, align 8, !tbaa !16
  store i64 %42, ptr %7, align 8, !tbaa !21
  %43 = getelementptr inbounds i8, ptr %3, i64 264
  %44 = load ptr, ptr %43, align 8, !tbaa !26
  %45 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %44, ptr %45, align 8, !tbaa !24
  %46 = getelementptr inbounds i8, ptr %3, i64 240
  %47 = getelementptr inbounds i8, ptr %7, i64 16
  %48 = load <2 x ptr>, ptr %46, align 8, !tbaa !25
  %49 = shufflevector <2 x ptr> %48, <2 x ptr> poison, <2 x i32> <i32 1, i32 0>
  store <2 x ptr> %49, ptr %47, align 8, !tbaa !25
  %50 = load i64, ptr %2, align 8, !tbaa !5
  %51 = trunc i64 %50 to i32
  %52 = lshr i32 %51, 1
  %53 = and i32 %52, 1
  %54 = call i32 @xdl_recs_cmp(ptr noundef nonnull %6, i64 noundef 0, i64 noundef %34, ptr noundef nonnull %7, i64 noundef 0, i64 noundef %42, ptr noundef nonnull %29, ptr noundef nonnull %30, i32 noundef %53, ptr noundef nonnull %5)
  %55 = icmp slt i32 %54, 0
  call void @free(ptr noundef nonnull %24) #6
  br i1 %55, label %56, label %57

56:                                               ; preds = %26
  call void @xdl_free_env(ptr noundef nonnull %3) #6
  br label %57

57:                                               ; preds = %26, %12, %56, %25, %10
  %.0 = phi i32 [ %11, %10 ], [ -1, %56 ], [ -1, %25 ], [ -1, %12 ], [ 0, %26 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  ret i32 %.0
}

declare i32 @xdl_do_patience_diff(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @xdl_prepare_env(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare void @xdl_free_env(ptr noundef) local_unnamed_addr #2

declare i64 @xdl_bogosqrt(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #5

attributes #0 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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, !7, i64 0}
!6 = !{!"s_xpparam", !7, i64 0}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 120}
!11 = !{!"s_xdfenv", !12, i64 0, !12, i64 136}
!12 = !{!"s_xdfile", !13, i64 0, !7, i64 56, !15, i64 64, !14, i64 72, !7, i64 80, !7, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !7, i64 120, !14, i64 128}
!13 = !{!"s_chastore", !14, i64 0, !14, i64 8, !7, i64 16, !7, i64 24, !14, i64 32, !14, i64 40, !7, i64 48}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"int", !8, i64 0}
!16 = !{!11, !7, i64 256}
!17 = !{!18, !7, i64 0}
!18 = !{!"s_xdalgoenv", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!18, !7, i64 8}
!20 = !{!18, !7, i64 16}
!21 = !{!22, !7, i64 0}
!22 = !{!"s_diffdata", !7, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!23 = !{!11, !14, i64 128}
!24 = !{!22, !14, i64 8}
!25 = !{!14, !14, i64 0}
!26 = !{!11, !14, i64 264}


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