// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/parse.c
// Function: parse_map
void		parse_map(t_output *output, t_info *info)
{
	t_output	*tmp;
	t_output	*tmp2;
	char		*line;
	int			rooms;

	tmp2 = output;
	rooms = 0;
	while (get_next_line(info->fd, &line))
	{
		if (!(tmp = (t_output*)malloc(sizeof(t_output))))
			exit_error(ERR_MALLOC, info);
		if (ft_strchr(line, ' ') && line[0] != '#' && line[0] != 'L')
			rooms++;
		if (ft_strchr(line, '-') && !(ft_strchr(line, ' ')))
			info->link_amnt++;
		if (ft_strstr(line, "#Here is the number of lines required:"))
			get_required_lines(info, line);
		tmp->line = ft_strdup(line);
		output->next = tmp;
		output = output->next;
		output->next = NULL;
		free(line);
	}
	run_data_parsing(info, tmp2, rooms);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r13
movl 0x1880(%rsi), %edi
leaq -0x38(%rbp), %rsi
callq 0x4dac
testl %eax, %eax
je 0x383e
movl $0x0, -0x2c(%rbp)
leaq -0x38(%rbp), %r14
movq %r13, %r12
movl $0x10, %edi
callq 0x1080
movq %rax, %r15
testq %rax, %rax
jne 0x378d
leaq 0x3e24(%rip), %rdi      # 0x75a9
movq %rbx, %rsi
callq 0x34cb
movq -0x38(%rbp), %rdi
movl $0x20, %esi
callq 0x474c
testq %rax, %rax
je 0x37b4
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
je 0x37b4
cmpl $0x4c, %eax
je 0x37b4
incl -0x2c(%rbp)
movq -0x38(%rbp), %rdi
movl $0x2d, %esi
callq 0x474c
testq %rax, %rax
je 0x37e0
movq -0x38(%rbp), %rdi
movl $0x20, %esi
callq 0x474c
testq %rax, %rax
jne 0x37e0
incl 0x1058(%rbx)
movq -0x38(%rbp), %rdi
leaq 0x3fe6(%rip), %rsi      # 0x77d1
callq 0x49f8
testq %rax, %rax
je 0x3801
movq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x1d30
movq -0x38(%rbp), %rdi
callq 0x47cc
movq %rax, (%r15)
movq %r15, 0x8(%r12)
movq $0x0, 0x8(%r15)
movq -0x38(%rbp), %rdi
callq 0x1030
movl 0x1880(%rbx), %edi
movq %r14, %rsi
callq 0x4dac
movq %r15, %r12
testl %eax, %eax
jne 0x376c
jmp 0x3845
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %r15d
testl %r15d, %r15d
je 0x3860
cmpl $0x0, 0x1058(%rbx)
jne 0x386f
leaq 0x3fb1(%rip), %rdi      # 0x780f
jmp 0x3867
leaq 0x3f91(%rip), %rdi      # 0x77f8
movq %rbx, %rsi
callq 0x34cb
movslq %r15d, %r14
leaq 0x1(,%r14,8), %rdi
callq 0x1080
movq %rax, 0x18a8(%rbx)
testq %rax, %rax
jne 0x389a
leaq 0x3d17(%rip), %rdi      # 0x75a9
movq %rbx, %rsi
callq 0x34cb
movq 0x18a8(%rbx), %rax
movq $0x0, (%rax,%r14,8)
movl %r15d, 0x1074(%rbx)
testq %r13, %r13
je 0x3bc7
leaq 0x10(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0x3e9d(%rip), %r12      # 0x7765
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0x0, -0x44(%rbp)
movl $0x0, -0x3c(%rbp)
movq %r13, %r14
movq %rbx, -0x58(%rbp)
movq (%r14), %rax
movsbl (%rax), %edi
callq 0x4578
testl %eax, %eax
je 0x3bc7
movq (%r14), %rdi
movq %r12, %rsi
callq 0x49f8
testq %rax, %rax
jne 0x391a
movq (%r14), %rdi
leaq 0x3e7b(%rip), %rsi      # 0x778b
callq 0x49f8
testq %rax, %rax
je 0x392e
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x2cd7
movl %eax, -0x2c(%rbp)
movl $0x2, %r15d
decl %r15d
movq (%r14), %rdi
movl $0x20, %esi
callq 0x474c
testq %rax, %rax
je 0x3ae1
movq (%r14), %rax
cmpb $0x23, (%rax)
je 0x3ae1
cmpl $0x0, -0x44(%rbp)
je 0x3968
leaq 0x3d95(%rip), %rdi      # 0x76f5
movq %rbx, %rsi
callq 0x34cb
movl %r15d, -0x40(%rbp)
testl %r15d, %r15d
movl $0x0, %eax
movl -0x2c(%rbp), %ecx
cmovnel %eax, %ecx
movl %ecx, -0x2c(%rbp)
movq (%r14), %r15
cmpb $0x4c, (%r15)
jne 0x3995
leaq 0x3ec2(%rip), %rdi      # 0x784f
movq %rbx, %rsi
callq 0x34cb
movq %r15, %rdi
movl $0x20, %esi
callq 0x4904
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2c41
movl $0x68, %edi
callq 0x1080
movq 0x18a8(%rbx), %rcx
movslq -0x3c(%rbp), %r15
movq %rax, (%rcx,%r15,8)
testq %rax, %rax
jne 0x39dd
leaq 0x3bd4(%rip), %rdi      # 0x75a9
movq %rbx, %rsi
callq 0x34cb
movq (%r12), %rdi
callq 0x47cc
movq 0x18a8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq %rax, 0x10(%rcx)
movq 0x8(%r12), %rdi
callq 0x44d0
movq 0x18a8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movl %eax, 0x60(%rcx)
movq %r12, -0x60(%rbp)
movq 0x10(%r12), %rdi
callq 0x44d0
movq 0x18a8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movl %eax, 0x64(%rcx)
movl -0x2c(%rbp), %r12d
movl %r12d, 0x58(%rcx)
movq %rbx, %rdi
movl -0x3c(%rbp), %esi
callq 0x2cab
xorl %edi, %edi
callq 0x48f4
movq 0x18a8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq %rax, (%rcx)
testq %rax, %rax
jne 0x3a65
leaq 0x3b4c(%rip), %rdi      # 0x75a9
movq %rbx, %rsi
callq 0x34cb
cmpl $0x1, %r12d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl $0x0, %ecx
cmovel %ecx, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmovll %ecx, %eax
movq 0x18a8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movl %eax, 0x4c(%rcx)
cmpl $0x2, %r12d
movl -0x40(%rbp), %r15d
je 0x3aaf
movl %r12d, %ebx
cmpl $0x1, %r12d
jne 0x3aca
movq -0x50(%rbp), %r12
cmpq $0x0, (%r12)
je 0x3aba
cmpl $0x2, %ebx
jne 0x3aca
movq -0x58(%rbp), %r12
cmpq $0x0, (%r12)
jne 0x3aca
movq -0x60(%rbp), %rax
movq (%rax), %rdi
callq 0x47cc
movq %rax, (%r12)
incl -0x3c(%rbp)
movq -0x60(%rbp), %rdi
callq 0x278f
leaq 0x3c88(%rip), %r12      # 0x7765
movq -0x58(%rbp), %rbx
movq (%r14), %rdi
movl $0x2d, %esi
callq 0x474c
testq %rax, %rax
je 0x3bba
movq (%r14), %rdi
movl $0x20, %esi
callq 0x474c
testq %rax, %rax
jne 0x3bba
movl %r15d, -0x40(%rbp)
movq (%r14), %rdi
movl $0x2d, %esi
callq 0x4904
movq %rax, %r15
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x2b90
cmpq $0x0, 0x10(%rbx)
jne 0x3b46
leaq 0x3ce7(%rip), %rdi      # 0x7825
movq %rbx, %rsi
callq 0x34cb
cmpq $0x0, (%rbx)
jne 0x3b5b
leaq 0x3ce8(%rip), %rdi      # 0x783b
movq %rbx, %rsi
callq 0x34cb
movq (%r15), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
callq 0x4820
testl %eax, %eax
je 0x3b7e
movq 0x8(%r15), %rdi
movq (%rbx), %rsi
callq 0x4820
testl %eax, %eax
jne 0x3ba1
movq (%r15), %rdi
movq (%rbx), %rsi
callq 0x4820
testl %eax, %eax
je 0x3bab
movq 0x8(%r15), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
callq 0x4820
testl %eax, %eax
je 0x3bab
movl $0x1, 0x1884(%rbx)
incl -0x44(%rbp)
movq %r15, %rdi
callq 0x278f
movl -0x40(%rbp), %r15d
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x38e3
cmpq $0x0, 0x10(%rbx)
je 0x3bdd
cmpq $0x0, (%rbx)
jne 0x3bfb
leaq 0x3c60(%rip), %rdi      # 0x783b
jmp 0x3be4
leaq 0x3c41(%rip), %rdi      # 0x7825
movq %rbx, %rsi
callq 0x34cb
jmp 0x3bfb
movq (%r13), %rdi
callq 0x4648
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0x3bee
movq %rbx, %rdi
callq 0x21fb
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop