; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal (PxeStart)

; 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.SNP_DRIVER = type <{ i32, [4 x i8], %struct.EFI_LOCK, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct.EFI_SIMPLE_NETWORK_MODE, ptr, ptr, ptr, i8, i8, i16, i32, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, %struct.s_pxe_cdb, [6 x i8], ptr, ptr, ptr, %struct.s_pxe_db_get_init_info, i8, ptr, [100 x %struct.MAP_LIST], ptr, i8, [7 x i8] }>
%struct.EFI_LOCK = type { i64, i64, i32 }
%struct._EFI_SIMPLE_NETWORK_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct.s_pxe_cdb = type { i16, i16, i16, i16, i64, i64, i16, i16, i16, i16 }
%struct.s_pxe_db_get_init_info = type <{ i32, i32, [4 x i32], i32, i16, i16, i16, i16, i16, i16, i16, i16, i8, i8, i8 }>
%struct.MAP_LIST = type { i64, ptr }
%struct.s_pxe_cpb_start_31 = type { i64, i64, i64, i64, i64, i64, i64, i64 }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1

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

46:                                               ; preds = %1
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.SNP_DRIVER, ptr %47, i32 0, i32 20
  %49 = getelementptr inbounds %struct.s_pxe_cdb, ptr %48, i32 0, i32 2
  store i16 64, ptr %49, align 2, !tbaa !22
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = ptrtoint ptr %50 to i64
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.SNP_DRIVER, ptr %52, i32 0, i32 20
  %54 = getelementptr inbounds %struct.s_pxe_cdb, ptr %53, i32 0, i32 4
  store i64 %51, ptr %54, align 2, !tbaa !24
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.s_pxe_cpb_start_31, ptr %55, i32 0, i32 0
  store i64 ptrtoint (ptr @SnpUndi32CallbackDelay to i64), ptr %56, align 1, !tbaa !32
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.s_pxe_cpb_start_31, ptr %57, i32 0, i32 1
  store i64 ptrtoint (ptr @SnpUndi32CallbackBlock to i64), ptr %58, align 1, !tbaa !34
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.s_pxe_cpb_start_31, ptr %59, i32 0, i32 2
  store i64 0, ptr %60, align 1, !tbaa !35
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.s_pxe_cpb_start_31, ptr %61, i32 0, i32 3
  store i64 ptrtoint (ptr @SnpUndi32CallbackMemio to i64), ptr %62, align 1, !tbaa !36
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.s_pxe_cpb_start_31, ptr %63, i32 0, i32 4
  store i64 ptrtoint (ptr @SnpUndi32CallbackMap to i64), ptr %64, align 1, !tbaa !37
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.s_pxe_cpb_start_31, ptr %65, i32 0, i32 5
  store i64 ptrtoint (ptr @SnpUndi32CallbackUnmap to i64), ptr %66, align 1, !tbaa !38
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.s_pxe_cpb_start_31, ptr %67, i32 0, i32 6
  store i64 ptrtoint (ptr @SnpUndi32CallbackSync to i64), ptr %68, align 1, !tbaa !39
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = ptrtoint ptr %69 to i64
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.s_pxe_cpb_start_31, ptr %71, i32 0, i32 7
  store i64 %70, ptr %72, align 1, !tbaa !40
  br label %73

73:                                               ; preds = %46, %1
  br label %74

74:                                               ; preds = %73
  %75 = call zeroext i8 @DebugPrintEnabled()
  %76 = icmp ne i8 %75, 0
  br i1 %76, label %77, label %85

77:                                               ; preds = %74
  br label %78

78:                                               ; preds = %77
  %79 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %80 = icmp ne i8 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %78
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str)
  br label %82

82:                                               ; preds = %81, %78
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  br label %85

85:                                               ; preds = %84, %74
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.SNP_DRIVER, ptr %88, i32 0, i32 7
  %90 = load ptr, ptr %89, align 8, !tbaa !41
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.SNP_DRIVER, ptr %91, i32 0, i32 20
  %93 = ptrtoint ptr %92 to i64
  %94 = call i64 %90(i64 noundef %93)
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.SNP_DRIVER, ptr %95, i32 0, i32 20
  %97 = getelementptr inbounds %struct.s_pxe_cdb, ptr %96, i32 0, i32 6
  %98 = load i16, ptr %97, align 2, !tbaa !26
  %99 = zext i16 %98 to i32
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %126

101:                                              ; preds = %87
  br label %102

102:                                              ; preds = %101
  %103 = call zeroext i8 @DebugPrintEnabled()
  %104 = icmp ne i8 %103, 0
  br i1 %104, label %105, label %123

105:                                              ; preds = %102
  br label %106

106:                                              ; preds = %105
  %107 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %108 = icmp ne i8 %107, 0
  br i1 %108, label %109, label %120

109:                                              ; preds = %106
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.SNP_DRIVER, ptr %110, i32 0, i32 20
  %112 = getelementptr inbounds %struct.s_pxe_cdb, ptr %111, i32 0, i32 6
  %113 = load i16, ptr %112, align 2, !tbaa !26
  %114 = zext i16 %113 to i32
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.SNP_DRIVER, ptr %115, i32 0, i32 20
  %117 = getelementptr inbounds %struct.s_pxe_cdb, ptr %116, i32 0, i32 7
  %118 = load i16, ptr %117, align 2, !tbaa !27
  %119 = zext i16 %118 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.1, i32 noundef %114, i32 noundef %119)
  br label %120

120:                                              ; preds = %109, %106
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122, %102
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  store i64 -9223372036854775801, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %130

126:                                              ; preds = %87
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.SNP_DRIVER, ptr %127, i32 0, i32 4
  %129 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %128, i32 0, i32 0
  store i32 1, ptr %129, align 8, !tbaa !42
  store i64 0, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %130

130:                                              ; preds = %126, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %131 = load i64, ptr %2, align 8
  ret i64 %131
}

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

declare void @SnpUndi32CallbackDelay(i64 noundef, i64 noundef) #2

declare void @SnpUndi32CallbackBlock(i64 noundef, i32 noundef) #2

declare void @SnpUndi32CallbackMemio(i64 noundef, i8 noundef zeroext, i8 noundef zeroext, i64 noundef, i64 noundef) #2

declare void @SnpUndi32CallbackMap(i64 noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef) #2

declare void @SnpUndi32CallbackUnmap(i64 noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef) #2

declare void @SnpUndi32CallbackSync(i64 noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef) #2

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

declare void @DebugPrint(i64 noundef, 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 }

!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 936}
!10 = !{!"", !11, i64 0, !12, i64 8, !14, i64 32, !15, i64 160, !6, i64 816, !6, i64 824, !6, i64 832, !7, i64 840, !17, i64 842, !11, i64 844, !6, i64 848, !6, i64 856, !6, i64 864, !6, i64 872, !6, i64 880, !6, i64 888, !7, i64 896, !7, i64 897, !18, i64 898, !6, i64 936, !6, i64 944, !6, i64 952, !19, i64 960, !6, i64 1008, !7, i64 1016, !6, i64 2616, !7, i64 2624}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 8, !11, i64 16}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!15 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !16, i64 552, !16, i64 584, !16, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!16 = !{!"", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!"s_pxe_cdb", !17, i64 0, !17, i64 2, !17, i64 4, !17, i64 6, !13, i64 8, !13, i64 16, !17, i64 24, !17, i64 26, !17, i64 28, !17, i64 30}
!19 = !{!"s_pxe_db_get_init_info", !11, i64 0, !11, i64 4, !7, i64 8, !11, i64 24, !17, i64 28, !17, i64 30, !17, i64 32, !17, i64 34, !17, i64 36, !17, i64 38, !17, i64 40, !17, i64 42, !7, i64 44, !7, i64 45, !7, i64 46}
!20 = !{!10, !17, i64 898}
!21 = !{!10, !17, i64 900}
!22 = !{!10, !17, i64 902}
!23 = !{!10, !17, i64 904}
!24 = !{!10, !13, i64 906}
!25 = !{!10, !13, i64 914}
!26 = !{!10, !17, i64 922}
!27 = !{!10, !17, i64 924}
!28 = !{!10, !17, i64 842}
!29 = !{!10, !17, i64 926}
!30 = !{!10, !17, i64 928}
!31 = !{!10, !7, i64 840}
!32 = !{!33, !13, i64 0}
!33 = !{!"s_pxe_cpb_start_31", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56}
!34 = !{!33, !13, i64 8}
!35 = !{!33, !13, i64 16}
!36 = !{!33, !13, i64 24}
!37 = !{!33, !13, i64 32}
!38 = !{!33, !13, i64 40}
!39 = !{!33, !13, i64 48}
!40 = !{!33, !13, i64 56}
!41 = !{!10, !6, i64 832}
!42 = !{!10, !11, i64 160}


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

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775801, 1) i64 @PxeStart(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 936
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 898
  store i16 1, ptr %4, align 2, !tbaa !19
  %5 = getelementptr inbounds i8, ptr %0, i64 900
  %6 = getelementptr inbounds i8, ptr %0, i64 922
  %7 = getelementptr inbounds i8, ptr %0, i64 924
  %8 = getelementptr inbounds i8, ptr %0, i64 842
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(26) %5, i8 0, i64 26, i1 false)
  %9 = load i16, ptr %8, align 2, !tbaa !20
  %10 = getelementptr inbounds i8, ptr %0, i64 926
  store i16 %9, ptr %10, align 2, !tbaa !21
  %11 = getelementptr inbounds i8, ptr %0, i64 928
  store i16 0, ptr %11, align 2, !tbaa !22
  %12 = getelementptr inbounds i8, ptr %0, i64 840
  %13 = load i8, ptr %12, align 8, !tbaa !23
  %.not = icmp eq i8 %13, 0
  br i1 %.not, label %26, label %14

14:                                               ; preds = %1
  %15 = getelementptr inbounds i8, ptr %0, i64 906
  %16 = getelementptr inbounds i8, ptr %0, i64 902
  store i16 64, ptr %16, align 2, !tbaa !24
  %17 = ptrtoint ptr %3 to i64
  store i64 %17, ptr %15, align 2, !tbaa !25
  store i64 ptrtoint (ptr @SnpUndi32CallbackDelay to i64), ptr %3, align 1, !tbaa !26
  %18 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 ptrtoint (ptr @SnpUndi32CallbackBlock to i64), ptr %18, align 1, !tbaa !28
  %19 = getelementptr inbounds i8, ptr %3, i64 16
  store i64 0, ptr %19, align 1, !tbaa !29
  %20 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 ptrtoint (ptr @SnpUndi32CallbackMemio to i64), ptr %20, align 1, !tbaa !30
  %21 = getelementptr inbounds i8, ptr %3, i64 32
  store i64 ptrtoint (ptr @SnpUndi32CallbackMap to i64), ptr %21, align 1, !tbaa !31
  %22 = getelementptr inbounds i8, ptr %3, i64 40
  store i64 ptrtoint (ptr @SnpUndi32CallbackUnmap to i64), ptr %22, align 1, !tbaa !32
  %23 = getelementptr inbounds i8, ptr %3, i64 48
  store i64 ptrtoint (ptr @SnpUndi32CallbackSync to i64), ptr %23, align 1, !tbaa !33
  %24 = ptrtoint ptr %0 to i64
  %25 = getelementptr inbounds i8, ptr %3, i64 56
  store i64 %24, ptr %25, align 1, !tbaa !34
  br label %26

26:                                               ; preds = %1, %14
  %27 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not31 = icmp eq i8 %27, 0
  br i1 %.not31, label %31, label %28

28:                                               ; preds = %26
  %29 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not32 = icmp eq i8 %29, 0
  br i1 %.not32, label %31, label %30

30:                                               ; preds = %28
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str) #3
  br label %31

31:                                               ; preds = %28, %30, %26
  %32 = getelementptr inbounds i8, ptr %0, i64 832
  %33 = load ptr, ptr %32, align 8, !tbaa !35
  %34 = ptrtoint ptr %4 to i64
  %35 = tail call i64 %33(i64 noundef %34) #3
  %36 = load i16, ptr %6, align 2, !tbaa !36
  %.not33 = icmp eq i16 %36, 0
  br i1 %.not33, label %46, label %37

37:                                               ; preds = %31
  %38 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not34 = icmp eq i8 %38, 0
  br i1 %.not34, label %48, label %39

39:                                               ; preds = %37
  %40 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not35 = icmp eq i8 %40, 0
  br i1 %.not35, label %48, label %41

41:                                               ; preds = %39
  %42 = load i16, ptr %6, align 2, !tbaa !36
  %43 = zext i16 %42 to i32
  %44 = load i16, ptr %7, align 2, !tbaa !37
  %45 = zext i16 %44 to i32
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.1, i32 noundef %43, i32 noundef %45) #3
  br label %48

46:                                               ; preds = %31
  %47 = getelementptr inbounds i8, ptr %0, i64 160
  store i32 1, ptr %47, align 8, !tbaa !38
  br label %48

48:                                               ; preds = %37, %41, %39, %46
  %.0 = phi i64 [ 0, %46 ], [ -9223372036854775801, %39 ], [ -9223372036854775801, %41 ], [ -9223372036854775801, %37 ]
  ret i64 %.0
}

declare void @SnpUndi32CallbackDelay(i64 noundef, i64 noundef) #1

declare void @SnpUndi32CallbackBlock(i64 noundef, i32 noundef) #1

declare void @SnpUndi32CallbackMemio(i64 noundef, i8 noundef zeroext, i8 noundef zeroext, i64 noundef, i64 noundef) #1

declare void @SnpUndi32CallbackMap(i64 noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef) #1

declare void @SnpUndi32CallbackUnmap(i64 noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef) #1

declare void @SnpUndi32CallbackSync(i64 noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef) #1

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) local_unnamed_addr #1

declare void @DebugPrint(i64 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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 = { "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 nounwind willreturn memory(argmem: write) }
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, !13, i64 936}
!6 = !{!"", !7, i64 0, !10, i64 8, !12, i64 32, !14, i64 160, !13, i64 816, !13, i64 824, !13, i64 832, !8, i64 840, !16, i64 842, !7, i64 844, !13, i64 848, !13, i64 856, !13, i64 864, !13, i64 872, !13, i64 880, !13, i64 888, !8, i64 896, !8, i64 897, !17, i64 898, !13, i64 936, !13, i64 944, !13, i64 952, !18, i64 960, !13, i64 1008, !8, i64 1016, !13, i64 2616, !8, i64 2624}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 8, !7, i64 16}
!11 = !{!"long long", !8, i64 0}
!12 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !11, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"", !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, !8, i64 40, !15, i64 552, !15, i64 584, !15, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!15 = !{!"", !8, i64 0}
!16 = !{!"short", !8, i64 0}
!17 = !{!"s_pxe_cdb", !16, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !11, i64 8, !11, i64 16, !16, i64 24, !16, i64 26, !16, i64 28, !16, i64 30}
!18 = !{!"s_pxe_db_get_init_info", !7, i64 0, !7, i64 4, !8, i64 8, !7, i64 24, !16, i64 28, !16, i64 30, !16, i64 32, !16, i64 34, !16, i64 36, !16, i64 38, !16, i64 40, !16, i64 42, !8, i64 44, !8, i64 45, !8, i64 46}
!19 = !{!6, !16, i64 898}
!20 = !{!6, !16, i64 842}
!21 = !{!6, !16, i64 926}
!22 = !{!6, !16, i64 928}
!23 = !{!6, !8, i64 840}
!24 = !{!6, !16, i64 902}
!25 = !{!6, !11, i64 906}
!26 = !{!27, !11, i64 0}
!27 = !{!"s_pxe_cpb_start_31", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!28 = !{!27, !11, i64 8}
!29 = !{!27, !11, i64 16}
!30 = !{!27, !11, i64 24}
!31 = !{!27, !11, i64 32}
!32 = !{!27, !11, i64 40}
!33 = !{!27, !11, i64 48}
!34 = !{!27, !11, i64 56}
!35 = !{!6, !13, i64 832}
!36 = !{!6, !16, i64 922}
!37 = !{!6, !16, i64 924}
!38 = !{!6, !7, i64 160}


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