; LLVM IR from gem5/gem5 :: ext/libfdt (fdt_rw)

; 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.fdt_header = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

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

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

declare i32 @fdt_num_mem_rsv(ptr noundef) #1

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

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

28:                                               ; preds = %3
  %29 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %29, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %31

30:                                               ; preds = %3
  store i32 0, ptr %16, align 4
  br label %31

31:                                               ; preds = %30, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  %32 = load i32, ptr %16, align 4
  switch i32 %32, label %148 [
    i32 0, label %33
  ]

33:                                               ; preds = %31
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = call i32 @fdt_num_mem_rsv(ptr noundef %34)
  %36 = add nsw i32 %35, 1
  %37 = sext i32 %36 to i64
  %38 = mul i64 %37, 16
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %9, align 4, !tbaa !9
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.fdt_header, ptr %40, i32 0, i32 5
  %42 = load i32, ptr %41, align 4, !tbaa !13
  %43 = call i32 @fdt32_to_cpu(i32 noundef %42)
  %44 = icmp uge i32 %43, 17
  br i1 %44, label %45, label %50

45:                                               ; preds = %33
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.fdt_header, ptr %46, i32 0, i32 9
  %48 = load i32, ptr %47, align 4, !tbaa !14
  %49 = call i32 @fdt32_to_cpu(i32 noundef %48)
  store i32 %49, ptr %10, align 4, !tbaa !9
  br label %63

50:                                               ; preds = %33
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %56, %50
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = load i32, ptr %10, align 4, !tbaa !9
  %54 = call i32 @fdt_next_tag(ptr noundef %52, i32 noundef %53, ptr noundef %10)
  %55 = icmp ne i32 %54, 9
  br i1 %55, label %56, label %57

56:                                               ; preds = %51
  br label %51, !llvm.loop !15

57:                                               ; preds = %51
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = icmp slt i32 %58, 0
  br i1 %59, label %60, label %62

60:                                               ; preds = %57
  %61 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %61, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %148

62:                                               ; preds = %57
  br label %63

63:                                               ; preds = %62, %45
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = load i32, ptr %10, align 4, !tbaa !9
  %67 = call i32 @_fdt_blocks_misordered(ptr noundef %64, i32 noundef %65, i32 noundef %66)
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %84, label %69

69:                                               ; preds = %63
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = call i32 @fdt_move(ptr noundef %70, ptr noundef %71, i32 noundef %72)
  store i32 %73, ptr %8, align 4, !tbaa !9
  %74 = load i32, ptr %8, align 4, !tbaa !9
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %69
  %77 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %77, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %148

78:                                               ; preds = %69
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  call void @fdt_set_version(ptr noundef %79, i32 noundef 17)
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load i32, ptr %10, align 4, !tbaa !9
  call void @fdt_set_size_dt_struct(ptr noundef %80, i32 noundef %81)
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load i32, ptr %7, align 4, !tbaa !9
  call void @fdt_set_totalsize(ptr noundef %82, i32 noundef %83)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %148

84:                                               ; preds = %63
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = add i64 40, %86
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = add i64 %87, %89
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.fdt_header, ptr %91, i32 0, i32 8
  %93 = load i32, ptr %92, align 4, !tbaa !17
  %94 = call i32 @fdt32_to_cpu(i32 noundef %93)
  %95 = zext i32 %94 to i64
  %96 = add i64 %90, %95
  %97 = trunc i64 %96 to i32
  store i32 %97, ptr %11, align 4, !tbaa !9
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = load i32, ptr %11, align 4, !tbaa !9
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %102

101:                                              ; preds = %84
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %148

102:                                              ; preds = %84
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %103, ptr %14, align 8, !tbaa !5
  %104 = load ptr, ptr %14, align 8, !tbaa !5
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %104, i64 %106
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = icmp ugt ptr %107, %108
  br i1 %109, label %110, label %129

110:                                              ; preds = %102
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = icmp ult ptr %111, %112
  br i1 %113, label %114, label %129

114:                                              ; preds = %110
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = ptrtoint ptr %115 to i64
  %117 = inttoptr i64 %116 to ptr
  store ptr %117, ptr %14, align 8, !tbaa !5
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i8, ptr %118, i64 %120
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = load i32, ptr %7, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i8, ptr %122, i64 %124
  %126 = icmp ugt ptr %121, %125
  br i1 %126, label %127, label %128

127:                                              ; preds = %114
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %148

128:                                              ; preds = %114
  br label %129

129:                                              ; preds = %128, %110, %102
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = load ptr, ptr %14, align 8, !tbaa !5
  %132 = load i32, ptr %9, align 4, !tbaa !9
  %133 = load i32, ptr %10, align 4, !tbaa !9
  call void @_fdt_packblocks(ptr noundef %130, ptr noundef %131, i32 noundef %132, i32 noundef %133)
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  %136 = load i32, ptr %11, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %134, ptr align 1 %135, i64 %137, i1 false)
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  call void @fdt_set_magic(ptr noundef %138, i32 noundef -804389139)
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = load i32, ptr %7, align 4, !tbaa !9
  call void @fdt_set_totalsize(ptr noundef %139, i32 noundef %140)
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  call void @fdt_set_version(ptr noundef %141, i32 noundef 17)
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  call void @fdt_set_last_comp_version(ptr noundef %142, i32 noundef 16)
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.fdt_header, ptr %144, i32 0, i32 7
  %146 = load i32, ptr %145, align 4, !tbaa !18
  %147 = call i32 @fdt32_to_cpu(i32 noundef %146)
  call void @fdt_set_boot_cpuid_phys(ptr noundef %143, i32 noundef %147)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %148

148:                                              ; preds = %129, %127, %101, %78, %76, %60, %31
  call void @llvm.lifetime.end.p0(i64 8, 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 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %149 = load i32, ptr %4, align 4
  ret i32 %149
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @fdt32_to_cpu(i32 noundef) #3

declare i32 @fdt_check_header(ptr noundef) #1

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @_fdt_packblocks(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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, !10, i64 4}
!12 = !{!"fdt_header", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!13 = !{!12, !10, i64 20}
!14 = !{!12, !10, i64 36}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !10, i64 32}
!18 = !{!12, !10, i64 28}


; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

declare i32 @fdt_num_mem_rsv(ptr noundef) local_unnamed_addr #1

declare i32 @fdt_next_tag(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @fdt_open_into(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %5 = getelementptr inbounds i8, ptr %0, i64 4
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = tail call i32 @fdt32_to_cpu(i32 noundef %6)
  %8 = zext i32 %7 to i64
  %9 = getelementptr inbounds i8, ptr %0, i64 %8
  %10 = tail call i32 @fdt_check_header(ptr noundef %0) #5
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %11, label %61

11:                                               ; preds = %3
  %12 = tail call i32 @fdt_num_mem_rsv(ptr noundef nonnull %0) #5
  %13 = shl i32 %12, 4
  %14 = add i32 %13, 16
  %15 = getelementptr inbounds i8, ptr %0, i64 20
  %16 = load i32, ptr %15, align 4, !tbaa !10
  %17 = tail call i32 @fdt32_to_cpu(i32 noundef %16)
  %18 = icmp ugt i32 %17, 16
  br i1 %18, label %19, label %23

19:                                               ; preds = %11
  %20 = getelementptr inbounds i8, ptr %0, i64 36
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = tail call i32 @fdt32_to_cpu(i32 noundef %21)
  store i32 %22, ptr %4, align 4, !tbaa !12
  br label %30

23:                                               ; preds = %11
  store i32 0, ptr %4, align 4, !tbaa !12
  br label %24

24:                                               ; preds = %24, %23
  %25 = load i32, ptr %4, align 4, !tbaa !12
  %26 = call i32 @fdt_next_tag(ptr noundef %0, i32 noundef %25, ptr noundef nonnull %4) #5
  %.not58 = icmp eq i32 %26, 9
  br i1 %.not58, label %27, label %24, !llvm.loop !13

27:                                               ; preds = %24
  %28 = load i32, ptr %4, align 4, !tbaa !12
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %61, label %30

30:                                               ; preds = %27, %19
  %31 = phi i32 [ %28, %27 ], [ %22, %19 ]
  %32 = call i32 @_fdt_blocks_misordered(ptr noundef %0, i32 noundef %14, i32 noundef %31)
  %.not59 = icmp eq i32 %32, 0
  br i1 %.not59, label %33, label %37

33:                                               ; preds = %30
  %34 = call i32 @fdt_move(ptr noundef %0, ptr noundef %1, i32 noundef %2) #5
  %.not60 = icmp eq i32 %34, 0
  br i1 %.not60, label %35, label %61

35:                                               ; preds = %33
  call void @fdt_set_version(ptr noundef %1, i32 noundef 17)
  %36 = load i32, ptr %4, align 4, !tbaa !12
  call void @fdt_set_size_dt_struct(ptr noundef %1, i32 noundef %36)
  call void @fdt_set_totalsize(ptr noundef %1, i32 noundef %2)
  br label %61

37:                                               ; preds = %30
  %38 = add i32 %13, 56
  %39 = load i32, ptr %4, align 4, !tbaa !12
  %40 = add i32 %38, %39
  %41 = getelementptr inbounds i8, ptr %0, i64 32
  %42 = load i32, ptr %41, align 4, !tbaa !15
  %43 = call i32 @fdt32_to_cpu(i32 noundef %42)
  %44 = add i32 %40, %43
  %45 = icmp sgt i32 %44, %2
  br i1 %45, label %61, label %46

46:                                               ; preds = %37
  %47 = sext i32 %44 to i64
  %48 = getelementptr inbounds i8, ptr %1, i64 %47
  %49 = icmp ugt ptr %48, %0
  %50 = icmp ugt ptr %9, %1
  %or.cond = select i1 %49, i1 %50, i1 false
  br i1 %or.cond, label %51, label %56

51:                                               ; preds = %46
  %52 = getelementptr inbounds i8, ptr %9, i64 %47
  %53 = sext i32 %2 to i64
  %54 = getelementptr inbounds i8, ptr %1, i64 %53
  %55 = icmp ugt ptr %52, %54
  br i1 %55, label %61, label %56

56:                                               ; preds = %51, %46
  %.050 = phi ptr [ %9, %51 ], [ %1, %46 ]
  %57 = load i32, ptr %4, align 4, !tbaa !12
  call void @_fdt_packblocks(ptr noundef nonnull %0, ptr noundef %.050, i32 noundef %14, i32 noundef %57)
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %1, ptr align 1 %.050, i64 %47, i1 false)
  call void @fdt_set_magic(ptr noundef %1, i32 noundef -804389139)
  call void @fdt_set_totalsize(ptr noundef %1, i32 noundef %2)
  call void @fdt_set_version(ptr noundef %1, i32 noundef 17)
  call void @fdt_set_last_comp_version(ptr noundef %1, i32 noundef 16)
  %58 = getelementptr inbounds i8, ptr %0, i64 28
  %59 = load i32, ptr %58, align 4, !tbaa !16
  %60 = call i32 @fdt32_to_cpu(i32 noundef %59)
  call void @fdt_set_boot_cpuid_phys(ptr noundef %1, i32 noundef %60)
  br label %61

61:                                               ; preds = %51, %37, %33, %27, %3, %56, %35
  %.1 = phi i32 [ 0, %56 ], [ 0, %35 ], [ %10, %3 ], [ %28, %27 ], [ %34, %33 ], [ -3, %37 ], [ -3, %51 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  ret i32 %.1
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @fdt32_to_cpu(i32 noundef) local_unnamed_addr #3

declare i32 @fdt_check_header(ptr noundef) local_unnamed_addr #1

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

declare i32 @fdt_move(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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, !7, i64 4}
!6 = !{!"fdt_header", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 20}
!11 = !{!6, !7, i64 36}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!6, !7, i64 32}
!16 = !{!6, !7, i64 28}


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