; LLVM IR from FrancesoM/Bisc8FX :: sdk_projects/bisc8_platform/hw/drivers/atan_saturation_v1_0/src (Initialize)

; 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.XAtan_saturation_uio_info = type { i32, i32, [64 x i8], [64 x i8], [5 x %struct.XAtan_saturation_uio_map] }
%struct.XAtan_saturation_uio_map = type { i64, i32 }
%struct.dirent = type { i64, i64, i16, i8, [256 x i8] }
%struct.XAtan_saturation = type { i64, i32 }

@uio_info = external hidden global %struct.XAtan_saturation_uio_info, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [140 x i8], align 1
@__PRETTY_FUNCTION__.XAtan_saturation_Initialize = external hidden unnamed_addr constant [66 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @XAtan_saturation_Initialize(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca [256 x i8], align 16
  %12 = alloca [64 x i8], align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  store ptr @uio_info, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 256, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %2
  br label %19

18:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 95, ptr noundef @__PRETTY_FUNCTION__.XAtan_saturation_Initialize) #9
  unreachable

19:                                               ; preds = %17
  %20 = call i32 @scandir(ptr noundef @.str.2, ptr noundef %7, ptr noundef null, ptr noundef @alphasort)
  store i32 %20, ptr %9, align 4, !tbaa !9
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = icmp slt i32 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %19
  store i32 2, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %130

24:                                               ; preds = %19
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %67, %24
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = load i32, ptr %9, align 4, !tbaa !9
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %29, label %70

29:                                               ; preds = %25
  %30 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %31 = call ptr @strcpy(ptr noundef %30, ptr noundef @.str.3) #8
  %32 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds ptr, ptr %33, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.dirent, ptr %37, i32 0, i32 4
  %39 = getelementptr inbounds [256 x i8], ptr %38, i64 0, i64 0
  %40 = call ptr @strcat(ptr noundef %32, ptr noundef %39) #8
  %41 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %42 = call ptr @strcat(ptr noundef %41, ptr noundef @.str.4) #8
  %43 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %44 = getelementptr inbounds [64 x i8], ptr %12, i64 0, i64 0
  %45 = call i32 @line_from_file(ptr noundef %43, ptr noundef %44)
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %66

47:                                               ; preds = %29
  %48 = getelementptr inbounds [64 x i8], ptr %12, i64 0, i64 0
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = call i32 @strcmp(ptr noundef %48, ptr noundef %49) #10
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %66

52:                                               ; preds = %47
  store i32 1, ptr %13, align 4, !tbaa !9
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds ptr, ptr %53, i64 %55
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.dirent, ptr %57, i32 0, i32 4
  %59 = getelementptr inbounds [256 x i8], ptr %58, i64 0, i64 0
  store ptr %59, ptr %10, align 8, !tbaa !5
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %60, i64 3
  store ptr %61, ptr %10, align 8, !tbaa !5
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = call i32 @atoi(ptr noundef %62) #10
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.XAtan_saturation_uio_info, ptr %64, i32 0, i32 1
  store i32 %63, ptr %65, align 4, !tbaa !11
  br label %70

66:                                               ; preds = %47, %29
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %8, align 4, !tbaa !9
  br label %25, !llvm.loop !13

70:                                               ; preds = %52, %25
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store i32 2, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %130

74:                                               ; preds = %70
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = call i32 @uio_info_read_name(ptr noundef %75)
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = call i32 @uio_info_read_version(ptr noundef %77)
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %89, %74
  %80 = load i32, ptr %9, align 4, !tbaa !9
  %81 = icmp slt i32 %80, 5
  br i1 %81, label %82, label %92

82:                                               ; preds = %79
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = load i32, ptr %9, align 4, !tbaa !9
  %85 = call i32 @uio_info_read_map_addr(ptr noundef %83, i32 noundef %84)
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = call i32 @uio_info_read_map_size(ptr noundef %86, i32 noundef %87)
  br label %89

89:                                               ; preds = %82
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %9, align 4, !tbaa !9
  br label %79, !llvm.loop !15

92:                                               ; preds = %79
  %93 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.XAtan_saturation_uio_info, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !11
  %97 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %93, ptr noundef @.str.5, i32 noundef %96) #8
  %98 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 0
  %99 = call i32 (ptr, i32, ...) @open(ptr noundef %98, i32 noundef 2)
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.XAtan_saturation_uio_info, ptr %100, i32 0, i32 0
  store i32 %99, ptr %101, align 8, !tbaa !16
  %102 = icmp slt i32 %99, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %92
  store i32 3, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %130

104:                                              ; preds = %92
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.XAtan_saturation_uio_info, ptr %105, i32 0, i32 4
  %107 = getelementptr inbounds [5 x %struct.XAtan_saturation_uio_map], ptr %106, i64 0, i64 0
  %108 = getelementptr inbounds %struct.XAtan_saturation_uio_map, ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 8, !tbaa !17
  %110 = zext i32 %109 to i64
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.XAtan_saturation_uio_info, ptr %111, i32 0, i32 0
  %113 = load i32, ptr %112, align 8, !tbaa !16
  %114 = call i32 @getpagesize() #11
  %115 = mul nsw i32 0, %114
  %116 = sext i32 %115 to i64
  %117 = call ptr @mmap(ptr noundef null, i64 noundef %110, i32 noundef 3, i32 noundef 1, i32 noundef %113, i64 noundef %116) #8
  %118 = ptrtoint ptr %117 to i64
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.XAtan_saturation, ptr %119, i32 0, i32 0
  store i64 %118, ptr %120, align 8, !tbaa !20
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.XAtan_saturation, ptr %121, i32 0, i32 0
  %123 = load i64, ptr %122, align 8, !tbaa !20
  %124 = icmp ne i64 %123, 0
  br i1 %124, label %125, label %126

125:                                              ; preds = %104
  br label %127

126:                                              ; preds = %104
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 127, ptr noundef @__PRETTY_FUNCTION__.XAtan_saturation_Initialize) #9
  unreachable

127:                                              ; preds = %125
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.XAtan_saturation, ptr %128, i32 0, i32 1
  store i32 1, ptr %129, align 8, !tbaa !17
  store i32 0, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %130

130:                                              ; preds = %127, %103, %73, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %131 = load i32, ptr %3, align 4
  ret i32 %131
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare i32 @scandir(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @alphasort(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #5

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #6

; Function Attrs: nounwind uwtable
declare hidden i32 @uio_info_read_name(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @uio_info_read_version(ptr noundef) #0

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

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #5

declare i32 @open(ptr noundef, i32 noundef, ...) #3

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) #5

; Function Attrs: nounwind willreturn memory(none)
declare i32 @getpagesize() #7

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn 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 #3 = { "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 willreturn memory(read) "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 #5 = { 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 #6 = { inlinehint nounwind willreturn memory(read) 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 #7 = { nounwind willreturn memory(none) "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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { nounwind willreturn memory(none) }

!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 4}
!12 = !{!"", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 72, !7, i64 136}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!12, !10, i64 0}
!17 = !{!18, !10, i64 8}
!18 = !{!"", !19, i64 0, !10, i64 8}
!19 = !{!"long", !7, i64 0}
!20 = !{!18, !19, 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"

%struct.XAtan_saturation_uio_info = type { i32, i32, [64 x i8], [64 x i8], [5 x %struct.XAtan_saturation_uio_map] }
%struct.XAtan_saturation_uio_map = type { i64, i32 }

@uio_info = external hidden global %struct.XAtan_saturation_uio_info, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [140 x i8], align 1
@__PRETTY_FUNCTION__.XAtan_saturation_Initialize = external hidden unnamed_addr constant [66 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 4) i32 @XAtan_saturation_Initialize(ptr noundef writeonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca [256 x i8], align 16
  %5 = alloca [64 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #11
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #11
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %6, label %7

6:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 95, ptr noundef nonnull @__PRETTY_FUNCTION__.XAtan_saturation_Initialize) #12
  unreachable

7:                                                ; preds = %2
  %8 = call i32 @scandir(ptr noundef nonnull @.str.2, ptr noundef nonnull %3, ptr noundef null, ptr noundef nonnull @alphasort) #11
  %.not3335 = icmp sgt i32 %8, 0
  br i1 %.not3335, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %7
  %wide.trip.count = zext nneg i32 %8 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %21
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %21 ]
  %9 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.3) #11
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds ptr, ptr %10, i64 %indvars.iv
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 19
  %14 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %13) #11
  %15 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.4) #11
  %16 = call i32 @line_from_file(ptr noundef nonnull %4, ptr noundef nonnull %5)
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %21

18:                                               ; preds = %.lr.ph
  %19 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) %1) #13
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %22, label %21

21:                                               ; preds = %.lr.ph, %18
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !9

22:                                               ; preds = %18
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 22
  %27 = call i32 @atoi(ptr nocapture noundef %26) #13
  store i32 %27, ptr getelementptr inbounds (i8, ptr @uio_info, i64 4), align 4, !tbaa !11
  %28 = call i32 @uio_info_read_name(ptr noundef nonnull @uio_info)
  %29 = call i32 @uio_info_read_version(ptr noundef nonnull @uio_info)
  %30 = call i32 @uio_info_read_map_addr(ptr noundef nonnull @uio_info, i32 noundef 0)
  %31 = call i32 @uio_info_read_map_size(ptr noundef nonnull @uio_info, i32 noundef 0)
  %32 = call i32 @uio_info_read_map_addr(ptr noundef nonnull @uio_info, i32 noundef 1)
  %33 = call i32 @uio_info_read_map_size(ptr noundef nonnull @uio_info, i32 noundef 1)
  %34 = call i32 @uio_info_read_map_addr(ptr noundef nonnull @uio_info, i32 noundef 2)
  %35 = call i32 @uio_info_read_map_size(ptr noundef nonnull @uio_info, i32 noundef 2)
  %36 = call i32 @uio_info_read_map_addr(ptr noundef nonnull @uio_info, i32 noundef 3)
  %37 = call i32 @uio_info_read_map_size(ptr noundef nonnull @uio_info, i32 noundef 3)
  %38 = call i32 @uio_info_read_map_addr(ptr noundef nonnull @uio_info, i32 noundef 4)
  %39 = call i32 @uio_info_read_map_size(ptr noundef nonnull @uio_info, i32 noundef 4)
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @uio_info, i64 4), align 4, !tbaa !11
  %41 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %40) #11
  %42 = call i32 (ptr, i32, ...) @open(ptr noundef nonnull %4, i32 noundef 2) #11
  store i32 %42, ptr @uio_info, align 8, !tbaa !14
  %43 = icmp slt i32 %42, 0
  br i1 %43, label %.critedge, label %44

44:                                               ; preds = %22
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @uio_info, i64 144), align 8, !tbaa !15
  %46 = zext i32 %45 to i64
  %47 = call ptr @mmap(ptr noundef null, i64 noundef %46, i32 noundef 3, i32 noundef 1, i32 noundef %42, i64 noundef 0) #11
  %48 = ptrtoint ptr %47 to i64
  store i64 %48, ptr %0, align 8, !tbaa !18
  %.not34 = icmp eq ptr %47, null
  br i1 %.not34, label %49, label %50

49:                                               ; preds = %44
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 127, ptr noundef nonnull @__PRETTY_FUNCTION__.XAtan_saturation_Initialize) #12
  unreachable

50:                                               ; preds = %44
  %51 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 1, ptr %51, align 8, !tbaa !15
  br label %.critedge

.critedge:                                        ; preds = %21, %22, %7, %50
  %.027 = phi i32 [ 0, %50 ], [ 2, %7 ], [ 3, %22 ], [ 2, %21 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #11
  ret i32 %.027
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @scandir(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @alphasort(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly) local_unnamed_addr #5

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #7

; Function Attrs: nounwind uwtable
declare hidden i32 @uio_info_read_name(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @uio_info_read_version(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #8

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #9

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #10

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn 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 #3 = { "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 = { mustprogress nofree nounwind willreturn memory(read) "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 #5 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 #6 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #7 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #8 = { 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 #9 = { nofree "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 #10 = { 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 #11 = { nounwind }
attributes #12 = { noreturn nounwind }
attributes #13 = { nounwind willreturn memory(read) }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !13, i64 4}
!12 = !{!"", !13, i64 0, !13, i64 4, !7, i64 8, !7, i64 72, !7, i64 136}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 0}
!15 = !{!16, !13, i64 8}
!16 = !{!"", !17, i64 0, !13, i64 8}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !17, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass