#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*/ getchar();
int scanf(char *, int *);
int getNumbers(int *nums) {
  unsigned i = 0;
  for (; i < 10; ++i) {
    if (scanf("%d", nums + i) == 1) {
      getchar();
    } else {
      goto end;
    }
  }
  return 1;
end:
  return 0;
}


x86 assembly (clang, -O0):
<getNumbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jae    1184 <getNumbers+0x64>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeae(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    116c <getNumbers+0x4c>
mov    $0x0,%al
call   1030 <getchar@plt>
jmp    1171 <getNumbers+0x51>
jmp    1190 <getNumbers+0x70>
jmp    1176 <getNumbers+0x56>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <getNumbers+0x13>
movl   $0x1,-0x4(%rbp)
jmp    1197 <getNumbers+0x77>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNumbers>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
xor    %ebp,%ebp
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getchar@plt>
lea    0x4(%rbx),%rsi
lea    0xeac(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getchar@plt>
lea    0x8(%rbx),%rsi
lea    0xe8a(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getchar@plt>
lea    0xc(%rbx),%rsi
lea    0xe68(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getchar@plt>
lea    0x10(%rbx),%rsi
lea    0xe46(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getchar@plt>
lea    0x14(%rbx),%rsi
lea    0xe24(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getchar@plt>
lea    0x18(%rbx),%rsi
lea    0xe02(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getchar@plt>
lea    0x1c(%rbx),%rsi
lea    0xde4(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getchar@plt>
lea    0x20(%rbx),%rsi
lea    0xdc6(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getchar@plt>
add    $0x24,%rbx
lea    0xda8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1271 <getNumbers+0x151>
xor    %eax,%eax
call   1030 <getchar@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @getNumbers(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 0, i32* %4
br label %5
5: ; preds = %19, %1
%6 = load i32, i32* %4
%7 = icmp ult i32 %6, 10
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %12)
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %17
15: ; preds = %8
%16 = call i32 (...) @getchar()
br label %18
17: ; preds = %8
br label %23
18: ; preds = %15
br label %19
19: ; preds = %18
%20 = load i32, i32* %4
%21 = add i32 %20, 1
store i32 %21, i32* %4
br label %5
22: ; preds = %5
store i32 1, i32* %2
br label %24
23: ; preds = %17
store i32 0, i32* %2
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @getNumbers(i32* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %51
4: ; preds = %1
%5 = tail call i32 (...) @getchar()
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %51
9: ; preds = %4
%10 = tail call i32 (...) @getchar()
%11 = getelementptr inbounds i32, i32* %0, i64 2
%12 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %51
14: ; preds = %9
%15 = tail call i32 (...) @getchar()
%16 = getelementptr inbounds i32, i32* %0, i64 3
%17 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %16)
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %51
19: ; preds = %14
%20 = tail call i32 (...) @getchar()
%21 = getelementptr inbounds i32, i32* %0, i64 4
%22 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %21)
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %51
24: ; preds = %19
%25 = tail call i32 (...) @getchar()
%26 = getelementptr inbounds i32, i32* %0, i64 5
%27 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %26)
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %51
29: ; preds = %24
%30 = tail call i32 (...) @getchar()
%31 = getelementptr inbounds i32, i32* %0, i64 6
%32 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %31)
%33 = icmp eq i32 %32, 1
br i1 %33, label %34, label %51
34: ; preds = %29
%35 = tail call i32 (...) @getchar()
%36 = getelementptr inbounds i32, i32* %0, i64 7
%37 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %36)
%38 = icmp eq i32 %37, 1
br i1 %38, label %39, label %51
39: ; preds = %34
%40 = tail call i32 (...) @getchar()
%41 = getelementptr inbounds i32, i32* %0, i64 8
%42 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %41)
%43 = icmp eq i32 %42, 1
br i1 %43, label %44, label %51
44: ; preds = %39
%45 = tail call i32 (...) @getchar()
%46 = getelementptr inbounds i32, i32* %0, i64 9
%47 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %46)
%48 = icmp eq i32 %47, 1
br i1 %48, label %49, label %51
49: ; preds = %44
%50 = tail call i32 (...) @getchar()
br label %51
51: ; preds = %49, %44, %39, %34, %29, %24, %19, %14, %9, %4, %1
%52 = phi i32 [ 0, %1 ], [ 0, %4 ], [ 0, %9 ], [ 0, %14 ], [ 0, %19 ], [ 0, %24 ], [ 0, %29 ], [ 0, %34 ], [ 0, %39 ], [ 0, %44 ], [ 1, %49 ]
ret i32 %52
}