#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 */
scalar_t__ an(scalar_t__);
int /*<<< orphan*/ blanks();
scalar_t__ ch();
int /*<<< orphan*/ gch();
scalar_t__ inbyte();
void junk() {
  if (an(inbyte()))
    while (an(ch()))
      gch();
  else
    while (an(ch()) == 0) {
      if (ch() == 0)
        break;
      gch();
    }
  blanks();
}


x86 assembly (clang, -O0):
<junk>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <inbyte@plt>
mov    %rax,%rdi
call   1070 <an@plt>
cmp    $0x0,%rax
je     119c <junk+0x4c>
jmp    1172 <junk+0x22>
mov    $0x0,%al
call   1030 <ch@plt>
mov    %rax,%rdi
call   1070 <an@plt>
cmp    $0x0,%rax
je     1197 <junk+0x47>
mov    $0x0,%al
call   1060 <gch@plt>
jmp    1172 <junk+0x22>
jmp    11e1 <junk+0x91>
jmp    11a1 <junk+0x51>
mov    $0x0,%al
call   1030 <ch@plt>
mov    %rax,%rdi
call   1070 <an@plt>
cmp    $0x0,%rax
jne    11dc <junk+0x8c>
mov    $0x0,%al
call   1030 <ch@plt>
cmp    $0x0,%rax
jne    11d0 <junk+0x80>
jmp    11dc <junk+0x8c>
mov    $0x0,%al
call   1060 <gch@plt>
jmp    11a1 <junk+0x51>
jmp    11e1 <junk+0x91>
mov    $0x0,%al
call   1040 <blanks@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<junk>:
push   %rbx
xor    %eax,%eax
call   1050 <inbyte@plt>
mov    %rax,%rdi
call   1070 <an@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <ch@plt>
mov    %rax,%rdi
call   1070 <an@plt>
test   %rbx,%rbx
je     11d2 <junk+0x82>
nopw   0x0(%rax,%rax,1)
test   %rax,%rax
je     11d7 <junk+0x87>
xor    %eax,%eax
call   1060 <gch@plt>
xor    %eax,%eax
call   1030 <ch@plt>
mov    %rax,%rdi
call   1070 <an@plt>
test   %rax,%rax
jne    1185 <junk+0x35>
jmp    11d7 <junk+0x87>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <ch@plt>
test   %rax,%rax
je     11d7 <junk+0x87>
xor    %eax,%eax
call   1060 <gch@plt>
xor    %eax,%eax
call   1030 <ch@plt>
mov    %rax,%rdi
call   1070 <an@plt>
test   %rax,%rax
je     11b0 <junk+0x60>
xor    %eax,%eax
pop    %rbx
jmp    1040 <blanks@plt>

LLVM IR (-O0):
define void @junk() {
%1 = call i64 (...) @inbyte()
%2 = call i64 @an(i64 %1)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %12
4: ; preds = %0
br label %5
5: ; preds = %9, %4
%6 = call i64 (...) @ch()
%7 = call i64 @an(i64 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 (...) @gch()
br label %5
11: ; preds = %5
br label %24
12: ; preds = %0
br label %13
13: ; preds = %21, %12
%14 = call i64 (...) @ch()
%15 = call i64 @an(i64 %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %13
%18 = call i64 (...) @ch()
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
br label %23
21: ; preds = %17
%22 = call i32 (...) @gch()
br label %13
23: ; preds = %20, %13
br label %24
24: ; preds = %23, %11
%25 = call i32 (...) @blanks()
ret void
}

LLVM IR (-O2):
define void @junk() {
%1 = tail call i64 (...) @inbyte()
%2 = tail call i64 @an(i64 %1)
%3 = icmp eq i64 %2, 0
%4 = tail call i64 (...) @ch()
%5 = tail call i64 @an(i64 %4)
%6 = icmp eq i64 %5, 0
br i1 %3, label %8, label %7
7: ; preds = %0
br i1 %6, label %22, label %9
8: ; preds = %0
br i1 %6, label %14, label %22
9: ; preds = %7, %9
%10 = tail call i32 (...) @gch()
%11 = tail call i64 (...) @ch()
%12 = tail call i64 @an(i64 %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %22, label %9
14: ; preds = %8, %17
%15 = tail call i64 (...) @ch()
%16 = icmp eq i64 %15, 0
br i1 %16, label %22, label %17
17: ; preds = %14
%18 = tail call i32 (...) @gch()
%19 = tail call i64 (...) @ch()
%20 = tail call i64 @an(i64 %19)
%21 = icmp eq i64 %20, 0
br i1 %21, label %14, label %22
22: ; preds = %9, %14, %17, %7, %8
%23 = tail call i32 (...) @blanks()
ret void
}