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

; 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_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 }
%struct.s_xmparam = type { %struct.s_xpparam, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.s_xpparam = type { i64 }
%struct.s_mmbuffer = type { ptr, i64 }
%struct.s_mmfile = type { ptr, i64 }

; Function Attrs: nounwind uwtable
define dso_local i32 @xdl_merge(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.s_xdfenv, align 8
  %15 = alloca %struct.s_xdfenv, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !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 272, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 272, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.s_xmparam, ptr %19, i32 0, i32 0
  store ptr %20, ptr %17, align 8, !tbaa !5
  %21 = load ptr, ptr %11, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.s_mmbuffer, ptr %21, i32 0, i32 0
  store ptr null, ptr %22, align 8, !tbaa !9
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.s_mmbuffer, ptr %23, i32 0, i32 1
  store i64 0, ptr %24, align 8, !tbaa !12
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = load ptr, ptr %17, align 8, !tbaa !5
  %28 = call i32 @xdl_do_diff(ptr noundef %25, ptr noundef %26, ptr noundef %27, ptr noundef %14)
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %36, label %30

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

36:                                               ; preds = %30, %5
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %136

37:                                               ; preds = %30
  %38 = getelementptr inbounds %struct.s_xdfenv, ptr %14, i32 0, i32 0
  %39 = getelementptr inbounds %struct.s_xdfenv, ptr %14, i32 0, i32 1
  %40 = load ptr, ptr %17, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.s_xpparam, ptr %40, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !13
  %43 = call i32 @xdl_change_compact(ptr noundef %38, ptr noundef %39, i64 noundef %42)
  %44 = icmp slt i32 %43, 0
  br i1 %44, label %56, label %45

45:                                               ; preds = %37
  %46 = getelementptr inbounds %struct.s_xdfenv, ptr %14, i32 0, i32 1
  %47 = getelementptr inbounds %struct.s_xdfenv, ptr %14, i32 0, i32 0
  %48 = load ptr, ptr %17, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.s_xpparam, ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !13
  %51 = call i32 @xdl_change_compact(ptr noundef %46, ptr noundef %47, i64 noundef %50)
  %52 = icmp slt i32 %51, 0
  br i1 %52, label %56, label %53

53:                                               ; preds = %45
  %54 = call i32 @xdl_build_script(ptr noundef %14, ptr noundef %12)
  %55 = icmp slt i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %53, %45, %37
  call void @xdl_free_env(ptr noundef %14)
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %136

57:                                               ; preds = %53
  %58 = getelementptr inbounds %struct.s_xdfenv, ptr %15, i32 0, i32 0
  %59 = getelementptr inbounds %struct.s_xdfenv, ptr %15, i32 0, i32 1
  %60 = load ptr, ptr %17, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.s_xpparam, ptr %60, i32 0, i32 0
  %62 = load i64, ptr %61, align 8, !tbaa !13
  %63 = call i32 @xdl_change_compact(ptr noundef %58, ptr noundef %59, i64 noundef %62)
  %64 = icmp slt i32 %63, 0
  br i1 %64, label %76, label %65

65:                                               ; preds = %57
  %66 = getelementptr inbounds %struct.s_xdfenv, ptr %15, i32 0, i32 1
  %67 = getelementptr inbounds %struct.s_xdfenv, ptr %15, i32 0, i32 0
  %68 = load ptr, ptr %17, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.s_xpparam, ptr %68, i32 0, i32 0
  %70 = load i64, ptr %69, align 8, !tbaa !13
  %71 = call i32 @xdl_change_compact(ptr noundef %66, ptr noundef %67, i64 noundef %70)
  %72 = icmp slt i32 %71, 0
  br i1 %72, label %76, label %73

73:                                               ; preds = %65
  %74 = call i32 @xdl_build_script(ptr noundef %15, ptr noundef %13)
  %75 = icmp slt i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %73, %65, %57
  call void @xdl_free_env(ptr noundef %15)
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %136

77:                                               ; preds = %73
  store i32 0, ptr %16, align 4, !tbaa !15
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = icmp ne ptr %78, null
  br i1 %79, label %101, label %80

80:                                               ; preds = %77
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.s_mmfile, ptr %81, i32 0, i32 1
  %83 = load i64, ptr %82, align 8, !tbaa !17
  %84 = call noalias ptr @malloc(i64 noundef %83) #6
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.s_mmbuffer, ptr %85, i32 0, i32 0
  store ptr %84, ptr %86, align 8, !tbaa !9
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.s_mmbuffer, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.s_mmfile, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !19
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.s_mmfile, ptr %93, i32 0, i32 1
  %95 = load i64, ptr %94, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %89, ptr align 1 %92, i64 %95, i1 false)
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.s_mmfile, ptr %96, i32 0, i32 1
  %98 = load i64, ptr %97, align 8, !tbaa !17
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.s_mmbuffer, ptr %99, i32 0, i32 1
  store i64 %98, ptr %100, align 8, !tbaa !12
  br label %132

101:                                              ; preds = %77
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %125, label %104

104:                                              ; preds = %101
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.s_mmfile, ptr %105, i32 0, i32 1
  %107 = load i64, ptr %106, align 8, !tbaa !17
  %108 = call noalias ptr @malloc(i64 noundef %107) #6
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.s_mmbuffer, ptr %109, i32 0, i32 0
  store ptr %108, ptr %110, align 8, !tbaa !9
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.s_mmbuffer, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.s_mmfile, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !19
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.s_mmfile, ptr %117, i32 0, i32 1
  %119 = load i64, ptr %118, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %113, ptr align 1 %116, i64 %119, i1 false)
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.s_mmfile, ptr %120, i32 0, i32 1
  %122 = load i64, ptr %121, align 8, !tbaa !17
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.s_mmbuffer, ptr %123, i32 0, i32 1
  store i64 %122, ptr %124, align 8, !tbaa !12
  br label %131

125:                                              ; preds = %101
  %126 = load ptr, ptr %12, align 8, !tbaa !5
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = call i32 @xdl_do_merge(ptr noundef %14, ptr noundef %126, ptr noundef %15, ptr noundef %127, ptr noundef %128, ptr noundef %129)
  store i32 %130, ptr %16, align 4, !tbaa !15
  br label %131

131:                                              ; preds = %125, %104
  br label %132

132:                                              ; preds = %131, %80
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  call void @xdl_free_script(ptr noundef %133)
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  call void @xdl_free_script(ptr noundef %134)
  call void @xdl_free_env(ptr noundef %14)
  call void @xdl_free_env(ptr noundef %15)
  %135 = load i32, ptr %16, align 4, !tbaa !15
  store i32 %135, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %136

136:                                              ; preds = %132, %76, %56, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 272, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 272, 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
  %137 = load i32, ptr %6, align 4
  ret i32 %137
}

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

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

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

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

declare void @xdl_free_env(ptr noundef) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @xdl_do_merge(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

declare void @xdl_free_script(ptr noundef) #2

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!10 = !{!"s_mmbuffer", !6, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!14, !11, i64 0}
!14 = !{!"s_xpparam", !11, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !11, i64 8}
!18 = !{!"s_mmfile", !6, i64 0, !11, i64 8}
!19 = !{!18, !6, 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"

%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
define dso_local i32 @xdl_merge(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.s_xdfenv, align 8
  %9 = alloca %struct.s_xdfenv, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %9) #6
  %10 = getelementptr inbounds i8, ptr %4, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  %11 = call i32 @xdl_do_diff(ptr noundef %0, ptr noundef %1, ptr noundef %3, ptr noundef nonnull %8) #6
  %12 = icmp slt i32 %11, 0
  br i1 %12, label %59, label %13

13:                                               ; preds = %5
  %14 = call i32 @xdl_do_diff(ptr noundef %0, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %9) #6
  %15 = icmp slt i32 %14, 0
  br i1 %15, label %59, label %16

16:                                               ; preds = %13
  %17 = getelementptr inbounds i8, ptr %8, i64 136
  %18 = load i64, ptr %3, align 8, !tbaa !5
  %19 = call i32 @xdl_change_compact(ptr noundef nonnull %8, ptr noundef nonnull %17, i64 noundef %18) #6
  %20 = icmp slt i32 %19, 0
  br i1 %20, label %.sink.split, label %21

21:                                               ; preds = %16
  %22 = load i64, ptr %3, align 8, !tbaa !5
  %23 = call i32 @xdl_change_compact(ptr noundef nonnull %17, ptr noundef nonnull %8, i64 noundef %22) #6
  %24 = icmp slt i32 %23, 0
  br i1 %24, label %.sink.split, label %25

25:                                               ; preds = %21
  %26 = call i32 @xdl_build_script(ptr noundef nonnull %8, ptr noundef nonnull %6) #6
  %27 = icmp slt i32 %26, 0
  br i1 %27, label %.sink.split, label %28

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %9, i64 136
  %30 = load i64, ptr %3, align 8, !tbaa !5
  %31 = call i32 @xdl_change_compact(ptr noundef nonnull %9, ptr noundef nonnull %29, i64 noundef %30) #6
  %32 = icmp slt i32 %31, 0
  br i1 %32, label %.sink.split, label %33

33:                                               ; preds = %28
  %34 = load i64, ptr %3, align 8, !tbaa !5
  %35 = call i32 @xdl_change_compact(ptr noundef nonnull %29, ptr noundef nonnull %9, i64 noundef %34) #6
  %36 = icmp slt i32 %35, 0
  br i1 %36, label %.sink.split, label %37

37:                                               ; preds = %33
  %38 = call i32 @xdl_build_script(ptr noundef nonnull %9, ptr noundef nonnull %7) #6
  %39 = icmp slt i32 %38, 0
  br i1 %39, label %.sink.split, label %40

40:                                               ; preds = %37
  %41 = load ptr, ptr %6, align 8, !tbaa !10
  %.not = icmp eq ptr %41, null
  br i1 %.not, label %42, label %47

42:                                               ; preds = %40
  %43 = getelementptr inbounds i8, ptr %2, i64 8
  %44 = load i64, ptr %43, align 8, !tbaa !12
  %45 = call noalias ptr @malloc(i64 noundef %44) #7
  store ptr %45, ptr %4, align 8, !tbaa !14
  %46 = load ptr, ptr %2, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %45, ptr align 1 %46, i64 %44, i1 false)
  store i64 %44, ptr %10, align 8, !tbaa !17
  br label %56

47:                                               ; preds = %40
  %48 = load ptr, ptr %7, align 8, !tbaa !10
  %.not33 = icmp eq ptr %48, null
  br i1 %.not33, label %49, label %54

49:                                               ; preds = %47
  %50 = getelementptr inbounds i8, ptr %1, i64 8
  %51 = load i64, ptr %50, align 8, !tbaa !12
  %52 = call noalias ptr @malloc(i64 noundef %51) #7
  store ptr %52, ptr %4, align 8, !tbaa !14
  %53 = load ptr, ptr %1, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %52, ptr align 1 %53, i64 %51, i1 false)
  store i64 %51, ptr %10, align 8, !tbaa !17
  br label %56

54:                                               ; preds = %47
  %55 = call i32 @xdl_do_merge(ptr noundef nonnull %8, ptr noundef nonnull %41, ptr noundef nonnull %9, ptr noundef nonnull %48, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %.pre = load ptr, ptr %6, align 8, !tbaa !10
  br label %56

56:                                               ; preds = %49, %54, %42
  %57 = phi ptr [ %.pre, %54 ], [ %41, %49 ], [ null, %42 ]
  %.030 = phi i32 [ %55, %54 ], [ 0, %49 ], [ 0, %42 ]
  call void @xdl_free_script(ptr noundef %57) #6
  %58 = load ptr, ptr %7, align 8, !tbaa !10
  call void @xdl_free_script(ptr noundef %58) #6
  call void @xdl_free_env(ptr noundef nonnull %8) #6
  br label %.sink.split

.sink.split:                                      ; preds = %28, %33, %37, %16, %21, %25, %56
  %.sink = phi ptr [ %9, %56 ], [ %8, %25 ], [ %8, %21 ], [ %8, %16 ], [ %9, %37 ], [ %9, %33 ], [ %9, %28 ]
  %.0.ph = phi i32 [ %.030, %56 ], [ -1, %25 ], [ -1, %21 ], [ -1, %16 ], [ -1, %37 ], [ -1, %33 ], [ -1, %28 ]
  call void @xdl_free_env(ptr noundef nonnull %.sink) #6
  br label %59

59:                                               ; preds = %.sink.split, %5, %13
  %.0 = phi i32 [ -1, %13 ], [ -1, %5 ], [ %.0.ph, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  ret i32 %.0
}

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

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

declare i32 @xdl_change_compact(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

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

declare void @xdl_free_env(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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

declare void @xdl_free_script(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !7, i64 8}
!13 = !{!"s_mmfile", !11, i64 0, !7, i64 8}
!14 = !{!15, !11, i64 0}
!15 = !{!"s_mmbuffer", !11, i64 0, !7, i64 8}
!16 = !{!13, !11, i64 0}
!17 = !{!15, !7, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass