// File: /workspace/github_cpp_makefile_star2_O3/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 0x5974
cmpl $0x0, 0x228(%rbx)
jle 0x741f
leaq 0x228(%rbx), %r14
leaq 0x208(%rbx), %r15
leaq 0xdfce(%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 0x9f0c
movq %r14, %rdi
movq %r15, %rsi
callq 0x9f80
movl $0x9, %edx
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x4510
testl %eax, %eax
je 0x7379
movl $0x7, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xdf17(%rip), %rcx      # 0x151bd
callq 0x4510
testl %eax, %eax
je 0x7389
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xdf01(%rip), %rcx      # 0x151c5
callq 0x4510
testl %eax, %eax
je 0x73a3
movl $0xc, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xdeea(%rip), %rcx      # 0x151cc
callq 0x4510
testl %eax, %eax
je 0x73c0
movl $0x9, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xded9(%rip), %rcx      # 0x151d9
callq 0x4510
testl %eax, %eax
je 0x73dd
movl $0x5, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xdec5(%rip), %rcx      # 0x151e3
callq 0x4510
testl %eax, %eax
je 0x73fa
movl $0x1, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0xddf2(%rip), %rcx      # 0x1512e
callq 0x4510
testl %eax, %eax
je 0x7415
movq (%r15), %rsi
leaq 0xdddd(%rip), %rdi      # 0x15130
leaq 0xde8f(%rip), %rdx      # 0x151e9
callq 0x9fe7
leaq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x4620
leaq -0x40(%rbp), %rdi
callq 0x47b0
jmp 0x7415
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7470
jmp 0x7415
movl $0x7, -0x2c(%rbp)
movq %r13, %rdi
xorl %esi, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bd4
jmp 0x7415
movl $0x6, -0x2c(%rbp)
movq %r13, %rdi
movl $0x1, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bd4
jmp 0x7415
movl $0xc, -0x2c(%rbp)
movq %r13, %rdi
movl $0x2, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bd4
jmp 0x7415
movl $0x9, -0x2c(%rbp)
movq %r13, %rdi
movl $0x3, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bd4
jmp 0x7415
movl $0x5, -0x2c(%rbp)
movq %r13, %rdi
movl $0x4, %esi
leaq -0x2c(%rbp), %rdx
movq %r15, %rcx
callq 0x5bd4
cmpl $0x0, (%r14)
jg 0x7246
leaq -0xd8(%rbp), %rsi
movq %rbx, %rdi
callq 0x79e8
leaq -0xd8(%rbp), %rdi
callq 0x5b40
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7458
jmp 0x7458
jmp 0x7458
jmp 0x7458
jmp 0x7458
jmp 0x7458
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x5b40
movq %rbx, %rdi
callq 0x46d0
nop