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


x86 assembly (clang, -O0):
<junk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <inbyte@plt>
mov    %rax,%rdi
call   1060 <alphanumeric@plt>
cmp    $0x0,%rax
je     11a0 <junk+0x50>
jmp    1176 <junk+0x26>
mov    $0x0,%al
call   1030 <ch@plt>
mov    %rax,%rdi
call   1060 <alphanumeric@plt>
cmp    $0x0,%rax
je     119b <junk+0x4b>
mov    $0x0,%al
call   1070 <gch@plt>
jmp    1176 <junk+0x26>
jmp    11e5 <junk+0x95>
jmp    11a5 <junk+0x55>
mov    $0x0,%al
call   1030 <ch@plt>
mov    %rax,%rdi
call   1060 <alphanumeric@plt>
cmp    $0x0,%rax
je     11e0 <junk+0x90>
mov    $0x0,%al
call   1030 <ch@plt>
cmp    $0x0,%rax
jne    11d4 <junk+0x84>
jmp    11e0 <junk+0x90>
mov    $0x0,%al
call   1070 <gch@plt>
jmp    11a5 <junk+0x55>
jmp    11e5 <junk+0x95>
mov    $0x0,%al
call   1040 <blanks@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<junk>:
push   %rbx
xor    %eax,%eax
call   1050 <inbyte@plt>
mov    %rax,%rdi
call   1060 <alphanumeric@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <ch@plt>
mov    %rax,%rdi
call   1060 <alphanumeric@plt>
test   %rbx,%rbx
je     11c6 <junk+0x76>
nopw   0x0(%rax,%rax,1)
test   %rax,%rax
je     11d7 <junk+0x87>
xor    %eax,%eax
call   1070 <gch@plt>
xor    %eax,%eax
call   1030 <ch@plt>
mov    %rax,%rdi
call   1060 <alphanumeric@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   1070 <gch@plt>
xor    %eax,%eax
call   1030 <ch@plt>
mov    %rax,%rdi
call   1060 <alphanumeric@plt>
test   %rax,%rax
je     11d7 <junk+0x87>
xor    %eax,%eax
call   1030 <ch@plt>
test   %rax,%rax
jne    11b0 <junk+0x60>
xor    %eax,%eax
pop    %rbx
jmp    1040 <blanks@plt>

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

LLVM IR (-O2):
define i32 @junk() {
%1 = tail call i64 (...) @inbyte()
%2 = tail call i64 @alphanumeric(i64 %1)
%3 = icmp eq i64 %2, 0
%4 = tail call i64 (...) @ch()
%5 = tail call i64 @alphanumeric(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 %22, label %14
9: ; preds = %7, %9
%10 = tail call i32 (...) @gch()
%11 = tail call i64 (...) @ch()
%12 = tail call i64 @alphanumeric(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 @alphanumeric(i64 %19)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %14
22: ; preds = %9, %14, %17, %7, %8
%23 = tail call i32 (...) @blanks()
ret i32 undef
}