; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/NetworkPkg/IScsiDxe (IScsiDhcpIsConfigured)

; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct._ISCSI_ATTEMPT_CONFIG_NVDATA = type <{ %struct._LIST_ENTRY, i8, i8, i8, i8, i8, i8, i16, i16, [96 x i8], [96 x i8], %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %struct._ISCSI_SESSION_CONFIG_NVDATA, i8, %union.anon }>
%struct._LIST_ENTRY = type { ptr, ptr }
%union.EFI_IP_ADDRESS = type { [4 x i32] }
%struct._ISCSI_SESSION_CONFIG_NVDATA = type <{ i16, i8, i8, %union.EFI_IP_ADDRESS, %struct.EFI_IPv4_ADDRESS, %union.EFI_IP_ADDRESS, i8, i8, [224 x i8], %union.EFI_IP_ADDRESS, i8, [8 x i8], i16, i8, [6 x i8] }>
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%union.anon = type { %struct._ISCSI_CHAP_AUTH_CONFIG_NVDATA }
%struct._ISCSI_CHAP_AUTH_CONFIG_NVDATA = type { i8, [127 x i8], [17 x i8], [127 x i8], [17 x i8] }

@.str.1 = external hidden unnamed_addr constant [133 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i32], align 4
@gIScsiConfigGuid = external global %struct.GUID, align 4
@.str.5 = external hidden unnamed_addr constant [5 x i32], align 4
@gEfiIScsiInitiatorNameProtocolGuid = external global %struct.GUID, align 4
@.str.6 = external hidden unnamed_addr constant [60 x i8], align 1

; 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 zeroext i8 @DebugAssertEnabled() #1

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @IScsiMacAddrToStr(ptr noundef, i32 noundef, i16 noundef zeroext, ptr noundef) #2

declare i64 @UnicodeSPrint(ptr noundef, i64 noundef, ptr noundef, ...) #1

declare i64 @NetLibGetMacAddress(ptr noundef, ptr noundef, ptr noundef) #1

declare zeroext i16 @NetLibGetVlanId(ptr noundef) #1

declare void @FreePool(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @IScsiGetVariableAndSize(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @IScsiDhcpIsConfigured(ptr noundef %0, i8 noundef zeroext %1) #2 {
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %struct.EFI_MAC_ADDRESS, align 1
  %12 = alloca i64, align 8
  %13 = alloca i16, align 2
  %14 = alloca [96 x i16], align 16
  %15 = alloca [223 x i16], align 16
  %16 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i8 %1, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 192, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 446, ptr %15) #3
  %17 = call ptr @IScsiGetVariableAndSize(ptr noundef @.str.4, ptr noundef @gIScsiConfigGuid, ptr noundef %8)
  store ptr %17, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %23, label %20

20:                                               ; preds = %2
  %21 = load i64, ptr %8, align 8, !tbaa !10
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %20, %2
  store i8 0, ptr %3, align 1
  store i32 1, ptr %16, align 4
  br label %139

24:                                               ; preds = %20
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call i64 @NetLibGetMacAddress(ptr noundef %25, ptr noundef %11, ptr noundef %12)
  store i64 %26, ptr %10, align 8, !tbaa !10
  %27 = load i64, ptr %10, align 8, !tbaa !10
  %28 = icmp slt i64 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  store i8 0, ptr %3, align 1
  store i32 1, ptr %16, align 4
  br label %139

30:                                               ; preds = %24
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call zeroext i16 @NetLibGetVlanId(ptr noundef %31)
  store i16 %32, ptr %13, align 2, !tbaa !12
  %33 = load i64, ptr %12, align 8, !tbaa !10
  %34 = trunc i64 %33 to i32
  %35 = load i16, ptr %13, align 2, !tbaa !12
  %36 = getelementptr inbounds [96 x i16], ptr %14, i64 0, i64 0
  call void @IScsiMacAddrToStr(ptr noundef %11, i32 noundef %34, i16 noundef zeroext %35, ptr noundef %36)
  store i64 0, ptr %9, align 8, !tbaa !10
  br label %37

37:                                               ; preds = %134, %30
  %38 = load i64, ptr %9, align 8, !tbaa !10
  %39 = load i64, ptr %8, align 8, !tbaa !10
  %40 = udiv i64 %39, 1
  %41 = icmp ult i64 %38, %40
  br i1 %41, label %42, label %137

42:                                               ; preds = %37
  %43 = getelementptr inbounds [223 x i16], ptr %15, i64 0, i64 0
  %44 = getelementptr inbounds [96 x i16], ptr %14, i64 0, i64 0
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = load i64, ptr %9, align 8, !tbaa !10
  %47 = getelementptr inbounds i8, ptr %45, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = zext i8 %48 to i64
  %50 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %43, i64 noundef 128, ptr noundef @.str.5, ptr noundef %44, i64 noundef %49)
  %51 = getelementptr inbounds [223 x i16], ptr %15, i64 0, i64 0
  %52 = call i64 @GetVariable2(ptr noundef %51, ptr noundef @gEfiIScsiInitiatorNameProtocolGuid, ptr noundef %6, ptr noundef null)
  store i64 %52, ptr %10, align 8, !tbaa !10
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = icmp eq ptr %53, null
  br i1 %54, label %58, label %55

55:                                               ; preds = %42
  %56 = load i64, ptr %10, align 8, !tbaa !10
  %57 = icmp slt i64 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %55, %42
  br label %134

59:                                               ; preds = %55
  br label %60

60:                                               ; preds = %59
  %61 = call zeroext i8 @DebugAssertEnabled()
  %62 = icmp ne i8 %61, 0
  br i1 %62, label %63, label %76

63:                                               ; preds = %60
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load i64, ptr %9, align 8, !tbaa !10
  %66 = getelementptr inbounds i8, ptr %64, i64 %65
  %67 = load i8, ptr %66, align 1, !tbaa !9
  %68 = zext i8 %67 to i32
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %69, i32 0, i32 2
  %71 = load i8, ptr %70, align 1, !tbaa !14
  %72 = zext i8 %71 to i32
  %73 = icmp eq i32 %68, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %63
  call void @DebugAssert(ptr noundef @.str.1, i64 noundef 963, ptr noundef @.str.6)
  br label %75

75:                                               ; preds = %74, %63
  br label %76

76:                                               ; preds = %75, %60
  br label %77

77:                                               ; preds = %76
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %79, i32 0, i32 14
  %81 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %80, i32 0, i32 1
  %82 = load i8, ptr %81, align 1, !tbaa !19
  %83 = zext i8 %82 to i32
  %84 = icmp eq i32 %83, 0
  br i1 %84, label %85, label %87

85:                                               ; preds = %78
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  call void @FreePool(ptr noundef %86)
  br label %134

87:                                               ; preds = %78
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %88, i32 0, i32 14
  %90 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %89, i32 0, i32 2
  %91 = load i8, ptr %90, align 1, !tbaa !20
  %92 = zext i8 %91 to i32
  %93 = icmp ne i32 %92, 2
  br i1 %93, label %94, label %108

94:                                               ; preds = %87
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %95, i32 0, i32 14
  %97 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %96, i32 0, i32 2
  %98 = load i8, ptr %97, align 1, !tbaa !20
  %99 = zext i8 %98 to i32
  %100 = load i8, ptr %5, align 1, !tbaa !9
  %101 = zext i8 %100 to i32
  %102 = icmp eq i32 %101, 4
  %103 = zext i1 %102 to i64
  %104 = select i1 %102, i32 0, i32 1
  %105 = icmp ne i32 %99, %104
  br i1 %105, label %106, label %108

106:                                              ; preds = %94
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  call void @FreePool(ptr noundef %107)
  br label %134

108:                                              ; preds = %94, %87
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %109, i32 0, i32 14
  %111 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %110, i32 0, i32 2
  %112 = load i8, ptr %111, align 1, !tbaa !20
  %113 = zext i8 %112 to i32
  %114 = icmp eq i32 %113, 2
  br i1 %114, label %129, label %115

115:                                              ; preds = %108
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %116, i32 0, i32 14
  %118 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %117, i32 0, i32 6
  %119 = load i8, ptr %118, align 1, !tbaa !21
  %120 = zext i8 %119 to i32
  %121 = icmp eq i32 %120, 1
  br i1 %121, label %129, label %122

122:                                              ; preds = %115
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %123, i32 0, i32 14
  %125 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %124, i32 0, i32 7
  %126 = load i8, ptr %125, align 1, !tbaa !22
  %127 = zext i8 %126 to i32
  %128 = icmp eq i32 %127, 1
  br i1 %128, label %129, label %132

129:                                              ; preds = %122, %115, %108
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  call void @FreePool(ptr noundef %130)
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  call void @FreePool(ptr noundef %131)
  store i8 1, ptr %3, align 1
  store i32 1, ptr %16, align 4
  br label %139

132:                                              ; preds = %122
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  call void @FreePool(ptr noundef %133)
  br label %134

134:                                              ; preds = %132, %106, %85, %58
  %135 = load i64, ptr %9, align 8, !tbaa !10
  %136 = add i64 %135, 1
  store i64 %136, ptr %9, align 8, !tbaa !10
  br label %37, !llvm.loop !23

137:                                              ; preds = %37
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  call void @FreePool(ptr noundef %138)
  store i8 0, ptr %3, align 1
  store i32 1, ptr %16, align 4
  br label %139

139:                                              ; preds = %137, %129, %29, %23
  call void @llvm.lifetime.end.p0(i64 446, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 192, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %140 = load i8, ptr %3, align 1
  ret i8 %140
}

declare i64 @GetVariable2(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !7, i64 17}
!15 = !{!"_ISCSI_ATTEMPT_CONFIG_NVDATA", !16, i64 0, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !13, i64 22, !13, i64 24, !7, i64 26, !7, i64 122, !7, i64 218, !7, i64 234, !7, i64 250, !17, i64 266, !7, i64 566, !7, i64 567}
!16 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!17 = !{!"_ISCSI_SESSION_CONFIG_NVDATA", !13, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !18, i64 20, !7, i64 24, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 266, !7, i64 282, !7, i64 283, !13, i64 291, !7, i64 293, !7, i64 294}
!18 = !{!"", !7, i64 0}
!19 = !{!15, !7, i64 268}
!20 = !{!15, !7, i64 269}
!21 = !{!15, !7, i64 306}
!22 = !{!15, !7, i64 307}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }

@.str.1 = external hidden unnamed_addr constant [133 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i32], align 4
@gIScsiConfigGuid = external global %struct.GUID, align 4
@.str.5 = external hidden unnamed_addr constant [5 x i32], align 4
@gEfiIScsiInitiatorNameProtocolGuid = external global %struct.GUID, align 4
@.str.6 = external hidden unnamed_addr constant [60 x i8], align 1

; 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 zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @IScsiMacAddrToStr(ptr noundef, i32 noundef, i16 noundef zeroext, ptr noundef) local_unnamed_addr #2

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

declare i64 @NetLibGetMacAddress(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i16 @NetLibGetVlanId(ptr noundef) local_unnamed_addr #1

declare void @FreePool(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @IScsiGetVariableAndSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local zeroext range(i8 0, 2) i8 @IScsiDhcpIsConfigured(ptr noundef %0, i8 noundef zeroext %1) local_unnamed_addr #2 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca %struct.EFI_MAC_ADDRESS, align 1
  %6 = alloca i64, align 8
  %7 = alloca [96 x i16], align 16
  %8 = alloca [223 x i16], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 446, ptr nonnull %8) #3
  %9 = call ptr @IScsiGetVariableAndSize(ptr noundef nonnull @.str.4, ptr noundef nonnull @gIScsiConfigGuid, ptr noundef nonnull %4)
  %10 = icmp eq ptr %9, null
  %11 = load i64, ptr %4, align 8
  %12 = icmp eq i64 %11, 0
  %or.cond = select i1 %10, i1 true, i1 %12
  br i1 %or.cond, label %61, label %13

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

16:                                               ; preds = %13
  %17 = call zeroext i16 @NetLibGetVlanId(ptr noundef %0) #3
  %18 = load i64, ptr %6, align 8, !tbaa !5
  %19 = trunc i64 %18 to i32
  call void @IScsiMacAddrToStr(ptr noundef nonnull %5, i32 noundef %19, i16 noundef zeroext %17, ptr noundef nonnull %7)
  %20 = load i64, ptr %4, align 8, !tbaa !5
  %.not24 = icmp eq i64 %20, 0
  br i1 %.not24, label %.sink.split26, label %.lr.ph

.lr.ph:                                           ; preds = %16
  %21 = icmp ne i8 %1, 4
  %22 = zext i1 %21 to i8
  br label %23

23:                                               ; preds = %.lr.ph, %57
  %.01823 = phi i64 [ 0, %.lr.ph ], [ %58, %57 ]
  %24 = getelementptr inbounds i8, ptr %9, i64 %.01823
  %25 = load i8, ptr %24, align 1, !tbaa !9
  %26 = zext i8 %25 to i64
  %27 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef nonnull %8, i64 noundef 128, ptr noundef nonnull @.str.5, ptr noundef nonnull %7, i64 noundef %26) #3
  %28 = call i64 @GetVariable2(ptr noundef nonnull %8, ptr noundef nonnull @gEfiIScsiInitiatorNameProtocolGuid, ptr noundef nonnull %3, ptr noundef null) #3
  %29 = load ptr, ptr %3, align 8, !tbaa !10
  %30 = icmp eq ptr %29, null
  %31 = icmp slt i64 %28, 0
  %or.cond3 = select i1 %30, i1 true, i1 %31
  br i1 %or.cond3, label %57, label %32

32:                                               ; preds = %23
  %33 = call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %33, 0
  %.pre25 = load ptr, ptr %3, align 8, !tbaa !10
  br i1 %.not, label %40, label %34

34:                                               ; preds = %32
  %35 = load i8, ptr %24, align 1, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %.pre25, i64 17
  %37 = load i8, ptr %36, align 1, !tbaa !12
  %38 = icmp eq i8 %35, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %34
  call void @DebugAssert(ptr noundef nonnull @.str.1, i64 noundef 963, ptr noundef nonnull @.str.6) #3
  %.pre = load ptr, ptr %3, align 8, !tbaa !10
  br label %40

40:                                               ; preds = %34, %39, %32
  %41 = phi ptr [ %.pre25, %34 ], [ %.pre, %39 ], [ %.pre25, %32 ]
  %42 = getelementptr inbounds i8, ptr %41, i64 268
  %43 = load i8, ptr %42, align 1, !tbaa !18
  %44 = icmp eq i8 %43, 0
  br i1 %44, label %.sink.split, label %45

45:                                               ; preds = %40
  %46 = getelementptr inbounds i8, ptr %41, i64 269
  %47 = load i8, ptr %46, align 1, !tbaa !19
  %.not21 = icmp eq i8 %47, 2
  br i1 %.not21, label %.thread, label %48

48:                                               ; preds = %45
  %.not22 = icmp eq i8 %47, %22
  br i1 %.not22, label %49, label %.sink.split

49:                                               ; preds = %48
  %50 = getelementptr inbounds i8, ptr %41, i64 306
  %51 = load i8, ptr %50, align 1, !tbaa !20
  %52 = icmp eq i8 %51, 1
  br i1 %52, label %.thread, label %53

53:                                               ; preds = %49
  %54 = getelementptr inbounds i8, ptr %41, i64 307
  %55 = load i8, ptr %54, align 1, !tbaa !21
  %56 = icmp eq i8 %55, 1
  br i1 %56, label %.thread, label %.sink.split

.thread:                                          ; preds = %45, %53, %49
  call void @FreePool(ptr noundef nonnull %41) #3
  br label %.sink.split26

.sink.split:                                      ; preds = %53, %48, %40
  call void @FreePool(ptr noundef nonnull %41) #3
  br label %57

57:                                               ; preds = %.sink.split, %23
  %58 = add nuw i64 %.01823, 1
  %59 = load i64, ptr %4, align 8, !tbaa !5
  %60 = icmp ult i64 %58, %59
  br i1 %60, label %23, label %.sink.split26, !llvm.loop !22

.sink.split26:                                    ; preds = %57, %16, %.thread
  %.0.ph = phi i8 [ 1, %.thread ], [ 0, %16 ], [ 0, %57 ]
  call void @FreePool(ptr noundef nonnull %9) #3
  br label %61

61:                                               ; preds = %.sink.split26, %13, %2
  %.0 = phi i8 [ 0, %2 ], [ 0, %13 ], [ %.0.ph, %.sink.split26 ]
  call void @llvm.lifetime.end.p0(i64 446, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret i8 %.0
}

declare i64 @GetVariable2(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !7, i64 17}
!13 = !{!"_ISCSI_ATTEMPT_CONFIG_NVDATA", !14, i64 0, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !15, i64 22, !15, i64 24, !7, i64 26, !7, i64 122, !7, i64 218, !7, i64 234, !7, i64 250, !16, i64 266, !7, i64 566, !7, i64 567}
!14 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!15 = !{!"short", !7, i64 0}
!16 = !{!"_ISCSI_SESSION_CONFIG_NVDATA", !15, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !17, i64 20, !7, i64 24, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 266, !7, i64 282, !7, i64 283, !15, i64 291, !7, i64 293, !7, i64 294}
!17 = !{!"", !7, i64 0}
!18 = !{!13, !7, i64 268}
!19 = !{!13, !7, i64 269}
!20 = !{!13, !7, i64 306}
!21 = !{!13, !7, i64 307}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass