#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ vprint(int *, int);
int /*<<< orphan*/ vprintl(int *, int);
int main(int argc, char **argv) {
  int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, -1};
  for (int i = 0; i <= 10; i++) {
    vprint(a, i);
    printf("\n");
  }
  printf("\n");
  for (int i = 0; i <= 10; i++)
    vprintl(a, i);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0xa,-0x44(%rbp)
jg     11a2 <main+0x62>
lea    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
call   1050 <vprint@plt>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1172 <main+0x32>
lea    0xe7f(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x48(%rbp)
cmpl   $0xa,-0x48(%rbp)
jg     11d9 <main+0x99>
lea    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%esi
call   1030 <vprintl@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11b5 <main+0x75>
mov    0x2e00(%rip),%rax
mov    (%rax),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xee4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <vprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1040 <vprintl@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <vprintl@plt>
mov    0x2cee(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 -1]
@.str = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [10 x i32]* %6 to i8*
store i32 0, i32* %7
br label %10
10: ; preds = %18, %2
%11 = load i32, i32* %7
%12 = icmp sle i32 %11, 10
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%15 = load i32, i32* %7
%16 = call i32 @vprint(i32* %14, i32 %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %13
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
store i32 %20, i32* %7
br label %10
21: ; preds = %10
%22 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %8
br label %23
23: ; preds = %30, %21
%24 = load i32, i32* %8
%25 = icmp sle i32 %24, 10
br i1 %25, label %26, label %33
26: ; preds = %23
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%28 = load i32, i32* %8
%29 = call i32 @vprintl(i32* %27, i32 %28)
br label %30
30: ; preds = %26
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
store i32 %32, i32* %8
br label %23
33: ; preds = %23
%34 = load i32, i32* @EXIT_SUCCESS
ret i32 %34
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 -1]
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = bitcast [10 x i32]* %3 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%6 = call i32 @vprint(i32* %5, i32 0)
%7 = call i32 @putchar(i32 10)
%8 = call i32 @vprint(i32* %5, i32 1)
%9 = call i32 @putchar(i32 10)
%10 = call i32 @vprint(i32* %5, i32 2)
%11 = call i32 @putchar(i32 10)
%12 = call i32 @vprint(i32* %5, i32 3)
%13 = call i32 @putchar(i32 10)
%14 = call i32 @vprint(i32* %5, i32 4)
%15 = call i32 @putchar(i32 10)
%16 = call i32 @vprint(i32* %5, i32 5)
%17 = call i32 @putchar(i32 10)
%18 = call i32 @vprint(i32* %5, i32 6)
%19 = call i32 @putchar(i32 10)
%20 = call i32 @vprint(i32* %5, i32 7)
%21 = call i32 @putchar(i32 10)
%22 = call i32 @vprint(i32* %5, i32 8)
%23 = call i32 @putchar(i32 10)
%24 = call i32 @vprint(i32* %5, i32 9)
%25 = call i32 @putchar(i32 10)
%26 = call i32 @vprint(i32* %5, i32 10)
%27 = call i32 @putchar(i32 10)
%28 = call i32 @putchar(i32 10)
%29 = call i32 @vprintl(i32* %5, i32 0)
%30 = call i32 @vprintl(i32* %5, i32 1)
%31 = call i32 @vprintl(i32* %5, i32 2)
%32 = call i32 @vprintl(i32* %5, i32 3)
%33 = call i32 @vprintl(i32* %5, i32 4)
%34 = call i32 @vprintl(i32* %5, i32 5)
%35 = call i32 @vprintl(i32* %5, i32 6)
%36 = call i32 @vprintl(i32* %5, i32 7)
%37 = call i32 @vprintl(i32* %5, i32 8)
%38 = call i32 @vprintl(i32* %5, i32 9)
%39 = call i32 @vprintl(i32* %5, i32 10)
%40 = load i32, i32* @EXIT_SUCCESS
ret i32 %40
}