// File: lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::parseVar(cashew::Parser<asmjs_ast::Node*, Builder>::Frag&, char*&, char const*)
NodeRef parseVar(Frag& frag, char*& src, const char* seps) {
    NodeRef ret = builder.makeVar(frag.str == CONST);
    while (1) {
      src = skipSpace(src);
      if (*src == ';') break;
      Frag name(src);
      assert(name.type == IDENT);
      NodeRef value;
      src += name.size;
      src = skipSpace(src);
      if (*src == '=') {
        src++;
        src = skipSpace(src);
        value = parseElement(src, ";,");
      }
      builder.appendToVar(ret, name.str, value);
      src = skipSpace(src);
      if (*src && *src == ';') break;
      if (*src && *src == ',') {
        src++;
        continue;
      }
      assert(0);
    }
    assert(*src == ';');
    src++;
    return ret;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
addq $0x28, %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x16a6d(%rip), %rsi     # 0x22220
callq 0x6680
movq -0x50(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0xc630
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x5d30
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0xb7f5
jmp 0xb941
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq -0x38(%rbp), %rdi
callq 0x5f00
cmpl $0x2, -0x2c(%rbp)
jne 0xb80d
jmp 0xb82c
leaq 0x9e7e(%rip), %rdi      # 0x15692
leaq 0x9aec(%rip), %rsi      # 0x15307
movl $0x182, %edx            # imm = 0x182
leaq 0x9e7e(%rip), %rcx      # 0x156a5
callq 0x2130
movl -0x30(%rbp), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x5d30
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0xb8a0
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x5d30
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rsi
leaq 0x9e9b(%rip), %rdx      # 0x15732
callq 0x9850
movq %rax, -0x40(%rbp)
movq -0x58(%rbp), %rdi
addq $0x28, %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rdx
callq 0xc670
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x5d30
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0xb8f4
movq -0x18(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0xb8f4
jmp 0xb941
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0xb922
movq -0x18(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0xb922
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0xb7cb
leaq 0xa292(%rip), %rdi      # 0x15bbb
leaq 0x99d7(%rip), %rsi      # 0x15307
movl $0x192, %edx            # imm = 0x192
leaq 0x9d69(%rip), %rcx      # 0x156a5
callq 0x2130
movq -0x18(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0xb952
jmp 0xb971
leaq 0x9ddc(%rip), %rdi      # 0x15735
leaq 0x99a7(%rip), %rsi      # 0x15307
movl $0x194, %edx            # imm = 0x194
leaq 0x9d39(%rip), %rcx      # 0x156a5
callq 0x2130
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)