#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 */
char getTexChar();
scalar_t__ isalpha(int);
int /*<<< orphan*/ ungetTexChar(char);
void IgnoreCmd(void) {
  char c;
  do {
    c = getTexChar();
  } while (c && c != '\\');
  do {
    c = getTexChar();
  } while (c && isalpha((int)c));
  ungetTexChar(c);
}


x86 assembly (clang, -O0):
<IgnoreCmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getTexChar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     1161 <IgnoreCmd+0x31>
movsbl -0x1(%rbp),%eax
cmp    $0x5c,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    1138 <IgnoreCmd+0x8>
jmp    1171 <IgnoreCmd+0x41>
mov    $0x0,%al
call   1040 <getTexChar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x3(%rbp)
je     11a0 <IgnoreCmd+0x70>
movsbl -0x1(%rbp),%edi
call   1050 <isalpha@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
test   $0x1,%al
jne    1171 <IgnoreCmd+0x41>
movsbl -0x1(%rbp),%edi
call   1030 <ungetTexChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IgnoreCmd>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getTexChar@plt>
cmp    $0x5c,%al
je     116c <IgnoreCmd+0x3c>
test   %al,%al
jne    1140 <IgnoreCmd+0x10>
jmp    116c <IgnoreCmd+0x3c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1050 <isalpha@plt>
test   %rax,%rax
je     117a <IgnoreCmd+0x4a>
xor    %eax,%eax
call   1040 <getTexChar@plt>
movsbl %al,%ebx
test   %al,%al
jne    1160 <IgnoreCmd+0x30>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <ungetTexChar@plt>

LLVM IR (-O0):
define void @IgnoreCmd() {
%1 = alloca i8
br label %2
2: ; preds = %12, %0
%3 = call signext i8 (...) @getTexChar()
store i8 %3, i8* %1
br label %4
4: ; preds = %2
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 92
br label %12
12: ; preds = %8, %4
%13 = phi i1 [ false, %4 ], [ %11, %8 ]
br i1 %13, label %2, label %14
14: ; preds = %12
br label %15
15: ; preds = %26, %14
%16 = call signext i8 (...) @getTexChar()
store i8 %16, i8* %1
br label %17
17: ; preds = %15
%18 = load i8, i8* %1
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = load i8, i8* %1
%23 = sext i8 %22 to i32
%24 = call i64 @isalpha(i32 %23)
%25 = icmp ne i64 %24, 0
br label %26
26: ; preds = %21, %17
%27 = phi i1 [ false, %17 ], [ %25, %21 ]
br i1 %27, label %15, label %28
28: ; preds = %26
%29 = load i8, i8* %1
%30 = call i32 @ungetTexChar(i8 signext %29)
ret void
}

LLVM IR (-O2):
define void @IgnoreCmd() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getTexChar()
switch i8 %2, label %1 [
i8 92, label %3
i8 0, label %3
]
3: ; preds = %1, %1
br label %4
4: ; preds = %3, %7
%5 = tail call signext i8 (...) @getTexChar()
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = sext i8 %5 to i32
%9 = tail call i64 @isalpha(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %7
%12 = tail call i32 @ungetTexChar(i8 signext %5)
ret void
}