#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ myqsort(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  int vector[argc - 1];
  for (int a = 1; a < argc; a++) {
    vector[a - 1] = atoi(argv[a]);
  }
  myqsort(vector, 0, argc - 1);
  for (int a = 1; a < argc; a++) {
    printf("%d ", vector[a - 1]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b4 <main+0x84>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <atoi@plt>
mov    %eax,%edx
mov    -0x30(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1177 <main+0x47>
mov    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <myqsort@plt>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1204 <main+0xd4>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11cc <main+0x9c>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    -0x1(%rdi),%ebx
mov    %rsp,%r13
lea    0xf(,%rbx,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
cmp    $0x1,%edi
jle    11ea <main+0xaa>
mov    %rsi,%r12
mov    %rdi,-0x30(%rbp)
mov    %edi,%eax
mov    %rax,-0x38(%rbp)
lea    -0x1(%rax),%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%r12,%r15,8),%rdi
call   1060 <atoi@plt>
mov    %eax,0x0(%r13,%r15,4)
add    $0x1,%r15
cmp    %r15,%r14
jne    1190 <main+0x50>
mov    %r13,%rdi
xor    %esi,%esi
mov    %ebx,%edx
call   1040 <myqsort@plt>
cmpl   $0x2,-0x30(%rbp)
mov    -0x38(%rbp),%r15
jl     11f6 <main+0xb6>
add    $0xffffffffffffffff,%r15
lea    0xe37(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    11d0 <main+0x90>
jmp    11f6 <main+0xb6>
mov    %r13,%rdi
xor    %esi,%esi
mov    %ebx,%edx
call   1040 <myqsort@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %6
%14 = alloca i32, i64 %12
store i64 %12, i64* %7
store i32 1, i32* %8
br label %15
15: ; preds = %30, %2
%16 = load i32, i32* %8
%17 = load i32, i32* %4
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %33
19: ; preds = %15
%20 = load i8**, i8*** %5
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = call i32 @atoi(i8* %24)
%26 = load i32, i32* %8
%27 = sub nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i32, i32* %14, i64 %28
store i32 %25, i32* %29
br label %30
30: ; preds = %19
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
store i32 %32, i32* %8
br label %15
33: ; preds = %15
%34 = load i32, i32* %4
%35 = sub nsw i32 %34, 1
%36 = call i32 @myqsort(i32* %14, i32 0, i32 %35)
store i32 1, i32* %9
br label %37
37: ; preds = %48, %33
%38 = load i32, i32* %9
%39 = load i32, i32* %4
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %51
41: ; preds = %37
%42 = load i32, i32* %9
%43 = sub nsw i32 %42, 1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i32, i32* %14, i64 %44
%46 = load i32, i32* %45
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %46)
br label %48
48: ; preds = %41
%49 = load i32, i32* %9
%50 = add nsw i32 %49, 1
store i32 %50, i32* %9
br label %37
51: ; preds = %37
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%53 = load i8*, i8** %6
%54 = load i32, i32* %3
ret i32 %54
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = zext i32 %3 to i64
%5 = alloca i32, i64 %4
%6 = icmp sgt i32 %0, 1
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @myqsort(i32* %5, i32 0, i32 %3)
br label %24
9: ; preds = %2
%10 = zext i32 %0 to i64
br label %15
11: ; preds = %15
%12 = call i32 @myqsort(i32* %5, i32 0, i32 %3)
br i1 %6, label %13, label %24
13: ; preds = %11
%14 = zext i32 %0 to i64
br label %26
15: ; preds = %9, %15
%16 = phi i64 [ 1, %9 ], [ %22, %15 ]
%17 = getelementptr inbounds i8*, i8** %1, i64 %16
%18 = load i8*, i8** %17
%19 = tail call i32 @atoi(i8* %18)
%20 = add nsw i64 %16, -1
%21 = getelementptr inbounds i32, i32* %5, i64 %20
store i32 %19, i32* %21
%22 = add nuw nsw i64 %16, 1
%23 = icmp eq i64 %22, %10
br i1 %23, label %11, label %15
24: ; preds = %26, %7, %11
%25 = call i32 @putchar(i32 10)
ret i32 0
26: ; preds = %13, %26
%27 = phi i64 [ 1, %13 ], [ %32, %26 ]
%28 = add nsw i64 %27, -1
%29 = getelementptr inbounds i32, i32* %5, i64 %28
%30 = load i32, i32* %29
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %30)
%32 = add nuw nsw i64 %27, 1
%33 = icmp eq i64 %32, %14
br i1 %33, label %24, label %26
}