#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*/ e_scan_plus(int, int *, int *);
int /*<<< orphan*/ i_scan_plus(int, int *, int *);
int /*<<< orphan*/ printResult(int, int *);
int main(int argc, char **argv) {
  int in[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  int out[10];
  int eout[10];
  i_scan_plus(10, in, out);
  e_scan_plus(10, in, eout);
  printResult(10, out);
  printResult(10, eout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe9c(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rsi
lea    -0x70(%rbp),%rdx
mov    $0xa,%edi
call   1060 <i_scan_plus@plt>
lea    -0x40(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
mov    $0xa,%edi
call   1050 <e_scan_plus@plt>
lea    -0x70(%rbp),%rsi
mov    $0xa,%edi
call   1030 <printResult@plt>
lea    -0xa0(%rbp),%rsi
mov    $0xa,%edi
call   1030 <printResult@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x90,%rsp
mov    0xedd(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
lea    0x60(%rsp),%r14
mov    $0xa,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <i_scan_plus@plt>
lea    0x30(%rsp),%r15
mov    $0xa,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <e_scan_plus@plt>
mov    $0xa,%edi
mov    %r14,%rsi
call   1030 <printResult@plt>
mov    $0xa,%edi
mov    %r15,%rsi
call   1030 <printResult@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.in = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca [10 x i32]
%8 = alloca [10 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [10 x i32]* %6 to i8*
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 0
%12 = call i32 @i_scan_plus(i32 10, i32* %10, i32* %11)
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%15 = call i32 @e_scan_plus(i32 10, i32* %13, i32* %14)
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 0
%17 = call i32 @printResult(i32 10, i32* %16)
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%19 = call i32 @printResult(i32 10, i32* %18)
ret i32 0
}

LLVM IR (-O2):
@__const.main.in = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = alloca [10 x i32]
%6 = bitcast [10 x i32]* %3 to i8*
%7 = bitcast [10 x i32]* %4 to i8*
%8 = bitcast [10 x i32]* %5 to i8*
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%11 = call i32 @i_scan_plus(i32 10, i32* %9, i32* %10)
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 0
%13 = call i32 @e_scan_plus(i32 10, i32* %9, i32* %12)
%14 = call i32 @printResult(i32 10, i32* %10)
%15 = call i32 @printResult(i32 10, i32* %12)
ret i32 0
}