; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/URI/Olimpiadas - OBI2009 (main)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%struct.Modalidade = type { i32, i32, i32 }
%struct.Paises = type { i32, i32, i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z8sortRank6PaisesS_(i64, i64, i64, i64) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [100 x %struct.Modalidade], align 16
  %9 = alloca [100 x %struct.Paises], align 16
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 1200, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 1600, ptr %9) #5
  %12 = getelementptr inbounds [100 x %struct.Paises], ptr %9, i32 0, i32 0
  %13 = getelementptr inbounds %struct.Paises, ptr %12, i64 100
  br label %14

14:                                               ; preds = %14, %0
  %15 = phi ptr [ %12, %0 ], [ %16, %14 ]
  call void @_ZN6PaisesC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %15)
  %16 = getelementptr inbounds %struct.Paises, ptr %15, i64 1
  %17 = icmp eq ptr %16, %13
  br i1 %17, label %18, label %14

18:                                               ; preds = %14
  br label %19

19:                                               ; preds = %23, %18
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %23, label %44

23:                                               ; preds = %19
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100 x %struct.Modalidade], ptr %8, i64 0, i64 %29
  %31 = getelementptr inbounds %struct.Modalidade, ptr %30, i32 0, i32 0
  store i32 %27, ptr %31, align 4, !tbaa !9
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100 x %struct.Modalidade], ptr %8, i64 0, i64 %34
  %36 = getelementptr inbounds %struct.Modalidade, ptr %35, i32 0, i32 1
  store i32 %32, ptr %36, align 4, !tbaa !11
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100 x %struct.Modalidade], ptr %8, i64 0, i64 %39
  %41 = getelementptr inbounds %struct.Modalidade, ptr %40, i32 0, i32 2
  store i32 %37, ptr %41, align 4, !tbaa !12
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %7, align 4, !tbaa !5
  br label %19, !llvm.loop !13

44:                                               ; preds = %19
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %49, %44
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %49, label %58

49:                                               ; preds = %45
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100 x %struct.Paises], ptr %9, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.Paises, ptr %54, i32 0, i32 0
  store i32 %51, ptr %55, align 16, !tbaa !15
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %7, align 4, !tbaa !5
  br label %45, !llvm.loop !17

58:                                               ; preds = %45
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %63, %58
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %63, label %99

63:                                               ; preds = %59
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100 x %struct.Modalidade], ptr %8, i64 0, i64 %65
  %67 = getelementptr inbounds %struct.Modalidade, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = sub nsw i32 %68, 1
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100 x %struct.Paises], ptr %9, i64 0, i64 %70
  %72 = getelementptr inbounds %struct.Paises, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !18
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %72, align 4, !tbaa !18
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100 x %struct.Modalidade], ptr %8, i64 0, i64 %76
  %78 = getelementptr inbounds %struct.Modalidade, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !11
  %80 = sub nsw i32 %79, 1
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100 x %struct.Paises], ptr %9, i64 0, i64 %81
  %83 = getelementptr inbounds %struct.Paises, ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 8, !tbaa !19
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %83, align 8, !tbaa !19
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [100 x %struct.Modalidade], ptr %8, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.Modalidade, ptr %88, i32 0, i32 2
  %90 = load i32, ptr %89, align 4, !tbaa !12
  %91 = sub nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100 x %struct.Paises], ptr %9, i64 0, i64 %92
  %94 = getelementptr inbounds %struct.Paises, ptr %93, i32 0, i32 3
  %95 = load i32, ptr %94, align 4, !tbaa !20
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %94, align 4, !tbaa !20
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %7, align 4, !tbaa !5
  br label %59, !llvm.loop !21

99:                                               ; preds = %59
  %100 = getelementptr inbounds [100 x %struct.Paises], ptr %9, i64 0, i64 0
  %101 = getelementptr inbounds [100 x %struct.Paises], ptr %9, i64 0, i64 0
  %102 = load i32, ptr %2, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds %struct.Paises, ptr %101, i64 %103
  call void @_ZSt4sortIP6PaisesPFbS0_S0_EEvT_S4_T0_(ptr noundef %100, ptr noundef %104, ptr noundef @_Z8sortRank6PaisesS_)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %114, %99
  %106 = load i32, ptr %7, align 4, !tbaa !5
  %107 = load i32, ptr %2, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %109, label %123

109:                                              ; preds = %105
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %114

112:                                              ; preds = %109
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %114

114:                                              ; preds = %112, %109
  %115 = load i32, ptr %7, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [100 x %struct.Paises], ptr %9, i64 0, i64 %116
  %118 = getelementptr inbounds %struct.Paises, ptr %117, i32 0, i32 0
  %119 = load i32, ptr %118, align 16, !tbaa !15
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %119)
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %7, align 4, !tbaa !5
  br label %105, !llvm.loop !22

123:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 1600, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6PaisesC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP6PaisesPFbS0_S0_EEvT_S4_T0_(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 norecurse 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 nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS10Modalidade", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTS6Paises", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!17 = distinct !{!17, !14}
!18 = !{!16, !6, i64 4}
!19 = !{!16, !6, i64 8}
!20 = !{!16, !6, i64 12}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%struct.Modalidade = type { i32, i32, i32 }
%struct.Paises = type { i32, i32, i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z8sortRank6PaisesS_(i64, i64, i64, i64) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca [100 x %struct.Modalidade], align 16
  %7 = alloca [100 x %struct.Paises], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1600, ptr nonnull %7) #5
  br label %10

10:                                               ; preds = %10, %0
  %.idx = phi i64 [ 0, %0 ], [ %.add, %10 ]
  %.ptr = getelementptr inbounds i8, ptr %7, i64 %.idx
  call void @_ZN6PaisesC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %.ptr)
  %.add = add nuw nsw i64 %.idx, 16
  %11 = icmp eq i64 %.add, 1600
  br i1 %11, label %.preheader20, label %10

.preheader20:                                     ; preds = %10
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %.preheader19

.preheader19:                                     ; preds = %.lr.ph, %.preheader20
  %.lcssa21 = phi i32 [ %12, %.preheader20 ], [ %26, %.lr.ph ]
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph24.preheader, label %.preheader

.lr.ph24.preheader:                               ; preds = %.preheader19
  %wide.trip.count = zext nneg i32 %14 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %16 = icmp ult i32 %14, 4
  br i1 %16, label %.preheader.loopexit.unr-lcssa, label %.lr.ph24.preheader.new

.lr.ph24.preheader.new:                           ; preds = %.lr.ph24.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph24

.lr.ph:                                           ; preds = %.preheader20, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader20 ]
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = getelementptr inbounds [100 x %struct.Modalidade], ptr %6, i64 0, i64 %indvars.iv
  store i32 %20, ptr %21, align 4, !tbaa !9
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %21, i64 4
  store i32 %22, ptr %23, align 4, !tbaa !11
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %21, i64 8
  store i32 %24, ptr %25, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = icmp slt i64 %indvars.iv.next, %27
  br i1 %28, label %.lr.ph, label %.preheader19, !llvm.loop !13

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph24, %.lr.ph24.preheader
  %indvars.iv33.unr = phi i64 [ 0, %.lr.ph24.preheader ], [ %indvars.iv.next34.3, %.lr.ph24 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph24.epil

.lr.ph24.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph24.epil
  %indvars.iv33.epil = phi i64 [ %indvars.iv.next34.epil, %.lr.ph24.epil ], [ %indvars.iv33.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph24.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %indvars.iv.next34.epil = add nuw nsw i64 %indvars.iv33.epil, 1
  %29 = getelementptr inbounds [100 x %struct.Paises], ptr %7, i64 0, i64 %indvars.iv33.epil
  %30 = trunc nuw nsw i64 %indvars.iv.next34.epil to i32
  store i32 %30, ptr %29, align 16, !tbaa !15
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader, label %.lr.ph24.epil, !llvm.loop !17

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph24.epil, %.preheader19
  %31 = icmp sgt i32 %.lcssa21, 0
  br i1 %31, label %.lr.ph27.preheader, label %._crit_edge

.lr.ph27.preheader:                               ; preds = %.preheader
  %wide.trip.count39 = zext nneg i32 %.lcssa21 to i64
  br label %.lr.ph27

.lr.ph24:                                         ; preds = %.lr.ph24, %.lr.ph24.preheader.new
  %indvars.iv33 = phi i64 [ 0, %.lr.ph24.preheader.new ], [ %indvars.iv.next34.3, %.lr.ph24 ]
  %niter = phi i64 [ 0, %.lr.ph24.preheader.new ], [ %niter.next.3, %.lr.ph24 ]
  %indvars.iv.next34 = or disjoint i64 %indvars.iv33, 1
  %32 = getelementptr inbounds [100 x %struct.Paises], ptr %7, i64 0, i64 %indvars.iv33
  %33 = trunc nuw nsw i64 %indvars.iv.next34 to i32
  store i32 %33, ptr %32, align 16, !tbaa !15
  %indvars.iv.next34.1 = or disjoint i64 %indvars.iv33, 2
  %34 = getelementptr inbounds [100 x %struct.Paises], ptr %7, i64 0, i64 %indvars.iv.next34
  %35 = trunc nuw nsw i64 %indvars.iv.next34.1 to i32
  store i32 %35, ptr %34, align 16, !tbaa !15
  %indvars.iv.next34.2 = or disjoint i64 %indvars.iv33, 3
  %36 = getelementptr inbounds [100 x %struct.Paises], ptr %7, i64 0, i64 %indvars.iv.next34.1
  %37 = trunc nuw nsw i64 %indvars.iv.next34.2 to i32
  store i32 %37, ptr %36, align 16, !tbaa !15
  %indvars.iv.next34.3 = add nuw nsw i64 %indvars.iv33, 4
  %38 = getelementptr inbounds [100 x %struct.Paises], ptr %7, i64 0, i64 %indvars.iv.next34.2
  %39 = trunc nuw nsw i64 %indvars.iv.next34.3 to i32
  store i32 %39, ptr %38, align 16, !tbaa !15
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %.lr.ph24, !llvm.loop !19

.lr.ph27:                                         ; preds = %.lr.ph27.preheader, %.lr.ph27
  %indvars.iv36 = phi i64 [ 0, %.lr.ph27.preheader ], [ %indvars.iv.next37, %.lr.ph27 ]
  %40 = getelementptr inbounds [100 x %struct.Modalidade], ptr %6, i64 0, i64 %indvars.iv36
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = add nsw i32 %41, -1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100 x %struct.Paises], ptr %7, i64 0, i64 %43, i32 1
  %45 = load i32, ptr %44, align 4, !tbaa !20
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %44, align 4, !tbaa !20
  %47 = getelementptr inbounds i8, ptr %40, i64 4
  %48 = load i32, ptr %47, align 4, !tbaa !11
  %49 = add nsw i32 %48, -1
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100 x %struct.Paises], ptr %7, i64 0, i64 %50, i32 2
  %52 = load i32, ptr %51, align 8, !tbaa !21
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %51, align 8, !tbaa !21
  %54 = getelementptr inbounds i8, ptr %40, i64 8
  %55 = load i32, ptr %54, align 4, !tbaa !12
  %56 = add nsw i32 %55, -1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100 x %struct.Paises], ptr %7, i64 0, i64 %57, i32 3
  %59 = load i32, ptr %58, align 4, !tbaa !22
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %58, align 4, !tbaa !22
  %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1
  %exitcond40.not = icmp eq i64 %indvars.iv.next37, %wide.trip.count39
  br i1 %exitcond40.not, label %._crit_edge, label %.lr.ph27, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph27, %.preheader
  %61 = sext i32 %14 to i64
  %62 = getelementptr inbounds %struct.Paises, ptr %7, i64 %61
  call void @_ZSt4sortIP6PaisesPFbS0_S0_EEvT_S4_T0_(ptr noundef nonnull %7, ptr noundef nonnull %62, ptr noundef nonnull @_Z8sortRank6PaisesS_)
  %63 = load i32, ptr %1, align 4, !tbaa !5
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.lr.ph30.preheader._crit_edge, label %._crit_edge31

.lr.ph30.preheader._crit_edge:                    ; preds = %._crit_edge
  %.pre = load i32, ptr %7, align 16, !tbaa !15
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.pre)
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = icmp sgt i32 %66, 1
  br i1 %67, label %.lr.ph30.peel.next, label %._crit_edge31

.lr.ph30.peel.next:                               ; preds = %.lr.ph30.preheader._crit_edge, %.lr.ph30.peel.next
  %indvars.iv41 = phi i64 [ %indvars.iv.next42, %.lr.ph30.peel.next ], [ 1, %.lr.ph30.preheader._crit_edge ]
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %69 = getelementptr inbounds [100 x %struct.Paises], ptr %7, i64 0, i64 %indvars.iv41
  %70 = load i32, ptr %69, align 16, !tbaa !15
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %70)
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %72 = load i32, ptr %1, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next42, %73
  br i1 %74, label %.lr.ph30.peel.next, label %._crit_edge31, !llvm.loop !24

._crit_edge31:                                    ; preds = %.lr.ph30.peel.next, %.lr.ph30.preheader._crit_edge, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 1600, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6PaisesC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP6PaisesPFbS0_S0_EEvT_S4_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 norecurse 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS10Modalidade", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTS6Paises", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !14}
!20 = !{!16, !6, i64 4}
!21 = !{!16, !6, i64 8}
!22 = !{!16, !6, i64 12}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14, !25}
!25 = !{!"llvm.loop.peeled.count", i32 1}


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