#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*/ myisalnum(char);
char *_man_name(char *p) {
  static char buf[256];
  int i = 0;
  while ((*p) && (*p != '"'))
    p++;
  if (*p == '"') {
    p++;
    while ((*p) && (*p != '"')) {
      if ((!myisalnum(*p)) && (*p != '_'))
        return NULL;
      buf[i++] = *(p++);
    }
    if (i) {
      buf[i] = 0;
      return buf;
    }
  }
  return NULL;
}


x86 assembly (clang, -O0):
<_man_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     1148 <_man_name+0x38>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1158 <_man_name+0x48>
jmp    1169 <_man_name+0x59>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1123 <_man_name+0x13>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1248 <_man_name+0x138>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x16(%rbp)
je     11aa <_man_name+0x9a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
setne  %al
mov    %al,-0x16(%rbp)
mov    -0x16(%rbp),%al
test   $0x1,%al
jne    11ba <_man_name+0xaa>
jmp    121a <_man_name+0x10a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <myisalnum@plt>
cmp    $0x0,%eax
jne    11ec <_man_name+0xdc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
je     11ec <_man_name+0xdc>
movq   $0x0,-0x8(%rbp)
jmp    1250 <_man_name+0x140>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%dl
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
movslq %eax,%rcx
lea    0x2e2e(%rip),%rax
mov    %dl,(%rax,%rcx,1)
jmp    1185 <_man_name+0x75>
cmpl   $0x0,-0x14(%rbp)
je     1243 <_man_name+0x133>
movslq -0x14(%rbp),%rcx
lea    0x2e11(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2e06(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1250 <_man_name+0x140>
jmp    1248 <_man_name+0x138>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_man_name>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
movzbl -0x1(%rbx),%eax
test   %al,%al
je     117e <_man_name+0x6e>
cmp    $0x22,%al
jne    1120 <_man_name+0x10>
lea    0x2f09(%rip),%r14
xor    %r15d,%r15d
jmp    1148 <_man_name+0x38>
nopl   0x0(%rax)
mov    %cl,(%r15,%r14,1)
add    $0x1,%r15
movzbl (%rbx,%r15,1),%eax
test   %al,%al
je     116f <_man_name+0x5f>
cmp    $0x22,%al
je     116f <_man_name+0x5f>
movsbl %al,%edi
call   1030 <myisalnum@plt>
movzbl (%rbx,%r15,1),%ecx
test   %eax,%eax
jne    1140 <_man_name+0x30>
cmp    $0x5f,%cl
mov    $0x5f,%cl
je     1140 <_man_name+0x30>
jmp    117e <_man_name+0x6e>
test   %r15d,%r15d
je     117e <_man_name+0x6e>
mov    %r15d,%eax
movb   $0x0,(%rax,%r14,1)
jmp    1181 <_man_name+0x71>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@_man_name.buf = internal global [256 x i8] zeroinitializer
define i8* @_man_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %17, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 34
br label %15
15: ; preds = %10, %5
%16 = phi i1 [ false, %5 ], [ %14, %10 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
br label %5
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 34
br i1 %24, label %25, label %67
25: ; preds = %20
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %3
br label %28
28: ; preds = %51, %25
%29 = load i8*, i8** %3
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %38
33: ; preds = %28
%34 = load i8*, i8** %3
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp ne i32 %36, 34
br label %38
38: ; preds = %33, %28
%39 = phi i1 [ false, %28 ], [ %37, %33 ]
br i1 %39, label %40, label %59
40: ; preds = %38
%41 = load i8*, i8** %3
%42 = load i8, i8* %41
%43 = call i32 @myisalnum(i8 signext %42)
%44 = icmp ne i32 %43, 0
br i1 %44, label %51, label %45
45: ; preds = %40
%46 = load i8*, i8** %3
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %48, 95
br i1 %49, label %50, label %51
50: ; preds = %45
store i8* null, i8** %2
br label %68
51: ; preds = %45, %40
%52 = load i8*, i8** %3
%53 = getelementptr inbounds i8, i8* %52, i32 1
store i8* %53, i8** %3
%54 = load i8, i8* %52
%55 = load i32, i32* %4
%56 = add nsw i32 %55, 1
store i32 %56, i32* %4
%57 = sext i32 %55 to i64
%58 = getelementptr inbounds [256 x i8], [256 x i8]* @_man_name.buf, i64 0, i64 %57
store i8 %54, i8* %58
br label %28
59: ; preds = %38
%60 = load i32, i32* %4
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %66
62: ; preds = %59
%63 = load i32, i32* %4
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [256 x i8], [256 x i8]* @_man_name.buf, i64 0, i64 %64
store i8 0, i8* %65
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @_man_name.buf, i64 0, i64 0), i8** %2
br label %68
66: ; preds = %59
br label %67
67: ; preds = %66, %20
store i8* null, i8** %2
br label %68
68: ; preds = %67, %62, %50
%69 = load i8*, i8** %2
ret i8* %69
}

LLVM IR (-O2):
@_man_name.buf = internal global [256 x i8] zeroinitializer
define i8* @_man_name(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 34, label %7
i8 0, label %28
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %18
%8 = phi i64 [ %20, %18 ], [ 0, %2 ]
%9 = phi i8* [ %10, %18 ], [ %3, %2 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
switch i8 %11, label %12 [
i8 0, label %22
i8 34, label %22
]
12: ; preds = %7
%13 = tail call i32 @myisalnum(i8 signext %11)
%14 = icmp eq i32 %13, 0
%15 = load i8, i8* %10
br i1 %14, label %16, label %18
16: ; preds = %12
%17 = icmp eq i8 %15, 95
br i1 %17, label %18, label %28
18: ; preds = %12, %16
%19 = phi i8 [ 95, %16 ], [ %15, %12 ]
%20 = add nuw i64 %8, 1
%21 = getelementptr inbounds [256 x i8], [256 x i8]* @_man_name.buf, i64 0, i64 %8
store i8 %19, i8* %21
br label %7
22: ; preds = %7, %7
%23 = trunc i64 %8 to i32
%24 = icmp eq i32 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = and i64 %8, 4294967295
%27 = getelementptr inbounds [256 x i8], [256 x i8]* @_man_name.buf, i64 0, i64 %26
store i8 0, i8* %27
br label %28
28: ; preds = %2, %16, %22, %25
%29 = phi i8* [ getelementptr inbounds ([256 x i8], [256 x i8]* @_man_name.buf, i64 0, i64 0), %25 ], [ null, %22 ], [ null, %16 ], [ null, %2 ]
ret i8* %29
}