; LLVM IR from travisdowns/uarch-bench :: page-info (fprint_info)

; 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.page_info = type { i64, i8, i8, i8, i8, i8, i8, i64 }

@.str.25 = external hidden unnamed_addr constant [84 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @fprint_info(ptr noundef %0, ptr noundef byval(%struct.page_info) align 8 %1) #0 {
  %3 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds %struct.page_info, ptr %1, i32 0, i32 0
  %6 = load i64, ptr %5, align 8, !tbaa !9
  %7 = inttoptr i64 %6 to ptr
  %8 = getelementptr inbounds %struct.page_info, ptr %1, i32 0, i32 1
  %9 = load i8, ptr %8, align 8, !tbaa !13, !range !14, !noundef !15
  %10 = trunc i8 %9 to i1
  %11 = zext i1 %10 to i32
  %12 = getelementptr inbounds %struct.page_info, ptr %1, i32 0, i32 2
  %13 = load i8, ptr %12, align 1, !tbaa !16, !range !14, !noundef !15
  %14 = trunc i8 %13 to i1
  %15 = zext i1 %14 to i32
  %16 = getelementptr inbounds %struct.page_info, ptr %1, i32 0, i32 3
  %17 = load i8, ptr %16, align 2, !tbaa !17, !range !14, !noundef !15
  %18 = trunc i8 %17 to i1
  %19 = zext i1 %18 to i32
  %20 = getelementptr inbounds %struct.page_info, ptr %1, i32 0, i32 4
  %21 = load i8, ptr %20, align 1, !tbaa !18, !range !14, !noundef !15
  %22 = trunc i8 %21 to i1
  %23 = zext i1 %22 to i32
  %24 = getelementptr inbounds %struct.page_info, ptr %1, i32 0, i32 5
  %25 = load i8, ptr %24, align 4, !tbaa !19, !range !14, !noundef !15
  %26 = trunc i8 %25 to i1
  %27 = zext i1 %26 to i32
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %4, ptr noundef @.str.25, ptr noundef %7, i32 noundef %11, i32 noundef %15, i32 noundef %19, i32 noundef %23, i32 noundef %27) #2
  ret void
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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 = { nounwind "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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !12, i64 8, !12, i64 9, !12, i64 10, !12, i64 11, !12, i64 12, !12, i64 13, !11, i64 16}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!10, !12, i64 9}
!17 = !{!10, !12, i64 10}
!18 = !{!10, !12, i64 11}
!19 = !{!10, !12, i64 12}


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

%struct.page_info = type { i64, i8, i8, i8, i8, i8, i8, i64 }

@.str.25 = external hidden unnamed_addr constant [84 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local void @fprint_info(ptr nocapture noundef %0, ptr nocapture noundef readonly byval(%struct.page_info) align 8 %1) local_unnamed_addr #0 {
  %3 = load i64, ptr %1, align 8, !tbaa !5
  %4 = inttoptr i64 %3 to ptr
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load i8, ptr %5, align 8, !tbaa !11, !range !12, !noundef !13
  %7 = zext nneg i8 %6 to i32
  %8 = getelementptr inbounds i8, ptr %1, i64 9
  %9 = load i8, ptr %8, align 1, !tbaa !14, !range !12, !noundef !13
  %10 = zext nneg i8 %9 to i32
  %11 = getelementptr inbounds i8, ptr %1, i64 10
  %12 = load i8, ptr %11, align 2, !tbaa !15, !range !12, !noundef !13
  %13 = zext nneg i8 %12 to i32
  %14 = getelementptr inbounds i8, ptr %1, i64 11
  %15 = load i8, ptr %14, align 1, !tbaa !16, !range !12, !noundef !13
  %16 = zext nneg i8 %15 to i32
  %17 = getelementptr inbounds i8, ptr %1, i64 12
  %18 = load i8, ptr %17, align 4, !tbaa !17, !range !12, !noundef !13
  %19 = zext nneg i8 %18 to i32
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.25, ptr noundef %4, i32 noundef %7, i32 noundef %10, i32 noundef %13, i32 noundef %16, i32 noundef %19) #2
  ret void
}

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

attributes #0 = { nofree 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 nounwind "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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 9, !10, i64 10, !10, i64 11, !10, i64 12, !10, i64 13, !7, i64 16}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_Bool", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!6, !10, i64 9}
!15 = !{!6, !10, i64 10}
!16 = !{!6, !10, i64 11}
!17 = !{!6, !10, i64 12}


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