#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*/ printf(char *, int);
int strtol(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ testpqsort(int, int);
int /*<<< orphan*/ usage(char **);
int main(int argc, char **argv) {
  if (2 != argc)
    usage(argv);
  int nth = strtol(argv[1], NULL, 0);
  if (nth < 0)
    usage(argv);
  printf("nthreads %d...\n", nth);
  testpqsort(1000, nth);
  testpqsort(4000, nth);
  testpqsort(8000, nth);
  testpqsort(10000, nth);
  testpqsort(40000, nth);
  testpqsort(80000, nth);
  testpqsort(100000, nth);
  testpqsort(400000, nth);
  testpqsort(800000, nth);
  testpqsort(1000000, nth);
  testpqsort(4000000, nth);
  testpqsort(8000000, nth);
  testpqsort(10000000, nth);
  testpqsort(40000000, nth);
  testpqsort(80000000, nth);
  return 0;
}


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)
mov    $0x2,%eax
cmp    -0x8(%rbp),%eax
je     116d <main+0x2d>
mov    -0x10(%rbp),%rdi
call   1050 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1196 <main+0x56>
mov    -0x10(%rbp),%rdi
call   1050 <usage@plt>
mov    -0x14(%rbp),%esi
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    $0x3e8,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0xfa0,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x1f40,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x2710,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x9c40,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x13880,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x186a0,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x61a80,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0xc3500,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0xf4240,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x3d0900,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x7a1200,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x989680,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x2625a00,%edi
call   1060 <testpqsort@plt>
mov    -0x14(%rbp),%esi
mov    $0x4c4b400,%edi
call   1060 <testpqsort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
cmp    $0x2,%edi
je     1154 <main+0x14>
mov    %r14,%rdi
call   1050 <usage@plt>
mov    0x8(%r14),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    116f <main+0x2f>
mov    %r14,%rdi
call   1050 <usage@plt>
lea    0xe8a(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    $0x3e8,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0xfa0,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x1f40,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x2710,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x9c40,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x13880,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x186a0,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x61a80,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0xc3500,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0xf4240,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x3d0900,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x7a1200,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x989680,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x2625a00,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
mov    $0x4c4b400,%edi
mov    %ebx,%esi
call   1060 <testpqsort@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [16 x i8] c"nthreads %d...\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 2, %7
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = call i32 @usage(i8** %10)
br label %12
12: ; preds = %9, %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @strtol(i8* %15, i32* null, i32 0)
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %12
%20 = load i8**, i8*** %5
%21 = call i32 @usage(i8** %20)
br label %22
22: ; preds = %19, %12
%23 = load i32, i32* %6
%24 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %6
%26 = call i32 @testpqsort(i32 1000, i32 %25)
%27 = load i32, i32* %6
%28 = call i32 @testpqsort(i32 4000, i32 %27)
%29 = load i32, i32* %6
%30 = call i32 @testpqsort(i32 8000, i32 %29)
%31 = load i32, i32* %6
%32 = call i32 @testpqsort(i32 10000, i32 %31)
%33 = load i32, i32* %6
%34 = call i32 @testpqsort(i32 40000, i32 %33)
%35 = load i32, i32* %6
%36 = call i32 @testpqsort(i32 80000, i32 %35)
%37 = load i32, i32* %6
%38 = call i32 @testpqsort(i32 100000, i32 %37)
%39 = load i32, i32* %6
%40 = call i32 @testpqsort(i32 400000, i32 %39)
%41 = load i32, i32* %6
%42 = call i32 @testpqsort(i32 800000, i32 %41)
%43 = load i32, i32* %6
%44 = call i32 @testpqsort(i32 1000000, i32 %43)
%45 = load i32, i32* %6
%46 = call i32 @testpqsort(i32 4000000, i32 %45)
%47 = load i32, i32* %6
%48 = call i32 @testpqsort(i32 8000000, i32 %47)
%49 = load i32, i32* %6
%50 = call i32 @testpqsort(i32 10000000, i32 %49)
%51 = load i32, i32* %6
%52 = call i32 @testpqsort(i32 40000000, i32 %51)
%53 = load i32, i32* %6
%54 = call i32 @testpqsort(i32 80000000, i32 %53)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"nthreads %d...\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @usage(i8** %1)
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @strtol(i8* nocapture %8, i32* null, i32 0)
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = tail call i32 @usage(i8** %1)
br label %13
13: ; preds = %11, %6
%14 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %9)
%15 = tail call i32 @testpqsort(i32 1000, i32 %9)
%16 = tail call i32 @testpqsort(i32 4000, i32 %9)
%17 = tail call i32 @testpqsort(i32 8000, i32 %9)
%18 = tail call i32 @testpqsort(i32 10000, i32 %9)
%19 = tail call i32 @testpqsort(i32 40000, i32 %9)
%20 = tail call i32 @testpqsort(i32 80000, i32 %9)
%21 = tail call i32 @testpqsort(i32 100000, i32 %9)
%22 = tail call i32 @testpqsort(i32 400000, i32 %9)
%23 = tail call i32 @testpqsort(i32 800000, i32 %9)
%24 = tail call i32 @testpqsort(i32 1000000, i32 %9)
%25 = tail call i32 @testpqsort(i32 4000000, i32 %9)
%26 = tail call i32 @testpqsort(i32 8000000, i32 %9)
%27 = tail call i32 @testpqsort(i32 10000000, i32 %9)
%28 = tail call i32 @testpqsort(i32 40000000, i32 %9)
%29 = tail call i32 @testpqsort(i32 80000000, i32 %9)
ret i32 0
}