// File: exrok[P]evdoublebind/./src/make_config.cc
// Function: ConfigParser::next()
bool next() {
        key = value = NULL;
        while (!end) {
            char *last; //last character in ident
            char *ident; //current token either value or key depending on state
            int state = 0;
            ident = last = c = skip_ws(c);
            while (1) {
                switch (*c) {
                    case ':':
                        if (state == 0) {
                            *(last+1) = '\0';
                            state = 1;
                            key = ident;
                            ident = c = skip_ws(c+1);
                            continue;
                        } else {
                            fprintf(stderr,"ERROR: unexpected ':' on line %d\n'", line + 1);
                            exit(1);
                        }
                        break;
                    case ' ': //Skip White Space
                    case '\t':
                        last = c-1;
                        c = skip_ws(c + 1);
                        continue;
                    case '#': //Skip Comment
                        c++;
                        while (*c && *c != '\n' ) c++; //Fallthougth
                    case '\n':
                    case '\0':
                        goto end_line;
                }
                last = c++;
            }
        end_line:
            line++;
            end = (*c == '\0');
            if (state == 1 && last != ident) {
                *(last+1) = '\0';
                value = ident;
                c++;
                return true;
            }
            c++;
        }
        return false;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x10(%rax)
movq $0x0, 0x8(%rax)
movq 0x18(%rsp), %rax
movb 0x1c(%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4cc6
jmp 0x4e99
movq 0x18(%rsp), %rax
movl $0x0, 0x24(%rsp)
movq (%rax), %rdi
callq 0x35f0
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq %rax, 0x30(%rsp)
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x3a, %eax
ja 0x4e0e
movq 0x10(%rsp), %rax
leaq 0x12f0(%rip), %rcx      # 0x6004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0x24(%rsp)
jne 0x4d5e
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
movb $0x0, 0x1(%rcx)
movl $0x1, 0x24(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq (%rax), %rdi
addq $0x1, %rdi
callq 0x35f0
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq %rax, 0x28(%rsp)
jmp 0x4ced
movq 0x18(%rsp), %rax
movq 0x528e(%rip), %rcx      # 0x9ff8
movq (%rcx), %rdi
movl 0x18(%rax), %edx
addl $0x1, %edx
leaq 0x2b2e(%rip), %rsi      # 0x78a8
movb $0x0, %al
callq 0x3130
movl $0x1, %edi
callq 0x3220
movq 0x18(%rsp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x30(%rsp)
movq (%rax), %rdi
addq $0x1, %rdi
callq 0x35f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
jmp 0x4ced
movq 0x18(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, 0xf(%rsp)
je 0x4def
movq 0x18(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x4df9
jmp 0x4e0a
movq 0x18(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x4dc7
jmp 0x4e0c
jmp 0x4e2a
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
movq %rax, 0x30(%rsp)
jmp 0x4ced
movq 0x18(%rsp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq (%rax), %rcx
movsbl (%rcx), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x1c(%rax)
cmpl $0x1, 0x24(%rsp)
jne 0x4e85
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
je 0x4e85
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
movb $0x0, 0x1(%rcx)
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movb $0x1, 0x47(%rsp)
jmp 0x4e9e
movq 0x18(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x4cb3
movb $0x0, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax)