// File: /workspace/github_cpp_makefile_star2_O3/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::Frag::Frag(char*)
explicit Frag(char* src) {
      assert(!isSpace(*src));
      char *start = src;
      if (isIdentInit(*src)) {
        // read an identifier or a keyword
        src++;
        while (isIdentPart(*src)) {
          src++;
        }
        if (*src == 0) {
          str.set(start);
        } else {
          char temp = *src;
          *src = 0;
          str.set(start, false);
          *src = temp;
        }
        type = keywords.has(str) ? KEYWORD : IDENT;
      } else if (*src == '"' || *src == '\'') {
        char *end = strchr(src+1, *src);
        *end = 0;
        str.set(src+1);
        src = end+1;
        type = STRING;
      } else if (isDigit(*src) || (src[0] == '.' && isDigit(src[1]))) {
        if (src[0] == '0' && (src[1] == 'x' || src[1] == 'X')) {
          // Explicitly parse hex numbers of form "0x...", because strtod
          // supports hex number strings only in C++11, and Visual Studio 2013 does
          // not yet support that functionality.
          src += 2;
          num = 0;
          while (1) {
            if (*src >= '0' && *src <= '9') { num *= 16; num += *src - '0'; }
            else if (*src >= 'a' && *src <= 'f') { num *= 16; num += *src - 'a' + 10; }
            else if (*src >= 'A' && *src <= 'F') { num *= 16; num += *src - 'F' + 10; }
            else break;
            src++;
          }
        } else {
          num = strtod(start, &src);
        }
        // asm.js must have a '.' for double values. however, we also tolerate
        // uglify's tendency to emit without a '.' (and fix it later with a +).
        // for valid asm.js input, the '.' should be enough, and for uglify
        // in the emscripten optimizer pipeline, we use simple_ast where INT/DOUBLE
        // is quite the same at this point anyhow
        type = (std::find(start, src, '.') == src && is32Bit(num)) ? INT : DOUBLE;
        assert(src > start);
      } else if (hasChar(OPERATOR_INITS, *src)) {
        switch (*src) {
          case '!': str = src[1] == '=' ? NE : L_NOT; break;
          case '%': str = MOD; break;
          case '&': str = AND; break;
          case '*': str = MUL; break;
          case '+': str = PLUS; break;
          case ',': str = COMMA; break;
          case '-': str = MINUS; break;
          case '.': str = PERIOD; break;
          case '/': str = DIV; break;
          case ':': str = COLON; break;
          case '<': str = src[1] == '<' ? LSHIFT : (src[1] == '=' ? LE : LT); break;
          case '=': str = src[1] == '=' ? EQ : SET; break;
          case '>': str = src[1] == '>' ? (src[2] == '>' ? TRSHIFT : RSHIFT) : (src[1] == '=' ? GE : GT); break;
          case '?': str = QUESTION; break;
          case '^': str = XOR; break;
          case '|': str = OR; break;
          case '~': str = B_NOT; break;
        }
        assert(!str.isNull());
        size = strlen(str.str);
#ifndef NDEBUG
        char temp = start[size];
        start[size] = 0;
        assert(strcmp(str.str, start) == 0);
        start[size] = temp;
#endif
        type = OPERATOR;
        return;
      } else if (hasChar(SEPARATORS, *src)) {
        type = SEPARATOR;
        char temp = src[1];
        src[1] = 0;
        str.set(src, false);
        src[1] = temp;
        src++;
      } else {
        dump("frag parsing", src);
        assert(0);
      }
      size = src - start;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movzbl (%rsi), %eax
cmpq $0x20, %rax
ja 0x3738
movabsq $0x100002600, %rcx      # imm = 0x100002600
btq %rax, %rcx
jb 0x3b2b
movsbl %al, %edi
callq 0x6c0f
testb %al, %al
je 0x3776
movq %rbx, %r15
movsbl 0x1(%r15), %edi
incq %r15
callq 0x6c34
testb %al, %al
jne 0x3747
movb (%r15), %bpl
testb %bpl, %bpl
je 0x37b2
movb $0x0, (%r15)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3e96
movb %bpl, (%r15)
jmp 0x37c2
movzbl (%rbx), %esi
cmpl $0x27, %esi
je 0x3783
cmpl $0x22, %esi
jne 0x37f3
leaq 0x1(%rbx), %r12
movq %r12, %rdi
callq 0x2060
movq %rax, %r15
movb $0x0, (%rax)
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x3e96
incq %r15
movl $0x3, 0xc(%r14)
jmp 0x37df
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x3e96
leaq 0x9c77(%rip), %rdi      # 0xd440
movq %r14, %rsi
callq 0x435c
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
addl %ecx, %ecx
movl %ecx, 0xc(%r14)
subl %ebx, %r15d
movl %r15d, 0x8(%r14)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leal -0x30(%rsi), %eax
cmpb $0xa, %al
jae 0x3876
cmpl $0x30, %esi
jne 0x3884
movzbl 0x1(%rbx), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x3884
leaq 0x2(%rbx), %r15
movq $0x0, (%r14)
xorpd %xmm0, %xmm0
movsd 0x47fa(%rip), %xmm1     # 0x8020
movb (%r15), %al
leal -0x30(%rax), %edx
movl $0xffffffd0, %ecx       # imm = 0xFFFFFFD0
cmpb $0xa, %dl
jb 0x3852
leal -0x61(%rax), %edx
movl $0xffffffa9, %ecx       # imm = 0xFFFFFFA9
cmpb $0x6, %dl
jb 0x3852
addb $-0x41, %al
movl $0xffffffc4, %ecx       # imm = 0xFFFFFFC4
cmpb $0x5, %al
ja 0x38f9
mulsd %xmm1, %xmm0
movsd %xmm0, (%r14)
movsbl (%r15), %eax
addl %ecx, %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
addsd %xmm2, %xmm0
movsd %xmm0, (%r14)
incq %r15
jmp 0x3826
cmpl $0x2e, %esi
jne 0x389e
movb 0x1(%rbx), %al
addb $-0x30, %al
cmpb $0xa, %al
jae 0x389e
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2120
movsd %xmm0, (%r14)
movq (%r15), %r15
jmp 0x38fe
leaq 0x98db(%rip), %rax      # 0xd180
movq (%rax), %rax
movb (%rax), %cl
cmpb %sil, %cl
je 0x38b6
incq %rax
testb %cl, %cl
jne 0x38a8
testb %cl, %cl
je 0x3966
cmpl $0x5d, %esi
jg 0x39b0
addl $-0x21, %esi
cmpl $0x1e, %esi
ja 0x3aa0
leaq 0x474e(%rip), %rax      # 0x8028
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpb $0x3d, 0x1(%rbx)
jne 0x3abb
leaq 0x9a34(%rip), %rax      # 0xd328
jmp 0x3ae9
movq %r15, 0x8(%rsp)
leaq 0x7(%rsp), %rdx
movb $0x2e, (%rdx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x43ef
movl $0x5, %ecx
cmpq %r15, %rax
jne 0x394f
movsd (%r14), %xmm0
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
cvttsd2si %xmm0, %rax
movl %eax, %eax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
cmpeqpd %xmm0, %xmm1
cmpeqpd %xmm0, %xmm2
orpd %xmm1, %xmm2
movd %xmm2, %ecx
andl $0x1, %ecx
xorl $0x5, %ecx
movl %ecx, 0xc(%r14)
cmpq %rbx, %r15
jbe 0x3b4a
movq 0x8(%rsp), %r15
jmp 0x37df
leaq 0x981b(%rip), %rax      # 0xd188
movq (%rax), %rax
movb (%rax), %cl
cmpb %sil, %cl
je 0x397e
incq %rax
testb %cl, %cl
jne 0x3970
testb %cl, %cl
je 0x3ba7
movl $0x6, 0xc(%r14)
leaq 0x1(%rbx), %r15
movb 0x1(%rbx), %bpl
movb $0x0, 0x1(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3e96
movb %bpl, 0x1(%rbx)
jmp 0x37df
cmpl $0x5e, %esi
je 0x3a97
cmpl $0x7c, %esi
je 0x3a8e
cmpl $0x7e, %esi
jne 0x3aa0
leaq 0x9926(%rip), %rax      # 0xd2f8
jmp 0x3ae9
cmpb $0x3d, 0x1(%rbx)
jne 0x3aa5
leaq 0x9938(%rip), %rax      # 0xd320
jmp 0x3ae9
leaq 0x9a1c(%rip), %rax      # 0xd410
jmp 0x3ae9
movb 0x1(%rbx), %al
cmpb $0x3e, %al
jne 0x3aae
cmpb $0x3e, 0x2(%rbx)
jne 0x3ad9
leaq 0x9943(%rip), %rax      # 0xd358
jmp 0x3ae9
leaq 0x99bf(%rip), %rax      # 0xd3e0
jmp 0x3ae9
leaq 0x98a3(%rip), %rax      # 0xd2d0
jmp 0x3ae9
leaq 0x9907(%rip), %rax      # 0xd340
jmp 0x3ae9
leaq 0x9883(%rip), %rax      # 0xd2c8
jmp 0x3ae9
leaq 0x98df(%rip), %rax      # 0xd330
jmp 0x3ae9
leaq 0x9883(%rip), %rax      # 0xd2e0
jmp 0x3ae9
leaq 0x98cf(%rip), %rax      # 0xd338
jmp 0x3ae9
leaq 0x997e(%rip), %rax      # 0xd3f0
jmp 0x3ae9
movb 0x1(%rbx), %cl
cmpb $0x3d, %cl
jne 0x3ac4
leaq 0x988d(%rip), %rax      # 0xd310
jmp 0x3acb
leaq 0x995c(%rip), %rax      # 0xd3e8
jmp 0x3ae9
leaq 0x9843(%rip), %rax      # 0xd2d8
jmp 0x3ae9
leaq 0x984a(%rip), %rax      # 0xd2e8
jmp 0x3ae9
movq (%r14), %rdi
jmp 0x3aef
leaq 0x998c(%rip), %rax      # 0xd438
jmp 0x3ae9
cmpb $0x3d, %al
jne 0x3ae2
leaq 0x984f(%rip), %rax      # 0xd308
jmp 0x3ae9
leaq 0x982e(%rip), %rax      # 0xd2f0
jmp 0x3ae9
leaq 0x9835(%rip), %rax      # 0xd300
cmpb $0x3c, %cl
jne 0x3ae9
leaq 0x9879(%rip), %rax      # 0xd350
jmp 0x3ae9
leaq 0x9868(%rip), %rax      # 0xd348
jmp 0x3ae9
leaq 0x982f(%rip), %rax      # 0xd318
movq (%rax), %rdi
movq %rdi, (%r14)
testq %rdi, %rdi
je 0x3b69
callq 0x2090
movl %eax, 0x8(%r14)
cltq
movb (%rbx,%rax), %bpl
movb $0x0, (%rbx,%rax)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21f0
testl %eax, %eax
jne 0x3b88
movslq 0x8(%r14), %rax
movb %bpl, (%rbx,%rax)
movl $0x1, 0xc(%r14)
jmp 0x37e6
leaq 0x46b6(%rip), %rdi      # 0x81e8
leaq 0x46be(%rip), %rsi      # 0x81f7
leaq 0x46cb(%rip), %rcx      # 0x820b
movl $0xc1, %edx
callq 0x2100
leaq 0x472a(%rip), %rdi      # 0x827b
leaq 0x469f(%rip), %rsi      # 0x81f7
leaq 0x46ac(%rip), %rcx      # 0x820b
movl $0xef, %edx
callq 0x2100
leaq 0x4717(%rip), %rdi      # 0x8287
leaq 0x4680(%rip), %rsi      # 0x81f7
leaq 0x468d(%rip), %rcx      # 0x820b
movl $0x104, %edx            # imm = 0x104
callq 0x2100
leaq 0x4706(%rip), %rdi      # 0x8295
leaq 0x4661(%rip), %rsi      # 0x81f7
leaq 0x466e(%rip), %rcx      # 0x820b
movl $0x109, %edx            # imm = 0x109
callq 0x2100
leaq 0x4703(%rip), %rdi      # 0x82b1
movq %rbx, %rsi
callq 0x22c0
leaq 0x4eeb(%rip), %rdi      # 0x8aa8
leaq 0x4633(%rip), %rsi      # 0x81f7
leaq 0x4640(%rip), %rcx      # 0x820b
movl $0x117, %edx            # imm = 0x117
callq 0x2100
nop