; LLVM IR from jingweizhanghuai/Morn :: src/math (morn_large_integer)

; 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.MArray = type { i32, i16, %union.anon }
%union.anon = type { ptr }

@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.mStringToLInt = external hidden unnamed_addr constant [14 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: nounwind uwtable
declare dso_local void @LIntAppend(ptr noundef, i32 noundef) #1

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
declare dso_local void @m_LIntAddInt(ptr noundef, i64 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @LIntMulInt(ptr noundef, i64 noundef, ptr noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @mStringToLInt(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [10 x i8], align 1
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %12

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %19, label %15

15:                                               ; preds = %12
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = ptrtoint ptr %16 to i64
  %18 = icmp eq i64 %17, -1
  br label %19

19:                                               ; preds = %15, %12
  %20 = phi i1 [ true, %12 ], [ %18, %15 ]
  %21 = zext i1 %20 to i32
  store i32 %21, ptr %5, align 4, !tbaa !9
  %22 = load i32, ptr %5, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %19
  %25 = load i32, ptr %5, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %25, i32 noundef -1, ptr noundef @.str.1, i32 noundef 565, ptr noundef @__FUNCTION__.mStringToLInt, ptr noundef @.str.4)
  br label %26

26:                                               ; preds = %24, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %27

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call i64 @strlen(ptr noundef %28) #7
  %30 = trunc i64 %29 to i32
  store i32 %30, ptr %6, align 4, !tbaa !9
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = sdiv i32 %32, 10
  call void @LIntAppend(ptr noundef %31, i32 noundef %33)
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.MArray, ptr %34, i32 0, i32 2
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = getelementptr inbounds i32, ptr %36, i64 0
  store i32 0, ptr %37, align 4, !tbaa !9
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.MArray, ptr %38, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds i32, ptr %40, i64 1
  store i32 0, ptr %41, align 4, !tbaa !9
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.MArray, ptr %42, i32 0, i32 2
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = getelementptr inbounds i64, ptr %44, i64 1
  store i64 1, ptr %45, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 0
  %48 = load i8, ptr %47, align 1, !tbaa !11
  %49 = sext i8 %48 to i32
  %50 = icmp eq i32 %49, 45
  br i1 %50, label %51, label %56

51:                                               ; preds = %27
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i32 1
  store ptr %53, ptr %4, align 8, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = add nsw i32 %54, -1
  store i32 %55, ptr %6, align 4, !tbaa !9
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %51, %27
  br label %57

57:                                               ; preds = %63, %56
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 0
  %60 = load i8, ptr %59, align 1, !tbaa !11
  %61 = sext i8 %60 to i32
  %62 = icmp eq i32 %61, 48
  br i1 %62, label %63, label %68

63:                                               ; preds = %57
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %64, i32 1
  store ptr %65, ptr %4, align 8, !tbaa !5
  %66 = load i32, ptr %6, align 4, !tbaa !9
  %67 = add nsw i32 %66, -1
  store i32 %67, ptr %6, align 4, !tbaa !9
  br label %57, !llvm.loop !14

68:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 10, ptr %8) #6
  %69 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 9
  store i8 0, ptr %69, align 1, !tbaa !11
  %70 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %70, ptr align 1 %71, i64 9, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %72 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %73 = call i32 @atoi(ptr noundef %72) #7
  %74 = sext i32 %73 to i64
  store i64 %74, ptr %9, align 8, !tbaa !12
  %75 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %75, ptr align 1 %77, i64 9, i1 false)
  %78 = load i64, ptr %9, align 8, !tbaa !12
  %79 = mul nsw i64 %78, 1000000000
  %80 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %81 = call i32 @atoi(ptr noundef %80) #7
  %82 = sext i32 %81 to i64
  %83 = add nsw i64 %79, %82
  store i64 %83, ptr %9, align 8, !tbaa !12
  %84 = load i64, ptr %9, align 8, !tbaa !12
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.MArray, ptr %85, i32 0, i32 2
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  %88 = getelementptr inbounds i64, ptr %87, i64 2
  store i64 %84, ptr %88, align 8, !tbaa !12
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.MArray, ptr %89, i32 0, i32 0
  store i32 3, ptr %90, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 18, ptr %10, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %122, %68
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = load i32, ptr %6, align 4, !tbaa !9
  %94 = sub nsw i32 %93, 18
  %95 = icmp sle i32 %92, %94
  br i1 %95, label %96, label %125

96:                                               ; preds = %91
  %97 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %98, i64 %100
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %97, ptr align 1 %101, i64 9, i1 false)
  %102 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %103 = call i32 @atoi(ptr noundef %102) #7
  %104 = sext i32 %103 to i64
  store i64 %104, ptr %9, align 8, !tbaa !12
  %105 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i8, ptr %106, i64 %108
  %110 = getelementptr inbounds i8, ptr %109, i64 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %105, ptr align 1 %110, i64 9, i1 false)
  %111 = load i64, ptr %9, align 8, !tbaa !12
  %112 = mul nsw i64 %111, 1000000000
  %113 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 0
  %114 = call i32 @atoi(ptr noundef %113) #7
  %115 = sext i32 %114 to i64
  %116 = add nsw i64 %112, %115
  store i64 %116, ptr %9, align 8, !tbaa !12
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  call void @LIntMulInt(ptr noundef %117, i64 noundef 1000000000000000000, ptr noundef %118)
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = load i64, ptr %9, align 8, !tbaa !12
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  call void @m_LIntAddInt(ptr noundef %119, i64 noundef %120, ptr noundef %121)
  br label %122

122:                                              ; preds = %96
  %123 = load i32, ptr %10, align 4, !tbaa !9
  %124 = add nsw i32 %123, 18
  store i32 %124, ptr %10, align 4, !tbaa !9
  br label %91, !llvm.loop !19

125:                                              ; preds = %91
  %126 = load i32, ptr %10, align 4, !tbaa !9
  %127 = load i32, ptr %6, align 4, !tbaa !9
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %129, label %157

129:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 1, ptr %11, align 8, !tbaa !12
  store i64 0, ptr %9, align 8, !tbaa !12
  br label %130

130:                                              ; preds = %147, %129
  %131 = load i32, ptr %10, align 4, !tbaa !9
  %132 = load i32, ptr %6, align 4, !tbaa !9
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %134, label %150

134:                                              ; preds = %130
  %135 = load i64, ptr %11, align 8, !tbaa !12
  %136 = mul nsw i64 %135, 10
  store i64 %136, ptr %11, align 8, !tbaa !12
  %137 = load i64, ptr %9, align 8, !tbaa !12
  %138 = mul nsw i64 %137, 10
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = load i32, ptr %10, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i8, ptr %139, i64 %141
  %143 = load i8, ptr %142, align 1, !tbaa !11
  %144 = sext i8 %143 to i64
  %145 = add nsw i64 %138, %144
  %146 = sub nsw i64 %145, 48
  store i64 %146, ptr %9, align 8, !tbaa !12
  br label %147

147:                                              ; preds = %134
  %148 = load i32, ptr %10, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %10, align 4, !tbaa !9
  br label %130, !llvm.loop !20

150:                                              ; preds = %130
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = load i64, ptr %11, align 8, !tbaa !12
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  call void @LIntMulInt(ptr noundef %151, i64 noundef %152, ptr noundef %153)
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = load i64, ptr %9, align 8, !tbaa !12
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  call void @m_LIntAddInt(ptr noundef %154, i64 noundef %155, ptr noundef %156)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %157

157:                                              ; preds = %150, %125
  %158 = load i32, ptr %7, align 4, !tbaa !9
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.MArray, ptr %159, i32 0, i32 2
  %161 = load ptr, ptr %160, align 8, !tbaa !11
  %162 = getelementptr inbounds i32, ptr %161, i64 0
  store i32 %158, ptr %162, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 10, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !10, i64 0}
!17 = !{!"MArray", !10, i64 0, !18, i64 4, !7, i64 8}
!18 = !{!"short", !7, i64 0}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


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

@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.mStringToLInt = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @mStringToLInt(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 {
  %3 = alloca [10 x i8], align 1
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %9 [
    i64 -1, label %4
    i64 0, label %4
  ]

4:                                                ; preds = %2, %2
  %5 = icmp eq ptr %0, null
  %6 = icmp eq ptr %0, inttoptr (i64 -1 to ptr)
  %7 = or i1 %5, %6
  %8 = zext i1 %7 to i32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %8, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 565, ptr noundef nonnull @__FUNCTION__.mStringToLInt, ptr noundef nonnull @.str.4) #6
  br label %9

9:                                                ; preds = %2, %4
  %10 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #7
  %11 = trunc i64 %10 to i32
  %12 = sdiv i32 %11, 10
  tail call void @LIntAppend(ptr noundef %0, i32 noundef %12)
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %14, align 4, !tbaa !8
  %15 = load ptr, ptr %13, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 4
  store i32 0, ptr %16, align 4, !tbaa !8
  %17 = load ptr, ptr %13, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  store i64 1, ptr %18, align 8, !tbaa !10
  %19 = load i8, ptr %1, align 1, !tbaa !5
  %20 = icmp eq i8 %19, 45
  %.056.idx = zext i1 %20 to i64
  %.056 = getelementptr inbounds i8, ptr %1, i64 %.056.idx
  %21 = sext i1 %20 to i32
  %.054 = add nsw i32 %21, %11
  %22 = load i8, ptr %.056, align 1, !tbaa !5
  %23 = icmp eq i8 %22, 48
  br i1 %23, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %9, %.lr.ph
  %.15559 = phi i32 [ %25, %.lr.ph ], [ %.054, %9 ]
  %.15758 = phi ptr [ %24, %.lr.ph ], [ %.056, %9 ]
  %24 = getelementptr inbounds i8, ptr %.15758, i64 1
  %25 = add nsw i32 %.15559, -1
  %26 = load i8, ptr %24, align 1, !tbaa !5
  %27 = icmp eq i8 %26, 48
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %9
  %.157.lcssa = phi ptr [ %.056, %9 ], [ %24, %.lr.ph ]
  %.155.lcssa = phi i32 [ %.054, %9 ], [ %25, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %3) #6
  %28 = getelementptr inbounds i8, ptr %3, i64 9
  store i8 0, ptr %28, align 1, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(9) %3, ptr noundef nonnull align 1 dereferenceable(9) %.157.lcssa, i64 9, i1 false)
  %29 = call i32 @atoi(ptr nocapture noundef %3) #7
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i8, ptr %.157.lcssa, i64 9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(9) %3, ptr noundef nonnull align 1 dereferenceable(9) %31, i64 9, i1 false)
  %32 = mul nsw i64 %30, 1000000000
  %33 = call i32 @atoi(ptr nocapture noundef %3) #7
  %34 = sext i32 %33 to i64
  %35 = add nsw i64 %32, %34
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  store i64 %35, ptr %37, align 8, !tbaa !10
  store i32 3, ptr %0, align 8, !tbaa !14
  %38 = add nsw i32 %.155.lcssa, -18
  %.not61 = icmp slt i32 %.155.lcssa, 36
  br i1 %.not61, label %._crit_edge65, label %.lr.ph64

.lr.ph64:                                         ; preds = %._crit_edge, %.lr.ph64
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph64 ], [ 18, %._crit_edge ]
  %39 = getelementptr inbounds i8, ptr %.157.lcssa, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(9) %3, ptr noundef nonnull align 1 dereferenceable(9) %39, i64 9, i1 false)
  %40 = call i32 @atoi(ptr nocapture noundef %3) #7
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i8, ptr %39, i64 9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(9) %3, ptr noundef nonnull align 1 dereferenceable(9) %42, i64 9, i1 false)
  %43 = mul nsw i64 %41, 1000000000
  %44 = call i32 @atoi(ptr nocapture noundef %3) #7
  %45 = sext i32 %44 to i64
  %46 = add nsw i64 %43, %45
  tail call void @LIntMulInt(ptr noundef nonnull %0, i64 noundef 1000000000000000000, ptr noundef nonnull %0)
  tail call void @m_LIntAddInt(ptr noundef nonnull %0, i64 noundef %46, ptr noundef nonnull %0)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 18
  %47 = trunc nuw i64 %indvars.iv.next to i32
  %.not = icmp slt i32 %38, %47
  br i1 %.not, label %._crit_edge65, label %.lr.ph64, !llvm.loop !17

._crit_edge65:                                    ; preds = %.lr.ph64, %._crit_edge
  %.051.lcssa = phi i32 [ 18, %._crit_edge ], [ %47, %.lr.ph64 ]
  %48 = icmp slt i32 %.051.lcssa, %.155.lcssa
  br i1 %48, label %.preheader.preheader, label %85

.preheader.preheader:                             ; preds = %._crit_edge65
  %49 = zext i32 %.051.lcssa to i64
  %50 = sub i32 %.155.lcssa, %.051.lcssa
  %xtraiter = and i32 %50, 3
  %51 = sub i32 %.051.lcssa, %.155.lcssa
  %52 = icmp ugt i32 %51, -4
  br i1 %52, label %.unr-lcssa, label %.preheader.preheader.new

.preheader.preheader.new:                         ; preds = %.preheader.preheader
  %unroll_iter = and i32 %50, -4
  br label %.preheader

.preheader:                                       ; preds = %.preheader, %.preheader.preheader.new
  %indvars.iv75 = phi i64 [ %49, %.preheader.preheader.new ], [ %indvars.iv.next76.3, %.preheader ]
  %.069 = phi i64 [ 1, %.preheader.preheader.new ], [ %71, %.preheader ]
  %.05267 = phi i64 [ 0, %.preheader.preheader.new ], [ %77, %.preheader ]
  %niter = phi i32 [ 0, %.preheader.preheader.new ], [ %niter.next.3, %.preheader ]
  %53 = mul nsw i64 %.05267, 10
  %54 = getelementptr inbounds i8, ptr %.157.lcssa, i64 %indvars.iv75
  %55 = load i8, ptr %54, align 1, !tbaa !5
  %56 = sext i8 %55 to i64
  %57 = add i64 %53, -48
  %58 = add i64 %57, %56
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %59 = mul nsw i64 %58, 10
  %60 = getelementptr inbounds i8, ptr %.157.lcssa, i64 %indvars.iv.next76
  %61 = load i8, ptr %60, align 1, !tbaa !5
  %62 = sext i8 %61 to i64
  %63 = add i64 %59, -48
  %64 = add i64 %63, %62
  %indvars.iv.next76.1 = add nuw nsw i64 %indvars.iv75, 2
  %65 = mul nsw i64 %64, 10
  %66 = getelementptr inbounds i8, ptr %.157.lcssa, i64 %indvars.iv.next76.1
  %67 = load i8, ptr %66, align 1, !tbaa !5
  %68 = sext i8 %67 to i64
  %69 = add i64 %65, -48
  %70 = add i64 %69, %68
  %indvars.iv.next76.2 = add nuw nsw i64 %indvars.iv75, 3
  %71 = mul nuw i64 %.069, 10000
  %72 = mul nsw i64 %70, 10
  %73 = getelementptr inbounds i8, ptr %.157.lcssa, i64 %indvars.iv.next76.2
  %74 = load i8, ptr %73, align 1, !tbaa !5
  %75 = sext i8 %74 to i64
  %76 = add i64 %72, -48
  %77 = add i64 %76, %75
  %indvars.iv.next76.3 = add nuw nsw i64 %indvars.iv75, 4
  %niter.next.3 = add i32 %niter, 4
  %niter.ncmp.3.not = icmp eq i32 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3.not, label %.unr-lcssa, label %.preheader, !llvm.loop !18

.unr-lcssa:                                       ; preds = %.preheader, %.preheader.preheader
  %.lcssa86.ph = phi i64 [ poison, %.preheader.preheader ], [ %71, %.preheader ]
  %.lcssa.ph = phi i64 [ poison, %.preheader.preheader ], [ %77, %.preheader ]
  %indvars.iv75.unr = phi i64 [ %49, %.preheader.preheader ], [ %indvars.iv.next76.3, %.preheader ]
  %.069.unr = phi i64 [ 1, %.preheader.preheader ], [ %71, %.preheader ]
  %.05267.unr = phi i64 [ 0, %.preheader.preheader ], [ %77, %.preheader ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.preheader.epil

.preheader.epil:                                  ; preds = %.unr-lcssa, %.preheader.epil
  %indvars.iv75.epil = phi i64 [ %indvars.iv.next76.epil, %.preheader.epil ], [ %indvars.iv75.unr, %.unr-lcssa ]
  %.069.epil = phi i64 [ %78, %.preheader.epil ], [ %.069.unr, %.unr-lcssa ]
  %.05267.epil = phi i64 [ %84, %.preheader.epil ], [ %.05267.unr, %.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.preheader.epil ], [ 0, %.unr-lcssa ]
  %78 = mul nuw nsw i64 %.069.epil, 10
  %79 = mul nsw i64 %.05267.epil, 10
  %80 = getelementptr inbounds i8, ptr %.157.lcssa, i64 %indvars.iv75.epil
  %81 = load i8, ptr %80, align 1, !tbaa !5
  %82 = sext i8 %81 to i64
  %83 = add i64 %79, -48
  %84 = add i64 %83, %82
  %indvars.iv.next76.epil = add nuw nsw i64 %indvars.iv75.epil, 1
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.epilog-lcssa, label %.preheader.epil, !llvm.loop !19

.epilog-lcssa:                                    ; preds = %.preheader.epil, %.unr-lcssa
  %.lcssa86 = phi i64 [ %.lcssa86.ph, %.unr-lcssa ], [ %78, %.preheader.epil ]
  %.lcssa = phi i64 [ %.lcssa.ph, %.unr-lcssa ], [ %84, %.preheader.epil ]
  tail call void @LIntMulInt(ptr noundef nonnull %0, i64 noundef %.lcssa86, ptr noundef nonnull %0)
  tail call void @m_LIntAddInt(ptr noundef nonnull %0, i64 noundef %.lcssa, ptr noundef nonnull %0)
  br label %85

85:                                               ; preds = %.epilog-lcssa, %._crit_edge65
  %.053 = zext i1 %20 to i32
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 %.053, ptr %86, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %3) #6
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !9, i64 0}
!15 = !{!"MArray", !9, i64 0, !16, i64 4, !6, i64 8}
!16 = !{!"short", !6, i64 0}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}


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