#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int fscanf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/ *);
int n;
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  FILE *fin = fopen("namenum.in", "r");
  FILE *dic = fopen("valid_names.txt", "r");
  FILE *fout = fopen("namenum.out", "w");
  int n = fscanf(fin, "%d ", &n);
  printf("%d\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    0xeb7(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
lea    0xea9(%rip),%rdi
lea    0xea0(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
lea    0xea2(%rip),%rdi
lea    0xea7(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe95(%rip),%rsi
lea    -0x2c(%rbp),%rdx
call   1040 <fscanf@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
lea    0xec9(%rip),%r14
mov    %r14,%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xeb9(%rip),%rdi
mov    %r14,%rsi
call   1050 <fopen@plt>
lea    0xeba(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1050 <fopen@plt>
lea    0xeb5(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <fscanf@plt>
mov    %eax,0x4(%rsp)
lea    0xea1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"namenum.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [16 x i8] c"valid_names.txt\00"
@.str.3 = [12 x i8] c"namenum.out\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [4 x i8] c"%d \00"
@.str.6 = [4 x i8] c"%d\0A\00"
@n = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %6
%11 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %11, i32** %7
%12 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %12, i32** %8
%13 = load i32*, i32** %6
%14 = call i32 @fscanf(i32* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32* %9)
store i32 %14, i32* %9
%15 = load i32, i32* %9
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"namenum.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [16 x i8] c"valid_names.txt\00"
@.str.3 = [12 x i8] c"namenum.out\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [4 x i8] c"%d \00"
@.str.6 = [4 x i8] c"%d\0A\00"
@n = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%7 = bitcast i32* %3 to i8*
%8 = call i32 @fscanf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32* %3)
store i32 %8, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %8)
ret i32 0
}