; LLVM IR from tangjz/acm-icpc :: codeforces/gym/100959K.ll (Z3gcd7complexS_)

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

@__const._Z3gcd7complexS_.tr = external hidden unnamed_addr constant %struct.complex, align 8

; Function Attrs: mustprogress uwtable
define dso_local { i64, i64 } @_Z3gcd7complexS_(i64 %0, i64 %1, i64 %2, i64 %3) #0 {
  %5 = alloca %struct.complex, align 8
  %6 = alloca %struct.complex, align 8
  %7 = alloca %struct.complex, align 8
  %8 = alloca i64, align 8
  %9 = alloca %struct.complex, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.complex, align 8
  %12 = alloca %struct.complex, align 8
  %13 = alloca %struct.complex, align 8
  %14 = alloca %struct.complex, align 8
  %15 = alloca %struct.complex, align 8
  %16 = alloca %struct.complex, align 8
  %17 = alloca %struct.complex, align 8
  %18 = alloca i32, align 4
  %19 = alloca %struct.complex, align 8
  %20 = alloca %struct.complex, align 8
  %21 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 0
  store i64 %0, ptr %21, align 8
  %22 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 1
  store i64 %1, ptr %22, align 8
  %23 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  store i64 %2, ptr %23, align 8
  %24 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  store i64 %3, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  br label %25

25:                                               ; preds = %82, %4
  %26 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7)
  store i64 %26, ptr %8, align 8, !tbaa !5
  %27 = icmp ne i64 %26, 0
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  br label %83

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %30 = call { i64, i64 } @_ZNK7complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %31 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %32 = extractvalue { i64, i64 } %30, 0
  store i64 %32, ptr %31, align 8
  %33 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %34 = extractvalue { i64, i64 } %30, 1
  store i64 %34, ptr %33, align 8
  %35 = call { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %36 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %37 = extractvalue { i64, i64 } %35, 0
  store i64 %37, ptr %36, align 8
  %38 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %39 = extractvalue { i64, i64 } %35, 1
  store i64 %39, ptr %38, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  %40 = load i64, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.complex, ptr %9, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !10
  %43 = sdiv i64 %42, %40
  store i64 %43, ptr %41, align 8, !tbaa !10
  %44 = load i64, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.complex, ptr %9, i32 0, i32 1
  %46 = load i64, ptr %45, align 8, !tbaa !12
  %47 = sdiv i64 %46, %44
  store i64 %47, ptr %45, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  %48 = call { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %7)
  %49 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 0
  %50 = extractvalue { i64, i64 } %48, 0
  store i64 %50, ptr %49, align 8
  %51 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 1
  %52 = extractvalue { i64, i64 } %48, 1
  store i64 %52, ptr %51, align 8
  %53 = call { i64, i64 } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %54 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %55 = extractvalue { i64, i64 } %53, 0
  store i64 %55, ptr %54, align 8
  %56 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %57 = extractvalue { i64, i64 } %53, 1
  store i64 %57, ptr %56, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %13, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 @__const._Z3gcd7complexS_.tr, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !13
  br label %58

58:                                               ; preds = %73, %29
  %59 = load i32, ptr %18, align 4, !tbaa !13
  %60 = icmp slt i32 %59, 4
  br i1 %60, label %62, label %61

61:                                               ; preds = %58
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %81

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %63 = call { i64, i64 } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %64 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %65 = extractvalue { i64, i64 } %63, 0
  store i64 %65, ptr %64, align 8
  %66 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %67 = extractvalue { i64, i64 } %63, 1
  store i64 %67, ptr %66, align 8
  %68 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %69 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %70 = icmp slt i64 %68, %69
  br i1 %70, label %71, label %72

71:                                               ; preds = %62
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !9
  br label %72

72:                                               ; preds = %71, %62
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %18, align 4, !tbaa !13
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %18, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %76 = call { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %17)
  %77 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 0
  %78 = extractvalue { i64, i64 } %76, 0
  store i64 %78, ptr %77, align 8
  %79 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 1
  %80 = extractvalue { i64, i64 } %76, 1
  store i64 %80, ptr %79, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  br label %58, !llvm.loop !15

81:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  br label %82

82:                                               ; preds = %81
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !9
  br label %25, !llvm.loop !17

83:                                               ; preds = %28
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !9
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %84 = load { i64, i64 }, ptr %5, align 8
  ret { i64, i64 } %84
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK7complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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


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

@__const._Z3gcd7complexS_.tr = external hidden unnamed_addr constant %struct.complex, align 8

; Function Attrs: mustprogress nounwind uwtable
define dso_local { i64, i64 } @_Z3gcd7complexS_(i64 %0, i64 %1, i64 %2, i64 %3) local_unnamed_addr #0 {
  %5 = alloca %struct.complex, align 8
  %6 = alloca %struct.complex, align 8
  %7 = alloca %struct.complex, align 8
  %8 = alloca %struct.complex, align 8
  %9 = alloca %struct.complex, align 8
  %10 = alloca %struct.complex, align 8
  %11 = alloca %struct.complex, align 8
  %12 = alloca %struct.complex, align 8
  %13 = alloca %struct.complex, align 8
  store i64 %0, ptr %5, align 8
  %14 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 %1, ptr %14, align 8
  store i64 %2, ptr %6, align 8
  %15 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 %3, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  %16 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %.not11 = icmp eq i64 %16, 0
  br i1 %.not11, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %17 = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.45.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %18 = getelementptr inbounds i8, ptr %9, i64 8
  %19 = getelementptr inbounds i8, ptr %13, i64 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  br label %20

._crit_edge.loopexit:                             ; preds = %76
  %.sroa.08.0.copyload.pre = load i64, ptr %5, align 8, !tbaa !5
  %.sroa.2.0.copyload.pre = load i64, ptr %14, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %4
  %.sroa.2.0.copyload = phi i64 [ %.sroa.2.0.copyload.pre, %._crit_edge.loopexit ], [ %1, %4 ]
  %.sroa.08.0.copyload = phi i64 [ %.sroa.08.0.copyload.pre, %._crit_edge.loopexit ], [ %0, %4 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.sroa.08.0.copyload, 0
  %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.sroa.2.0.copyload, 1
  ret { i64, i64 } %.fca.1.insert

20:                                               ; preds = %.lr.ph, %76
  %21 = phi i64 [ %16, %.lr.ph ], [ %78, %76 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  %22 = call { i64, i64 } @_ZNK7complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %23 = extractvalue { i64, i64 } %22, 0
  store i64 %23, ptr %8, align 8
  %24 = extractvalue { i64, i64 } %22, 1
  store i64 %24, ptr %17, align 8
  %25 = call { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %26 = extractvalue { i64, i64 } %25, 0
  %27 = extractvalue { i64, i64 } %25, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  %28 = sdiv i64 %26, %21
  store i64 %28, ptr %7, align 8, !tbaa !9
  %29 = sdiv i64 %27, %21
  store i64 %29, ptr %.sroa.45.0..sroa_idx, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  %30 = call { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %31 = extractvalue { i64, i64 } %30, 0
  store i64 %31, ptr %9, align 8
  %32 = extractvalue { i64, i64 } %30, 1
  store i64 %32, ptr %18, align 8
  %33 = call { i64, i64 } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %34 = extractvalue { i64, i64 } %33, 0
  %35 = extractvalue { i64, i64 } %33, 1
  store i64 %34, ptr %7, align 8, !tbaa !5
  store i64 %35, ptr %.sroa.45.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #3
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %7, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #3
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %6, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #3
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) @__const._Z3gcd7complexS_.tr, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #3
  %36 = call { i64, i64 } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %37 = extractvalue { i64, i64 } %36, 0
  store i64 %37, ptr %13, align 8
  %38 = extractvalue { i64, i64 } %36, 1
  store i64 %38, ptr %19, align 8
  %39 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %40 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %41 = icmp slt i64 %39, %40
  br i1 %41, label %42, label %43

42:                                               ; preds = %20
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false), !tbaa.struct !12
  br label %43

43:                                               ; preds = %42, %20
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #3
  %44 = call { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %45 = extractvalue { i64, i64 } %44, 0
  %46 = extractvalue { i64, i64 } %44, 1
  store i64 %45, ptr %11, align 8, !tbaa !5
  store i64 %46, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #3
  %47 = call { i64, i64 } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %48 = extractvalue { i64, i64 } %47, 0
  store i64 %48, ptr %13, align 8
  %49 = extractvalue { i64, i64 } %47, 1
  store i64 %49, ptr %19, align 8
  %50 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %51 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %52 = icmp slt i64 %50, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %43
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false), !tbaa.struct !12
  br label %54

54:                                               ; preds = %53, %43
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #3
  %55 = call { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %56 = extractvalue { i64, i64 } %55, 0
  %57 = extractvalue { i64, i64 } %55, 1
  store i64 %56, ptr %11, align 8, !tbaa !5
  store i64 %57, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #3
  %58 = call { i64, i64 } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %59 = extractvalue { i64, i64 } %58, 0
  store i64 %59, ptr %13, align 8
  %60 = extractvalue { i64, i64 } %58, 1
  store i64 %60, ptr %19, align 8
  %61 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %62 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %63 = icmp slt i64 %61, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %54
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false), !tbaa.struct !12
  br label %65

65:                                               ; preds = %64, %54
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #3
  %66 = call { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %67 = extractvalue { i64, i64 } %66, 0
  %68 = extractvalue { i64, i64 } %66, 1
  store i64 %67, ptr %11, align 8, !tbaa !5
  store i64 %68, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #3
  %69 = call { i64, i64 } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %70 = extractvalue { i64, i64 } %69, 0
  store i64 %70, ptr %13, align 8
  %71 = extractvalue { i64, i64 } %69, 1
  store i64 %71, ptr %19, align 8
  %72 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %73 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %74 = icmp slt i64 %72, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %65
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false), !tbaa.struct !12
  br label %76

76:                                               ; preds = %75, %65
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #3
  %77 = call { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #3
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7, i64 16, i1 false), !tbaa.struct !12
  %78 = call noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %.not = icmp eq i64 %78, 0
  br i1 %.not, label %._crit_edge.loopexit, label %20, !llvm.loop !13
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7complex5mode2Ev(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK7complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 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) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

attributes #0 = { mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS7complex", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass