#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*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ *strstr(char *, char *);
int main() {
  int occ = 0;
  char input[12];
  for (int i = 0; i < 5; i++) {
    scanf("%s", input);
    if (strstr(input, "FBI") != NULL)
      occ += (1 << i);
  }
  if (!occ) {
    printf("HE GOT AWAY!\n");
  } else {
    int first = 1;
    for (int i = 0; i < 5; i++) {
      if (occ & (1 << i)) {
        printf(first ? "%d" : " %d", i + 1);
        first = 0;
      }
    }
    putchar('\n');
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x5,-0x18(%rbp)
jge    11b4 <main+0x74>
lea    -0x14(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x14(%rbp),%rdi
lea    0xe81(%rip),%rsi
call   1060 <strstr@plt>
cmp    $0x0,%rax
je     11a1 <main+0x61>
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    11a6 <main+0x66>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115d <main+0x1d>
cmpl   $0x0,-0x8(%rbp)
jne    11d1 <main+0x91>
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    124c <main+0x10c>
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x5,-0x20(%rbp)
jge    1242 <main+0x102>
mov    -0x8(%rbp),%eax
mov    -0x20(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     122f <main+0xef>
mov    -0x1c(%rbp),%ecx
lea    0xe08(%rip),%rdi
lea    0xe02(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    -0x20(%rbp),%esi
add    $0x1,%esi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x1c(%rbp)
jmp    1234 <main+0xf4>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11df <main+0x9f>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xe9b(%rip),%r12
lea    0x1c(%rsp),%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
lea    0xe87(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <strstr@plt>
mov    %rax,%r13
xor    %ebp,%ebp
test   %rax,%rax
setne  %bpl
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <strstr@plt>
mov    %rax,%r14
xor    %eax,%eax
test   %r14,%r14
setne  %al
lea    0x0(%rbp,%rax,2),%ebp
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <strstr@plt>
xor    %ecx,%ecx
mov    %rax,0x8(%rsp)
test   %rax,%rax
setne  %cl
lea    0x0(%rbp,%rcx,4),%ebp
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <strstr@plt>
xor    %ecx,%ecx
mov    %rax,0x10(%rsp)
test   %rax,%rax
setne  %cl
lea    0x0(%rbp,%rcx,8),%ebp
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <strstr@plt>
mov    %rax,%rbx
xor    %eax,%eax
test   %rbx,%rbx
setne  %al
shl    $0x4,%eax
or     %ebp,%eax
je     12fd <main+0x1ad>
test   %r13,%r13
je     131a <main+0x1ca>
lea    0xdc6(%rip),%rdi
xor    %ebp,%ebp
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r14,%r14
je     1278 <main+0x128>
test   %r13,%r13
lea    0xda8(%rip),%rax
lea    0xda2(%rip),%rdi
cmovne %rax,%rdi
xor    %ebp,%ebp
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmpq   $0x0,0x8(%rsp)
je     12a2 <main+0x152>
test   %ebp,%ebp
lea    0xd7e(%rip),%rax
lea    0xd78(%rip),%rdi
cmove  %rax,%rdi
xor    %ebp,%ebp
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmpq   $0x0,0x10(%rsp)
je     12cc <main+0x17c>
test   %ebp,%ebp
lea    0xd54(%rip),%rax
lea    0xd4e(%rip),%rdi
cmove  %rax,%rdi
xor    %ebp,%ebp
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %rbx,%rbx
je     12f1 <main+0x1a1>
test   %ebp,%ebp
lea    0xd2d(%rip),%rax
lea    0xd27(%rip),%rdi
cmove  %rax,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1309 <main+0x1b9>
lea    0xd07(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%ebp
test   %r14,%r14
jne    1255 <main+0x105>
jmp    1278 <main+0x128>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"FBI\00"
@.str.2 = [14 x i8] c"HE GOT AWAY!\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [4 x i8] c" %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [12 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %4
br label %7
7: ; preds = %22, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 5
br i1 %9, label %10, label %25
10: ; preds = %7
%11 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%14 = call i32* @strstr(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp ne i32* %14, null
br i1 %15, label %16, label %21
16: ; preds = %10
%17 = load i32, i32* %4
%18 = shl i32 1, %17
%19 = load i32, i32* %2
%20 = add nsw i32 %19, %18
store i32 %20, i32* %2
br label %21
21: ; preds = %16, %10
br label %22
22: ; preds = %21
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %7
25: ; preds = %7
%26 = load i32, i32* %2
%27 = icmp ne i32 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %54
30: ; preds = %25
store i32 1, i32* %5
store i32 0, i32* %6
br label %31
31: ; preds = %49, %30
%32 = load i32, i32* %6
%33 = icmp slt i32 %32, 5
br i1 %33, label %34, label %52
34: ; preds = %31
%35 = load i32, i32* %2
%36 = load i32, i32* %6
%37 = shl i32 1, %36
%38 = and i32 %35, %37
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %48
40: ; preds = %34
%41 = load i32, i32* %5
%42 = icmp ne i32 %41, 0
%43 = zext i1 %42 to i64
%44 = select i1 %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0)
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
%47 = call i32 (i8*, ...) @printf(i8* %44, i32 %46)
store i32 0, i32* %5
br label %48
48: ; preds = %40, %34
br label %49
49: ; preds = %48
%50 = load i32, i32* %6
%51 = add nsw i32 %50, 1
store i32 %51, i32* %6
br label %31
52: ; preds = %31
%53 = call i32 @putchar(i8 signext 10)
br label %54
54: ; preds = %52, %28
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"FBI\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [4 x i8] c" %d\00"
@str = [13 x i8] c"HE GOT AWAY!\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i32* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32* %8, null
%10 = select i1 %9, i32 0, i32 2
%11 = or i32 %10, %6
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%13 = call i32* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32* %13, null
%15 = select i1 %14, i32 0, i32 4
%16 = or i32 %15, %11
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%18 = call i32* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i32* %18, null
%20 = select i1 %19, i32 0, i32 8
%21 = or i32 %20, %16
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%23 = call i32* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32* %23, null
%25 = select i1 %24, i32 0, i32 16
%26 = or i32 %25, %21
%27 = icmp eq i32 %26, 0
br i1 %27, label %29, label %28
28: ; preds = %0
br i1 %5, label %31, label %33
29: ; preds = %0
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
br label %58
31: ; preds = %28
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 1)
br label %33
33: ; preds = %28, %31
%34 = phi i32 [ 0, %31 ], [ 1, %28 ]
br i1 %9, label %38, label %35
35: ; preds = %33
%36 = select i1 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %36, i32 2)
br label %38
38: ; preds = %35, %33
%39 = phi i32 [ 0, %35 ], [ %34, %33 ]
br i1 %14, label %44, label %40
40: ; preds = %38
%41 = icmp eq i32 %39, 0
%42 = select i1 %41, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %42, i32 3)
br label %44
44: ; preds = %40, %38
%45 = phi i32 [ 0, %40 ], [ %39, %38 ]
br i1 %19, label %50, label %46
46: ; preds = %44
%47 = icmp eq i32 %45, 0
%48 = select i1 %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %48, i32 4)
br label %50
50: ; preds = %46, %44
%51 = phi i32 [ 0, %46 ], [ %45, %44 ]
br i1 %24, label %56, label %52
52: ; preds = %50
%53 = icmp eq i32 %51, 0
%54 = select i1 %53, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %54, i32 5)
br label %56
56: ; preds = %52, %50
%57 = call i32 @putchar(i8 signext 10)
br label %58
58: ; preds = %56, %29
ret i32 0
}