// File: /workspace/github_c_makefile_star2_O3/ffoissey[P]filler_42/libft/srcs/get_next_line/get_next_line.c
// Function: get_next_line
int				get_next_line(const int fd, char **line)
{
	static	t_file	file;

	if (fd < 0 || !line)
		return (FAILURE);
	ft_fill_line_with_rest(&file);
	if (file.state != 1 && ft_read(&file) == FAILURE)
		return (FAILURE);
	if (file.cur != NULL)
	{
		*line = ft_strdup(file.cur);
		ft_strdel(&file.cur);
	}
	return ((*line == NULL && file.state != 0) ? FAILURE : file.state);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1020, %rsp           # imm = 0x1020
testl %edi, %edi
sets %al
testq %rsi, %rsi
sete %cl
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
orb %al, %cl
jne 0x2b2c
movq %rsi, %rbx
movl $0x0, 0x8734(%rip)      # 0xb05c
movq 0x8731(%rip), %rdi      # 0xb060
testq %rdi, %rdi
je 0x2a00
movl $0xa, %esi
callq 0x61c4
testq %rax, %rax
je 0x29a1
leaq 0x1(%rax), %r14
cmpb $0x0, 0x1(%rax)
movq 0x870a(%rip), %rdi      # 0xb060
je 0x29b6
subq %rdi, %rax
xorl %esi, %esi
movq %rax, %rdx
callq 0x6304
movq %rax, 0x86fc(%rip)      # 0xb068
movq 0x86ed(%rip), %rax      # 0xb060
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq %r14, %rdi
callq 0x61f4
movq %rax, 0x86d6(%rip)      # 0xb060
movq %r15, %rdi
callq 0x2800
movl $0x1, 0x86c0(%rip)      # 0xb05c
jmp 0x2af5
movq 0x86b8(%rip), %rdi      # 0xb060
callq 0x61f4
movq %rax, 0x86b4(%rip)      # 0xb068
jmp 0x29e7
callq 0x61f4
movq %rax, 0x86a6(%rip)      # 0xb068
cmpb $0x0, (%r14)
jne 0x29e7
movq %rax, %r15
movq 0x868e(%rip), %rdi      # 0xb060
callq 0x27e0
movb $0x0, -0x1(%r15,%rax)
movl $0x1, 0x8675(%rip)      # 0xb05c
leaq 0x8672(%rip), %rdi      # 0xb060
callq 0x2800
cmpl $0x1, 0x8662(%rip)      # 0xb05c
je 0x2af5
movl 0x8652(%rip), %edi      # 0xb058
leaq 0x10(%rsp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x1060
testl %eax, %eax
jle 0x2a80
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r15
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movb $0x0, 0x10(%rsp,%rax)
movq 0x8634(%rip), %rax      # 0xb068
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movl $0xa, %esi
callq 0x61c4
testq %rax, %rax
jne 0x2aaf
movq 0x8616(%rip), %rdi      # 0xb068
movq %r14, %rsi
callq 0x6274
movq %rax, 0x8607(%rip)      # 0xb068
movq %r15, %rdi
callq 0x2800
movl 0x85e9(%rip), %edi      # 0xb058
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rsi
callq 0x1060
testl %eax, %eax
jg 0x2a23
movq 0x85e1(%rip), %rcx      # 0xb068
testq %rcx, %rcx
je 0x2a9b
cmpb $0x0, (%rcx)
je 0x2a9b
movl $0x1, 0x85c1(%rip)      # 0xb05c
cmpl $-0x1, %eax
je 0x2b2c
cmpl $-0x1, 0x85b1(%rip)     # 0xb05c
jne 0x2af5
jmp 0x2b2c
movq %rax, %r12
movl $0x1, 0x85a0(%rip)      # 0xb05c
movq %rax, %rdi
incq %rdi
callq 0x61f4
movq %rax, 0x8592(%rip)      # 0xb060
movb $0x0, (%r12)
movq 0x858e(%rip), %rdi      # 0xb068
leaq 0x10(%rsp), %rsi
callq 0x6274
movq %rax, 0x857d(%rip)      # 0xb068
leaq 0x8(%rsp), %rdi
callq 0x2800
movq 0x856c(%rip), %rdi      # 0xb068
testq %rdi, %rdi
je 0x2b15
callq 0x61f4
movq %rax, (%rbx)
leaq 0x8558(%rip), %rdi      # 0xb068
callq 0x2800
movl 0x8541(%rip), %eax      # 0xb05c
xorl %ebp, %ebp
movl %eax, %ecx
negl %ecx
sbbl %ebp, %ebp
orl %eax, %ebp
cmpq $0x0, (%rbx)
cmovnel %eax, %ebp
movl %ebp, %eax
addq $0x1020, %rsp           # imm = 0x1020
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop