#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 EOF;
int /*<<< orphan*/ bf10(int);
int /*<<< orphan*/ bf100(int);
int /*<<< orphan*/ bf255(int);
int /*<<< orphan*/ bf50(int);
int fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ print_and_reset();
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  int c;
  while ((c = fgetc(stdin)) != EOF) {
    if (c <= 10) {
      bf10(c);
      print_and_reset();
    } else if (c <= 50) {
      bf50(c);
      print_and_reset();
    } else if (c <= 100) {
      bf100(c);
      print_and_reset();
    } else {
      bf255(c);
      print_and_reset();
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1040 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e52(%rip),%rcx
cmp    (%rcx),%eax
je     120e <main+0xae>
cmpl   $0xa,-0x14(%rbp)
jg     11b4 <main+0x54>
mov    -0x14(%rbp),%edi
call   1030 <bf10@plt>
mov    $0x0,%al
call   1060 <print_and_reset@plt>
jmp    1209 <main+0xa9>
cmpl   $0x32,-0x14(%rbp)
jg     11d2 <main+0x72>
mov    -0x14(%rbp),%edi
call   1070 <bf50@plt>
mov    $0x0,%al
call   1060 <print_and_reset@plt>
jmp    1204 <main+0xa4>
cmpl   $0x64,-0x14(%rbp)
jg     11f0 <main+0x90>
mov    -0x14(%rbp),%edi
call   1080 <bf100@plt>
mov    $0x0,%al
call   1060 <print_and_reset@plt>
jmp    11ff <main+0x9f>
mov    -0x14(%rbp),%edi
call   1050 <bf255@plt>
mov    $0x0,%al
call   1060 <print_and_reset@plt>
jmp    1204 <main+0xa4>
jmp    1209 <main+0xa9>
jmp    1176 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2e7d(%rip),%r14
mov    (%r14),%edi
call   1040 <fgetc@plt>
mov    0x2e66(%rip),%rbx
jmp    1196 <main+0x36>
nopl   0x0(%rax)
mov    %eax,%edi
call   1030 <bf10@plt>
xor    %eax,%eax
call   1060 <print_and_reset@plt>
mov    (%r14),%edi
call   1040 <fgetc@plt>
cmp    (%rbx),%eax
je     11c5 <main+0x65>
cmp    $0xa,%eax
jle    1180 <main+0x20>
cmp    $0x32,%eax
ja     11b0 <main+0x50>
mov    %eax,%edi
call   1070 <bf50@plt>
jmp    1187 <main+0x27>
nopl   (%rax)
mov    %eax,%edi
cmp    $0x64,%eax
ja     11be <main+0x5e>
call   1080 <bf100@plt>
jmp    1187 <main+0x27>
call   1050 <bf255@plt>
jmp    1187 <main+0x27>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@EOF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %39, %2
%8 = load i32, i32* @stdin
%9 = call i32 @fgetc(i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* @EOF
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %40
12: ; preds = %7
%13 = load i32, i32* %6
%14 = icmp sle i32 %13, 10
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = load i32, i32* %6
%17 = call i32 @bf10(i32 %16)
%18 = call i32 (...) @print_and_reset()
br label %39
19: ; preds = %12
%20 = load i32, i32* %6
%21 = icmp sle i32 %20, 50
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = load i32, i32* %6
%24 = call i32 @bf50(i32 %23)
%25 = call i32 (...) @print_and_reset()
br label %38
26: ; preds = %19
%27 = load i32, i32* %6
%28 = icmp sle i32 %27, 100
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = load i32, i32* %6
%31 = call i32 @bf100(i32 %30)
%32 = call i32 (...) @print_and_reset()
br label %37
33: ; preds = %26
%34 = load i32, i32* %6
%35 = call i32 @bf255(i32 %34)
%36 = call i32 (...) @print_and_reset()
br label %37
37: ; preds = %33, %29
br label %38
38: ; preds = %37, %22
br label %39
39: ; preds = %38, %15
br label %7
40: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgetc(i32 %3)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %28, label %7
7: ; preds = %2, %22
%8 = phi i32 [ %25, %22 ], [ %4, %2 ]
%9 = icmp slt i32 %8, 11
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 @bf10(i32 %8)
br label %22
12: ; preds = %7
%13 = icmp ult i32 %8, 51
br i1 %13, label %14, label %16
14: ; preds = %12
%15 = tail call i32 @bf50(i32 %8)
br label %22
16: ; preds = %12
%17 = icmp ult i32 %8, 101
br i1 %17, label %18, label %20
18: ; preds = %16
%19 = tail call i32 @bf100(i32 %8)
br label %22
20: ; preds = %16
%21 = tail call i32 @bf255(i32 %8)
br label %22
22: ; preds = %14, %20, %18, %10
%23 = tail call i32 (...) @print_and_reset()
%24 = load i32, i32* @stdin
%25 = tail call i32 @fgetc(i32 %24)
%26 = load i32, i32* @EOF
%27 = icmp eq i32 %25, %26
br i1 %27, label %28, label %7
28: ; preds = %22, %2
ret i32 0
}