#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__ isalnum(char);
scalar_t__ isalpha(char);
long consumePossibleVariableName(char delimiterStart, char *buffer,
                                 long lineLength) {
  long Counter;
  if ((isalpha(*buffer)) || (*buffer == '_')) {
    Counter = 1;
    buffer++;
    while ((Counter < lineLength) &&
           ((isalnum(*buffer)) || (*buffer == '_') || (*buffer == '.')) &&
           (*buffer != delimiterStart)) {
      Counter++;
      buffer++;
    }
  } else {
    Counter = 0;
  }
  return (Counter);
}


x86 assembly (clang, -O0):
<consumePossibleVariableName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
jne    115c <consumePossibleVariableName+0x3c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
jne    1203 <consumePossibleVariableName+0xe3>
movq   $0x1,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x21(%rbp)
jge    11d1 <consumePossibleVariableName+0xb1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
jne    11be <consumePossibleVariableName+0x9e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
je     11be <consumePossibleVariableName+0x9e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2e,%ecx
mov    %al,-0x21(%rbp)
jne    11d1 <consumePossibleVariableName+0xb1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    11e1 <consumePossibleVariableName+0xc1>
jmp    11fe <consumePossibleVariableName+0xde>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1170 <consumePossibleVariableName+0x50>
jmp    120b <consumePossibleVariableName+0xeb>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<consumePossibleVariableName>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%r15d
movsbl (%rsi),%edi
call   1040 <isalpha@plt>
test   %rax,%rax
jne    1142 <consumePossibleVariableName+0x22>
cmpb   $0x5f,(%rbx)
jne    1193 <consumePossibleVariableName+0x73>
mov    $0x1,%ebp
cmp    $0x2,%r14
jl     1195 <consumePossibleVariableName+0x75>
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rbx,%rbp,1),%edi
call   1030 <isalnum@plt>
movzbl (%rbx,%rbp,1),%ecx
test   %rax,%rax
jne    1180 <consumePossibleVariableName+0x60>
cmp    $0x5f,%cl
je     1180 <consumePossibleVariableName+0x60>
cmp    $0x2e,%cl
jne    1195 <consumePossibleVariableName+0x75>
nopl   0x0(%rax)
cmp    %r15b,%cl
je     1195 <consumePossibleVariableName+0x75>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1160 <consumePossibleVariableName+0x40>
mov    %r14,%rbp
jmp    1195 <consumePossibleVariableName+0x75>
xor    %ebp,%ebp
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @consumePossibleVariableName(i8 signext %0, i8* %1, i64 %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8 %0, i8* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = call i64 @isalpha(i8 signext %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 95
br i1 %16, label %17, label %54
17: ; preds = %12, %3
store i64 1, i64* %7
%18 = load i8*, i8** %5
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %5
br label %20
20: ; preds = %48, %17
%21 = load i64, i64* %7
%22 = load i64, i64* %6
%23 = icmp slt i64 %21, %22
br i1 %23, label %24, label %46
24: ; preds = %20
%25 = load i8*, i8** %5
%26 = load i8, i8* %25
%27 = call i64 @isalnum(i8 signext %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %39, label %29
29: ; preds = %24
%30 = load i8*, i8** %5
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 95
br i1 %33, label %39, label %34
34: ; preds = %29
%35 = load i8*, i8** %5
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 46
br i1 %38, label %39, label %46
39: ; preds = %34, %29, %24
%40 = load i8*, i8** %5
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = load i8, i8* %4
%44 = sext i8 %43 to i32
%45 = icmp ne i32 %42, %44
br label %46
46: ; preds = %39, %34, %20
%47 = phi i1 [ false, %34 ], [ false, %20 ], [ %45, %39 ]
br i1 %47, label %48, label %53
48: ; preds = %46
%49 = load i64, i64* %7
%50 = add nsw i64 %49, 1
store i64 %50, i64* %7
%51 = load i8*, i8** %5
%52 = getelementptr inbounds i8, i8* %51, i32 1
store i8* %52, i8** %5
br label %20
53: ; preds = %46
br label %55
54: ; preds = %12
store i64 0, i64* %7
br label %55
55: ; preds = %54, %53
%56 = load i64, i64* %7
ret i64 %56
}

LLVM IR (-O2):
define i64 @consumePossibleVariableName(i8 signext %0, i8* nocapture %1, i64 %2) {
%4 = load i8, i8* %1
%5 = tail call i64 @isalpha(i8 signext %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i8, i8* %1
%9 = icmp eq i8 %8, 95
br i1 %9, label %10, label %26
10: ; preds = %7, %3
%11 = icmp sgt i64 %2, 1
br i1 %11, label %12, label %26
12: ; preds = %10, %23
%13 = phi i8* [ %15, %23 ], [ %1, %10 ]
%14 = phi i64 [ %24, %23 ], [ 1, %10 ]
%15 = getelementptr inbounds i8, i8* %13, i64 1
%16 = load i8, i8* %15
%17 = tail call i64 @isalnum(i8 signext %16)
%18 = icmp eq i64 %17, 0
%19 = load i8, i8* %15
br i1 %18, label %20, label %21
20: ; preds = %12
switch i8 %19, label %26 [
i8 95, label %21
i8 46, label %21
]
21: ; preds = %12, %20, %20
%22 = icmp eq i8 %19, %0
br i1 %22, label %26, label %23
23: ; preds = %21
%24 = add nuw nsw i64 %14, 1
%25 = icmp eq i64 %24, %2
br i1 %25, label %26, label %12
26: ; preds = %23, %21, %20, %10, %7
%27 = phi i64 [ 0, %7 ], [ 1, %10 ], [ %2, %23 ], [ %14, %21 ], [ %14, %20 ]
ret i64 %27
}