// File: metopa[P]HTTP_Server/src/config/CParserINI.cpp
// Function: CParserINI::getIdentifier(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned int&)
string CParserINI::getIdentifier( string& line, unsigned int& pos ) {
	string currentArg( "" );
	int delim;

	skipWS( line, pos );
	if ( pos == line.size() )
		throw INIParserException( "End of line reached (identifier expected)" );

	if ( line[pos] == '\'' || line[pos] == '"' ) {
		delim = line[pos++];
		while ( pos < line.size() ) {
			if ( line[pos] == delim ) {
				delim = -1;
				break;
			}
			currentArg.insert( currentArg.end(), line[pos] );
			pos++;
		}

		if ( delim != -1 )
			throw INIParserException( "End of line reached (quotation mark expected)" );
		pos++;
		return currentArg;
	}

	while ( pos < line.size() ) {
		if ( isValidArgChar( line[pos] ) )
			currentArg.insert( currentArg.end(), line[pos++] );
		else
			break;
	}

	if ( currentArg.empty() )
		throw INIParserException( "Empty identifier" );

	return currentArg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movb $0x0, -0x21(%rbp)
leaq -0x22(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x6930
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0x196d8(%rip), %rsi     # 0x2cecc
callq 0xa9d0
jmp 0x137fb
leaq -0x22(%rbp), %rdi
callq 0x6550
movq -0x88(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x13110
jmp 0x1381a
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6360
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jne 0x138cf
movl $0x48, %edi
callq 0x6280
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
leaq 0x18acb(%rip), %rsi     # 0x2c32c
callq 0x13ea0
jmp 0x13868
movq -0xa0(%rbp), %rdi
leaq 0x2acaa(%rip), %rsi     # 0x3e520
leaq 0x6d3(%rip), %rdx       # 0x13f50
callq 0x68e0
jmp 0x13c21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x22(%rbp), %rdi
callq 0x6550
jmp 0x13c18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x13c0f
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x63b0
jmp 0x13c0f
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x6a00
movq %rax, -0xa8(%rbp)
jmp 0x138e9
movq -0xa8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
je 0x13925
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x6a00
movq %rax, -0xb0(%rbp)
jmp 0x13912
movq -0xb0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x13a9e
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movl %ecx, %esi
movl %esi, %ecx
incl %ecx
movl %ecx, (%rax)
callq 0x6a00
movq %rax, -0xb8(%rbp)
jmp 0x13945
movq -0xb8(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xc0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6360
movq %rax, %rcx
movq -0xc0(%rbp), %rax
cmpq %rcx, %rax
jae 0x13a1c
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x6a00
movq %rax, -0xc8(%rbp)
jmp 0x13995
movq -0xc8(%rbp), %rax
movsbl (%rax), %eax
cmpl -0x38(%rbp), %eax
jne 0x139ad
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
jmp 0x13a1c
movq -0x80(%rbp), %rdi
callq 0x62f0
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x14130
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x6a00
movq %rax, -0xd0(%rbp)
jmp 0x139e1
movq -0x80(%rbp), %rdi
movq -0xd0(%rbp), %rax
movsbl (%rax), %edx
movq -0x40(%rbp), %rsi
callq 0x6990
movq %rax, -0xd8(%rbp)
jmp 0x13a01
movq -0xd8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x13952
cmpl $-0x1, -0x38(%rbp)
je 0x13a83
movl $0x48, %edi
callq 0x6280
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xe0(%rbp)
leaq 0x18916(%rip), %rsi     # 0x2c356
callq 0x13ea0
jmp 0x13a47
movq -0xe0(%rbp), %rdi
leaq 0x2aacb(%rip), %rsi     # 0x3e520
leaq 0x4f4(%rip), %rdx       # 0x13f50
callq 0x68e0
jmp 0x13c21
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x63b0
jmp 0x13c0f
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movb $0x1, -0x21(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0x13bf0
jmp 0x13aa0
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xe8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6360
movq %rax, %rcx
movq -0xe8(%rbp), %rax
cmpq %rcx, %rax
jae 0x13b7b
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x6a00
movq %rax, -0xf0(%rbp)
jmp 0x13ae3
movq -0x88(%rbp), %rdi
movq -0xf0(%rbp), %rax
movsbl (%rax), %esi
callq 0x13700
movb %al, -0xf1(%rbp)
jmp 0x13b01
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x13b0d
jmp 0x13b74
movq -0x80(%rbp), %rdi
callq 0x62f0
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x14130
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movl %ecx, %esi
movl %esi, %ecx
incl %ecx
movl %ecx, (%rax)
callq 0x6a00
movq %rax, -0x100(%rbp)
jmp 0x13b47
movq -0x80(%rbp), %rdi
movq -0x100(%rbp), %rax
movsbl (%rax), %edx
movq -0x60(%rbp), %rsi
callq 0x6990
movq %rax, -0x108(%rbp)
jmp 0x13b67
movq -0x108(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x13b76
jmp 0x13b7b
jmp 0x13aa0
movq -0x80(%rbp), %rdi
callq 0x68a0
testb $0x1, %al
jne 0x13b8a
jmp 0x13be5
movl $0x48, %edi
callq 0x6280
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x110(%rbp)
leaq 0x187dc(%rip), %rsi     # 0x2c384
callq 0x13ea0
jmp 0x13baf
movq -0x110(%rbp), %rdi
leaq 0x2a963(%rip), %rsi     # 0x3e520
leaq 0x38c(%rip), %rdx       # 0x13f50
callq 0x68e0
jmp 0x13c21
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x63b0
jmp 0x13c0f
movb $0x1, -0x21(%rbp)
movl $0x1, -0x54(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x13bff
movq -0x80(%rbp), %rdi
callq 0x6310
movq -0x90(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x6310
movq -0x30(%rbp), %rdi
callq 0x6920
nopw %cs:(%rax,%rax)