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

; 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.__USART_HandleTypeDef = type { ptr, %struct.USART_InitTypeDef, ptr, i16, i16, ptr, i16, i16, i16, i16, i16, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32 }
%struct.USART_InitTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.USART_TypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

; Function Attrs: nounwind uwtable
declare hidden void @USART_TxISR_16BIT_FIFOEN(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_TxISR_8BIT_FIFOEN(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_TxISR_16BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_TxISR_8BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_RxISR_16BIT_FIFOEN(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_RxISR_8BIT_FIFOEN(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_RxISR_16BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_RxISR_8BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_USART_TransmitReceive_IT(ptr noundef %0, ptr noundef %1, ptr noundef %2, i16 noundef zeroext %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i16, align 2
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i16 %3, ptr %9, align 2, !tbaa !9
  %10 = load ptr, ptr %6, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %10, i32 0, i32 18
  %12 = load volatile i32, ptr %11, align 4, !tbaa !11
  %13 = icmp eq i32 %12, 1
  br i1 %13, label %14, label %239

14:                                               ; preds = %4
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %24, label %17

17:                                               ; preds = %14
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %24, label %20

20:                                               ; preds = %17
  %21 = load i16, ptr %9, align 2, !tbaa !9
  %22 = zext i16 %21 to i32
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %20, %17, %14
  store i32 1, ptr %5, align 4
  br label %240

25:                                               ; preds = %20
  br label %26

26:                                               ; preds = %25
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %27, i32 0, i32 17
  %29 = load i32, ptr %28, align 8, !tbaa !15
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %31, label %32

31:                                               ; preds = %26
  store i32 2, ptr %5, align 4
  br label %240

32:                                               ; preds = %26
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %33, i32 0, i32 17
  store i32 1, ptr %34, align 8, !tbaa !15
  br label %35

35:                                               ; preds = %32
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %38, i32 0, i32 5
  store ptr %37, ptr %39, align 8, !tbaa !16
  %40 = load i16, ptr %9, align 2, !tbaa !9
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %41, i32 0, i32 6
  store i16 %40, ptr %42, align 8, !tbaa !17
  %43 = load i16, ptr %9, align 2, !tbaa !9
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %44, i32 0, i32 7
  store volatile i16 %43, ptr %45, align 2, !tbaa !18
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %47, i32 0, i32 2
  store ptr %46, ptr %48, align 8, !tbaa !19
  %49 = load i16, ptr %9, align 2, !tbaa !9
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %50, i32 0, i32 3
  store i16 %49, ptr %51, align 8, !tbaa !20
  %52 = load i16, ptr %9, align 2, !tbaa !9
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %53, i32 0, i32 4
  store volatile i16 %52, ptr %54, align 2, !tbaa !21
  br label %55

55:                                               ; preds = %36
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %56, i32 0, i32 1
  %58 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !22
  %60 = icmp eq i32 %59, 4096
  br i1 %60, label %61, label %74

61:                                               ; preds = %55
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %62, i32 0, i32 1
  %64 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %63, i32 0, i32 3
  %65 = load i32, ptr %64, align 4, !tbaa !23
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %70

67:                                               ; preds = %61
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %68, i32 0, i32 8
  store i16 511, ptr %69, align 4, !tbaa !24
  br label %73

70:                                               ; preds = %61
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %71, i32 0, i32 8
  store i16 255, ptr %72, align 4, !tbaa !24
  br label %73

73:                                               ; preds = %70, %67
  br label %117

74:                                               ; preds = %55
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %75, i32 0, i32 1
  %77 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !22
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %93

80:                                               ; preds = %74
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %81, i32 0, i32 1
  %83 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %82, i32 0, i32 3
  %84 = load i32, ptr %83, align 4, !tbaa !23
  %85 = icmp eq i32 %84, 0
  br i1 %85, label %86, label %89

86:                                               ; preds = %80
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %87, i32 0, i32 8
  store i16 255, ptr %88, align 4, !tbaa !24
  br label %92

89:                                               ; preds = %80
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %90, i32 0, i32 8
  store i16 127, ptr %91, align 4, !tbaa !24
  br label %92

92:                                               ; preds = %89, %86
  br label %116

93:                                               ; preds = %74
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %94, i32 0, i32 1
  %96 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 4, !tbaa !22
  %98 = icmp eq i32 %97, 268435456
  br i1 %98, label %99, label %112

99:                                               ; preds = %93
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %100, i32 0, i32 1
  %102 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %101, i32 0, i32 3
  %103 = load i32, ptr %102, align 4, !tbaa !23
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %108

105:                                              ; preds = %99
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %106, i32 0, i32 8
  store i16 127, ptr %107, align 4, !tbaa !24
  br label %111

108:                                              ; preds = %99
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %109, i32 0, i32 8
  store i16 63, ptr %110, align 4, !tbaa !24
  br label %111

111:                                              ; preds = %108, %105
  br label %115

112:                                              ; preds = %93
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %113, i32 0, i32 8
  store i16 0, ptr %114, align 4, !tbaa !24
  br label %115

115:                                              ; preds = %112, %111
  br label %116

116:                                              ; preds = %115, %92
  br label %117

117:                                              ; preds = %116, %73
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %119, i32 0, i32 19
  store volatile i32 0, ptr %120, align 8, !tbaa !25
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %121, i32 0, i32 18
  store volatile i32 50, ptr %122, align 4, !tbaa !11
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %123, i32 0, i32 12
  %125 = load i32, ptr %124, align 8, !tbaa !26
  %126 = zext i32 %125 to i64
  %127 = icmp eq i64 %126, 536870912
  br i1 %127, label %128, label %187

128:                                              ; preds = %118
  %129 = load i16, ptr %9, align 2, !tbaa !9
  %130 = zext i16 %129 to i32
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %131, i32 0, i32 9
  %133 = load i16, ptr %132, align 2, !tbaa !27
  %134 = zext i16 %133 to i32
  %135 = icmp sge i32 %130, %134
  br i1 %135, label %136, label %187

136:                                              ; preds = %128
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %137, i32 0, i32 1
  %139 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %138, i32 0, i32 1
  %140 = load i32, ptr %139, align 4, !tbaa !22
  %141 = icmp eq i32 %140, 4096
  br i1 %141, label %142, label %153

142:                                              ; preds = %136
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %143, i32 0, i32 1
  %145 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %144, i32 0, i32 3
  %146 = load i32, ptr %145, align 4, !tbaa !23
  %147 = icmp eq i32 %146, 0
  br i1 %147, label %148, label %153

148:                                              ; preds = %142
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %149, i32 0, i32 14
  store ptr @USART_TxISR_16BIT_FIFOEN, ptr %150, align 8, !tbaa !28
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %151, i32 0, i32 13
  store ptr @USART_RxISR_16BIT_FIFOEN, ptr %152, align 8, !tbaa !29
  br label %158

153:                                              ; preds = %142, %136
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %154, i32 0, i32 14
  store ptr @USART_TxISR_8BIT_FIFOEN, ptr %155, align 8, !tbaa !28
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %156, i32 0, i32 13
  store ptr @USART_RxISR_8BIT_FIFOEN, ptr %157, align 8, !tbaa !29
  br label %158

158:                                              ; preds = %153, %148
  br label %159

159:                                              ; preds = %158
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %160, i32 0, i32 17
  store i32 0, ptr %161, align 8, !tbaa !15
  br label %162

162:                                              ; preds = %159
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !30
  %166 = getelementptr inbounds %struct.USART_TypeDef, ptr %165, i32 0, i32 2
  %167 = load volatile i32, ptr %166, align 4, !tbaa !31
  %168 = zext i32 %167 to i64
  %169 = or i64 %168, 1
  %170 = trunc i64 %169 to i32
  store volatile i32 %170, ptr %166, align 4, !tbaa !31
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !30
  %174 = getelementptr inbounds %struct.USART_TypeDef, ptr %173, i32 0, i32 0
  %175 = load volatile i32, ptr %174, align 4, !tbaa !33
  %176 = zext i32 %175 to i64
  %177 = or i64 %176, 256
  %178 = trunc i64 %177 to i32
  store volatile i32 %178, ptr %174, align 4, !tbaa !33
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %179, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !30
  %182 = getelementptr inbounds %struct.USART_TypeDef, ptr %181, i32 0, i32 2
  %183 = load volatile i32, ptr %182, align 4, !tbaa !31
  %184 = zext i32 %183 to i64
  %185 = or i64 %184, 276824064
  %186 = trunc i64 %185 to i32
  store volatile i32 %186, ptr %182, align 4, !tbaa !31
  br label %238

187:                                              ; preds = %128, %118
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %188, i32 0, i32 1
  %190 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %189, i32 0, i32 1
  %191 = load i32, ptr %190, align 4, !tbaa !22
  %192 = icmp eq i32 %191, 4096
  br i1 %192, label %193, label %204

193:                                              ; preds = %187
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %194, i32 0, i32 1
  %196 = getelementptr inbounds %struct.USART_InitTypeDef, ptr %195, i32 0, i32 3
  %197 = load i32, ptr %196, align 4, !tbaa !23
  %198 = icmp eq i32 %197, 0
  br i1 %198, label %199, label %204

199:                                              ; preds = %193
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %200, i32 0, i32 14
  store ptr @USART_TxISR_16BIT, ptr %201, align 8, !tbaa !28
  %202 = load ptr, ptr %6, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %202, i32 0, i32 13
  store ptr @USART_RxISR_16BIT, ptr %203, align 8, !tbaa !29
  br label %209

204:                                              ; preds = %193, %187
  %205 = load ptr, ptr %6, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %205, i32 0, i32 14
  store ptr @USART_TxISR_8BIT, ptr %206, align 8, !tbaa !28
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %207, i32 0, i32 13
  store ptr @USART_RxISR_8BIT, ptr %208, align 8, !tbaa !29
  br label %209

209:                                              ; preds = %204, %199
  br label %210

210:                                              ; preds = %209
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %211, i32 0, i32 17
  store i32 0, ptr %212, align 8, !tbaa !15
  br label %213

213:                                              ; preds = %210
  %214 = load ptr, ptr %6, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %214, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8, !tbaa !30
  %217 = getelementptr inbounds %struct.USART_TypeDef, ptr %216, i32 0, i32 2
  %218 = load volatile i32, ptr %217, align 4, !tbaa !31
  %219 = zext i32 %218 to i64
  %220 = or i64 %219, 1
  %221 = trunc i64 %220 to i32
  store volatile i32 %221, ptr %217, align 4, !tbaa !31
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %222, i32 0, i32 0
  %224 = load ptr, ptr %223, align 8, !tbaa !30
  %225 = getelementptr inbounds %struct.USART_TypeDef, ptr %224, i32 0, i32 0
  %226 = load volatile i32, ptr %225, align 4, !tbaa !33
  %227 = zext i32 %226 to i64
  %228 = or i64 %227, 288
  %229 = trunc i64 %228 to i32
  store volatile i32 %229, ptr %225, align 4, !tbaa !33
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.__USART_HandleTypeDef, ptr %230, i32 0, i32 0
  %232 = load ptr, ptr %231, align 8, !tbaa !30
  %233 = getelementptr inbounds %struct.USART_TypeDef, ptr %232, i32 0, i32 0
  %234 = load volatile i32, ptr %233, align 4, !tbaa !33
  %235 = zext i32 %234 to i64
  %236 = or i64 %235, 128
  %237 = trunc i64 %236 to i32
  store volatile i32 %237, ptr %233, align 4, !tbaa !33
  br label %238

238:                                              ; preds = %213, %162
  store i32 0, ptr %5, align 4
  br label %240

239:                                              ; preds = %4
  store i32 2, ptr %5, align 4
  br label %240

240:                                              ; preds = %239, %238, %31, %24
  %241 = load i32, ptr %5, align 4
  ret i32 %241
}

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

!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 = !{!"short", !7, i64 0}
!11 = !{!12, !14, i64 132}
!12 = !{!"__USART_HandleTypeDef", !6, i64 0, !13, i64 8, !6, i64 48, !10, i64 56, !10, i64 58, !6, i64 64, !10, i64 72, !10, i64 74, !10, i64 76, !10, i64 78, !10, i64 80, !14, i64 84, !14, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !14, i64 128, !14, i64 132, !14, i64 136}
!13 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !14, i64 128}
!16 = !{!12, !6, i64 64}
!17 = !{!12, !10, i64 72}
!18 = !{!12, !10, i64 74}
!19 = !{!12, !6, i64 48}
!20 = !{!12, !10, i64 56}
!21 = !{!12, !10, i64 58}
!22 = !{!12, !14, i64 12}
!23 = !{!12, !14, i64 20}
!24 = !{!12, !10, i64 76}
!25 = !{!12, !14, i64 136}
!26 = !{!12, !14, i64 88}
!27 = !{!12, !10, i64 78}
!28 = !{!12, !6, i64 104}
!29 = !{!12, !6, i64 96}
!30 = !{!12, !6, i64 0}
!31 = !{!32, !14, i64 8}
!32 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44}
!33 = !{!32, !14, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind uwtable
declare hidden void @USART_TxISR_16BIT_FIFOEN(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_TxISR_8BIT_FIFOEN(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_TxISR_16BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_TxISR_8BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_RxISR_16BIT_FIFOEN(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_RxISR_8BIT_FIFOEN(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_RxISR_16BIT(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @USART_RxISR_8BIT(ptr noundef) #0

; Function Attrs: nofree norecurse nounwind uwtable
define dso_local range(i32 0, 3) i32 @HAL_USART_TransmitReceive_IT(ptr noundef %0, ptr noundef %1, ptr noundef %2, i16 noundef zeroext %3) local_unnamed_addr #1 {
  %5 = getelementptr inbounds i8, ptr %0, i64 132
  %6 = load volatile i32, ptr %5, align 4, !tbaa !5
  %7 = icmp eq i32 %6, 1
  br i1 %7, label %8, label %86

8:                                                ; preds = %4
  %9 = icmp eq ptr %1, null
  %10 = icmp eq ptr %2, null
  %or.cond = or i1 %9, %10
  %11 = icmp eq i16 %3, 0
  %or.cond4 = or i1 %or.cond, %11
  br i1 %or.cond4, label %86, label %12

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %0, i64 128
  %14 = load i32, ptr %13, align 8, !tbaa !13
  %15 = icmp eq i32 %14, 1
  br i1 %15, label %86, label %16

16:                                               ; preds = %12
  store i32 1, ptr %13, align 8, !tbaa !13
  %17 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %2, ptr %17, align 8, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  store i16 %3, ptr %18, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %0, i64 74
  store volatile i16 %3, ptr %19, align 2, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %1, ptr %20, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %0, i64 56
  store i16 %3, ptr %21, align 8, !tbaa !18
  %22 = getelementptr inbounds i8, ptr %0, i64 58
  store volatile i16 %3, ptr %22, align 2, !tbaa !19
  %23 = getelementptr inbounds i8, ptr %0, i64 12
  %24 = load i32, ptr %23, align 4, !tbaa !20
  switch i32 %24, label %46 [
    i32 4096, label %25
    i32 0, label %32
    i32 268435456, label %39
  ]

25:                                               ; preds = %16
  %26 = getelementptr inbounds i8, ptr %0, i64 20
  %27 = load i32, ptr %26, align 4, !tbaa !21
  %28 = icmp eq i32 %27, 0
  %29 = getelementptr inbounds i8, ptr %0, i64 76
  br i1 %28, label %30, label %31

30:                                               ; preds = %25
  store i16 511, ptr %29, align 4, !tbaa !22
  br label %48

31:                                               ; preds = %25
  store i16 255, ptr %29, align 4, !tbaa !22
  br label %48

32:                                               ; preds = %16
  %33 = getelementptr inbounds i8, ptr %0, i64 20
  %34 = load i32, ptr %33, align 4, !tbaa !21
  %35 = icmp eq i32 %34, 0
  %36 = getelementptr inbounds i8, ptr %0, i64 76
  br i1 %35, label %37, label %38

37:                                               ; preds = %32
  store i16 255, ptr %36, align 4, !tbaa !22
  br label %48

38:                                               ; preds = %32
  store i16 127, ptr %36, align 4, !tbaa !22
  br label %48

39:                                               ; preds = %16
  %40 = getelementptr inbounds i8, ptr %0, i64 20
  %41 = load i32, ptr %40, align 4, !tbaa !21
  %42 = icmp eq i32 %41, 0
  %43 = getelementptr inbounds i8, ptr %0, i64 76
  br i1 %42, label %44, label %45

44:                                               ; preds = %39
  store i16 127, ptr %43, align 4, !tbaa !22
  br label %48

45:                                               ; preds = %39
  store i16 63, ptr %43, align 4, !tbaa !22
  br label %48

46:                                               ; preds = %16
  %47 = getelementptr inbounds i8, ptr %0, i64 76
  store i16 0, ptr %47, align 4, !tbaa !22
  br label %48

48:                                               ; preds = %31, %30, %46, %45, %44, %37, %38
  %49 = getelementptr inbounds i8, ptr %0, i64 136
  store volatile i32 0, ptr %49, align 8, !tbaa !23
  store volatile i32 50, ptr %5, align 4, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %0, i64 88
  %51 = load i32, ptr %50, align 8, !tbaa !24
  %52 = icmp eq i32 %51, 536870912
  br i1 %52, label %53, label %68

53:                                               ; preds = %48
  %54 = getelementptr inbounds i8, ptr %0, i64 78
  %55 = load i16, ptr %54, align 2, !tbaa !25
  %.not = icmp ugt i16 %55, %3
  br i1 %.not, label %68, label %56

56:                                               ; preds = %53
  %57 = icmp eq i32 %24, 4096
  br i1 %57, label %58, label %62

58:                                               ; preds = %56
  %59 = getelementptr inbounds i8, ptr %0, i64 20
  %60 = load i32, ptr %59, align 4, !tbaa !21
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %63, label %62

62:                                               ; preds = %58, %56
  br label %63

63:                                               ; preds = %58, %62
  %USART_TxISR_16BIT_FIFOEN.sink = phi ptr [ @USART_TxISR_8BIT_FIFOEN, %62 ], [ @USART_TxISR_16BIT_FIFOEN, %58 ]
  %USART_RxISR_16BIT_FIFOEN.sink = phi ptr [ @USART_RxISR_8BIT_FIFOEN, %62 ], [ @USART_RxISR_16BIT_FIFOEN, %58 ]
  %64 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %USART_TxISR_16BIT_FIFOEN.sink, ptr %64, align 8, !tbaa !26
  %65 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %USART_RxISR_16BIT_FIFOEN.sink, ptr %65, align 8, !tbaa !27
  store i32 0, ptr %13, align 8, !tbaa !13
  %66 = load ptr, ptr %0, align 8, !tbaa !28
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  br label %.sink.split

68:                                               ; preds = %53, %48
  %69 = icmp eq i32 %24, 4096
  br i1 %69, label %70, label %74

70:                                               ; preds = %68
  %71 = getelementptr inbounds i8, ptr %0, i64 20
  %72 = load i32, ptr %71, align 4, !tbaa !21
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %75, label %74

74:                                               ; preds = %70, %68
  br label %75

75:                                               ; preds = %70, %74
  %USART_TxISR_16BIT.sink = phi ptr [ @USART_TxISR_8BIT, %74 ], [ @USART_TxISR_16BIT, %70 ]
  %USART_RxISR_16BIT.sink = phi ptr [ @USART_RxISR_8BIT, %74 ], [ @USART_RxISR_16BIT, %70 ]
  %76 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %USART_TxISR_16BIT.sink, ptr %76, align 8, !tbaa !26
  %77 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %USART_RxISR_16BIT.sink, ptr %77, align 8, !tbaa !27
  store i32 0, ptr %13, align 8, !tbaa !13
  %78 = load ptr, ptr %0, align 8, !tbaa !28
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  br label %.sink.split

.sink.split:                                      ; preds = %75, %63
  %.sink75 = phi ptr [ %67, %63 ], [ %79, %75 ]
  %.sink71 = phi ptr [ %66, %63 ], [ %78, %75 ]
  %.sink70 = phi i32 [ 256, %63 ], [ 288, %75 ]
  %.sink = phi ptr [ %67, %63 ], [ %78, %75 ]
  %.sink66 = phi i32 [ 276824064, %63 ], [ 128, %75 ]
  %80 = load volatile i32, ptr %.sink75, align 4, !tbaa !29
  %81 = or i32 %80, 1
  store volatile i32 %81, ptr %.sink75, align 4, !tbaa !29
  %82 = load volatile i32, ptr %.sink71, align 4, !tbaa !31
  %83 = or i32 %82, %.sink70
  store volatile i32 %83, ptr %.sink71, align 4, !tbaa !31
  %84 = load volatile i32, ptr %.sink, align 4, !tbaa !32
  %85 = or i32 %84, %.sink66
  store volatile i32 %85, ptr %.sink, align 4, !tbaa !32
  br label %86

86:                                               ; preds = %.sink.split, %4, %12, %8
  %.0 = phi i32 [ 1, %8 ], [ 2, %12 ], [ 2, %4 ], [ 0, %.sink.split ]
  ret i32 %.0
}

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 = { nofree norecurse 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" }

!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 132}
!6 = !{!"__USART_HandleTypeDef", !7, i64 0, !10, i64 8, !7, i64 48, !12, i64 56, !12, i64 58, !7, i64 64, !12, i64 72, !12, i64 74, !12, i64 76, !12, i64 78, !12, i64 80, !11, i64 84, !11, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !11, i64 128, !11, i64 132, !11, i64 136}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !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 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!6, !11, i64 128}
!14 = !{!6, !7, i64 64}
!15 = !{!6, !12, i64 72}
!16 = !{!6, !12, i64 74}
!17 = !{!6, !7, i64 48}
!18 = !{!6, !12, i64 56}
!19 = !{!6, !12, i64 58}
!20 = !{!6, !11, i64 12}
!21 = !{!6, !11, i64 20}
!22 = !{!6, !12, i64 76}
!23 = !{!6, !11, i64 136}
!24 = !{!6, !11, i64 88}
!25 = !{!6, !12, i64 78}
!26 = !{!6, !7, i64 104}
!27 = !{!6, !7, i64 96}
!28 = !{!6, !7, i64 0}
!29 = !{!30, !11, i64 8}
!30 = !{!"", !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, !11, i64 40, !11, i64 44}
!31 = !{!30, !11, i64 0}
!32 = !{!11, !11, i64 0}


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