; LLVM IR from tangjz/acm-icpc :: 51nod/1387.ll (Z6init_gii)

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

@mod = external dso_local global i32, align 4
@sz = external dso_local global i32, align 4
@g = external dso_local global [131072 x ptr], align 16
@x = external dso_local global [65536 x i32], align 16
@y = external dso_local global [65536 x i32], align 16

; 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: mustprogress uwtable
declare dso_local void @_Z3NTTiPii(i32 noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7round_2i(i32 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z10tail_alloci(i32 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6init_gii(i32 noundef %0, i32 noundef %1) #1 {
  %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 i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = call noundef i32 @_Z7seg_idxii(i32 noundef %15, i32 noundef %16)
  store i32 %17, ptr %5, align 4, !tbaa !5
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp eq i32 %18, %19
  br i1 %20, label %21, label %41

21:                                               ; preds = %2
  %22 = call noundef ptr @_Z10tail_alloci(i32 noundef 2)
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %24
  store ptr %22, ptr %25, align 8, !tbaa !9
  %26 = load i32, ptr @mod, align 4, !tbaa !5
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = load i32, ptr @sz, align 4, !tbaa !5
  %29 = mul nsw i32 %27, %28
  %30 = sub nsw i32 %26, %29
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds i32, ptr %34, i64 0
  store i32 %30, ptr %35, align 4, !tbaa !5
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %37
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds i32, ptr %39, i64 1
  store i32 1, ptr %40, align 4, !tbaa !5
  store i32 1, ptr %6, align 4
  br label %146

41:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = add nsw i32 %42, %43
  %45 = ashr i32 %44, 1
  store i32 %45, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = sub nsw i32 %46, %47
  %49 = add nsw i32 %48, 2
  store i32 %49, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = sub nsw i32 %50, %51
  %53 = add nsw i32 %52, 2
  store i32 %53, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = sub nsw i32 %54, %55
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = call noundef i32 @_Z7seg_idxii(i32 noundef %58, i32 noundef %59)
  store i32 %60, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = call noundef i32 @_Z7seg_idxii(i32 noundef %62, i32 noundef %63)
  store i32 %64, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %65 = load i32, ptr %8, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  %67 = call noundef i32 @_Z7round_2i(i32 noundef %66)
  store i32 %67, ptr %13, align 4, !tbaa !5
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z6init_gii(i32 noundef %68, i32 noundef %69)
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  %72 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z6init_gii(i32 noundef %71, i32 noundef %72)
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = mul i64 %78, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @x, ptr align 4 %76, i64 %79, i1 false)
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i32, ptr @x, i64 %81
  %83 = load i32, ptr %13, align 4, !tbaa !5
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = sub nsw i32 %83, %84
  %86 = sext i32 %85 to i64
  %87 = mul i64 %86, 4
  call void @llvm.memset.p0.i64(ptr align 4 %82, i8 0, i64 %87, i1 false)
  %88 = load i32, ptr %13, align 4, !tbaa !5
  call void @_Z3NTTiPii(i32 noundef %88, ptr noundef @x, i32 noundef 0)
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !9
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = mul i64 %94, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @y, ptr align 4 %92, i64 %95, i1 false)
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i32, ptr @y, i64 %97
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = load i32, ptr %10, align 4, !tbaa !5
  %101 = sub nsw i32 %99, %100
  %102 = sext i32 %101 to i64
  %103 = mul i64 %102, 4
  call void @llvm.memset.p0.i64(ptr align 4 %98, i8 0, i64 %103, i1 false)
  %104 = load i32, ptr %13, align 4, !tbaa !5
  call void @_Z3NTTiPii(i32 noundef %104, ptr noundef @y, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %129, %41
  %106 = load i32, ptr %14, align 4, !tbaa !5
  %107 = load i32, ptr %13, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %132

110:                                              ; preds = %105
  %111 = load i32, ptr %14, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [65536 x i32], ptr @x, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = load i32, ptr %14, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [65536 x i32], ptr @y, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = mul nsw i64 %115, %120
  %122 = load i32, ptr @mod, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = srem i64 %121, %123
  %125 = trunc i64 %124 to i32
  %126 = load i32, ptr %14, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [65536 x i32], ptr @x, i64 0, i64 %127
  store i32 %125, ptr %128, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %110
  %130 = load i32, ptr %14, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %14, align 4, !tbaa !5
  br label %105, !llvm.loop !11

132:                                              ; preds = %109
  %133 = load i32, ptr %13, align 4, !tbaa !5
  call void @_Z3NTTiPii(i32 noundef %133, ptr noundef @x, i32 noundef 1)
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = call noundef ptr @_Z10tail_alloci(i32 noundef %134)
  %136 = load i32, ptr %5, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %137
  store ptr %135, ptr %138, align 8, !tbaa !9
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !9
  %143 = load i32, ptr %8, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = mul i64 %144, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %142, ptr align 16 @x, i64 %145, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  store i32 0, ptr %6, align 4
  br label %146

146:                                              ; preds = %132, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %147 = load i32, ptr %6, align 4
  switch i32 %147, label %149 [
    i32 0, label %148
    i32 1, label %148
  ]

148:                                              ; preds = %146, %146
  ret void

149:                                              ; preds = %146
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7seg_idxii(i32 noundef, i32 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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

@mod = external dso_local local_unnamed_addr global i32, align 4
@sz = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local local_unnamed_addr global [131072 x ptr], align 16
@x = external dso_local global [65536 x i32], align 16
@y = external dso_local global [65536 x i32], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3NTTiPii(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7round_2i(i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z10tail_alloci(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6init_gii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = tail call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %1)
  %4 = icmp eq i32 %0, %1
  br i1 %4, label %5, label %14

5:                                                ; preds = %2
  %6 = tail call noundef ptr @_Z10tail_alloci(i32 noundef 2)
  %7 = sext i32 %3 to i64
  %8 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %7
  store ptr %6, ptr %8, align 8, !tbaa !5
  %9 = load i32, ptr @mod, align 4, !tbaa !9
  %10 = load i32, ptr @sz, align 4, !tbaa !9
  %11 = mul nsw i32 %10, %0
  %12 = sub nsw i32 %9, %11
  store i32 %12, ptr %6, align 4, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %83

14:                                               ; preds = %2
  %15 = add nsw i32 %1, %0
  %16 = ashr i32 %15, 1
  %17 = sub nsw i32 %1, %0
  %18 = add nsw i32 %17, 2
  %19 = sub nsw i32 %16, %0
  %20 = add nsw i32 %19, 2
  %21 = sub nsw i32 %1, %16
  %22 = add nsw i32 %21, 1
  %23 = tail call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %16)
  %24 = add nsw i32 %16, 1
  %25 = tail call noundef i32 @_Z7seg_idxii(i32 noundef %24, i32 noundef %1)
  %26 = add nsw i32 %17, 3
  %27 = tail call noundef i32 @_Z7round_2i(i32 noundef %26)
  tail call void @_Z6init_gii(i32 noundef %0, i32 noundef %16)
  tail call void @_Z6init_gii(i32 noundef %24, i32 noundef %1)
  %28 = sext i32 %23 to i64
  %29 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %28
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = sext i32 %20 to i64
  %32 = shl nsw i64 %31, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @x, ptr align 4 %30, i64 %32, i1 false)
  %33 = getelementptr inbounds i32, ptr @x, i64 %31
  %34 = sub nsw i32 %27, %20
  %35 = sext i32 %34 to i64
  %36 = shl nsw i64 %35, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %33, i8 0, i64 %36, i1 false)
  tail call void @_Z3NTTiPii(i32 noundef %27, ptr noundef nonnull @x, i32 noundef 0)
  %37 = sext i32 %25 to i64
  %38 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %37
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = sext i32 %22 to i64
  %41 = shl nsw i64 %40, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @y, ptr align 4 %39, i64 %41, i1 false)
  %42 = getelementptr inbounds i32, ptr @y, i64 %40
  %43 = sub nsw i32 %27, %22
  %44 = sext i32 %43 to i64
  %45 = shl nsw i64 %44, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %42, i8 0, i64 %45, i1 false)
  tail call void @_Z3NTTiPii(i32 noundef %27, ptr noundef nonnull @y, i32 noundef 0)
  %46 = icmp sgt i32 %27, 0
  br i1 %46, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %47 = load i32, ptr @mod, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %wide.trip.count = zext nneg i32 %27 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %49 = icmp eq i32 %27, 1
  br i1 %49, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %64

._crit_edge.loopexit.unr-lcssa:                   ; preds = %64, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %64 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %50 = getelementptr inbounds [65536 x i32], ptr @x, i64 0, i64 %indvars.iv.unr
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [65536 x i32], ptr @y, i64 0, i64 %indvars.iv.unr
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = mul nsw i64 %55, %52
  %57 = srem i64 %56, %48
  %58 = trunc nsw i64 %57 to i32
  store i32 %58, ptr %50, align 4, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %14
  tail call void @_Z3NTTiPii(i32 noundef %27, ptr noundef nonnull @x, i32 noundef 1)
  %59 = tail call noundef ptr @_Z10tail_alloci(i32 noundef %18)
  %60 = sext i32 %3 to i64
  %61 = getelementptr inbounds [131072 x ptr], ptr @g, i64 0, i64 %60
  store ptr %59, ptr %61, align 8, !tbaa !5
  %62 = sext i32 %18 to i64
  %63 = shl nsw i64 %62, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr nonnull align 16 @x, i64 %63, i1 false)
  br label %83

64:                                               ; preds = %64, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %64 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %64 ]
  %65 = getelementptr inbounds [65536 x i32], ptr @x, i64 0, i64 %indvars.iv
  %66 = load i32, ptr %65, align 8, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [65536 x i32], ptr @y, i64 0, i64 %indvars.iv
  %69 = load i32, ptr %68, align 8, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = mul nsw i64 %70, %67
  %72 = srem i64 %71, %48
  %73 = trunc nsw i64 %72 to i32
  store i32 %73, ptr %65, align 8, !tbaa !9
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %74 = getelementptr inbounds [65536 x i32], ptr @x, i64 0, i64 %indvars.iv.next
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [65536 x i32], ptr @y, i64 0, i64 %indvars.iv.next
  %78 = load i32, ptr %77, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = mul nsw i64 %79, %76
  %81 = srem i64 %80, %48
  %82 = trunc nsw i64 %81 to i32
  store i32 %82, ptr %74, align 4, !tbaa !9
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %64, !llvm.loop !11

83:                                               ; preds = %._crit_edge, %5
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7seg_idxii(i32 noundef, i32 noundef) local_unnamed_addr #3

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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" }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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