// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/FileParser.cpp
// Function: FileParser::newServer()
void FileParser::newServer(void)
{
	ServerInfo n_srv;
	while (_bracket > 0)
	{
		std::getline(_file, _buf);
		cleanLineFromSpaces(_buf);
		bracketRegulator(_bracket, _buf);

		if (!_buf.compare(0, 9, "location "))	
			newLocation(n_srv);
		else if (!_buf.compare(0, 7, "listen "))
			n_srv.setServer(LIS, 7, _buf);
		else if (!_buf.compare(0, 6, "error "))
			n_srv.setServer(ERR, 6, _buf);
		else if (!_buf.compare(0, 12, "server_name "))
			n_srv.setServer(SRV_N, 12, _buf);
		else if (!_buf.compare(0, 9, "max_body "))
			n_srv.setServer(BODY, 9, _buf);
		else if (!_buf.compare(0, 5, "host "))
			n_srv.setServer(HOST, 5, _buf);
		else if (!_buf.compare(0, 1, "}")) continue;
		else std::runtime_error(errParseMessage("error line : ", _buf.c_str(), ". Not accepting this input\n"));
	}
	addNewServerToMap(n_srv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x596c
cmpl $0x0, 0x228(%rbx)
jle 0x73db
leaq 0x228(%rbx), %r14
leaq 0x208(%rbx), %r15
leaq 0xe012(%rip), %r12      # 0x1520d
leaq -0xd8(%rbp), %r13
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x43b0
movsbl %al, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4740
movq %r15, %rdi
callq 0x9ea4
movq %r14, %rdi
movq %r15, %rsi
callq 0x9f09
movl $0x9, %edx
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x4510
testl %eax, %eax
je 0x7335
movl $0x7, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xdf5b(%rip), %rcx      # 0x151bd
callq 0x4510
testl %eax, %eax
je 0x7345
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xdf45(%rip), %rcx      # 0x151c5
callq 0x4510
testl %eax, %eax
je 0x735f
movl $0xc, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xdf2e(%rip), %rcx      # 0x151cc
callq 0x4510
testl %eax, %eax
je 0x737c
movl $0x9, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xdf1d(%rip), %rcx      # 0x151d9
callq 0x4510
testl %eax, %eax
je 0x7399
movl $0x5, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xdf09(%rip), %rcx      # 0x151e3
callq 0x4510
testl %eax, %eax
je 0x73b6
movl $0x1, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xde36(%rip), %rcx      # 0x1512e
callq 0x4510
testl %eax, %eax
je 0x73d1
movq (%r15), %rsi
leaq 0xde21(%rip), %rdi      # 0x15130
leaq 0xded3(%rip), %rdx      # 0x151e9
callq 0x9f70
leaq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x4620
leaq -0x40(%rbp), %rdi
callq 0x47b0
jmp 0x73d1
movq %rbx, %rdi
movq %r13, %rsi
callq 0x742c
jmp 0x73d1
movl $0x7, -0x2c(%rbp)
movq %r13, %rdi
xorl %esi, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bcc
jmp 0x73d1
movl $0x6, -0x2c(%rbp)
movq %r13, %rdi
movl $0x1, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bcc
jmp 0x73d1
movl $0xc, -0x2c(%rbp)
movq %r13, %rdi
movl $0x2, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bcc
jmp 0x73d1
movl $0x9, -0x2c(%rbp)
movq %r13, %rdi
movl $0x3, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bcc
jmp 0x73d1
movl $0x5, -0x2c(%rbp)
movq %r13, %rdi
movl $0x4, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bcc
cmpl $0x0, (%r14)
jg 0x7202
leaq -0xd8(%rbp), %rsi
movq %rbx, %rdi
callq 0x79a4
leaq -0xd8(%rbp), %rdi
callq 0x5b38
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7414
jmp 0x7414
jmp 0x7414
jmp 0x7414
jmp 0x7414
jmp 0x7414
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x5b38
movq %rbx, %rdi
callq 0x46d0
nop