#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 */
typedef int /*<<< orphan*/ y;
typedef int /*<<< orphan*/ x;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ lis(int *, int, char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    printf("\nERROR: Insufficient arguments!\n");
    exit(-1);
  }
  int x[] = {3, 2, 6, 4, 5, 1};
  int y[] = {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15};
  lis(x, sizeof(x) / sizeof(int), argv[1]);
  lis(y, sizeof(y) / sizeof(int), argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1176 <main+0x36>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    0xeb3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeae(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    $0x6,%esi
call   1030 <lis@plt>
lea    -0x70(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    $0x10,%esi
call   1030 <lis@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
cmp    $0x2,%edi
jne    11b0 <main+0x80>
mov    %rsi,%rbx
mov    0xecc(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xeb0(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0x8(%rsi),%rdx
mov    %rsp,%rdi
mov    $0x6,%esi
call   1030 <lis@plt>
mov    0x8(%rbx),%rdx
lea    0x20(%rsp),%rdi
mov    $0x10,%esi
call   1030 <lis@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret
lea    0xea9(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"\0AERROR: Insufficient arguments!\0A\00"
@__const.main.x = [6 x i32] [i32 3, i32 2, i32 6, i32 4, i32 5, i32 1]
@__const.main.y = [16 x i32] [i32 0, i32 8, i32 4, i32 12, i32 2, i32 10, i32 6, i32 14, i32 1, i32 9, i32 5, i32 13, i32 3, i32 11, i32 7, i32 15]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i32]
%7 = alloca [16 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %2
%14 = bitcast [6 x i32]* %6 to i8*
%15 = bitcast [16 x i32]* %7 to i8*
%16 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 0
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @lis(i32* %16, i32 6, i8* %19)
%21 = getelementptr inbounds [16 x i32], [16 x i32]* %7, i64 0, i64 0
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 @lis(i32* %21, i32 16, i8* %24)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [6 x i32] [i32 3, i32 2, i32 6, i32 4, i32 5, i32 1]
@__const.main.y = [16 x i32] [i32 0, i32 8, i32 4, i32 12, i32 2, i32 10, i32 6, i32 14, i32 1, i32 9, i32 5, i32 13, i32 3, i32 11, i32 7, i32 15]
@str = [32 x i8] c"\0AERROR: Insufficient arguments!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [6 x i32]
%4 = alloca [16 x i32]
%5 = icmp eq i32 %0, 2
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %2
%10 = bitcast [6 x i32]* %3 to i8*
%11 = bitcast [16 x i32]* %4 to i8*
%12 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 0
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @lis(i32* %12, i32 6, i8* %14)
%16 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 0
%17 = load i8*, i8** %13
%18 = call i32 @lis(i32* %16, i32 16, i8* %17)
ret i32 0
}