#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 /*<<< orphan*/ atoi(char *);
int psort(int /*<<< orphan*/, int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ terror(char *);
int main(int ac, char **av) {
  if (ac < 4) {
    terror("USE: sortWords <max_size> <num_proc> <input_file> <output_file>\n");
  }
  return psort(atoi(av[1]), atoi(av[2]), av[3], av[4]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    115c <main+0x2c>
lea    0xea9(%rip),%rdi
call   1040 <terror@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
call   1030 <psort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x3,%edi
jg     1147 <main+0x17>
lea    0xebe(%rip),%rdi
call   1040 <terror@plt>
mov    0x8(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1050 <atoi@plt>
mov    0x18(%rbx),%rdx
mov    0x20(%rbx),%rcx
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <psort@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"USE: sortWords <max_size> <num_proc> <input_file> <output_file>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @terror(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 2
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 3
%21 = load i8*, i8** %20
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 4
%24 = load i8*, i8** %23
%25 = call i32 @psort(i32 %14, i32 %18, i8* %21, i8* %24)
ret i32 %25
}

LLVM IR (-O2):
@.str = [65 x i8] c"USE: sortWords <max_size> <num_proc> <input_file> <output_file>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 4
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @terror(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = getelementptr inbounds i8*, i8** %1, i64 3
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8*, i8** %1, i64 4
%16 = load i8*, i8** %15
%17 = tail call i32 @psort(i32 %9, i32 %12, i8* %14, i8* %16)
ret i32 %17
}