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

/* Variables and functions */
int BUFSIZ;
int atoi(char *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  int i, j;
  char line[BUFSIZ];
  for (i = 0; fgets(line, sizeof(line), stdin); i++) {
    for (j = 0; j < argc; j++)
      if (atoi(argv[j]) == i + 1)
        goto out;
    printf("%s", line);
  out:;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x38(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rax
mov    %eax,%esi
mov    0x2e5a(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     120c <main+0xdc>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e9 <main+0xb9>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <atoi@plt>
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    11d6 <main+0xa6>
jmp    11f9 <main+0xc9>
jmp    11db <main+0xab>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a6 <main+0x76>
mov    -0x30(%rbp),%rsi
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <main+0xce>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    117d <main+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,-0x2c(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%r12
mov    %rsi,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    0x2e7d(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    %rsi,-0x38(%rbp)
call   1040 <fgets@plt>
test   %rax,%rax
je     11e9 <main+0xb9>
mov    -0x2c(%rbp),%r13d
xor    %r14d,%r14d
jmp    11b9 <main+0x89>
nopw   0x0(%rax,%rax,1)
lea    0xe69(%rip),%rdi
mov    %r12,%rsi
call   1030 <printf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    -0x38(%rbp),%rsi
call   1040 <fgets@plt>
test   %rax,%rax
je     11e9 <main+0xb9>
add    $0x1,%r14d
cmpl   $0x0,-0x2c(%rbp)
jle    1190 <main+0x60>
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%r15,8),%rdi
call   1050 <atoi@plt>
cmp    %r14d,%eax
je     119f <main+0x6f>
add    $0x1,%r15
cmp    %r15,%r13
jne    11d0 <main+0xa0>
jmp    1190 <main+0x60>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@BUFSIZ = global i32 0
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* @BUFSIZ
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %8
%13 = alloca i8, i64 %11
store i64 %11, i64* %9
store i32 0, i32* %6
br label %14
14: ; preds = %42, %2
%15 = trunc i64 %11 to i32
%16 = load i32, i32* @stdin
%17 = call i64 @fgets(i8* %13, i32 %15, i32 %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %45
19: ; preds = %14
store i32 0, i32* %7
br label %20
20: ; preds = %36, %19
%21 = load i32, i32* %7
%22 = load i32, i32* %4
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %39
24: ; preds = %20
%25 = load i8**, i8*** %5
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
%29 = load i8*, i8** %28
%30 = call i32 @atoi(i8* %29)
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
%33 = icmp eq i32 %30, %32
br i1 %33, label %34, label %35
34: ; preds = %24
br label %41
35: ; preds = %24
br label %36
36: ; preds = %35
%37 = load i32, i32* %7
%38 = add nsw i32 %37, 1
store i32 %38, i32* %7
br label %20
39: ; preds = %20
%40 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %41
41: ; preds = %39, %34
br label %42
42: ; preds = %41
%43 = load i32, i32* %6
%44 = add nsw i32 %43, 1
store i32 %44, i32* %6
br label %14
45: ; preds = %14
store i32 0, i32* %3
%46 = load i8*, i8** %8
%47 = load i32, i32* %3
ret i32 %47
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @BUFSIZ
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = load i32, i32* @stdin
%7 = call i64 @fgets(i8* %5, i32 %3, i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %30, label %9
9: ; preds = %2
%10 = icmp sgt i32 %0, 0
%11 = zext i32 %0 to i64
br label %12
12: ; preds = %9, %26
%13 = phi i32 [ 0, %9 ], [ %14, %26 ]
%14 = add nuw nsw i32 %13, 1
br i1 %10, label %17, label %24
15: ; preds = %17
%16 = icmp eq i64 %23, %11
br i1 %16, label %24, label %17
17: ; preds = %12, %15
%18 = phi i64 [ %23, %15 ], [ 0, %12 ]
%19 = getelementptr inbounds i8*, i8** %1, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 @atoi(i8* %20)
%22 = icmp eq i32 %21, %14
%23 = add nuw nsw i64 %18, 1
br i1 %22, label %26, label %15
24: ; preds = %15, %12
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %26
26: ; preds = %17, %24
%27 = load i32, i32* @stdin
%28 = call i64 @fgets(i8* %5, i32 %3, i32 %27)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %12
30: ; preds = %26, %2
ret i32 0
}