#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 */
typedef int /*<<< orphan*/ examples;

/* Variables and functions */
int /*<<< orphan*/ _valid_identifier(char const *);
void test_identifiers(void *fixture) {
  static const char *examples[] = {"f",   "foo",  "foo9", "foo9bar",
                                   "F78", "_foo", "_0",   "foo_bar"};
  unsigned i;
  for (i = 0; i < (sizeof(examples) / sizeof((examples)[0])); i++)
    _valid_identifier(examples[i]);
}


x86 assembly (clang, -O0):
<test_identifiers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    $0x8,%rax
jae    1153 <test_identifiers+0x43>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
lea    0x2ef4(%rip),%rax
mov    (%rax,%rcx,8),%rdi
call   1030 <_valid_identifier@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <test_identifiers+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_identifiers>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <_valid_identifier@plt>
lea    0xef0(%rip),%rdi
call   1030 <_valid_identifier@plt>
lea    0xed2(%rip),%rdi
call   1030 <_valid_identifier@plt>
lea    0xecb(%rip),%rdi
call   1030 <_valid_identifier@plt>
lea    0xec7(%rip),%rdi
call   1030 <_valid_identifier@plt>
lea    0xebf(%rip),%rdi
call   1030 <_valid_identifier@plt>
lea    0xeb8(%rip),%rdi
call   1030 <_valid_identifier@plt>
lea    0xeaf(%rip),%rdi
pop    %rax
jmp    1030 <_valid_identifier@plt>

LLVM IR (-O0):
@test_identifiers.examples = internal global [8 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i32 0, i32 0)]
@.str = [2 x i8] c"f\00"
@.str.1 = [4 x i8] c"foo\00"
@.str.2 = [5 x i8] c"foo9\00"
@.str.3 = [8 x i8] c"foo9bar\00"
@.str.4 = [4 x i8] c"F78\00"
@.str.5 = [5 x i8] c"_foo\00"
@.str.6 = [3 x i8] c"_0\00"
@.str.7 = [8 x i8] c"foo_bar\00"
define void @test_identifiers(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = icmp ult i64 %6, 8
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [8 x i8*], [8 x i8*]* @test_identifiers.examples, i64 0, i64 %10
%12 = load i8*, i8** %11
%13 = call i32 @_valid_identifier(i8* %12)
br label %14
14: ; preds = %8
%15 = load i32, i32* %3
%16 = add i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
@.str.1 = [4 x i8] c"foo\00"
@.str.2 = [5 x i8] c"foo9\00"
@.str.3 = [8 x i8] c"foo9bar\00"
@.str.4 = [4 x i8] c"F78\00"
@.str.5 = [5 x i8] c"_foo\00"
@.str.6 = [3 x i8] c"_0\00"
@.str.7 = [8 x i8] c"foo_bar\00"
define void @test_identifiers(i8* nocapture readnone %0) {
%2 = tail call i32 @_valid_identifier(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @_valid_identifier(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @_valid_identifier(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @_valid_identifier(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @_valid_identifier(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @_valid_identifier(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @_valid_identifier(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @_valid_identifier(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
ret void
}