// File: /workspace/github_cpp_makefile_star2_O3/mbourand[P]webserv/srcs/Request.cpp
// Function: is_header_field_finished(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
size_t is_header_field_finished(std::string str)
{
	size_t i = 0;

	while (str.find("\r\n", i) != std::string::npos)
	{
		if (str.find("\r\n", i) == 0)
			return (0);
		if (!str[str.find("\r\n", i) + 2])
			return Logger::print("Header field is not finished", -1, INFO, VERBOSE);
		if (str[str.find("\r\n", i) + 2] != ' ' && str[str.find("\r\n", i) + 2] != '\t')
			return Logger::print("Header field is finished", str.find("\r\n", i) + 2, INFO, VERBOSE);
		i = str.find("\r\n", i) + 2;
	}
	return Logger::print("Header field is not finished", -1, INFO, VERBOSE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
leaq 0x7f5f(%rip), %rsi      # 0x3d8f0
movl $0x2, %ecx
xorl %edx, %edx
callq 0x77f0
cmpq $-0x1, %rax
je 0x35a65
xorl %ebx, %ebx
leaq 0x7f40(%rip), %r12      # 0x3d8f0
xorl %r15d, %r15d
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
testq %rax, %rax
je 0x35b4d
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
movq (%r14), %rcx
cmpb $0x0, 0x2(%rcx,%rax)
je 0x35aa8
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
movq (%r14), %rcx
cmpb $0x20, 0x2(%rcx,%rax)
je 0x35a2e
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
movq (%r14), %rcx
cmpb $0x9, 0x2(%rcx,%rax)
jne 0x35ae8
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
movq %rax, %r15
addq $0x2, %r15
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
cmpq $-0x1, %rax
jne 0x359b3
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7d95(%rip), %rsi      # 0x3d80b
leaq 0x7daa(%rip), %rdx      # 0x3d827
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x80f4
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x12c02
movslq %eax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x35b3c
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7d52(%rip), %rsi      # 0x3d80b
leaq 0x7d67(%rip), %rdx      # 0x3d827
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x80f4
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x12c02
movslq %eax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x35b3c
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7d2f(%rip), %rsi      # 0x3d828
leaq 0x7d40(%rip), %rdx      # 0x3d840
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x80f4
leaq 0x7ddc(%rip), %rsi      # 0x3d8f0
movl $0x2, %ecx
movq %r14, %rdi
movq %r15, %rdx
callq 0x77f0
leaq 0x2(%rax), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3628e
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x35b4d
movq (%r12), %rsi
incq %rsi
callq 0x74b0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0x35b78
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x35b78
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x35b89
movq (%r12), %rsi
incq %rsi
callq 0x74b0
movq %rbx, %rdi
callq 0x7810
nop