#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__ read_char(char);
scalar_t__ read_char_range(char, char);
void read_identifier() {
  while (read_char_range('a', 'z') || read_char_range('A', 'Z') ||
         read_char_range('0', '9') || read_char('_')) {
  }
}


x86 assembly (clang, -O0):
<read_identifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
jmp    112d <read_identifier+0xd>
mov    $0x61,%edi
mov    $0x7a,%esi
call   1030 <read_char_range@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    11a4 <read_identifier+0x84>
mov    $0x41,%edi
mov    $0x5a,%esi
call   1030 <read_char_range@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    11a4 <read_identifier+0x84>
mov    $0x30,%edi
mov    $0x39,%esi
call   1030 <read_char_range@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    11a4 <read_identifier+0x84>
mov    $0x5f,%edi
call   1040 <read_char@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
test   $0x1,%al
jne    11b4 <read_identifier+0x94>
jmp    11b9 <read_identifier+0x99>
jmp    112d <read_identifier+0xd>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_identifier>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x61,%edi
mov    $0x7a,%esi
call   1030 <read_char_range@plt>
test   %rax,%rax
jne    1130 <read_identifier+0x10>
mov    $0x41,%edi
mov    $0x5a,%esi
call   1030 <read_char_range@plt>
test   %rax,%rax
jne    1130 <read_identifier+0x10>
mov    $0x30,%edi
mov    $0x39,%esi
call   1030 <read_char_range@plt>
test   %rax,%rax
jne    1130 <read_identifier+0x10>
mov    $0x5f,%edi
call   1040 <read_char@plt>
test   %rax,%rax
jne    1130 <read_identifier+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @read_identifier() {
br label %1
1: ; preds = %15, %0
%2 = call i64 @read_char_range(i8 signext 97, i8 signext 122)
%3 = icmp ne i64 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1
%5 = call i64 @read_char_range(i8 signext 65, i8 signext 90)
%6 = icmp ne i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %4
%8 = call i64 @read_char_range(i8 signext 48, i8 signext 57)
%9 = icmp ne i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = call i64 @read_char(i8 signext 95)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %10, %7, %4, %1
%14 = phi i1 [ true, %7 ], [ true, %4 ], [ true, %1 ], [ %12, %10 ]
br i1 %14, label %15, label %16
15: ; preds = %13
br label %1
16: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @read_identifier() {
br label %1
1: ; preds = %4, %0
%2 = tail call i64 @read_char_range(i8 signext 97, i8 signext 122)
%3 = icmp eq i64 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %1, %5, %8, %11
br label %1
5: ; preds = %1
%6 = tail call i64 @read_char_range(i8 signext 65, i8 signext 90)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %5
%9 = tail call i64 @read_char_range(i8 signext 48, i8 signext 57)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %8
%12 = tail call i64 @read_char(i8 signext 95)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %11
ret void
}