; LLVM IR from FrancesoM/Bisc8FX :: sdk_projects/bisc8_platform/ps7_cortexa9_0/standalone_domain/bsp/ps7_cortexa9_0_ (IntrHandler)

; 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.XEmacPs_Instance = type { %struct.XEmacPs_Config, i32, i32, i32, %struct.XEmacPs_BdRing, %struct.XEmacPs_BdRing, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32 }
%struct.XEmacPs_Config = type { i16, i64, i8, i8, i8, i8, i8, i8, i8 }
%struct.XEmacPs_BdRing = type { i64, i64, i64, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32 }

@Xil_AssertStatus = external global i32, align 4
@.str = external hidden unnamed_addr constant [170 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

declare void @Xil_Assert(ptr noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @XEmacPs_IntrHandler(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %9, ptr %7, align 8, !tbaa !5
  %10 = load ptr, ptr %7, align 8, !tbaa !5
  %11 = icmp ne ptr %10, null
  br i1 %11, label %12, label %13

12:                                               ; preds = %1
  store i32 0, ptr @Xil_AssertStatus, align 4, !tbaa !9
  br label %14

13:                                               ; preds = %1
  call void @Xil_Assert(ptr noundef @.str, i32 noundef 130)
  store i32 1, ptr @Xil_AssertStatus, align 4, !tbaa !9
  store i32 1, ptr %8, align 4
  br label %209

14:                                               ; preds = %12
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %15, i32 0, i32 2
  %17 = load i32, ptr %16, align 4, !tbaa !11
  %18 = icmp eq i32 %17, 286331153
  br i1 %18, label %19, label %20

19:                                               ; preds = %14
  store i32 0, ptr @Xil_AssertStatus, align 4, !tbaa !9
  br label %21

20:                                               ; preds = %14
  call void @Xil_Assert(ptr noundef @.str, i32 noundef 131)
  store i32 1, ptr @Xil_AssertStatus, align 4, !tbaa !9
  store i32 1, ptr %8, align 4
  br label %209

21:                                               ; preds = %19
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %22, i32 0, i32 0
  %24 = getelementptr inbounds %struct.XEmacPs_Config, ptr %23, i32 0, i32 1
  %25 = load i64, ptr %24, align 8, !tbaa !17
  %26 = add i64 %25, 36
  %27 = call i32 @Xil_In32(i64 noundef %26)
  store i32 %27, ptr %3, align 4, !tbaa !9
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %28, i32 0, i32 12
  %30 = load i32, ptr %29, align 8, !tbaa !18
  %31 = icmp ugt i32 %30, 2
  br i1 %31, label %32, label %39

32:                                               ; preds = %21
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds %struct.XEmacPs_Config, ptr %34, i32 0, i32 1
  %36 = load i64, ptr %35, align 8, !tbaa !17
  %37 = add i64 %36, 1024
  %38 = call i32 @Xil_In32(i64 noundef %37)
  store i32 %38, ptr %6, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %32, %21
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds %struct.XEmacPs_Config, ptr %41, i32 0, i32 1
  %43 = load i64, ptr %42, align 8, !tbaa !17
  %44 = add i64 %43, 36
  %45 = load i32, ptr %3, align 4, !tbaa !9
  call void @Xil_Out32(i64 noundef %44, i32 noundef %45)
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = and i32 %46, 2
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %61

49:                                               ; preds = %39
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds %struct.XEmacPs_Config, ptr %51, i32 0, i32 1
  %53 = load i64, ptr %52, align 8, !tbaa !17
  %54 = add i64 %53, 32
  call void @Xil_Out32(i64 noundef %54, i32 noundef 3)
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %55, i32 0, i32 7
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %58, i32 0, i32 9
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  call void %57(ptr noundef %60)
  br label %61

61:                                               ; preds = %49, %39
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %62, i32 0, i32 12
  %64 = load i32, ptr %63, align 8, !tbaa !18
  %65 = icmp ugt i32 %64, 2
  br i1 %65, label %66, label %87

66:                                               ; preds = %61
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = and i32 %67, 128
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %87

70:                                               ; preds = %66
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %struct.XEmacPs_Config, ptr %72, i32 0, i32 1
  %74 = load i64, ptr %73, align 8, !tbaa !17
  %75 = add i64 %74, 1024
  call void @Xil_Out32(i64 noundef %75, i32 noundef 128)
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds %struct.XEmacPs_Config, ptr %77, i32 0, i32 1
  %79 = load i64, ptr %78, align 8, !tbaa !17
  %80 = add i64 %79, 20
  call void @Xil_Out32(i64 noundef %80, i32 noundef 33)
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %81, i32 0, i32 6
  %83 = load ptr, ptr %82, align 8, !tbaa !21
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %84, i32 0, i32 8
  %86 = load ptr, ptr %85, align 8, !tbaa !22
  call void %83(ptr noundef %86)
  br label %87

87:                                               ; preds = %70, %66, %61
  %88 = load i32, ptr %3, align 4, !tbaa !9
  %89 = and i32 %88, 128
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %103

91:                                               ; preds = %87
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.XEmacPs_Config, ptr %93, i32 0, i32 1
  %95 = load i64, ptr %94, align 8, !tbaa !17
  %96 = add i64 %95, 20
  call void @Xil_Out32(i64 noundef %96, i32 noundef 33)
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %97, i32 0, i32 6
  %99 = load ptr, ptr %98, align 8, !tbaa !21
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %100, i32 0, i32 8
  %102 = load ptr, ptr %101, align 8, !tbaa !22
  call void %99(ptr noundef %102)
  br label %103

103:                                              ; preds = %91, %87
  %104 = load i32, ptr %3, align 4, !tbaa !9
  %105 = and i32 %104, 3076
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %150

107:                                              ; preds = %103
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds %struct.XEmacPs_Config, ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !17
  %112 = add i64 %111, 32
  %113 = call i32 @Xil_In32(i64 noundef %112)
  store i32 %113, ptr %4, align 4, !tbaa !9
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds %struct.XEmacPs_Config, ptr %115, i32 0, i32 1
  %117 = load i64, ptr %116, align 8, !tbaa !17
  %118 = add i64 %117, 32
  %119 = load i32, ptr %4, align 4, !tbaa !9
  call void @Xil_Out32(i64 noundef %118, i32 noundef %119)
  %120 = load i32, ptr %3, align 4, !tbaa !9
  %121 = and i32 %120, 4
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %138

123:                                              ; preds = %107
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds %struct.XEmacPs_Config, ptr %125, i32 0, i32 1
  %127 = load i64, ptr %126, align 8, !tbaa !17
  %128 = add i64 %127, 0
  %129 = call i32 @Xil_In32(i64 noundef %128)
  store i32 %129, ptr %5, align 4, !tbaa !9
  %130 = load i32, ptr %5, align 4, !tbaa !9
  %131 = or i32 %130, 262144
  store i32 %131, ptr %5, align 4, !tbaa !9
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %132, i32 0, i32 0
  %134 = getelementptr inbounds %struct.XEmacPs_Config, ptr %133, i32 0, i32 1
  %135 = load i64, ptr %134, align 8, !tbaa !17
  %136 = add i64 %135, 0
  %137 = load i32, ptr %5, align 4, !tbaa !9
  call void @Xil_Out32(i64 noundef %136, i32 noundef %137)
  br label %138

138:                                              ; preds = %123, %107
  %139 = load i32, ptr %4, align 4, !tbaa !9
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %149

141:                                              ; preds = %138
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %142, i32 0, i32 10
  %144 = load ptr, ptr %143, align 8, !tbaa !23
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %145, i32 0, i32 11
  %147 = load ptr, ptr %146, align 8, !tbaa !24
  %148 = load i32, ptr %4, align 4, !tbaa !9
  call void %144(ptr noundef %147, i8 noundef zeroext 2, i32 noundef %148)
  br label %149

149:                                              ; preds = %141, %138
  br label %150

150:                                              ; preds = %149, %103
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %151, i32 0, i32 12
  %153 = load i32, ptr %152, align 8, !tbaa !18
  %154 = icmp ugt i32 %153, 2
  br i1 %154, label %155, label %177

155:                                              ; preds = %150
  %156 = load i32, ptr %6, align 4, !tbaa !9
  %157 = and i32 %156, 64
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %177

159:                                              ; preds = %155
  %160 = load i32, ptr %6, align 4, !tbaa !9
  %161 = and i32 %160, 128
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %177

163:                                              ; preds = %159
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %164, i32 0, i32 0
  %166 = getelementptr inbounds %struct.XEmacPs_Config, ptr %165, i32 0, i32 1
  %167 = load i64, ptr %166, align 8, !tbaa !17
  %168 = add i64 %167, 1024
  %169 = load i32, ptr %6, align 4, !tbaa !9
  call void @Xil_Out32(i64 noundef %168, i32 noundef %169)
  %170 = load ptr, ptr %7, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %170, i32 0, i32 10
  %172 = load ptr, ptr %171, align 8, !tbaa !23
  %173 = load ptr, ptr %7, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %173, i32 0, i32 11
  %175 = load ptr, ptr %174, align 8, !tbaa !24
  %176 = load i32, ptr %6, align 4, !tbaa !9
  call void %172(ptr noundef %175, i8 noundef zeroext 1, i32 noundef %176)
  br label %177

177:                                              ; preds = %163, %159, %155, %150
  %178 = load i32, ptr %3, align 4, !tbaa !9
  %179 = and i32 %178, 112
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %208

181:                                              ; preds = %177
  %182 = load i32, ptr %3, align 4, !tbaa !9
  %183 = and i32 %182, 128
  %184 = icmp ne i32 %183, 0
  %185 = xor i1 %184, true
  %186 = zext i1 %185 to i32
  %187 = icmp ne i32 %186, 0
  br i1 %187, label %188, label %208

188:                                              ; preds = %181
  %189 = load ptr, ptr %7, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %189, i32 0, i32 0
  %191 = getelementptr inbounds %struct.XEmacPs_Config, ptr %190, i32 0, i32 1
  %192 = load i64, ptr %191, align 8, !tbaa !17
  %193 = add i64 %192, 20
  %194 = call i32 @Xil_In32(i64 noundef %193)
  store i32 %194, ptr %4, align 4, !tbaa !9
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %195, i32 0, i32 0
  %197 = getelementptr inbounds %struct.XEmacPs_Config, ptr %196, i32 0, i32 1
  %198 = load i64, ptr %197, align 8, !tbaa !17
  %199 = add i64 %198, 20
  %200 = load i32, ptr %4, align 4, !tbaa !9
  call void @Xil_Out32(i64 noundef %199, i32 noundef %200)
  %201 = load ptr, ptr %7, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %201, i32 0, i32 10
  %203 = load ptr, ptr %202, align 8, !tbaa !23
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.XEmacPs_Instance, ptr %204, i32 0, i32 11
  %206 = load ptr, ptr %205, align 8, !tbaa !24
  %207 = load i32, ptr %4, align 4, !tbaa !9
  call void %203(ptr noundef %206, i8 noundef zeroext 1, i32 noundef %207)
  br label %208

208:                                              ; preds = %188, %181, %177
  store i32 0, ptr %8, align 4
  br label %209

209:                                              ; preds = %208, %20, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  %210 = load i32, ptr %8, align 4
  switch i32 %210, label %212 [
    i32 0, label %211
    i32 1, label %211
  ]

211:                                              ; preds = %209, %209
  ret void

212:                                              ; preds = %209
  unreachable
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @Xil_In32(i64 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Xil_Out32(i64 noundef, i32 noundef) #3

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 = { inlinehint 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 #4 = { 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 28}
!12 = !{!"XEmacPs_Instance", !13, i64 0, !10, i64 24, !10, i64 28, !10, i64 32, !16, i64 40, !16, i64 152, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !10, i64 328}
!13 = !{!"", !14, i64 0, !15, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !7, i64 22}
!14 = !{!"short", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"", !15, i64 0, !15, i64 8, !15, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104}
!17 = !{!12, !15, i64 8}
!18 = !{!12, !10, i64 312}
!19 = !{!12, !6, i64 272}
!20 = !{!12, !6, i64 288}
!21 = !{!12, !6, i64 264}
!22 = !{!12, !6, i64 280}
!23 = !{!12, !6, i64 296}
!24 = !{!12, !6, i64 304}


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

@Xil_AssertStatus = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [170 x i8], align 1

declare void @Xil_Assert(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @XEmacPs_IntrHandler(ptr noundef readonly %0) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %6, label %2

2:                                                ; preds = %1
  store i32 0, ptr @Xil_AssertStatus, align 4, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 28
  %4 = load i32, ptr %3, align 4, !tbaa !9
  %5 = icmp eq i32 %4, 286331153
  br i1 %5, label %7, label %15

6:                                                ; preds = %1
  tail call void @Xil_Assert(ptr noundef nonnull @.str, i32 noundef 130) #3
  store i32 1, ptr @Xil_AssertStatus, align 4, !tbaa !5
  br label %97

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !16
  %10 = add i64 %9, 36
  %11 = tail call i32 @Xil_In32(i64 noundef %10)
  %12 = getelementptr inbounds i8, ptr %0, i64 312
  %13 = load i32, ptr %12, align 8, !tbaa !17
  %14 = icmp ugt i32 %13, 2
  br i1 %14, label %16, label %20

15:                                               ; preds = %2
  tail call void @Xil_Assert(ptr noundef nonnull @.str, i32 noundef 131) #3
  store i32 1, ptr @Xil_AssertStatus, align 4, !tbaa !5
  br label %97

16:                                               ; preds = %7
  %17 = load i64, ptr %8, align 8, !tbaa !16
  %18 = add i64 %17, 1024
  %19 = tail call i32 @Xil_In32(i64 noundef %18)
  br label %20

20:                                               ; preds = %16, %7
  %.0 = phi i32 [ %19, %16 ], [ 0, %7 ]
  %21 = load i64, ptr %8, align 8, !tbaa !16
  %22 = add i64 %21, 36
  tail call void @Xil_Out32(i64 noundef %22, i32 noundef %11)
  %23 = and i32 %11, 2
  %.not52 = icmp eq i32 %23, 0
  br i1 %.not52, label %31, label %24

24:                                               ; preds = %20
  %25 = load i64, ptr %8, align 8, !tbaa !16
  %26 = add i64 %25, 32
  tail call void @Xil_Out32(i64 noundef %26, i32 noundef 3)
  %27 = getelementptr inbounds i8, ptr %0, i64 272
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  %29 = getelementptr inbounds i8, ptr %0, i64 288
  %30 = load ptr, ptr %29, align 8, !tbaa !19
  tail call void %28(ptr noundef %30) #3
  br label %31

31:                                               ; preds = %24, %20
  %32 = load i32, ptr %12, align 8, !tbaa !17
  %33 = icmp ult i32 %32, 3
  %34 = and i32 %.0, 128
  %.not53 = icmp eq i32 %34, 0
  %or.cond = select i1 %33, i1 true, i1 %.not53
  br i1 %or.cond, label %44, label %35

35:                                               ; preds = %31
  %36 = load i64, ptr %8, align 8, !tbaa !16
  %37 = add i64 %36, 1024
  tail call void @Xil_Out32(i64 noundef %37, i32 noundef 128)
  %38 = load i64, ptr %8, align 8, !tbaa !16
  %39 = add i64 %38, 20
  tail call void @Xil_Out32(i64 noundef %39, i32 noundef 33)
  %40 = getelementptr inbounds i8, ptr %0, i64 264
  %41 = load ptr, ptr %40, align 8, !tbaa !20
  %42 = getelementptr inbounds i8, ptr %0, i64 280
  %43 = load ptr, ptr %42, align 8, !tbaa !21
  tail call void %41(ptr noundef %43) #3
  br label %44

44:                                               ; preds = %35, %31
  %45 = and i32 %11, 128
  %.not54 = icmp ne i32 %45, 0
  br i1 %.not54, label %46, label %53

46:                                               ; preds = %44
  %47 = load i64, ptr %8, align 8, !tbaa !16
  %48 = add i64 %47, 20
  tail call void @Xil_Out32(i64 noundef %48, i32 noundef 33)
  %49 = getelementptr inbounds i8, ptr %0, i64 264
  %50 = load ptr, ptr %49, align 8, !tbaa !20
  %51 = getelementptr inbounds i8, ptr %0, i64 280
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  tail call void %50(ptr noundef %52) #3
  br label %53

53:                                               ; preds = %46, %44
  %54 = and i32 %11, 3076
  %.not55 = icmp eq i32 %54, 0
  br i1 %.not55, label %73, label %55

55:                                               ; preds = %53
  %56 = load i64, ptr %8, align 8, !tbaa !16
  %57 = add i64 %56, 32
  %58 = tail call i32 @Xil_In32(i64 noundef %57)
  %59 = load i64, ptr %8, align 8, !tbaa !16
  %60 = add i64 %59, 32
  tail call void @Xil_Out32(i64 noundef %60, i32 noundef %58)
  %61 = and i32 %11, 4
  %.not56 = icmp eq i32 %61, 0
  br i1 %.not56, label %67, label %62

62:                                               ; preds = %55
  %63 = load i64, ptr %8, align 8, !tbaa !16
  %64 = tail call i32 @Xil_In32(i64 noundef %63)
  %65 = or i32 %64, 262144
  %66 = load i64, ptr %8, align 8, !tbaa !16
  tail call void @Xil_Out32(i64 noundef %66, i32 noundef %65)
  br label %67

67:                                               ; preds = %62, %55
  %.not57 = icmp eq i32 %58, 0
  br i1 %.not57, label %73, label %68

68:                                               ; preds = %67
  %69 = getelementptr inbounds i8, ptr %0, i64 296
  %70 = load ptr, ptr %69, align 8, !tbaa !22
  %71 = getelementptr inbounds i8, ptr %0, i64 304
  %72 = load ptr, ptr %71, align 8, !tbaa !23
  tail call void %70(ptr noundef %72, i8 noundef zeroext 2, i32 noundef %58) #3
  br label %73

73:                                               ; preds = %67, %68, %53
  %74 = load i32, ptr %12, align 8, !tbaa !17
  %75 = icmp ult i32 %74, 3
  %76 = and i32 %.0, 192
  %77 = icmp ne i32 %76, 192
  %or.cond62 = select i1 %75, i1 true, i1 %77
  br i1 %or.cond62, label %85, label %78

78:                                               ; preds = %73
  %79 = load i64, ptr %8, align 8, !tbaa !16
  %80 = add i64 %79, 1024
  tail call void @Xil_Out32(i64 noundef %80, i32 noundef %.0)
  %81 = getelementptr inbounds i8, ptr %0, i64 296
  %82 = load ptr, ptr %81, align 8, !tbaa !22
  %83 = getelementptr inbounds i8, ptr %0, i64 304
  %84 = load ptr, ptr %83, align 8, !tbaa !23
  tail call void %82(ptr noundef %84, i8 noundef zeroext 1, i32 noundef %.0) #3
  br label %85

85:                                               ; preds = %78, %73
  %86 = and i32 %11, 112
  %.not60 = icmp eq i32 %86, 0
  %brmerge = or i1 %.not60, %.not54
  br i1 %brmerge, label %97, label %87

87:                                               ; preds = %85
  %88 = load i64, ptr %8, align 8, !tbaa !16
  %89 = add i64 %88, 20
  %90 = tail call i32 @Xil_In32(i64 noundef %89)
  %91 = load i64, ptr %8, align 8, !tbaa !16
  %92 = add i64 %91, 20
  tail call void @Xil_Out32(i64 noundef %92, i32 noundef %90)
  %93 = getelementptr inbounds i8, ptr %0, i64 296
  %94 = load ptr, ptr %93, align 8, !tbaa !22
  %95 = getelementptr inbounds i8, ptr %0, i64 304
  %96 = load ptr, ptr %95, align 8, !tbaa !23
  tail call void %94(ptr noundef %96, i8 noundef zeroext 1, i32 noundef %90) #3
  br label %97

97:                                               ; preds = %87, %85, %15, %6
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @Xil_In32(i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Xil_Out32(i64 noundef, i32 noundef) local_unnamed_addr #2

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 = { inlinehint 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, !6, i64 28}
!10 = !{!"XEmacPs_Instance", !11, i64 0, !6, i64 24, !6, i64 28, !6, i64 32, !14, i64 40, !14, i64 152, !15, i64 264, !15, i64 272, !15, i64 280, !15, i64 288, !15, i64 296, !15, i64 304, !6, i64 312, !6, i64 316, !6, i64 320, !6, i64 324, !6, i64 328}
!11 = !{!"", !12, i64 0, !13, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !7, i64 22}
!12 = !{!"short", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !6, i64 104}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!10, !13, i64 8}
!17 = !{!10, !6, i64 312}
!18 = !{!10, !15, i64 272}
!19 = !{!10, !15, i64 288}
!20 = !{!10, !15, i64 264}
!21 = !{!10, !15, i64 280}
!22 = !{!10, !15, i64 296}
!23 = !{!10, !15, i64 304}


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