#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 */
int /*<<< orphan*/ skip_space(char const **);
const char *get_identifier(const char **s) {
  static char buf[63 + 1];
  int c;
  int i = 0;
  buf[0] = '\0';
  for (;;) {
    c = **s;
    if (c < 'A')
      break;
    if (i > 63)
      break;
    buf[i++] = c;
    buf[i] = '\0';
    (*s)++;
  }
  skip_space(s);
  return buf;
}


x86 assembly (clang, -O0):
<get_identifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movb   $0x0,0x2f16(%rip)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x41,-0xc(%rbp)
jge    1146 <get_identifier+0x36>
jmp    1194 <get_identifier+0x84>
cmpl   $0x3f,-0x10(%rbp)
jle    1155 <get_identifier+0x45>
jmp    1194 <get_identifier+0x84>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x10(%rbp)
movslq %eax,%rcx
lea    0x2ed1(%rip),%rax
mov    %dl,(%rax,%rcx,1)
movslq -0x10(%rbp),%rcx
lea    0x2ec3(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    112a <get_identifier+0x1a>
mov    -0x8(%rbp),%rdi
call   1030 <skip_space@plt>
lea    0x2e9c(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_identifier>:
push   %rax
movb   $0x0,0x2f28(%rip)
mov    (%rdi),%rax
mov    (%rax),%al
cmp    $0x41,%al
jl     1157 <get_identifier+0x47>
xor    %ecx,%ecx
lea    0x2f16(%rip),%rdx
nopw   0x0(%rax,%rax,1)
mov    %al,(%rcx,%rdx,1)
movb   $0x0,0x1(%rcx,%rdx,1)
mov    (%rdi),%rax
lea    0x1(%rax),%rsi
mov    %rsi,(%rdi)
movzbl 0x1(%rax),%eax
cmp    $0x41,%al
jl     1157 <get_identifier+0x47>
lea    0x1(%rcx),%rsi
cmp    $0x3f,%rcx
mov    %rsi,%rcx
jb     1130 <get_identifier+0x20>
call   1030 <skip_space@plt>
lea    0x2edd(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@get_identifier.buf = internal global [64 x i8] zeroinitializer
define i8* @get_identifier(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %4
store i8 0, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @get_identifier.buf, i64 0, i64 0)
br label %5
5: ; preds = %17, %1
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 65
br i1 %11, label %12, label %13
12: ; preds = %5
br label %30
13: ; preds = %5
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 63
br i1 %15, label %16, label %17
16: ; preds = %13
br label %30
17: ; preds = %13
%18 = load i32, i32* %3
%19 = trunc i32 %18 to i8
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
%22 = sext i32 %20 to i64
%23 = getelementptr inbounds [64 x i8], [64 x i8]* @get_identifier.buf, i64 0, i64 %22
store i8 %19, i8* %23
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [64 x i8], [64 x i8]* @get_identifier.buf, i64 0, i64 %25
store i8 0, i8* %26
%27 = load i8**, i8*** %2
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %27
br label %5
30: ; preds = %16, %12
%31 = load i8**, i8*** %2
%32 = call i32 @skip_space(i8** %31)
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @get_identifier.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@get_identifier.buf = internal global [64 x i8] zeroinitializer
define i8* @get_identifier(i8** %0) {
store i8 0, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @get_identifier.buf, i64 0, i64 0)
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp slt i8 %3, 65
br i1 %4, label %17, label %5
5: ; preds = %1, %5
%6 = phi i64 [ %8, %5 ], [ 0, %1 ]
%7 = phi i8 [ %13, %5 ], [ %3, %1 ]
%8 = add nuw nsw i64 %6, 1
%9 = getelementptr inbounds [64 x i8], [64 x i8]* @get_identifier.buf, i64 0, i64 %6
store i8 %7, i8* %9
%10 = getelementptr inbounds [64 x i8], [64 x i8]* @get_identifier.buf, i64 0, i64 %8
store i8 0, i8* %10
%11 = load i8*, i8** %0
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8* %12, i8** %0
%13 = load i8, i8* %12
%14 = icmp slt i8 %13, 65
%15 = icmp ugt i64 %6, 62
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %17, label %5
17: ; preds = %5, %1
%18 = tail call i32 @skip_space(i8** %0)
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @get_identifier.buf, i64 0, i64 0)
}