#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*/ arr9;
typedef int /*<<< orphan*/ arr8;
typedef int /*<<< orphan*/ arr7;
typedef int /*<<< orphan*/ arr6;
typedef int /*<<< orphan*/ arr5;
typedef int /*<<< orphan*/ arr4;
typedef int /*<<< orphan*/ arr3;
typedef int /*<<< orphan*/ arr2;
typedef int /*<<< orphan*/ arr1;
typedef int /*<<< orphan*/ arr0;

/* Variables and functions */
int /*<<< orphan*/ firstmissing(int *, int);
int main(int argc, char *argv[]) {
  int arr0[] = {0};
  int arr1[] = {-2, -1, 0, 1, 3, 4};
  int arr2[] = {3, 4, -1, 1};
  int arr3[] = {0, 1, 2};
  int arr4[] = {99, 100, 103};
  int arr5[] = {99, 100, 103, -1};
  int arr6[] = {99, 100, 103, -1, 1};
  int arr7[] = {0, 0, 0};
  int arr8[] = {-1, -1, -1};
  int arr9[] = {-1, -2, -3};
  firstmissing(arr0, sizeof(arr0) / sizeof(arr0[0]));
  firstmissing(arr1, sizeof(arr1) / sizeof(arr1[0]));
  firstmissing(arr2, sizeof(arr2) / sizeof(arr2[0]));
  firstmissing(arr3, sizeof(arr3) / sizeof(arr3[0]));
  firstmissing(arr4, sizeof(arr4) / sizeof(arr4[0]));
  firstmissing(arr5, sizeof(arr5) / sizeof(arr5[0]));
  firstmissing(arr6, sizeof(arr6) / sizeof(arr6[0]));
  firstmissing(arr7, sizeof(arr7) / sizeof(arr7[0]));
  firstmissing(arr8, sizeof(arr8) / sizeof(arr8[0]));
  firstmissing(arr9, sizeof(arr9) / sizeof(arr9[0]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    0xeb0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeec(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe91(%rip),%rax
mov    %rax,-0x4c(%rbp)
mov    0xe8f(%rip),%eax
mov    %eax,-0x44(%rbp)
mov    0xe89(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe87(%rip),%eax
mov    %eax,-0x50(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe6b(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xe65(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xe60(%rip),%eax
mov    %eax,-0x80(%rbp)
lea    -0x9c(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1030 <memset@plt>
mov    0xe47(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xe42(%rip),%eax
mov    %eax,-0xa0(%rbp)
mov    0xe39(%rip),%rax
mov    %rax,-0xb4(%rbp)
mov    0xe34(%rip),%eax
mov    %eax,-0xac(%rbp)
lea    -0x14(%rbp),%rdi
mov    $0x1,%esi
call   1040 <firstmissing@plt>
lea    -0x30(%rbp),%rdi
mov    $0x6,%esi
call   1040 <firstmissing@plt>
lea    -0x40(%rbp),%rdi
mov    $0x4,%esi
call   1040 <firstmissing@plt>
lea    -0x4c(%rbp),%rdi
mov    $0x3,%esi
call   1040 <firstmissing@plt>
lea    -0x58(%rbp),%rdi
mov    $0x3,%esi
call   1040 <firstmissing@plt>
lea    -0x70(%rbp),%rdi
mov    $0x4,%esi
call   1040 <firstmissing@plt>
lea    -0x90(%rbp),%rdi
mov    $0x5,%esi
call   1040 <firstmissing@plt>
lea    -0x9c(%rbp),%rdi
mov    $0x3,%esi
call   1040 <firstmissing@plt>
lea    -0xa8(%rbp),%rdi
mov    $0x3,%esi
call   1040 <firstmissing@plt>
lea    -0xb4(%rbp),%rdi
mov    $0x3,%esi
call   1040 <firstmissing@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xb8,%rsp
movl   $0x0,0xc(%rsp)
mov    0xeea(%rip),%rax
mov    %rax,0xb0(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xf0c(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
mov    0xece(%rip),%eax
mov    %eax,0x58(%rsp)
mov    0xebb(%rip),%rax
mov    %rax,0x50(%rsp)
mov    0xec4(%rip),%eax
mov    %eax,0x48(%rsp)
mov    0xeb1(%rip),%rax
mov    %rax,0x40(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
mov    0xeb3(%rip),%eax
mov    %eax,0x70(%rsp)
movaps 0xe98(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movl   $0x0,0x38(%rsp)
movq   $0x0,0x30(%rsp)
movl   $0xffffffff,0x28(%rsp)
ff
movq   $0xffffffffffffffff,0x20(%rsp)
ff ff
mov    0xe87(%rip),%eax
mov    %eax,0x18(%rsp)
mov    0xe74(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
call   1030 <firstmissing@plt>
lea    0xa0(%rsp),%rdi
mov    $0x6,%esi
call   1030 <firstmissing@plt>
lea    0x90(%rsp),%rdi
mov    $0x4,%esi
call   1030 <firstmissing@plt>
lea    0x50(%rsp),%rdi
mov    $0x3,%esi
call   1030 <firstmissing@plt>
lea    0x40(%rsp),%rdi
mov    $0x3,%esi
call   1030 <firstmissing@plt>
lea    0x80(%rsp),%rdi
mov    $0x4,%esi
call   1030 <firstmissing@plt>
lea    0x60(%rsp),%rdi
mov    $0x5,%esi
call   1030 <firstmissing@plt>
lea    0x30(%rsp),%rdi
mov    $0x3,%esi
call   1030 <firstmissing@plt>
lea    0x20(%rsp),%rdi
mov    $0x3,%esi
call   1030 <firstmissing@plt>
lea    0x10(%rsp),%rdi
mov    $0x3,%esi
call   1030 <firstmissing@plt>
xor    %eax,%eax
add    $0xb8,%rsp
ret

LLVM IR (-O0):
@__const.main.arr1 = [6 x i32] [i32 -2, i32 -1, i32 0, i32 1, i32 3, i32 4]
@__const.main.arr2 = [4 x i32] [i32 3, i32 4, i32 -1, i32 1]
@__const.main.arr3 = [3 x i32] [i32 0, i32 1, i32 2]
@__const.main.arr4 = [3 x i32] [i32 99, i32 100, i32 103]
@__const.main.arr5 = [4 x i32] [i32 99, i32 100, i32 103, i32 -1]
@__const.main.arr6 = [5 x i32] [i32 99, i32 100, i32 103, i32 -1, i32 1]
@__const.main.arr8 = [3 x i32] [i32 -1, i32 -1, i32 -1]
@__const.main.arr9 = [3 x i32] [i32 -1, i32 -2, i32 -3]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1 x i32]
%7 = alloca [6 x i32]
%8 = alloca [4 x i32]
%9 = alloca [3 x i32]
%10 = alloca [3 x i32]
%11 = alloca [4 x i32]
%12 = alloca [5 x i32]
%13 = alloca [3 x i32]
%14 = alloca [3 x i32]
%15 = alloca [3 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = bitcast [1 x i32]* %6 to i8*
%17 = bitcast [6 x i32]* %7 to i8*
%18 = bitcast [4 x i32]* %8 to i8*
%19 = bitcast [3 x i32]* %9 to i8*
%20 = bitcast [3 x i32]* %10 to i8*
%21 = bitcast [4 x i32]* %11 to i8*
%22 = bitcast [5 x i32]* %12 to i8*
%23 = bitcast [3 x i32]* %13 to i8*
%24 = bitcast [3 x i32]* %14 to i8*
%25 = bitcast [3 x i32]* %15 to i8*
%26 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
%27 = call i32 @firstmissing(i32* %26, i32 1)
%28 = getelementptr inbounds [6 x i32], [6 x i32]* %7, i64 0, i64 0
%29 = call i32 @firstmissing(i32* %28, i32 6)
%30 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 0
%31 = call i32 @firstmissing(i32* %30, i32 4)
%32 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
%33 = call i32 @firstmissing(i32* %32, i32 3)
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
%35 = call i32 @firstmissing(i32* %34, i32 3)
%36 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%37 = call i32 @firstmissing(i32* %36, i32 4)
%38 = getelementptr inbounds [5 x i32], [5 x i32]* %12, i64 0, i64 0
%39 = call i32 @firstmissing(i32* %38, i32 5)
%40 = getelementptr inbounds [3 x i32], [3 x i32]* %13, i64 0, i64 0
%41 = call i32 @firstmissing(i32* %40, i32 3)
%42 = getelementptr inbounds [3 x i32], [3 x i32]* %14, i64 0, i64 0
%43 = call i32 @firstmissing(i32* %42, i32 3)
%44 = getelementptr inbounds [3 x i32], [3 x i32]* %15, i64 0, i64 0
%45 = call i32 @firstmissing(i32* %44, i32 3)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr1 = [6 x i32] [i32 -2, i32 -1, i32 0, i32 1, i32 3, i32 4]
@__const.main.arr2 = [4 x i32] [i32 3, i32 4, i32 -1, i32 1]
@__const.main.arr3 = [3 x i32] [i32 0, i32 1, i32 2]
@__const.main.arr4 = [3 x i32] [i32 99, i32 100, i32 103]
@__const.main.arr5 = [4 x i32] [i32 99, i32 100, i32 103, i32 -1]
@__const.main.arr6 = [5 x i32] [i32 99, i32 100, i32 103, i32 -1, i32 1]
@__const.main.arr9 = [3 x i32] [i32 -1, i32 -2, i32 -3]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1 x i32]
%4 = alloca [6 x i32]
%5 = alloca [4 x i32]
%6 = alloca [3 x i32]
%7 = alloca [3 x i32]
%8 = alloca [4 x i32]
%9 = alloca [5 x i32]
%10 = alloca [3 x i32]
%11 = alloca [3 x i32]
%12 = alloca [3 x i32]
%13 = bitcast [1 x i32]* %3 to i8*
%14 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
store i32 0, i32* %14
%15 = bitcast [6 x i32]* %4 to i8*
%16 = bitcast [4 x i32]* %5 to i8*
%17 = bitcast [3 x i32]* %6 to i8*
%18 = bitcast [3 x i32]* %7 to i8*
%19 = bitcast [4 x i32]* %8 to i8*
%20 = bitcast [5 x i32]* %9 to i8*
%21 = bitcast [3 x i32]* %10 to i8*
%22 = bitcast [3 x i32]* %11 to i8*
%23 = bitcast [3 x i32]* %12 to i8*
%24 = call i32 @firstmissing(i32* %14, i32 1)
%25 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 0
%26 = call i32 @firstmissing(i32* %25, i32 6)
%27 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%28 = call i32 @firstmissing(i32* %27, i32 4)
%29 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%30 = call i32 @firstmissing(i32* %29, i32 3)
%31 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
%32 = call i32 @firstmissing(i32* %31, i32 3)
%33 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 0
%34 = call i32 @firstmissing(i32* %33, i32 4)
%35 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 0
%36 = call i32 @firstmissing(i32* %35, i32 5)
%37 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
%38 = call i32 @firstmissing(i32* %37, i32 3)
%39 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%40 = call i32 @firstmissing(i32* %39, i32 3)
%41 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 0
%42 = call i32 @firstmissing(i32* %41, i32 3)
ret i32 0
}