; LLVM IR from yourtion/LearningMasteringAlgorithms-C :: Example/sort (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"

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@stdout = external global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [10 x i32], align 16
  %7 = alloca [10 x i32], align 16
  %8 = alloca [10 x i32], align 16
  %9 = alloca [10 x i32], align 16
  %10 = alloca [10 x i32], align 16
  %11 = alloca [10 x i32], align 16
  %12 = alloca [10 x [6 x i8]], align 16
  %13 = alloca [10 x [6 x i8]], align 16
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 60, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 60, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 10, ptr %14, align 4, !tbaa !5
  %16 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 0
  store i32 0, ptr %16, align 16, !tbaa !5
  %17 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 1
  store i32 5, ptr %17, align 4, !tbaa !5
  %18 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 2
  store i32 1, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 3
  store i32 7, ptr %19, align 4, !tbaa !5
  %20 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 4
  store i32 3, ptr %20, align 16, !tbaa !5
  %21 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 5
  store i32 2, ptr %21, align 4, !tbaa !5
  %22 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 6
  store i32 8, ptr %22, align 8, !tbaa !5
  %23 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 7
  store i32 9, ptr %23, align 4, !tbaa !5
  %24 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 8
  store i32 4, ptr %24, align 16, !tbaa !5
  %25 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 9
  store i32 6, ptr %25, align 4, !tbaa !5
  %26 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  %27 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 0
  %28 = load i32, ptr %14, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = mul i64 %29, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %27, i64 %30, i1 false)
  %31 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %32 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 0
  %33 = load i32, ptr %14, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = mul i64 %34, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %32, i64 %35, i1 false)
  %36 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %37 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 0
  %38 = load i32, ptr %14, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = mul i64 %39, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %36, ptr align 16 %37, i64 %40, i1 false)
  %41 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %42 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 0
  %43 = load i32, ptr %14, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = mul i64 %44, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %41, ptr align 16 %42, i64 %45, i1 false)
  %46 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  store i32 11111323, ptr %46, align 16, !tbaa !5
  %47 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 1
  store i32 99283743, ptr %47, align 4, !tbaa !5
  %48 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 2
  store i32 98298383, ptr %48, align 8, !tbaa !5
  %49 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 3
  store i32 99987444, ptr %49, align 4, !tbaa !5
  %50 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 4
  store i32 43985209, ptr %50, align 16, !tbaa !5
  %51 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 5
  store i32 99911110, ptr %51, align 4, !tbaa !5
  %52 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 6
  store i32 11111324, ptr %52, align 8, !tbaa !5
  %53 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 7
  store i32 39842329, ptr %53, align 4, !tbaa !5
  %54 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 8
  store i32 97211029, ptr %54, align 16, !tbaa !5
  %55 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 9
  store i32 99272928, ptr %55, align 4, !tbaa !5
  %56 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 0
  %57 = getelementptr inbounds [6 x i8], ptr %56, i64 0, i64 0
  %58 = call ptr @strcpy(ptr noundef %57, ptr noundef @.str) #5
  %59 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 1
  %60 = getelementptr inbounds [6 x i8], ptr %59, i64 0, i64 0
  %61 = call ptr @strcpy(ptr noundef %60, ptr noundef @.str.1) #5
  %62 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 2
  %63 = getelementptr inbounds [6 x i8], ptr %62, i64 0, i64 0
  %64 = call ptr @strcpy(ptr noundef %63, ptr noundef @.str.2) #5
  %65 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 3
  %66 = getelementptr inbounds [6 x i8], ptr %65, i64 0, i64 0
  %67 = call ptr @strcpy(ptr noundef %66, ptr noundef @.str.3) #5
  %68 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 4
  %69 = getelementptr inbounds [6 x i8], ptr %68, i64 0, i64 0
  %70 = call ptr @strcpy(ptr noundef %69, ptr noundef @.str.4) #5
  %71 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 5
  %72 = getelementptr inbounds [6 x i8], ptr %71, i64 0, i64 0
  %73 = call ptr @strcpy(ptr noundef %72, ptr noundef @.str.5) #5
  %74 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 6
  %75 = getelementptr inbounds [6 x i8], ptr %74, i64 0, i64 0
  %76 = call ptr @strcpy(ptr noundef %75, ptr noundef @.str.6) #5
  %77 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 7
  %78 = getelementptr inbounds [6 x i8], ptr %77, i64 0, i64 0
  %79 = call ptr @strcpy(ptr noundef %78, ptr noundef @.str.7) #5
  %80 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 8
  %81 = getelementptr inbounds [6 x i8], ptr %80, i64 0, i64 0
  %82 = call ptr @strcpy(ptr noundef %81, ptr noundef @.str.8) #5
  %83 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 9
  %84 = getelementptr inbounds [6 x i8], ptr %83, i64 0, i64 0
  %85 = call ptr @strcpy(ptr noundef %84, ptr noundef @.str.9) #5
  %86 = getelementptr inbounds [10 x [6 x i8]], ptr %13, i64 0, i64 0
  %87 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 0
  %88 = load i32, ptr %14, align 4, !tbaa !5
  %89 = mul nsw i32 %88, 6
  %90 = sext i32 %89 to i64
  %91 = mul i64 %90, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %86, ptr align 16 %87, i64 %91, i1 false)
  %92 = load ptr, ptr @stdout, align 8, !tbaa !9
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %92, ptr noundef @.str.10) #5
  %94 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 0
  %95 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %94, i32 noundef %95)
  %96 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 0
  %97 = load i32, ptr %14, align 4, !tbaa !5
  %98 = call i32 @issort(ptr noundef %96, i32 noundef %97, i32 noundef 4, ptr noundef @compare_int)
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %101

100:                                              ; preds = %2
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %206

101:                                              ; preds = %2
  %102 = load ptr, ptr @stdout, align 8, !tbaa !9
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.11) #5
  %104 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 0
  %105 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %104, i32 noundef %105)
  %106 = load ptr, ptr @stdout, align 8, !tbaa !9
  %107 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef @.str.12) #5
  %108 = load ptr, ptr @stdout, align 8, !tbaa !9
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef @.str.13) #5
  %110 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %111 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %110, i32 noundef %111)
  %112 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %113 = load i32, ptr %14, align 4, !tbaa !5
  %114 = load i32, ptr %14, align 4, !tbaa !5
  %115 = sub nsw i32 %114, 1
  %116 = call i32 @qksort(ptr noundef %112, i32 noundef %113, i32 noundef 4, i32 noundef 0, i32 noundef %115, ptr noundef @compare_int)
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %119

118:                                              ; preds = %101
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %206

119:                                              ; preds = %101
  %120 = load ptr, ptr @stdout, align 8, !tbaa !9
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str.14) #5
  %122 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %123 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %122, i32 noundef %123)
  %124 = load ptr, ptr @stdout, align 8, !tbaa !9
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.12) #5
  %126 = load ptr, ptr @stdout, align 8, !tbaa !9
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str.15) #5
  %128 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 0
  %129 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_sdata(ptr noundef %128, i32 noundef %129)
  %130 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 0
  %131 = load i32, ptr %14, align 4, !tbaa !5
  %132 = load i32, ptr %14, align 4, !tbaa !5
  %133 = sub nsw i32 %132, 1
  %134 = call i32 @mgsort(ptr noundef %130, i32 noundef %131, i32 noundef 6, i32 noundef 0, i32 noundef %133, ptr noundef @compare_str)
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %137

136:                                              ; preds = %119
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %206

137:                                              ; preds = %119
  %138 = load ptr, ptr @stdout, align 8, !tbaa !9
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %138, ptr noundef @.str.16) #5
  %140 = getelementptr inbounds [10 x [6 x i8]], ptr %12, i64 0, i64 0
  %141 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_sdata(ptr noundef %140, i32 noundef %141)
  %142 = load ptr, ptr @stdout, align 8, !tbaa !9
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef @.str.12) #5
  %144 = load ptr, ptr @stdout, align 8, !tbaa !9
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef @.str.17) #5
  %146 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %147 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %146, i32 noundef %147)
  %148 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %149 = load i32, ptr %14, align 4, !tbaa !5
  %150 = call i32 @ctsort(ptr noundef %148, i32 noundef %149, i32 noundef 10)
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %153

152:                                              ; preds = %137
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %206

153:                                              ; preds = %137
  %154 = load ptr, ptr @stdout, align 8, !tbaa !9
  %155 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef @.str.18) #5
  %156 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %157 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %156, i32 noundef %157)
  %158 = load ptr, ptr @stdout, align 8, !tbaa !9
  %159 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef @.str.12) #5
  %160 = load ptr, ptr @stdout, align 8, !tbaa !9
  %161 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %160, ptr noundef @.str.19) #5
  %162 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %163 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %162, i32 noundef %163)
  %164 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %165 = load i32, ptr %14, align 4, !tbaa !5
  %166 = call i32 @rxsort(ptr noundef %164, i32 noundef %165, i32 noundef 8, i32 noundef 10)
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %169

168:                                              ; preds = %153
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %206

169:                                              ; preds = %153
  %170 = load ptr, ptr @stdout, align 8, !tbaa !9
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str.20) #5
  %172 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %173 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %172, i32 noundef %173)
  %174 = load ptr, ptr @stdout, align 8, !tbaa !9
  %175 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %174, ptr noundef @.str.12) #5
  %176 = load ptr, ptr @stdout, align 8, !tbaa !9
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %176, ptr noundef @.str.21) #5
  %178 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %179 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %178, i32 noundef %179)
  %180 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %181 = load i32, ptr %14, align 4, !tbaa !5
  %182 = call i32 @qsrt(ptr noundef %180, i32 noundef %181, i32 noundef 4, ptr noundef @compare_int)
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %185

184:                                              ; preds = %169
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %206

185:                                              ; preds = %169
  %186 = load ptr, ptr @stdout, align 8, !tbaa !9
  %187 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %186, ptr noundef @.str.22) #5
  %188 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %189 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_idata(ptr noundef %188, i32 noundef %189)
  %190 = load ptr, ptr @stdout, align 8, !tbaa !9
  %191 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef @.str.12) #5
  %192 = load ptr, ptr @stdout, align 8, !tbaa !9
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %192, ptr noundef @.str.23) #5
  %194 = getelementptr inbounds [10 x [6 x i8]], ptr %13, i64 0, i64 0
  %195 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_sdata(ptr noundef %194, i32 noundef %195)
  %196 = getelementptr inbounds [10 x [6 x i8]], ptr %13, i64 0, i64 0
  %197 = load i32, ptr %14, align 4, !tbaa !5
  %198 = call i32 @mgsrt(ptr noundef %196, i32 noundef %197, i32 noundef 6, ptr noundef @compare_str)
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %201

200:                                              ; preds = %185
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %206

201:                                              ; preds = %185
  %202 = load ptr, ptr @stdout, align 8, !tbaa !9
  %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %202, ptr noundef @.str.24) #5
  %204 = getelementptr inbounds [10 x [6 x i8]], ptr %13, i64 0, i64 0
  %205 = load i32, ptr %14, align 4, !tbaa !5
  call void @print_sdata(ptr noundef %204, i32 noundef %205)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %206

206:                                              ; preds = %201, %200, %184, %168, %152, %136, %118, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 60, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 60, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #5
  %207 = load i32, ptr %3, align 4
  ret i32 %207
}

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

; 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) #2

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
declare hidden void @print_idata(ptr noundef, i32 noundef) #0

declare i32 @issort(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @compare_int(ptr noundef, ptr noundef) #0

declare i32 @qksort(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @print_sdata(ptr noundef, i32 noundef) #0

declare i32 @mgsort(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @compare_str(ptr noundef, ptr noundef) #0

declare i32 @ctsort(ptr noundef, i32 noundef, i32 noundef) #4

declare i32 @rxsort(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

declare i32 @qsrt(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #4

declare i32 @mgsrt(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #4

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind "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 = { "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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; 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 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca [10 x i32], align 16
  %4 = alloca [10 x i32], align 16
  %5 = alloca [10 x i32], align 16
  %6 = alloca [10 x i32], align 16
  %7 = alloca [10 x i32], align 16
  %8 = alloca [10 x [6 x i8]], align 16
  %9 = alloca [10 x [6 x i8]], align 16
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %9) #6
  store <4 x i32> <i32 0, i32 5, i32 1, i32 7>, ptr %3, align 16, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %3, i64 16
  store <4 x i32> <i32 3, i32 2, i32 8, i32 9>, ptr %10, align 16, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %3, i64 32
  store i32 4, ptr %11, align 16, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %3, i64 36
  store i32 6, ptr %12, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %4, ptr noundef nonnull align 16 dereferenceable(40) %3, i64 40, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %7, ptr noundef nonnull align 16 dereferenceable(40) %3, i64 40, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %5, ptr noundef nonnull align 16 dereferenceable(40) %3, i64 40, i1 false)
  store <4 x i32> <i32 11111323, i32 99283743, i32 98298383, i32 99987444>, ptr %6, align 16, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %6, i64 16
  store <4 x i32> <i32 43985209, i32 99911110, i32 11111324, i32 39842329>, ptr %13, align 16, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %6, i64 32
  store i32 97211029, ptr %14, align 16, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %6, i64 36
  store i32 99272928, ptr %15, align 4, !tbaa !5
  %16 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str) #6
  %17 = getelementptr inbounds i8, ptr %8, i64 6
  %18 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.1) #6
  %19 = getelementptr inbounds i8, ptr %8, i64 12
  %20 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %19, ptr noundef nonnull dereferenceable(1) @.str.2) #6
  %21 = getelementptr inbounds i8, ptr %8, i64 18
  %22 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.3) #6
  %23 = getelementptr inbounds i8, ptr %8, i64 24
  %24 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %23, ptr noundef nonnull dereferenceable(1) @.str.4) #6
  %25 = getelementptr inbounds i8, ptr %8, i64 30
  %26 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %25, ptr noundef nonnull dereferenceable(1) @.str.5) #6
  %27 = getelementptr inbounds i8, ptr %8, i64 36
  %28 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %27, ptr noundef nonnull dereferenceable(1) @.str.6) #6
  %29 = getelementptr inbounds i8, ptr %8, i64 42
  %30 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %29, ptr noundef nonnull dereferenceable(1) @.str.7) #6
  %31 = getelementptr inbounds i8, ptr %8, i64 48
  %32 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %31, ptr noundef nonnull dereferenceable(1) @.str.8) #6
  %33 = getelementptr inbounds i8, ptr %8, i64 54
  %34 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %33, ptr noundef nonnull dereferenceable(1) @.str.9) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(60) %9, ptr noundef nonnull align 16 dereferenceable(60) %8, i64 60, i1 false)
  %35 = load ptr, ptr @stdout, align 8, !tbaa !9
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.10) #6
  call void @print_idata(ptr noundef nonnull %3, i32 noundef 10)
  %37 = call i32 @issort(ptr noundef nonnull %3, i32 noundef 10, i32 noundef 4, ptr noundef nonnull @compare_int) #6
  %.not = icmp eq i32 %37, 0
  br i1 %.not, label %38, label %89

38:                                               ; preds = %2
  %39 = load ptr, ptr @stdout, align 8, !tbaa !9
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.11) #6
  call void @print_idata(ptr noundef nonnull %3, i32 noundef 10)
  %41 = load ptr, ptr @stdout, align 8, !tbaa !9
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.12) #6
  %43 = load ptr, ptr @stdout, align 8, !tbaa !9
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.13) #6
  call void @print_idata(ptr noundef nonnull %4, i32 noundef 10)
  %45 = call i32 @qksort(ptr noundef nonnull %4, i32 noundef 10, i32 noundef 4, i32 noundef 0, i32 noundef 9, ptr noundef nonnull @compare_int) #6
  %.not29 = icmp eq i32 %45, 0
  br i1 %.not29, label %46, label %89

46:                                               ; preds = %38
  %47 = load ptr, ptr @stdout, align 8, !tbaa !9
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str.14) #6
  call void @print_idata(ptr noundef nonnull %4, i32 noundef 10)
  %49 = load ptr, ptr @stdout, align 8, !tbaa !9
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef nonnull @.str.12) #6
  %51 = load ptr, ptr @stdout, align 8, !tbaa !9
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.15) #6
  call void @print_sdata(ptr noundef nonnull %8, i32 noundef 10)
  %53 = call i32 @mgsort(ptr noundef nonnull %8, i32 noundef 10, i32 noundef 6, i32 noundef 0, i32 noundef 9, ptr noundef nonnull @compare_str) #6
  %.not30 = icmp eq i32 %53, 0
  br i1 %.not30, label %54, label %89

54:                                               ; preds = %46
  %55 = load ptr, ptr @stdout, align 8, !tbaa !9
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.16) #6
  call void @print_sdata(ptr noundef nonnull %8, i32 noundef 10)
  %57 = load ptr, ptr @stdout, align 8, !tbaa !9
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.12) #6
  %59 = load ptr, ptr @stdout, align 8, !tbaa !9
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str.17) #6
  call void @print_idata(ptr noundef nonnull %5, i32 noundef 10)
  %61 = call i32 @ctsort(ptr noundef nonnull %5, i32 noundef 10, i32 noundef 10) #6
  %.not31 = icmp eq i32 %61, 0
  br i1 %.not31, label %62, label %89

62:                                               ; preds = %54
  %63 = load ptr, ptr @stdout, align 8, !tbaa !9
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.18) #6
  call void @print_idata(ptr noundef nonnull %5, i32 noundef 10)
  %65 = load ptr, ptr @stdout, align 8, !tbaa !9
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.12) #6
  %67 = load ptr, ptr @stdout, align 8, !tbaa !9
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str.19) #6
  call void @print_idata(ptr noundef nonnull %6, i32 noundef 10)
  %69 = call i32 @rxsort(ptr noundef nonnull %6, i32 noundef 10, i32 noundef 8, i32 noundef 10) #6
  %.not32 = icmp eq i32 %69, 0
  br i1 %.not32, label %70, label %89

70:                                               ; preds = %62
  %71 = load ptr, ptr @stdout, align 8, !tbaa !9
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.20) #6
  call void @print_idata(ptr noundef nonnull %6, i32 noundef 10)
  %73 = load ptr, ptr @stdout, align 8, !tbaa !9
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef nonnull @.str.12) #6
  %75 = load ptr, ptr @stdout, align 8, !tbaa !9
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.21) #6
  call void @print_idata(ptr noundef nonnull %7, i32 noundef 10)
  %77 = call i32 @qsrt(ptr noundef nonnull %7, i32 noundef 10, i32 noundef 4, ptr noundef nonnull @compare_int) #6
  %.not33 = icmp eq i32 %77, 0
  br i1 %.not33, label %78, label %89

78:                                               ; preds = %70
  %79 = load ptr, ptr @stdout, align 8, !tbaa !9
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull @.str.22) #6
  call void @print_idata(ptr noundef nonnull %7, i32 noundef 10)
  %81 = load ptr, ptr @stdout, align 8, !tbaa !9
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef nonnull @.str.12) #6
  %83 = load ptr, ptr @stdout, align 8, !tbaa !9
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef nonnull @.str.23) #6
  call void @print_sdata(ptr noundef nonnull %9, i32 noundef 10)
  %85 = call i32 @mgsrt(ptr noundef nonnull %9, i32 noundef 10, i32 noundef 6, ptr noundef nonnull @compare_str) #6
  %.not34 = icmp eq i32 %85, 0
  br i1 %.not34, label %86, label %89

86:                                               ; preds = %78
  %87 = load ptr, ptr @stdout, align 8, !tbaa !9
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.24) #6
  call void @print_sdata(ptr noundef nonnull %9, i32 noundef 10)
  br label %89

89:                                               ; preds = %78, %70, %62, %54, %46, %38, %2, %86
  %.0 = phi i32 [ 0, %86 ], [ 1, %2 ], [ 1, %38 ], [ 1, %46 ], [ 1, %54 ], [ 1, %62 ], [ 1, %70 ], [ 1, %78 ]
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #6
  ret i32 %.0
}

; 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 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 nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @print_idata(ptr noundef, i32 noundef) local_unnamed_addr #0

declare i32 @issort(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden i32 @compare_int(ptr noundef, ptr noundef) #0

declare i32 @qksort(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden void @print_sdata(ptr noundef, i32 noundef) local_unnamed_addr #0

declare i32 @mgsort(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden i32 @compare_str(ptr noundef, ptr noundef) #0

declare i32 @ctsort(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

declare i32 @rxsort(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

declare i32 @qsrt(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

declare i32 @mgsrt(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass