; LLVM IR from BrunoLevy/learn-fpga :: LiteX/software/Doom/mc1-doom/src (z_zone)

; 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.memzone_t = type { i32, %struct.memblock_s, ptr }
%struct.memblock_s = type { i32, i32, ptr, i32, i32, ptr, ptr, i32 }

@mainzone = external dso_local global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [51 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

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

; Function Attrs: noreturn
declare void @I_Error(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Z_Free(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @Z_Malloc(i32 noundef %0, i32 noundef %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %13 = add nsw i32 %12, 8
  %14 = sub nsw i32 %13, 1
  %15 = and i32 %14, -8
  store i32 %15, ptr %4, align 4, !tbaa !5
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = add i64 %17, 48
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr %4, align 4, !tbaa !5
  %20 = load ptr, ptr @mainzone, align 8, !tbaa !9
  %21 = getelementptr inbounds %struct.memzone_t, ptr %20, i32 0, i32 2
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  store ptr %22, ptr %11, align 8, !tbaa !9
  %23 = load ptr, ptr %11, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct.memblock_s, ptr %23, i32 0, i32 6
  %25 = load ptr, ptr %24, align 8, !tbaa !14
  %26 = getelementptr inbounds %struct.memblock_s, ptr %25, i32 0, i32 2
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = icmp ne ptr %27, null
  br i1 %28, label %33, label %29

29:                                               ; preds = %3
  %30 = load ptr, ptr %11, align 8, !tbaa !9
  %31 = getelementptr inbounds %struct.memblock_s, ptr %30, i32 0, i32 6
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  store ptr %32, ptr %11, align 8, !tbaa !9
  br label %33

33:                                               ; preds = %29, %3
  %34 = load ptr, ptr %11, align 8, !tbaa !9
  store ptr %34, ptr %9, align 8, !tbaa !9
  %35 = load ptr, ptr %11, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.memblock_s, ptr %35, i32 0, i32 6
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  store ptr %37, ptr %8, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %87, %33
  %39 = load ptr, ptr %9, align 8, !tbaa !9
  %40 = load ptr, ptr %8, align 8, !tbaa !9
  %41 = icmp eq ptr %39, %40
  br i1 %41, label %42, label %44

42:                                               ; preds = %38
  %43 = load i32, ptr %4, align 4, !tbaa !5
  call void (ptr, ...) @I_Error(ptr noundef @.str.2, i32 noundef %43) #4
  unreachable

44:                                               ; preds = %38
  %45 = load ptr, ptr %9, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.memblock_s, ptr %45, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %71

49:                                               ; preds = %44
  %50 = load ptr, ptr %9, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.memblock_s, ptr %50, i32 0, i32 3
  %52 = load i32, ptr %51, align 8, !tbaa !16
  %53 = icmp slt i32 %52, 100
  br i1 %53, label %54, label %58

54:                                               ; preds = %49
  %55 = load ptr, ptr %9, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.memblock_s, ptr %55, i32 0, i32 5
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  store ptr %57, ptr %9, align 8, !tbaa !9
  store ptr %57, ptr %11, align 8, !tbaa !9
  br label %70

58:                                               ; preds = %49
  %59 = load ptr, ptr %11, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.memblock_s, ptr %59, i32 0, i32 6
  %61 = load ptr, ptr %60, align 8, !tbaa !14
  store ptr %61, ptr %11, align 8, !tbaa !9
  %62 = load ptr, ptr %9, align 8, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %62, i64 48
  call void @Z_Free(ptr noundef %63)
  %64 = load ptr, ptr %11, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.memblock_s, ptr %64, i32 0, i32 5
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  store ptr %66, ptr %11, align 8, !tbaa !9
  %67 = load ptr, ptr %11, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.memblock_s, ptr %67, i32 0, i32 5
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  store ptr %69, ptr %9, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %58, %54
  br label %75

71:                                               ; preds = %44
  %72 = load ptr, ptr %9, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.memblock_s, ptr %72, i32 0, i32 5
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  store ptr %74, ptr %9, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %71, %70
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %11, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.memblock_s, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !15
  %80 = icmp ne ptr %79, null
  br i1 %80, label %87, label %81

81:                                               ; preds = %76
  %82 = load ptr, ptr %11, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.memblock_s, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !18
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br label %87

87:                                               ; preds = %81, %76
  %88 = phi i1 [ true, %76 ], [ %86, %81 ]
  br i1 %88, label %38, label %89, !llvm.loop !19

89:                                               ; preds = %87
  %90 = load ptr, ptr %11, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.memblock_s, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !18
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = sub nsw i32 %92, %93
  store i32 %94, ptr %7, align 4, !tbaa !5
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = icmp sgt i32 %95, 64
  br i1 %96, label %97, label %134

97:                                               ; preds = %89
  %98 = load ptr, ptr %11, align 8, !tbaa !9
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %98, i64 %100
  store ptr %101, ptr %10, align 8, !tbaa !9
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = load ptr, ptr %10, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.memblock_s, ptr %103, i32 0, i32 1
  store i32 %102, ptr %104, align 4, !tbaa !18
  %105 = load ptr, ptr %10, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.memblock_s, ptr %105, i32 0, i32 7
  store i32 -1073627409, ptr %106, align 8, !tbaa !21
  %107 = load ptr, ptr %10, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct.memblock_s, ptr %107, i32 0, i32 0
  store i32 -1073627409, ptr %108, align 8, !tbaa !22
  %109 = load ptr, ptr %10, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.memblock_s, ptr %109, i32 0, i32 2
  store ptr null, ptr %110, align 8, !tbaa !15
  %111 = load ptr, ptr %10, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.memblock_s, ptr %111, i32 0, i32 3
  store i32 0, ptr %112, align 8, !tbaa !16
  %113 = load ptr, ptr %10, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.memblock_s, ptr %113, i32 0, i32 4
  store i32 0, ptr %114, align 4, !tbaa !23
  %115 = load ptr, ptr %11, align 8, !tbaa !9
  %116 = load ptr, ptr %10, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.memblock_s, ptr %116, i32 0, i32 6
  store ptr %115, ptr %117, align 8, !tbaa !14
  %118 = load ptr, ptr %11, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.memblock_s, ptr %118, i32 0, i32 5
  %120 = load ptr, ptr %119, align 8, !tbaa !17
  %121 = load ptr, ptr %10, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct.memblock_s, ptr %121, i32 0, i32 5
  store ptr %120, ptr %122, align 8, !tbaa !17
  %123 = load ptr, ptr %10, align 8, !tbaa !9
  %124 = load ptr, ptr %10, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.memblock_s, ptr %124, i32 0, i32 5
  %126 = load ptr, ptr %125, align 8, !tbaa !17
  %127 = getelementptr inbounds %struct.memblock_s, ptr %126, i32 0, i32 6
  store ptr %123, ptr %127, align 8, !tbaa !14
  %128 = load ptr, ptr %10, align 8, !tbaa !9
  %129 = load ptr, ptr %11, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct.memblock_s, ptr %129, i32 0, i32 5
  store ptr %128, ptr %130, align 8, !tbaa !17
  %131 = load i32, ptr %4, align 4, !tbaa !5
  %132 = load ptr, ptr %11, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.memblock_s, ptr %132, i32 0, i32 1
  store i32 %131, ptr %133, align 4, !tbaa !18
  br label %134

134:                                              ; preds = %97, %89
  %135 = load ptr, ptr %6, align 8, !tbaa !9
  %136 = icmp ne ptr %135, null
  br i1 %136, label %137, label %144

137:                                              ; preds = %134
  %138 = load ptr, ptr %6, align 8, !tbaa !9
  %139 = load ptr, ptr %11, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.memblock_s, ptr %139, i32 0, i32 2
  store ptr %138, ptr %140, align 8, !tbaa !15
  %141 = load ptr, ptr %11, align 8, !tbaa !9
  %142 = getelementptr inbounds i8, ptr %141, i64 48
  %143 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %142, ptr %143, align 8, !tbaa !9
  br label %151

144:                                              ; preds = %134
  %145 = load i32, ptr %5, align 4, !tbaa !5
  %146 = icmp sge i32 %145, 100
  br i1 %146, label %147, label %148

147:                                              ; preds = %144
  call void (ptr, ...) @I_Error(ptr noundef @.str.3) #4
  unreachable

148:                                              ; preds = %144
  %149 = load ptr, ptr %11, align 8, !tbaa !9
  %150 = getelementptr inbounds %struct.memblock_s, ptr %149, i32 0, i32 2
  store ptr inttoptr (i64 2 to ptr), ptr %150, align 8, !tbaa !15
  br label %151

151:                                              ; preds = %148, %137
  %152 = load i32, ptr %5, align 4, !tbaa !5
  %153 = load ptr, ptr %11, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.memblock_s, ptr %153, i32 0, i32 3
  store i32 %152, ptr %154, align 8, !tbaa !16
  %155 = load ptr, ptr %11, align 8, !tbaa !9
  %156 = getelementptr inbounds %struct.memblock_s, ptr %155, i32 0, i32 5
  %157 = load ptr, ptr %156, align 8, !tbaa !17
  %158 = load ptr, ptr @mainzone, align 8, !tbaa !9
  %159 = getelementptr inbounds %struct.memzone_t, ptr %158, i32 0, i32 2
  store ptr %157, ptr %159, align 8, !tbaa !11
  %160 = load ptr, ptr %11, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.memblock_s, ptr %160, i32 0, i32 4
  store i32 1919505, ptr %161, align 4, !tbaa !23
  %162 = load ptr, ptr %11, align 8, !tbaa !9
  %163 = getelementptr inbounds %struct.memblock_s, ptr %162, i32 0, i32 7
  store i32 -1073627409, ptr %163, align 8, !tbaa !21
  %164 = load ptr, ptr %11, align 8, !tbaa !9
  %165 = getelementptr inbounds %struct.memblock_s, ptr %164, i32 0, i32 0
  store i32 -1073627409, ptr %165, align 8, !tbaa !22
  %166 = load ptr, ptr %11, align 8, !tbaa !9
  %167 = getelementptr inbounds i8, ptr %166, i64 48
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret ptr %167
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn "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 }
attributes #4 = { noreturn }

!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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 56}
!12 = !{!"", !6, i64 0, !13, i64 8, !10, i64 56}
!13 = !{!"memblock_s", !6, i64 0, !6, i64 4, !10, i64 8, !6, i64 16, !6, i64 20, !10, i64 24, !10, i64 32, !6, i64 40}
!14 = !{!13, !10, i64 32}
!15 = !{!13, !10, i64 8}
!16 = !{!13, !6, i64 16}
!17 = !{!13, !10, i64 24}
!18 = !{!13, !6, i64 4}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!13, !6, i64 40}
!22 = !{!13, !6, i64 0}
!23 = !{!13, !6, i64 20}


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

@mainzone = external dso_local local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [51 x i8], align 1

; Function Attrs: noreturn
declare void @I_Error(ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @Z_Free(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local nonnull ptr @Z_Malloc(i32 noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = add nsw i32 %0, 7
  %5 = and i32 %4, -8
  %6 = add i32 %5, 48
  %7 = load ptr, ptr @mainzone, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 56
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %9, i64 32
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %.not = icmp eq ptr %13, null
  %spec.select = select i1 %.not, ptr %11, ptr %9
  %14 = getelementptr inbounds i8, ptr %spec.select, i64 32
  %15 = load ptr, ptr %14, align 8, !tbaa !13
  %16 = icmp eq ptr %spec.select, %15
  br i1 %16, label %.critedge._crit_edge, label %.lr.ph

.critedge._crit_edge:                             ; preds = %.critedge.backedge, %3
  tail call void (ptr, ...) @I_Error(ptr noundef nonnull @.str.2, i32 noundef %6) #3
  unreachable

.lr.ph:                                           ; preds = %3, %.critedge.backedge
  %.169 = phi ptr [ %.2, %.critedge.backedge ], [ %spec.select, %3 ]
  %.05568 = phi ptr [ %.156, %.critedge.backedge ], [ %spec.select, %3 ]
  %17 = getelementptr inbounds i8, ptr %.05568, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !14
  %.not61 = icmp eq ptr %18, null
  br i1 %.not61, label %34, label %19

19:                                               ; preds = %.lr.ph
  %20 = getelementptr inbounds i8, ptr %.05568, i64 16
  %21 = load i32, ptr %20, align 8, !tbaa !15
  %22 = icmp slt i32 %21, 100
  br i1 %22, label %23, label %26

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %.05568, i64 24
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  br label %37

26:                                               ; preds = %19
  %27 = getelementptr inbounds i8, ptr %.169, i64 32
  %28 = load ptr, ptr %27, align 8, !tbaa !13
  %29 = getelementptr inbounds i8, ptr %.05568, i64 48
  tail call void @Z_Free(ptr noundef nonnull %29)
  %30 = getelementptr inbounds i8, ptr %28, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = getelementptr inbounds i8, ptr %31, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  br label %37

34:                                               ; preds = %.lr.ph
  %35 = getelementptr inbounds i8, ptr %.05568, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !16
  br label %37

37:                                               ; preds = %34, %26, %23
  %.156 = phi ptr [ %25, %23 ], [ %33, %26 ], [ %36, %34 ]
  %.2 = phi ptr [ %25, %23 ], [ %31, %26 ], [ %.169, %34 ]
  %38 = getelementptr inbounds i8, ptr %.2, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %.not62 = icmp eq ptr %39, null
  br i1 %.not62, label %40, label %.critedge.backedge

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %.2, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !17
  %43 = icmp slt i32 %42, %6
  br i1 %43, label %.critedge.backedge, label %45

.critedge.backedge:                               ; preds = %40, %37
  %44 = icmp eq ptr %.156, %15
  br i1 %44, label %.critedge._crit_edge, label %.lr.ph, !llvm.loop !18

45:                                               ; preds = %40
  %46 = getelementptr inbounds i8, ptr %.2, i64 8
  %47 = sub nsw i32 %42, %6
  %48 = icmp sgt i32 %47, 64
  br i1 %48, label %49, label %61

49:                                               ; preds = %45
  %50 = getelementptr inbounds i8, ptr %.2, i64 4
  %51 = sext i32 %6 to i64
  %52 = getelementptr inbounds i8, ptr %.2, i64 %51
  %53 = getelementptr inbounds i8, ptr %52, i64 4
  store i32 %47, ptr %53, align 4, !tbaa !17
  %54 = getelementptr inbounds i8, ptr %52, i64 40
  store i32 -1073627409, ptr %54, align 8, !tbaa !20
  store i32 -1073627409, ptr %52, align 8, !tbaa !21
  %55 = getelementptr inbounds i8, ptr %52, i64 8
  %56 = getelementptr inbounds i8, ptr %52, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %55, i8 0, i64 16, i1 false)
  store ptr %.2, ptr %56, align 8, !tbaa !13
  %57 = getelementptr inbounds i8, ptr %.2, i64 24
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  %59 = getelementptr inbounds i8, ptr %52, i64 24
  store ptr %58, ptr %59, align 8, !tbaa !16
  %60 = getelementptr inbounds i8, ptr %58, i64 32
  store ptr %52, ptr %60, align 8, !tbaa !13
  store ptr %52, ptr %57, align 8, !tbaa !16
  store i32 %6, ptr %50, align 4, !tbaa !17
  br label %61

61:                                               ; preds = %49, %45
  %.not63 = icmp eq ptr %2, null
  br i1 %.not63, label %64, label %62

62:                                               ; preds = %61
  store ptr %2, ptr %46, align 8, !tbaa !14
  %63 = getelementptr inbounds i8, ptr %.2, i64 48
  store ptr %63, ptr %2, align 8, !tbaa !5
  br label %68

64:                                               ; preds = %61
  %65 = icmp sgt i32 %1, 99
  br i1 %65, label %66, label %67

66:                                               ; preds = %64
  tail call void (ptr, ...) @I_Error(ptr noundef nonnull @.str.3) #3
  unreachable

67:                                               ; preds = %64
  store ptr inttoptr (i64 2 to ptr), ptr %46, align 8, !tbaa !14
  br label %68

68:                                               ; preds = %67, %62
  %69 = getelementptr inbounds i8, ptr %.2, i64 16
  store i32 %1, ptr %69, align 8, !tbaa !15
  %70 = getelementptr inbounds i8, ptr %.2, i64 24
  %71 = load ptr, ptr %70, align 8, !tbaa !16
  %72 = load ptr, ptr @mainzone, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 56
  store ptr %71, ptr %73, align 8, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %.2, i64 20
  store i32 1919505, ptr %74, align 4, !tbaa !22
  %75 = getelementptr inbounds i8, ptr %.2, i64 40
  store i32 -1073627409, ptr %75, align 8, !tbaa !20
  store i32 -1073627409, ptr %.2, align 8, !tbaa !21
  %76 = getelementptr inbounds i8, ptr %.2, i64 48
  ret ptr %76
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

attributes #0 = { noreturn "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { noreturn 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, !6, i64 56}
!10 = !{!"", !11, i64 0, !12, i64 8, !6, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!"memblock_s", !11, i64 0, !11, i64 4, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !11, i64 40}
!13 = !{!12, !6, i64 32}
!14 = !{!12, !6, i64 8}
!15 = !{!12, !11, i64 16}
!16 = !{!12, !6, i64 24}
!17 = !{!12, !11, i64 4}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!12, !11, i64 40}
!21 = !{!12, !11, i64 0}
!22 = !{!12, !11, i64 20}


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