; LLVM IR from lichen-community-systems/signaletic :: hosts/daisy/vendor/libDaisy/Drivers/STM32H7xx_HAL_Driver/Src (Transmit)

; 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.ETH_HandleTypeDef = type { ptr, %struct.ETH_InitTypeDef, %struct.ETH_TxDescListTypeDef, %struct.ETH_RxDescListTypeDef, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.ETH_InitTypeDef = type { ptr, i32, ptr, ptr, i32 }
%struct.ETH_TxDescListTypeDef = type { [4 x i32], i32 }
%struct.ETH_RxDescListTypeDef = type { [4 x i32], i32, i32, i32, i32, i32 }
%struct.ETH_TypeDef = type { i32, i32, i32, i32, i32, i32, [14 x i32], i32, i32, i32, i32, i32, i32, [2 x i32], i32, [7 x i32], i32, [7 x i32], i32, i32, i32, i32, i32, i32, [2 x i32], i32, i32, i32, i32, [12 x i32], i32, i32, i32, i32, i32, i32, [54 x i32], i32, i32, [2 x i32], i32, [59 x i32], i32, i32, i32, i32, i32, i32, i32, i32, [248 x i32], i32, i32, i32, i32, i32, [14 x i32], i32, i32, [5 x i32], i32, [10 x i32], i32, i32, [10 x i32], i32, [9 x i32], i32, i32, i32, i32, [65 x i32], i32, i32, [2 x i32], i32, i32, i32, i32, [4 x i32], i32, i32, [2 x i32], i32, i32, i32, i32, [108 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], i32, i32, [2 x i32], i32, i32, i32, i32, i32, i32, i32, i32, [4 x i32], i32, [3 x i32], i32, i32, i32, i32, [12 x i32], i32, i32, i32, i32, i32, [11 x i32], i32, [7 x i32], i32, [55 x i32], i32, i32, i32, [8 x i32], i32, i32, i32, i32, [177 x i32], i32, i32, i32, i32, [60 x i32], i32, i32, i32, [2 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i32], i32 }
%struct.ETH_DMADescTypeDef = type { 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 @HAL_GetTick() #1

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_ETH_Transmit(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 ptr, align 8
  %10 = 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) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %18

13:                                               ; preds = %3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %14, i32 0, i32 7
  %16 = load volatile i32, ptr %15, align 4, !tbaa !11
  %17 = or i32 %16, 1
  store volatile i32 %17, ptr %15, align 4, !tbaa !11
  store i32 1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %138

18:                                               ; preds = %3
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %19, i32 0, i32 5
  %21 = load volatile i32, ptr %20, align 4, !tbaa !16
  %22 = icmp eq i32 %21, 16
  br i1 %22, label %23, label %137

23:                                               ; preds = %18
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = call i32 @ETH_Prepare_Tx_Descriptors(ptr noundef %24, ptr noundef %25, i32 noundef 0)
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %33

28:                                               ; preds = %23
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %29, i32 0, i32 7
  %31 = load volatile i32, ptr %30, align 4, !tbaa !11
  %32 = or i32 %31, 2
  store volatile i32 %32, ptr %30, align 4, !tbaa !11
  store i32 1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %138

33:                                               ; preds = %23
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %34, i32 0, i32 2
  %36 = getelementptr inbounds %struct.ETH_TxDescListTypeDef, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %37, i32 0, i32 2
  %39 = getelementptr inbounds %struct.ETH_TxDescListTypeDef, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 8, !tbaa !17
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds [4 x i32], ptr %36, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = zext i32 %43 to i64
  %45 = inttoptr i64 %44 to ptr
  store ptr %45, ptr %9, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %33
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %47, i32 0, i32 2
  %49 = getelementptr inbounds %struct.ETH_TxDescListTypeDef, ptr %48, i32 0, i32 1
  %50 = load i32, ptr %49, align 8, !tbaa !17
  %51 = add i32 %50, 1
  store i32 %51, ptr %49, align 8, !tbaa !17
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %52, i32 0, i32 2
  %54 = getelementptr inbounds %struct.ETH_TxDescListTypeDef, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !17
  %56 = icmp uge i32 %55, 4
  br i1 %56, label %57, label %66

57:                                               ; preds = %46
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %58, i32 0, i32 2
  %60 = getelementptr inbounds %struct.ETH_TxDescListTypeDef, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !17
  %62 = sub i32 %61, 4
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %63, i32 0, i32 2
  %65 = getelementptr inbounds %struct.ETH_TxDescListTypeDef, ptr %64, i32 0, i32 1
  store i32 %62, ptr %65, align 8, !tbaa !17
  br label %66

66:                                               ; preds = %57, %46
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %69, i32 0, i32 2
  %71 = getelementptr inbounds %struct.ETH_TxDescListTypeDef, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %72, i32 0, i32 2
  %74 = getelementptr inbounds %struct.ETH_TxDescListTypeDef, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 8, !tbaa !17
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds [4 x i32], ptr %71, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !9
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !18
  %82 = getelementptr inbounds %struct.ETH_TypeDef, ptr %81, i32 0, i32 148
  store volatile i32 %78, ptr %82, align 4, !tbaa !19
  %83 = call i32 @HAL_GetTick()
  store i32 %83, ptr %8, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %133, %68
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ETH_DMADescTypeDef, ptr %85, i32 0, i32 3
  %87 = load volatile i32, ptr %86, align 4, !tbaa !21
  %88 = and i32 %87, -2147483648
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %134

90:                                               ; preds = %84
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !18
  %94 = getelementptr inbounds %struct.ETH_TypeDef, ptr %93, i32 0, i32 164
  %95 = load volatile i32, ptr %94, align 4, !tbaa !23
  %96 = zext i32 %95 to i64
  %97 = and i64 %96, 4096
  %98 = icmp ne i64 %97, 0
  br i1 %98, label %99, label %113

99:                                               ; preds = %90
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %100, i32 0, i32 7
  %102 = load volatile i32, ptr %101, align 4, !tbaa !11
  %103 = or i32 %102, 8
  store volatile i32 %103, ptr %101, align 4, !tbaa !11
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !18
  %107 = getelementptr inbounds %struct.ETH_TypeDef, ptr %106, i32 0, i32 164
  %108 = load volatile i32, ptr %107, align 4, !tbaa !23
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %109, i32 0, i32 8
  store volatile i32 %108, ptr %110, align 8, !tbaa !24
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %111, i32 0, i32 5
  store volatile i32 224, ptr %112, align 4, !tbaa !16
  store i32 1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %138

113:                                              ; preds = %90
  %114 = load i32, ptr %7, align 4, !tbaa !9
  %115 = icmp ne i32 %114, -1
  br i1 %115, label %116, label %133

116:                                              ; preds = %113
  %117 = call i32 @HAL_GetTick()
  %118 = load i32, ptr %8, align 4, !tbaa !9
  %119 = sub i32 %117, %118
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = icmp ugt i32 %119, %120
  br i1 %121, label %125, label %122

122:                                              ; preds = %116
  %123 = load i32, ptr %7, align 4, !tbaa !9
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %132

125:                                              ; preds = %122, %116
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %126, i32 0, i32 7
  %128 = load volatile i32, ptr %127, align 4, !tbaa !11
  %129 = or i32 %128, 4
  store volatile i32 %129, ptr %127, align 4, !tbaa !11
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %130, i32 0, i32 5
  store volatile i32 16, ptr %131, align 4, !tbaa !16
  store i32 1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %138

132:                                              ; preds = %122
  br label %133

133:                                              ; preds = %132, %113
  br label %84, !llvm.loop !25

134:                                              ; preds = %84
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.ETH_HandleTypeDef, ptr %135, i32 0, i32 5
  store volatile i32 16, ptr %136, align 4, !tbaa !16
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %138

137:                                              ; preds = %18
  store i32 1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %138

138:                                              ; preds = %137, %134, %125, %99, %28, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %139 = load i32, ptr %4, align 4
  ret i32 %139
}

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

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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 116}
!12 = !{!"", !6, i64 0, !13, i64 8, !14, i64 48, !15, i64 68, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132}
!13 = !{!"", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !10, i64 32}
!14 = !{!"", !7, i64 0, !10, i64 16}
!15 = !{!"", !7, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!16 = !{!12, !10, i64 108}
!17 = !{!12, !10, i64 64}
!18 = !{!12, !6, i64 0}
!19 = !{!20, !10, i64 4384}
!20 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !7, i64 104, !10, i64 112, !7, i64 116, !10, i64 144, !7, i64 148, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !7, i64 200, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !7, i64 224, !10, i64 272, !10, i64 276, !10, i64 280, !10, i64 284, !10, i64 288, !10, i64 292, !7, i64 296, !10, i64 512, !10, i64 516, !7, i64 520, !10, i64 528, !7, i64 532, !10, i64 768, !10, i64 772, !10, i64 776, !10, i64 780, !10, i64 784, !10, i64 788, !10, i64 792, !10, i64 796, !7, i64 800, !10, i64 1792, !10, i64 1796, !10, i64 1800, !10, i64 1804, !10, i64 1808, !7, i64 1812, !10, i64 1868, !10, i64 1872, !7, i64 1876, !10, i64 1896, !7, i64 1900, !10, i64 1940, !10, i64 1944, !7, i64 1948, !10, i64 1988, !7, i64 1992, !10, i64 2028, !10, i64 2032, !10, i64 2036, !10, i64 2040, !7, i64 2044, !10, i64 2304, !10, i64 2308, !7, i64 2312, !10, i64 2320, !10, i64 2324, !10, i64 2328, !10, i64 2332, !7, i64 2336, !10, i64 2352, !10, i64 2356, !7, i64 2360, !10, i64 2368, !10, i64 2372, !10, i64 2376, !10, i64 2380, !7, i64 2384, !10, i64 2816, !10, i64 2820, !10, i64 2824, !10, i64 2828, !10, i64 2832, !10, i64 2836, !10, i64 2840, !10, i64 2844, !10, i64 2848, !7, i64 2852, !10, i64 2864, !10, i64 2868, !7, i64 2872, !10, i64 2880, !10, i64 2884, !10, i64 2888, !10, i64 2892, !10, i64 2896, !10, i64 2900, !10, i64 2904, !10, i64 2908, !7, i64 2912, !10, i64 2928, !7, i64 2932, !10, i64 2944, !10, i64 2948, !10, i64 2952, !10, i64 2956, !7, i64 2960, !10, i64 3008, !10, i64 3012, !10, i64 3016, !10, i64 3020, !10, i64 3024, !7, i64 3028, !10, i64 3072, !7, i64 3076, !10, i64 3104, !7, i64 3108, !10, i64 3328, !10, i64 3332, !10, i64 3336, !7, i64 3340, !10, i64 3372, !10, i64 3376, !10, i64 3380, !10, i64 3384, !7, i64 3388, !10, i64 4096, !10, i64 4100, !10, i64 4104, !10, i64 4108, !7, i64 4112, !10, i64 4352, !10, i64 4356, !10, i64 4360, !7, i64 4364, !10, i64 4372, !10, i64 4376, !10, i64 4380, !10, i64 4384, !10, i64 4388, !10, i64 4392, !10, i64 4396, !10, i64 4400, !10, i64 4404, !10, i64 4408, !10, i64 4412, !10, i64 4416, !10, i64 4420, !10, i64 4424, !10, i64 4428, !10, i64 4432, !10, i64 4436, !10, i64 4440, !10, i64 4444, !10, i64 4448, !7, i64 4452, !10, i64 4460}
!21 = !{!22, !10, i64 12}
!22 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!23 = !{!20, !10, i64 4448}
!24 = !{!12, !10, i64 120}
!25 = distinct !{!25, !26}
!26 = !{!"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"

declare i32 @HAL_GetTick() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @HAL_ETH_Transmit(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  %4 = icmp eq ptr %1, null
  br i1 %4, label %5, label %9

5:                                                ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 116
  %7 = load volatile i32, ptr %6, align 4, !tbaa !5
  %8 = or i32 %7, 1
  store volatile i32 %8, ptr %6, align 4, !tbaa !5
  br label %70

9:                                                ; preds = %3
  %10 = getelementptr inbounds i8, ptr %0, i64 108
  %11 = load volatile i32, ptr %10, align 4, !tbaa !14
  %12 = icmp eq i32 %11, 16
  br i1 %12, label %13, label %70

13:                                               ; preds = %9
  %14 = tail call i32 @ETH_Prepare_Tx_Descriptors(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef 0)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %19, label %15

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %0, i64 116
  %17 = load volatile i32, ptr %16, align 4, !tbaa !5
  %18 = or i32 %17, 2
  store volatile i32 %18, ptr %16, align 4, !tbaa !5
  br label %70

19:                                               ; preds = %13
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  %21 = getelementptr inbounds i8, ptr %0, i64 64
  %22 = load i32, ptr %21, align 8, !tbaa !15
  %23 = zext i32 %22 to i64
  %24 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !16
  %26 = zext i32 %25 to i64
  %27 = inttoptr i64 %26 to ptr
  %28 = add i32 %22, 1
  %29 = icmp ugt i32 %28, 3
  %30 = add i32 %22, -3
  %spec.select = select i1 %29, i32 %30, i32 %28
  store i32 %spec.select, ptr %21, align 8, !tbaa !15
  %31 = zext i32 %spec.select to i64
  %32 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !16
  %34 = load ptr, ptr %0, align 8, !tbaa !17
  %35 = getelementptr inbounds i8, ptr %34, i64 4384
  store volatile i32 %33, ptr %35, align 4, !tbaa !18
  %36 = tail call i32 @HAL_GetTick() #2
  %37 = getelementptr inbounds i8, ptr %27, i64 12
  %38 = load volatile i32, ptr %37, align 4, !tbaa !20
  %.not3237 = icmp sgt i32 %38, -1
  br i1 %.not3237, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %19
  switch i32 %2, label %.lr.ph.split.split [
    i32 -1, label %.lr.ph.split.us
    i32 0, label %.lr.ph.split.split.us
  ]

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %39 = load ptr, ptr %0, align 8, !tbaa !17
  %40 = getelementptr inbounds i8, ptr %39, i64 4448
  br label %41

41:                                               ; preds = %44, %.lr.ph.split.us
  %42 = load volatile i32, ptr %40, align 4, !tbaa !22
  %43 = and i32 %42, 4096
  %.not33.us = icmp eq i32 %43, 0
  br i1 %.not33.us, label %44, label %.split.us

44:                                               ; preds = %41
  %45 = load volatile i32, ptr %37, align 4, !tbaa !20
  %.not32.us = icmp sgt i32 %45, -1
  br i1 %.not32.us, label %._crit_edge, label %41, !llvm.loop !23

.lr.ph.split.split.us:                            ; preds = %.lr.ph
  %46 = load ptr, ptr %0, align 8, !tbaa !17
  %47 = getelementptr inbounds i8, ptr %46, i64 4448
  %48 = load volatile i32, ptr %47, align 4, !tbaa !22
  %49 = and i32 %48, 4096
  %.not33.us38 = icmp eq i32 %49, 0
  br i1 %.not33.us38, label %.split42.us, label %.split.us

.split42.us:                                      ; preds = %.lr.ph.split.split.us
  %50 = tail call i32 @HAL_GetTick() #2
  br label %.split42

.lr.ph.split.split:                               ; preds = %.lr.ph, %68
  %51 = load ptr, ptr %0, align 8, !tbaa !17
  %52 = getelementptr inbounds i8, ptr %51, i64 4448
  %53 = load volatile i32, ptr %52, align 4, !tbaa !22
  %54 = and i32 %53, 4096
  %.not33 = icmp eq i32 %54, 0
  br i1 %.not33, label %61, label %.split.us

.split.us:                                        ; preds = %41, %.lr.ph.split.split, %.lr.ph.split.split.us
  %.us-phi = phi ptr [ %46, %.lr.ph.split.split.us ], [ %51, %.lr.ph.split.split ], [ %39, %41 ]
  %55 = getelementptr inbounds i8, ptr %.us-phi, i64 4448
  %56 = getelementptr inbounds i8, ptr %0, i64 116
  %57 = load volatile i32, ptr %56, align 4, !tbaa !5
  %58 = or i32 %57, 8
  store volatile i32 %58, ptr %56, align 4, !tbaa !5
  %59 = load volatile i32, ptr %55, align 4, !tbaa !22
  %60 = getelementptr inbounds i8, ptr %0, i64 120
  store volatile i32 %59, ptr %60, align 8, !tbaa !25
  store volatile i32 224, ptr %10, align 4, !tbaa !14
  br label %70

61:                                               ; preds = %.lr.ph.split.split
  %62 = tail call i32 @HAL_GetTick() #2
  %63 = sub i32 %62, %36
  %64 = icmp ugt i32 %63, %2
  br i1 %64, label %.split42, label %68

.split42:                                         ; preds = %61, %.split42.us
  %65 = getelementptr inbounds i8, ptr %0, i64 116
  %66 = load volatile i32, ptr %65, align 4, !tbaa !5
  %67 = or i32 %66, 4
  store volatile i32 %67, ptr %65, align 4, !tbaa !5
  store volatile i32 16, ptr %10, align 4, !tbaa !14
  br label %70

68:                                               ; preds = %61
  %69 = load volatile i32, ptr %37, align 4, !tbaa !20
  %.not32 = icmp sgt i32 %69, -1
  br i1 %.not32, label %._crit_edge, label %.lr.ph.split.split, !llvm.loop !23

._crit_edge:                                      ; preds = %44, %68, %19
  store volatile i32 16, ptr %10, align 4, !tbaa !14
  br label %70

70:                                               ; preds = %9, %._crit_edge, %.split42, %.split.us, %15, %5
  %.0 = phi i32 [ 1, %5 ], [ 1, %15 ], [ 1, %.split.us ], [ 1, %.split42 ], [ 0, %._crit_edge ], [ 1, %9 ]
  ret i32 %.0
}

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

attributes #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 = { 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 #2 = { 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, !11, i64 116}
!6 = !{!"", !7, i64 0, !10, i64 8, !12, i64 48, !13, i64 68, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !7, i64 0, !11, i64 8, !7, i64 16, !7, i64 24, !11, i64 32}
!11 = !{!"int", !8, i64 0}
!12 = !{!"", !8, i64 0, !11, i64 16}
!13 = !{!"", !8, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}
!14 = !{!6, !11, i64 108}
!15 = !{!6, !11, i64 64}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !7, i64 0}
!18 = !{!19, !11, i64 4384}
!19 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !8, i64 24, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !8, i64 104, !11, i64 112, !8, i64 116, !11, i64 144, !8, i64 148, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !8, i64 200, !11, i64 208, !11, i64 212, !11, i64 216, !11, i64 220, !8, i64 224, !11, i64 272, !11, i64 276, !11, i64 280, !11, i64 284, !11, i64 288, !11, i64 292, !8, i64 296, !11, i64 512, !11, i64 516, !8, i64 520, !11, i64 528, !8, i64 532, !11, i64 768, !11, i64 772, !11, i64 776, !11, i64 780, !11, i64 784, !11, i64 788, !11, i64 792, !11, i64 796, !8, i64 800, !11, i64 1792, !11, i64 1796, !11, i64 1800, !11, i64 1804, !11, i64 1808, !8, i64 1812, !11, i64 1868, !11, i64 1872, !8, i64 1876, !11, i64 1896, !8, i64 1900, !11, i64 1940, !11, i64 1944, !8, i64 1948, !11, i64 1988, !8, i64 1992, !11, i64 2028, !11, i64 2032, !11, i64 2036, !11, i64 2040, !8, i64 2044, !11, i64 2304, !11, i64 2308, !8, i64 2312, !11, i64 2320, !11, i64 2324, !11, i64 2328, !11, i64 2332, !8, i64 2336, !11, i64 2352, !11, i64 2356, !8, i64 2360, !11, i64 2368, !11, i64 2372, !11, i64 2376, !11, i64 2380, !8, i64 2384, !11, i64 2816, !11, i64 2820, !11, i64 2824, !11, i64 2828, !11, i64 2832, !11, i64 2836, !11, i64 2840, !11, i64 2844, !11, i64 2848, !8, i64 2852, !11, i64 2864, !11, i64 2868, !8, i64 2872, !11, i64 2880, !11, i64 2884, !11, i64 2888, !11, i64 2892, !11, i64 2896, !11, i64 2900, !11, i64 2904, !11, i64 2908, !8, i64 2912, !11, i64 2928, !8, i64 2932, !11, i64 2944, !11, i64 2948, !11, i64 2952, !11, i64 2956, !8, i64 2960, !11, i64 3008, !11, i64 3012, !11, i64 3016, !11, i64 3020, !11, i64 3024, !8, i64 3028, !11, i64 3072, !8, i64 3076, !11, i64 3104, !8, i64 3108, !11, i64 3328, !11, i64 3332, !11, i64 3336, !8, i64 3340, !11, i64 3372, !11, i64 3376, !11, i64 3380, !11, i64 3384, !8, i64 3388, !11, i64 4096, !11, i64 4100, !11, i64 4104, !11, i64 4108, !8, i64 4112, !11, i64 4352, !11, i64 4356, !11, i64 4360, !8, i64 4364, !11, i64 4372, !11, i64 4376, !11, i64 4380, !11, i64 4384, !11, i64 4388, !11, i64 4392, !11, i64 4396, !11, i64 4400, !11, i64 4404, !11, i64 4408, !11, i64 4412, !11, i64 4416, !11, i64 4420, !11, i64 4424, !11, i64 4428, !11, i64 4432, !11, i64 4436, !11, i64 4440, !11, i64 4444, !11, i64 4448, !8, i64 4452, !11, i64 4460}
!20 = !{!21, !11, i64 12}
!21 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!22 = !{!19, !11, i64 4448}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !11, i64 120}


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