; LLVM IR from lfarcaro/ARINC653_ARMV7A_Z7000 :: ARINC653_ARMV7A_Z7000.sw/ARINC653_ARMV7A_Z7000_bsp/ps7_cortexa9_0/libsrc (MioWriteResetValues)

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Xil_Out32(i64 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 @XSlcr_MioWriteResetValues() #2 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  call void @Xil_Out32(i64 noundef 4160749576, i32 noundef 57101)
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %2

2:                                                ; preds = %10, %0
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %4 = icmp ule i32 %3, 1
  br i1 %4, label %5, label %13

5:                                                ; preds = %2
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = mul i32 %6, 4
  %8 = add i32 -134215936, %7
  %9 = zext i32 %8 to i64
  call void @Xil_Out32(i64 noundef %9, i32 noundef 5633)
  br label %10

10:                                               ; preds = %5
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = add i32 %11, 1
  store i32 %12, ptr %1, align 4, !tbaa !5
  br label %2, !llvm.loop !9

13:                                               ; preds = %2
  br label %14

14:                                               ; preds = %22, %13
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = icmp ule i32 %15, 8
  br i1 %16, label %17, label %25

17:                                               ; preds = %14
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = mul i32 %18, 4
  %20 = add i32 -134215936, %19
  %21 = zext i32 %20 to i64
  call void @Xil_Out32(i64 noundef %21, i32 noundef 1537)
  br label %22

22:                                               ; preds = %17
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = add i32 %23, 1
  store i32 %24, ptr %1, align 4, !tbaa !5
  br label %14, !llvm.loop !11

25:                                               ; preds = %14
  br label %26

26:                                               ; preds = %34, %25
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = icmp ule i32 %27, 53
  br i1 %28, label %29, label %37

29:                                               ; preds = %26
  %30 = load i32, ptr %1, align 4, !tbaa !5
  %31 = mul i32 %30, 4
  %32 = add i32 -134215936, %31
  %33 = zext i32 %32 to i64
  call void @Xil_Out32(i64 noundef %33, i32 noundef 5633)
  br label %34

34:                                               ; preds = %29
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = add i32 %35, 1
  store i32 %36, ptr %1, align 4, !tbaa !5
  br label %26, !llvm.loop !12

37:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; 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: inlinehint nounwind uwtable
declare hidden void @Xil_Out32(i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @XSlcr_MioWriteResetValues() local_unnamed_addr #1 {
._crit_edge:
  tail call void @Xil_Out32(i64 noundef 4160749576, i32 noundef 57101)
  tail call void @Xil_Out32(i64 noundef 4160751360, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751364, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751368, i32 noundef 1537)
  tail call void @Xil_Out32(i64 noundef 4160751372, i32 noundef 1537)
  tail call void @Xil_Out32(i64 noundef 4160751376, i32 noundef 1537)
  tail call void @Xil_Out32(i64 noundef 4160751380, i32 noundef 1537)
  tail call void @Xil_Out32(i64 noundef 4160751384, i32 noundef 1537)
  tail call void @Xil_Out32(i64 noundef 4160751388, i32 noundef 1537)
  tail call void @Xil_Out32(i64 noundef 4160751392, i32 noundef 1537)
  tail call void @Xil_Out32(i64 noundef 4160751396, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751400, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751404, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751408, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751412, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751416, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751420, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751424, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751428, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751432, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751436, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751440, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751444, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751448, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751452, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751456, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751460, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751464, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751468, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751472, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751476, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751480, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751484, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751488, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751492, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751496, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751500, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751504, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751508, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751512, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751516, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751520, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751524, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751528, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751532, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751536, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751540, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751544, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751548, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751552, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751556, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751560, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751564, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751568, i32 noundef 5633)
  tail call void @Xil_Out32(i64 noundef 4160751572, i32 noundef 5633)
  ret void
}

attributes #0 = { 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 #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" }

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


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass