// File: /workspace/github_cpp_makefile_star2_O1/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 0x7b48(%rip), %rsi      # 0x3d8f0
movl $0x2, %ecx
xorl %edx, %edx
callq 0x77f0
cmpq $-0x1, %rax
je 0x35e7c
xorl %ebx, %ebx
leaq 0x7b29(%rip), %r12      # 0x3d8f0
xorl %r15d, %r15d
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
testq %rax, %rax
je 0x35f64
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
movq (%r14), %rcx
cmpb $0x0, 0x2(%rcx,%rax)
je 0x35ebf
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
movq (%r14), %rcx
cmpb $0x20, 0x2(%rcx,%rax)
je 0x35e45
movl $0x2, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x77f0
movq (%r14), %rcx
cmpb $0x9, 0x2(%rcx,%rax)
jne 0x35eff
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 0x35dca
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x797e(%rip), %rsi      # 0x3d80b
leaq 0x7993(%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 0x12c94
movslq %eax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x35f53
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x793b(%rip), %rsi      # 0x3d80b
leaq 0x7950(%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 0x12c94
movslq %eax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x35f53
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7918(%rip), %rsi      # 0x3d828
leaq 0x7929(%rip), %rdx      # 0x3d840
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x80f4
leaq 0x79c5(%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 0x366a6
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x35f64
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 0x35f8f
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x35f8f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x35fa0
movq (%r12), %rsi
incq %rsi
callq 0x74b0
movq %rbx, %rdi
callq 0x7810