// File: /workspace/github_c_makefile_star2_O0/Orycterope[P]corewar/libft/get_next_line.c
// Function: reduce
static int	reduce(t_file **file, int size)
{
	t_file			*fil;
	char			*add;

	fil = *file;
	if (size_line(fil->text, fil->size_text) == 0 && fil->size_text == 0)
		fil->size_text = read(fil->fd, fil->text, BUFF_SIZE);
	if (fil->size_text <= 0 && fil->text != NULL)
		ft_strdel(&(fil->text));
	if (fil->size_text <= 0)
		fil->text = NULL;
	if (fil->size_text <= 0)
		return (fil->size_text < 0 ? -1 : 0);
	while (size_line(fil->text, fil->size_text) >= fil->size_text && size > 0)
	{
		size = BUFF_SIZE + fil->size_text;
		if ((add = (char *)malloc(sizeof(char) * size)) == NULL)
			return (-1);
		ft_strncpy(add, fil->text, fil->size_text);
		ft_strdel(&(fil->text));
		fil->text = add;
		add += fil->size_text;
		size = read(fil->fd, add, BUFF_SIZE);
		fil->size_text += size;
	}
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x6aa0
cmpl $0x0, %eax
jne 0x694e
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x694e
movq -0x20(%rbp), %rax
movl (%rax), %edi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0x800, %edx            # imm = 0x800
callq 0x1050
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jg 0x6970
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6970
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x7120
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jg 0x6986
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jg 0x69ac
movq -0x20(%rbp), %rax
movl 0x10(%rax), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovll %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x6a8e
jmp 0x69ae
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x6aa0
movl %eax, %ecx
movq -0x20(%rbp), %rdx
xorl %eax, %eax
cmpl 0x10(%rdx), %ecx
movb %al, -0x29(%rbp)
jl 0x69dc
cmpl $0x0, -0x14(%rbp)
setg %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x69e8
jmp 0x6a87
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x800, %eax            # imm = 0x800
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rdi
shlq $0x0, %rdi
callq 0x1060
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x6a17
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6a8e
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movslq 0x10(%rax), %rdx
callq 0x6fe0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x7120
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %edi
movq -0x28(%rbp), %rsi
movl $0x800, %edx            # imm = 0x800
callq 0x1050
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
jmp 0x69ae
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)