#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__ ispunct(char);
char *token_skip_space(char *);
char *get_token(char **s) {
  static char buffer[4096];
  char *buf_ptr = buffer;
  *s = token_skip_space(*s);
  if (!**s)
    return "";
  if (**s == '\'') {
    *buf_ptr++ = **s;
    (*s)++;
    while (**s && **s != '\'') {
      *buf_ptr++ = **s;
      (*s)++;
    }
    *buf_ptr++ = **s;
    (*s)++;
    *buf_ptr = '\0';
    return buffer;
  }
  if ((**s == 13) || (**s == 10)) {
    *buf_ptr = '\0';
    return buffer;
  }
  if (ispunct(**s)) {
    *buf_ptr++ = **s;
    (*s)++;
    *buf_ptr = '\0';
    return buffer;
  }
  while ((**s && isalnum(**s)) || **s == '_' || **s == '.') {
    *buf_ptr++ = **s;
    (*s)++;
  }
  *buf_ptr = '\0';
  return buffer;
}


x86 assembly (clang, -O0):
<get_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0x2f0d(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <token_skip_space@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmpb   $0x0,(%rax)
jne    117d <get_token+0x4d>
lea    0xe8c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13a7 <get_token+0x277>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    125f <get_token+0x12f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     11e3 <get_token+0xb3>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    11f3 <get_token+0xc3>
jmp    1220 <get_token+0xf0>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    11b8 <get_token+0x88>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2dfa(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13a7 <get_token+0x277>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     1285 <get_token+0x155>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    129c <get_token+0x16c>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2dbd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13a7 <get_token+0x277>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1050 <ispunct@plt>
cmp    $0x0,%rax
je     12f4 <get_token+0x1c4>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2d65(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13a7 <get_token+0x277>
jmp    12f9 <get_token+0x1c9>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     132d <get_token+0x1fd>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1040 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1a(%rbp)
jne    1358 <get_token+0x228>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x1a(%rbp)
je     1358 <get_token+0x228>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
sete   %al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
test   $0x1,%al
jne    1368 <get_token+0x238>
jmp    1395 <get_token+0x265>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    12f9 <get_token+0x1c9>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2cad(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_token>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    (%rdi),%rdi
call   1030 <token_skip_space@plt>
mov    %rax,(%r15)
movzbl (%rax),%eax
cmp    $0x27,%rax
ja     1176 <get_token+0x46>
lea    0xf4d(%rip),%r14
lea    0xea6(%rip),%rcx
movslq (%rcx,%rax,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
movb   $0x0,0x2ee6(%rip)
lea    0x2edf(%rip),%r14
jmp    1248 <get_token+0x118>
movsbl %al,%edi
call   1050 <ispunct@plt>
mov    (%r15),%rcx
mov    (%rcx),%cl
test   %rax,%rax
je     11f3 <get_token+0xc3>
mov    %cl,0x2ec2(%rip)
lea    0x2ebb(%rip),%r14
addq   $0x1,(%r15)
movb   $0x0,0x2eb1(%rip)
jmp    1248 <get_token+0x118>
movb   $0x27,0x2ea4(%rip)
lea    0x2e9f(%rip),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r15),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%r15)
movzbl 0x1(%rcx),%ecx
test   %cl,%cl
je     11e0 <get_token+0xb0>
cmp    $0x27,%cl
je     11e0 <get_token+0xb0>
mov    %cl,-0x1(%rax)
add    $0x1,%rax
jmp    11c0 <get_token+0x90>
mov    %cl,-0x1(%rax)
addq   $0x1,(%r15)
movb   $0x0,(%rax)
lea    0x2e5f(%rip),%r14
jmp    1248 <get_token+0x118>
lea    0x2e56(%rip),%r14
mov    %r14,%rbx
test   %cl,%cl
je     1245 <get_token+0x115>
lea    0x2e48(%rip),%rbx
jmp    1228 <get_token+0xf8>
nopw   0x0(%rax,%rax,1)
mov    %cl,(%rbx)
add    $0x1,%rbx
mov    (%r15),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%r15)
movzbl 0x1(%rax),%ecx
test   %cl,%cl
je     1245 <get_token+0x115>
movsbl %cl,%edi
call   1040 <isalnum@plt>
mov    (%r15),%rcx
movzbl (%rcx),%ecx
test   %rax,%rax
jne    1210 <get_token+0xe0>
cmp    $0x5f,%cl
je     1210 <get_token+0xe0>
cmp    $0x2e,%cl
je     1210 <get_token+0xe0>
movb   $0x0,(%rbx)
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@get_token.buffer = internal global [4096 x i8] zeroinitializer
@.str = [1 x i8] zeroinitializer
define i8* @get_token(i8** %0) {
%2 = alloca i8*
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = call i8* @token_skip_space(i8* %6)
%8 = load i8**, i8*** %3
store i8* %7, i8** %8
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %130
14: ; preds = %1
%15 = load i8**, i8*** %3
%16 = load i8*, i8** %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 39
br i1 %19, label %20, label %62
20: ; preds = %14
%21 = load i8**, i8*** %3
%22 = load i8*, i8** %21
%23 = load i8, i8* %22
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %4
store i8 %23, i8* %24
%26 = load i8**, i8*** %3
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %26
br label %29
29: ; preds = %43, %20
%30 = load i8**, i8*** %3
%31 = load i8*, i8** %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %41
35: ; preds = %29
%36 = load i8**, i8*** %3
%37 = load i8*, i8** %36
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp ne i32 %39, 39
br label %41
41: ; preds = %35, %29
%42 = phi i1 [ false, %29 ], [ %40, %35 ]
br i1 %42, label %43, label %52
43: ; preds = %41
%44 = load i8**, i8*** %3
%45 = load i8*, i8** %44
%46 = load i8, i8* %45
%47 = load i8*, i8** %4
%48 = getelementptr inbounds i8, i8* %47, i32 1
store i8* %48, i8** %4
store i8 %46, i8* %47
%49 = load i8**, i8*** %3
%50 = load i8*, i8** %49
%51 = getelementptr inbounds i8, i8* %50, i32 1
store i8* %51, i8** %49
br label %29
52: ; preds = %41
%53 = load i8**, i8*** %3
%54 = load i8*, i8** %53
%55 = load i8, i8* %54
%56 = load i8*, i8** %4
%57 = getelementptr inbounds i8, i8* %56, i32 1
store i8* %57, i8** %4
store i8 %55, i8* %56
%58 = load i8**, i8*** %3
%59 = load i8*, i8** %58
%60 = getelementptr inbounds i8, i8* %59, i32 1
store i8* %60, i8** %58
%61 = load i8*, i8** %4
store i8 0, i8* %61
store i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), i8** %2
br label %130
62: ; preds = %14
%63 = load i8**, i8*** %3
%64 = load i8*, i8** %63
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = icmp eq i32 %66, 13
br i1 %67, label %74, label %68
68: ; preds = %62
%69 = load i8**, i8*** %3
%70 = load i8*, i8** %69
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = icmp eq i32 %72, 10
br i1 %73, label %74, label %76
74: ; preds = %68, %62
%75 = load i8*, i8** %4
store i8 0, i8* %75
store i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), i8** %2
br label %130
76: ; preds = %68
%77 = load i8**, i8*** %3
%78 = load i8*, i8** %77
%79 = load i8, i8* %78
%80 = call i64 @ispunct(i8 signext %79)
%81 = icmp ne i64 %80, 0
br i1 %81, label %82, label %92
82: ; preds = %76
%83 = load i8**, i8*** %3
%84 = load i8*, i8** %83
%85 = load i8, i8* %84
%86 = load i8*, i8** %4
%87 = getelementptr inbounds i8, i8* %86, i32 1
store i8* %87, i8** %4
store i8 %85, i8* %86
%88 = load i8**, i8*** %3
%89 = load i8*, i8** %88
%90 = getelementptr inbounds i8, i8* %89, i32 1
store i8* %90, i8** %88
%91 = load i8*, i8** %4
store i8 0, i8* %91
store i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), i8** %2
br label %130
92: ; preds = %76
br label %93
93: ; preds = %119, %92
%94 = load i8**, i8*** %3
%95 = load i8*, i8** %94
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = icmp ne i32 %97, 0
br i1 %98, label %99, label %105
99: ; preds = %93
%100 = load i8**, i8*** %3
%101 = load i8*, i8** %100
%102 = load i8, i8* %101
%103 = call i64 @isalnum(i8 signext %102)
%104 = icmp ne i64 %103, 0
br i1 %104, label %117, label %105
105: ; preds = %99, %93
%106 = load i8**, i8*** %3
%107 = load i8*, i8** %106
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = icmp eq i32 %109, 95
br i1 %110, label %117, label %111
111: ; preds = %105
%112 = load i8**, i8*** %3
%113 = load i8*, i8** %112
%114 = load i8, i8* %113
%115 = sext i8 %114 to i32
%116 = icmp eq i32 %115, 46
br label %117
117: ; preds = %111, %105, %99
%118 = phi i1 [ true, %105 ], [ true, %99 ], [ %116, %111 ]
br i1 %118, label %119, label %128
119: ; preds = %117
%120 = load i8**, i8*** %3
%121 = load i8*, i8** %120
%122 = load i8, i8* %121
%123 = load i8*, i8** %4
%124 = getelementptr inbounds i8, i8* %123, i32 1
store i8* %124, i8** %4
store i8 %122, i8* %123
%125 = load i8**, i8*** %3
%126 = load i8*, i8** %125
%127 = getelementptr inbounds i8, i8* %126, i32 1
store i8* %127, i8** %125
br label %93
128: ; preds = %117
%129 = load i8*, i8** %4
store i8 0, i8* %129
store i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), i8** %2
br label %130
130: ; preds = %128, %82, %74, %52, %13
%131 = load i8*, i8** %2
ret i8* %131
}

LLVM IR (-O2):
@get_token.buffer = internal global [4096 x i8] zeroinitializer
@.str = [1 x i8] zeroinitializer
define i8* @get_token(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i8* @token_skip_space(i8* %2)
store i8* %3, i8** %0
%4 = load i8, i8* %3
switch i8 %4, label %18 [
i8 0, label %44
i8 39, label %5
i8 13, label %17
i8 10, label %17
]
5: ; preds = %1
store i8 39, i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0)
br label %6
6: ; preds = %11, %5
%7 = phi i8* [ getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 1), %5 ], [ %12, %11 ]
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %9, i8** %0
%10 = load i8, i8* %9
switch i8 %10, label %11 [
i8 0, label %13
i8 39, label %13
]
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %10, i8* %7
br label %6
13: ; preds = %6, %6
%14 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %10, i8* %7
%15 = load i8*, i8** %0
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8* %16, i8** %0
store i8 0, i8* %14
br label %44
17: ; preds = %1, %1
store i8 0, i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0)
br label %44
18: ; preds = %1
%19 = tail call i64 @ispunct(i8 signext %4)
%20 = icmp eq i64 %19, 0
%21 = load i8*, i8** %0
%22 = load i8, i8* %21
br i1 %20, label %23, label %25
23: ; preds = %18
%24 = icmp eq i8 %22, 0
br i1 %24, label %42, label %28
25: ; preds = %18
store i8 %22, i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0)
%26 = load i8*, i8** %0
%27 = getelementptr inbounds i8, i8* %26, i64 1
store i8* %27, i8** %0
store i8 0, i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 1)
br label %44
28: ; preds = %23, %36
%29 = phi i8 [ %40, %36 ], [ %22, %23 ]
%30 = phi i8* [ %37, %36 ], [ getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), %23 ]
%31 = tail call i64 @isalnum(i8 signext %29)
%32 = icmp eq i64 %31, 0
%33 = load i8*, i8** %0
%34 = load i8, i8* %33
br i1 %32, label %35, label %36
35: ; preds = %28
switch i8 %34, label %42 [
i8 95, label %36
i8 46, label %36
]
36: ; preds = %28, %35, %35
%37 = getelementptr inbounds i8, i8* %30, i64 1
store i8 %34, i8* %30
%38 = load i8*, i8** %0
%39 = getelementptr inbounds i8, i8* %38, i64 1
store i8* %39, i8** %0
%40 = load i8, i8* %39
%41 = icmp eq i8 %40, 0
br i1 %41, label %42, label %28
42: ; preds = %35, %36, %23
%43 = phi i8* [ getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), %23 ], [ %30, %35 ], [ %37, %36 ]
store i8 0, i8* %43
br label %44
44: ; preds = %1, %42, %25, %17, %13
%45 = phi i8* [ getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), %13 ], [ getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), %17 ], [ getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), %25 ], [ getelementptr inbounds ([4096 x i8], [4096 x i8]* @get_token.buffer, i64 0, i64 0), %42 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %45
}