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

; 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.EFI_TIME = type { i16, i8, i8, i8, i8, i8, i8, i32, i16, i8, i8 }
%struct.ETHER_HEAD = type { [6 x i8], [6 x i8], i16 }
%struct.IP4_HEAD = type { i8, i8, i16, i16, i16, i8, i8, i16, i32, i32 }
%struct.EFI_UDP_HEADER = type { i16, i16, i16, i16 }
%struct.EFI_RUNTIME_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }

@mSyslogPacketSeq = external dso_local global i32, align 4
@mSyslogDstMac = external dso_local global [6 x i8], align 1
@mSyslogDstIp = external dso_local global i32, align 4
@mSyslogSrcIp = external dso_local global i32, align 4
@mMonthName = external dso_local global [12 x ptr], align 16
@gRT = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [144 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [33 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 ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @SyslogBuildPacket(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6) #2 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %struct.EFI_TIME, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 %0, ptr %8, align 4, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %21 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %21, ptr %15, align 8, !tbaa !9
  %22 = load ptr, ptr %15, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.ETHER_HEAD, ptr %22, i32 0, i32 0
  %24 = getelementptr inbounds [6 x i8], ptr %23, i64 0, i64 0
  %25 = call ptr @CopyMem(ptr noundef %24, ptr noundef @mSyslogDstMac, i64 noundef 6)
  %26 = load ptr, ptr %15, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.ETHER_HEAD, ptr %26, i32 0, i32 1
  %28 = getelementptr inbounds [6 x i8], ptr %27, i64 0, i64 0
  %29 = call ptr @ZeroMem(ptr noundef %28, i64 noundef 6)
  %30 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 2048)
  %31 = load ptr, ptr %15, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.ETHER_HEAD, ptr %31, i32 0, i32 2
  store i16 %30, ptr %32, align 1, !tbaa !11
  %33 = load ptr, ptr %14, align 8, !tbaa !9
  %34 = getelementptr inbounds i8, ptr %33, i64 14
  store ptr %34, ptr %14, align 8, !tbaa !9
  %35 = load i32, ptr %13, align 4, !tbaa !5
  %36 = zext i32 %35 to i64
  %37 = sub i64 %36, 14
  %38 = trunc i64 %37 to i32
  store i32 %38, ptr %13, align 4, !tbaa !5
  %39 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %39, ptr %16, align 8, !tbaa !9
  %40 = load ptr, ptr %16, align 8, !tbaa !9
  %41 = load i8, ptr %40, align 1
  %42 = and i8 %41, -16
  %43 = or i8 %42, 5
  store i8 %43, ptr %40, align 1
  %44 = load ptr, ptr %16, align 8, !tbaa !9
  %45 = load i8, ptr %44, align 1
  %46 = and i8 %45, 15
  %47 = or i8 %46, 64
  store i8 %47, ptr %44, align 1
  %48 = load ptr, ptr %16, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.IP4_HEAD, ptr %48, i32 0, i32 1
  store i8 0, ptr %49, align 1, !tbaa !14
  %50 = load ptr, ptr %16, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.IP4_HEAD, ptr %50, i32 0, i32 2
  store i16 0, ptr %51, align 1, !tbaa !16
  %52 = load i32, ptr @mSyslogPacketSeq, align 4, !tbaa !5
  %53 = trunc i32 %52 to i16
  %54 = load ptr, ptr %16, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.IP4_HEAD, ptr %54, i32 0, i32 3
  store i16 %53, ptr %55, align 1, !tbaa !17
  %56 = load ptr, ptr %16, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.IP4_HEAD, ptr %56, i32 0, i32 4
  store i16 0, ptr %57, align 1, !tbaa !18
  %58 = load ptr, ptr %16, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.IP4_HEAD, ptr %58, i32 0, i32 5
  store i8 16, ptr %59, align 1, !tbaa !19
  %60 = load ptr, ptr %16, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.IP4_HEAD, ptr %60, i32 0, i32 6
  store i8 17, ptr %61, align 1, !tbaa !20
  %62 = load ptr, ptr %16, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.IP4_HEAD, ptr %62, i32 0, i32 7
  store i16 0, ptr %63, align 1, !tbaa !21
  %64 = load i32, ptr @mSyslogSrcIp, align 4, !tbaa !5
  %65 = load ptr, ptr %16, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.IP4_HEAD, ptr %65, i32 0, i32 8
  store i32 %64, ptr %66, align 1, !tbaa !22
  %67 = load i32, ptr @mSyslogDstIp, align 4, !tbaa !5
  %68 = load ptr, ptr %16, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.IP4_HEAD, ptr %68, i32 0, i32 9
  store i32 %67, ptr %69, align 1, !tbaa !23
  %70 = load ptr, ptr %14, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %70, i64 20
  store ptr %71, ptr %14, align 8, !tbaa !9
  %72 = load i32, ptr %13, align 4, !tbaa !5
  %73 = zext i32 %72 to i64
  %74 = sub i64 %73, 20
  %75 = trunc i64 %74 to i32
  store i32 %75, ptr %13, align 4, !tbaa !5
  %76 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %76, ptr %17, align 8, !tbaa !9
  %77 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 514)
  %78 = load ptr, ptr %17, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.EFI_UDP_HEADER, ptr %78, i32 0, i32 0
  store i16 %77, ptr %79, align 1, !tbaa !24
  %80 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 514)
  %81 = load ptr, ptr %17, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.EFI_UDP_HEADER, ptr %81, i32 0, i32 1
  store i16 %80, ptr %82, align 1, !tbaa !26
  %83 = load ptr, ptr %17, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.EFI_UDP_HEADER, ptr %83, i32 0, i32 2
  store i16 0, ptr %84, align 1, !tbaa !27
  %85 = load ptr, ptr %17, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.EFI_UDP_HEADER, ptr %85, i32 0, i32 3
  store i16 0, ptr %86, align 1, !tbaa !28
  %87 = load ptr, ptr %14, align 8, !tbaa !9
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  store ptr %88, ptr %14, align 8, !tbaa !9
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = zext i32 %89 to i64
  %91 = sub i64 %90, 8
  %92 = trunc i64 %91 to i32
  store i32 %92, ptr %13, align 4, !tbaa !5
  %93 = load i32, ptr %8, align 4, !tbaa !5
  %94 = and i32 %93, 7
  %95 = or i32 128, %94
  store i32 %95, ptr %19, align 4, !tbaa !5
  %96 = load ptr, ptr @gRT, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.EFI_RUNTIME_SERVICES, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !29
  %99 = call i64 %98(ptr noundef %18, ptr noundef null)
  br label %100

100:                                              ; preds = %7
  %101 = call zeroext i8 @DebugAssertEnabled()
  %102 = icmp ne i8 %101, 0
  br i1 %102, label %103, label %115

103:                                              ; preds = %100
  %104 = getelementptr inbounds %struct.EFI_TIME, ptr %18, i32 0, i32 1
  %105 = load i8, ptr %104, align 2, !tbaa !33
  %106 = zext i8 %105 to i32
  %107 = icmp sle i32 %106, 12
  br i1 %107, label %108, label %113

108:                                              ; preds = %103
  %109 = getelementptr inbounds %struct.EFI_TIME, ptr %18, i32 0, i32 1
  %110 = load i8, ptr %109, align 2, !tbaa !33
  %111 = zext i8 %110 to i32
  %112 = icmp sge i32 %111, 1
  br i1 %112, label %114, label %113

113:                                              ; preds = %108, %103
  call void @DebugAssert(ptr noundef @.str.12, i64 noundef 384, ptr noundef @.str.13)
  br label %114

114:                                              ; preds = %113, %108
  br label %115

115:                                              ; preds = %114, %100
  br label %116

116:                                              ; preds = %115
  br label %117

117:                                              ; preds = %116
  store i32 0, ptr %20, align 4, !tbaa !5
  %118 = load ptr, ptr %14, align 8, !tbaa !9
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = zext i32 %119 to i64
  %121 = load i32, ptr %19, align 4, !tbaa !5
  %122 = getelementptr inbounds %struct.EFI_TIME, ptr %18, i32 0, i32 1
  %123 = load i8, ptr %122, align 2, !tbaa !33
  %124 = zext i8 %123 to i32
  %125 = sub nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [12 x ptr], ptr @mMonthName, i64 0, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.EFI_TIME, ptr %18, i32 0, i32 2
  %130 = load i8, ptr %129, align 1, !tbaa !35
  %131 = zext i8 %130 to i32
  %132 = getelementptr inbounds %struct.EFI_TIME, ptr %18, i32 0, i32 3
  %133 = load i8, ptr %132, align 4, !tbaa !36
  %134 = zext i8 %133 to i32
  %135 = getelementptr inbounds %struct.EFI_TIME, ptr %18, i32 0, i32 4
  %136 = load i8, ptr %135, align 1, !tbaa !37
  %137 = zext i8 %136 to i32
  %138 = getelementptr inbounds %struct.EFI_TIME, ptr %18, i32 0, i32 5
  %139 = load i8, ptr %138, align 2, !tbaa !38
  %140 = zext i8 %139 to i32
  %141 = call i64 (ptr, i64, ptr, ...) @AsciiSPrint(ptr noundef %118, i64 noundef %120, ptr noundef @.str.14, i32 noundef %121, ptr noundef %128, i32 noundef %131, i32 noundef %134, i32 noundef %137, i32 noundef %140)
  %142 = trunc i64 %141 to i32
  %143 = load i32, ptr %20, align 4, !tbaa !5
  %144 = add i32 %143, %142
  store i32 %144, ptr %20, align 4, !tbaa !5
  %145 = load i32, ptr %20, align 4, !tbaa !5
  %146 = add i32 %145, -1
  store i32 %146, ptr %20, align 4, !tbaa !5
  %147 = load ptr, ptr %14, align 8, !tbaa !9
  %148 = load i32, ptr %20, align 4, !tbaa !5
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds i8, ptr %147, i64 %149
  %151 = load i32, ptr %13, align 4, !tbaa !5
  %152 = load i32, ptr %20, align 4, !tbaa !5
  %153 = sub i32 %151, %152
  %154 = zext i32 %153 to i64
  %155 = load ptr, ptr %9, align 8, !tbaa !9
  %156 = load ptr, ptr %12, align 8, !tbaa !9
  %157 = load i32, ptr %11, align 4, !tbaa !5
  %158 = load ptr, ptr %10, align 8, !tbaa !9
  %159 = call i64 (ptr, i64, ptr, ...) @AsciiSPrint(ptr noundef %150, i64 noundef %154, ptr noundef @.str.15, ptr noundef %155, ptr noundef %156, i32 noundef %157, ptr noundef %158)
  %160 = trunc i64 %159 to i32
  %161 = load i32, ptr %20, align 4, !tbaa !5
  %162 = add i32 %161, %160
  store i32 %162, ptr %20, align 4, !tbaa !5
  %163 = load i32, ptr %20, align 4, !tbaa !5
  %164 = add i32 %163, -1
  store i32 %164, ptr %20, align 4, !tbaa !5
  %165 = load i32, ptr %20, align 4, !tbaa !5
  %166 = zext i32 %165 to i64
  %167 = add i64 %166, 8
  %168 = trunc i64 %167 to i32
  store i32 %168, ptr %20, align 4, !tbaa !5
  %169 = load i32, ptr %20, align 4, !tbaa !5
  %170 = trunc i32 %169 to i16
  %171 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %170)
  %172 = load ptr, ptr %17, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.EFI_UDP_HEADER, ptr %172, i32 0, i32 2
  store i16 %171, ptr %173, align 1, !tbaa !27
  %174 = load i32, ptr %20, align 4, !tbaa !5
  %175 = zext i32 %174 to i64
  %176 = add i64 %175, 20
  %177 = trunc i64 %176 to i32
  store i32 %177, ptr %20, align 4, !tbaa !5
  %178 = load i32, ptr %20, align 4, !tbaa !5
  %179 = trunc i32 %178 to i16
  %180 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %179)
  %181 = load ptr, ptr %16, align 8, !tbaa !9
  %182 = getelementptr inbounds %struct.IP4_HEAD, ptr %181, i32 0, i32 2
  store i16 %180, ptr %182, align 1, !tbaa !16
  %183 = load ptr, ptr %16, align 8, !tbaa !9
  %184 = call zeroext i16 @NetblockChecksum(ptr noundef %183, i32 noundef 20)
  %185 = zext i16 %184 to i32
  %186 = xor i32 %185, -1
  %187 = trunc i32 %186 to i16
  %188 = load ptr, ptr %16, align 8, !tbaa !9
  %189 = getelementptr inbounds %struct.IP4_HEAD, ptr %188, i32 0, i32 7
  store i16 %187, ptr %189, align 1, !tbaa !21
  %190 = load i32, ptr %20, align 4, !tbaa !5
  %191 = zext i32 %190 to i64
  %192 = add i64 %191, 14
  %193 = trunc i64 %192 to i32
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  ret i32 %193
}

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

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) #1

declare zeroext i8 @DebugAssertEnabled() #1

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

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

declare zeroext i16 @NetblockChecksum(ptr noundef, i32 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 12}
!12 = !{!"", !7, i64 0, !7, i64 6, !13, i64 12}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !7, i64 1}
!15 = !{!"", !7, i64 0, !7, i64 0, !7, i64 1, !13, i64 2, !13, i64 4, !13, i64 6, !7, i64 8, !7, i64 9, !13, i64 10, !6, i64 12, !6, i64 16}
!16 = !{!15, !13, i64 2}
!17 = !{!15, !13, i64 4}
!18 = !{!15, !13, i64 6}
!19 = !{!15, !7, i64 8}
!20 = !{!15, !7, i64 9}
!21 = !{!15, !13, i64 10}
!22 = !{!15, !6, i64 12}
!23 = !{!15, !6, i64 16}
!24 = !{!25, !13, i64 0}
!25 = !{!"", !13, i64 0, !13, i64 2, !13, i64 4, !13, i64 6}
!26 = !{!25, !13, i64 2}
!27 = !{!25, !13, i64 4}
!28 = !{!25, !13, i64 6}
!29 = !{!30, !10, i64 24}
!30 = !{!"", !31, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128}
!31 = !{!"", !32, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!32 = !{!"long long", !7, i64 0}
!33 = !{!34, !7, i64 2}
!34 = !{!"", !13, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !6, i64 8, !13, i64 12, !7, i64 14, !7, i64 15}
!35 = !{!34, !7, i64 3}
!36 = !{!34, !7, i64 4}
!37 = !{!34, !7, i64 5}
!38 = !{!34, !7, i64 6}


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

@mSyslogPacketSeq = external dso_local local_unnamed_addr global i32, align 4
@mSyslogDstMac = external dso_local global [6 x i8], align 1
@mSyslogDstIp = external dso_local local_unnamed_addr global i32, align 4
@mSyslogSrcIp = external dso_local local_unnamed_addr global i32, align 4
@mMonthName = external dso_local local_unnamed_addr global [12 x ptr], align 16
@gRT = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [144 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [33 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 ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @SyslogBuildPacket(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6) local_unnamed_addr #2 {
  %8 = alloca %struct.EFI_TIME, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  %9 = tail call ptr @CopyMem(ptr noundef %6, ptr noundef nonnull @mSyslogDstMac, i64 noundef 6) #3
  %10 = getelementptr inbounds i8, ptr %6, i64 6
  %11 = tail call ptr @ZeroMem(ptr noundef nonnull %10, i64 noundef 6) #3
  %12 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext 2048) #3
  %13 = getelementptr inbounds i8, ptr %6, i64 12
  store i16 %12, ptr %13, align 1, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %6, i64 14
  store i8 69, ptr %14, align 1
  %15 = getelementptr inbounds i8, ptr %6, i64 15
  store i8 0, ptr %15, align 1, !tbaa !10
  %16 = getelementptr inbounds i8, ptr %6, i64 16
  store i16 0, ptr %16, align 1, !tbaa !13
  %17 = load i32, ptr @mSyslogPacketSeq, align 4, !tbaa !14
  %18 = trunc i32 %17 to i16
  %19 = getelementptr inbounds i8, ptr %6, i64 18
  store i16 %18, ptr %19, align 1, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %6, i64 20
  store i16 0, ptr %20, align 1, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %6, i64 22
  store i8 16, ptr %21, align 1, !tbaa !17
  %22 = getelementptr inbounds i8, ptr %6, i64 23
  store i8 17, ptr %22, align 1, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %6, i64 24
  store i16 0, ptr %23, align 1, !tbaa !19
  %24 = load i32, ptr @mSyslogSrcIp, align 4, !tbaa !14
  %25 = getelementptr inbounds i8, ptr %6, i64 26
  store i32 %24, ptr %25, align 1, !tbaa !20
  %26 = load i32, ptr @mSyslogDstIp, align 4, !tbaa !14
  %27 = getelementptr inbounds i8, ptr %6, i64 30
  store i32 %26, ptr %27, align 1, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %6, i64 34
  %29 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext 514) #3
  store i16 %29, ptr %28, align 1, !tbaa !22
  %30 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext 514) #3
  %31 = getelementptr inbounds i8, ptr %6, i64 36
  store i16 %30, ptr %31, align 1, !tbaa !24
  %32 = getelementptr inbounds i8, ptr %6, i64 38
  store i16 0, ptr %32, align 1, !tbaa !25
  %33 = getelementptr inbounds i8, ptr %6, i64 40
  store i16 0, ptr %33, align 1, !tbaa !26
  %34 = load ptr, ptr @gRT, align 8, !tbaa !27
  %35 = getelementptr inbounds i8, ptr %34, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !29
  %37 = call i64 %36(ptr noundef nonnull %8, ptr noundef null) #3
  %38 = call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %38, 0
  br i1 %.not, label %44, label %39

39:                                               ; preds = %7
  %40 = getelementptr inbounds i8, ptr %8, i64 2
  %41 = load i8, ptr %40, align 2
  %42 = add i8 %41, -1
  %or.cond = icmp ult i8 %42, 12
  br i1 %or.cond, label %44, label %43

43:                                               ; preds = %39
  call void @DebugAssert(ptr noundef nonnull @.str.12, i64 noundef 384, ptr noundef nonnull @.str.13) #3
  br label %44

44:                                               ; preds = %43, %39, %7
  %45 = and i32 %0, 7
  %46 = or disjoint i32 %45, 128
  %47 = add i32 %5, -42
  %48 = getelementptr inbounds i8, ptr %6, i64 42
  %49 = zext i32 %47 to i64
  %50 = getelementptr inbounds i8, ptr %8, i64 2
  %51 = load i8, ptr %50, align 2, !tbaa !33
  %52 = zext i8 %51 to i64
  %53 = add nsw i64 %52, -1
  %54 = getelementptr inbounds [12 x ptr], ptr @mMonthName, i64 0, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !27
  %56 = getelementptr inbounds i8, ptr %8, i64 3
  %57 = load i8, ptr %56, align 1, !tbaa !35
  %58 = zext i8 %57 to i32
  %59 = getelementptr inbounds i8, ptr %8, i64 4
  %60 = load i8, ptr %59, align 4, !tbaa !36
  %61 = zext i8 %60 to i32
  %62 = getelementptr inbounds i8, ptr %8, i64 5
  %63 = load i8, ptr %62, align 1, !tbaa !37
  %64 = zext i8 %63 to i32
  %65 = getelementptr inbounds i8, ptr %8, i64 6
  %66 = load i8, ptr %65, align 2, !tbaa !38
  %67 = zext i8 %66 to i32
  %68 = call i64 (ptr, i64, ptr, ...) @AsciiSPrint(ptr noundef nonnull %48, i64 noundef %49, ptr noundef nonnull @.str.14, i32 noundef %46, ptr noundef %55, i32 noundef %58, i32 noundef %61, i32 noundef %64, i32 noundef %67) #3
  %69 = trunc i64 %68 to i32
  %70 = add i32 %69, -1
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i8, ptr %48, i64 %71
  %73 = sub i32 %47, %70
  %74 = zext i32 %73 to i64
  %75 = call i64 (ptr, i64, ptr, ...) @AsciiSPrint(ptr noundef nonnull %72, i64 noundef %74, ptr noundef nonnull @.str.15, ptr noundef %1, ptr noundef %4, i32 noundef %3, ptr noundef %2) #3
  %76 = trunc i64 %75 to i32
  %77 = add i32 %70, %76
  %78 = trunc i32 %77 to i16
  %79 = add i16 %78, 7
  %80 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %79) #3
  store i16 %80, ptr %32, align 1, !tbaa !25
  %81 = add i16 %78, 27
  %82 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %81) #3
  store i16 %82, ptr %16, align 1, !tbaa !13
  %83 = call zeroext i16 @NetblockChecksum(ptr noundef nonnull %14, i32 noundef 20) #3
  %84 = xor i16 %83, -1
  store i16 %84, ptr %23, align 1, !tbaa !19
  %85 = add i32 %77, 41
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  ret i32 %85
}

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

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) local_unnamed_addr #1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

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

declare zeroext i16 @NetblockChecksum(ptr noundef, i32 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, !9, i64 12}
!6 = !{!"", !7, i64 0, !7, i64 6, !9, i64 12}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"short", !7, i64 0}
!10 = !{!11, !7, i64 1}
!11 = !{!"", !7, i64 0, !7, i64 0, !7, i64 1, !9, i64 2, !9, i64 4, !9, i64 6, !7, i64 8, !7, i64 9, !9, i64 10, !12, i64 12, !12, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!11, !9, i64 2}
!14 = !{!12, !12, i64 0}
!15 = !{!11, !9, i64 4}
!16 = !{!11, !9, i64 6}
!17 = !{!11, !7, i64 8}
!18 = !{!11, !7, i64 9}
!19 = !{!11, !9, i64 10}
!20 = !{!11, !12, i64 12}
!21 = !{!11, !12, i64 16}
!22 = !{!23, !9, i64 0}
!23 = !{!"", !9, i64 0, !9, i64 2, !9, i64 4, !9, i64 6}
!24 = !{!23, !9, i64 2}
!25 = !{!23, !9, i64 4}
!26 = !{!23, !9, i64 6}
!27 = !{!28, !28, i64 0}
!28 = !{!"any pointer", !7, i64 0}
!29 = !{!30, !28, i64 24}
!30 = !{!"", !31, i64 0, !28, i64 24, !28, i64 32, !28, i64 40, !28, i64 48, !28, i64 56, !28, i64 64, !28, i64 72, !28, i64 80, !28, i64 88, !28, i64 96, !28, i64 104, !28, i64 112, !28, i64 120, !28, i64 128}
!31 = !{!"", !32, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!32 = !{!"long long", !7, i64 0}
!33 = !{!34, !7, i64 2}
!34 = !{!"", !9, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !12, i64 8, !9, i64 12, !7, i64 14, !7, i64 15}
!35 = !{!34, !7, i64 3}
!36 = !{!34, !7, i64 4}
!37 = !{!34, !7, i64 5}
!38 = !{!34, !7, i64 6}


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