// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r13
movl $0x0, -0x2c(%rbp)
pushq $0x20
popq %r14
leaq 0x43c8(%rip), %r12      # 0x77d1
movq %rdi, -0x60(%rbp)
movl 0x1880(%rbx), %edi
leaq -0x38(%rbp), %rsi
callq 0x47b0
testl %eax, %eax
je 0x34cf
pushq $0x10
popq %rdi
callq 0x1070
movq %rax, %r15
testq %rax, %rax
jne 0x3443
leaq 0x416e(%rip), %rdi      # 0x75a9
movq %rbx, %rsi
callq 0x31ab
movq -0x38(%rbp), %rdi
movl %r14d, %esi
callq 0x41bc
movq -0x38(%rbp), %rdi
testq %rax, %rax
je 0x3468
movzbl (%rdi), %eax
cmpl $0x23, %eax
je 0x3468
cmpl $0x4c, %eax
je 0x3468
incl -0x2c(%rbp)
pushq $0x2d
popq %rsi
callq 0x41bc
testq %rax, %rax
je 0x348c
movq -0x38(%rbp), %rdi
movl %r14d, %esi
callq 0x41bc
testq %rax, %rax
jne 0x348c
incl 0x1058(%rbx)
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x4428
testq %rax, %rax
je 0x34a9
movq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x1bc0
movq -0x38(%rbp), %rdi
callq 0x4228
movq %rax, (%r15)
movq %r15, 0x8(%r13)
andq $0x0, 0x8(%r15)
movq -0x38(%rbp), %rdi
callq 0x1030
movq %r15, %r13
jmp 0x340d
movl -0x2c(%rbp), %r15d
testl %r15d, %r15d
je 0x34ea
cmpl $0x0, 0x1058(%rbx)
jne 0x34f9
leaq 0x4327(%rip), %rdi      # 0x780f
jmp 0x34f1
leaq 0x4307(%rip), %rdi      # 0x77f8
movq %rbx, %rsi
callq 0x31ab
movslq %r15d, %r14
leaq 0x1(,%r14,8), %rdi
callq 0x1070
movq %rax, 0x18a8(%rbx)
testq %rax, %rax
jne 0x352b
leaq 0x408d(%rip), %rdi      # 0x75a9
movq %rbx, %rsi
callq 0x31ab
movq 0x18a8(%rbx), %rax
andq $0x0, (%rax,%r14,8)
movl %r15d, 0x1074(%rbx)
leaq 0x10(%rbx), %rax
movq %rax, -0x48(%rbp)
pushq $-0x1
popq %r15
leaq 0x421b(%rip), %r13      # 0x7765
leaq 0x42d4(%rip), %rax      # 0x7825
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %r14
movl $0x0, -0x40(%rbp)
movl $0x0, -0x3c(%rbp)
testq %r14, %r14
je 0x384a
movq (%r14), %rax
movsbl (%rax), %edi
callq 0x4048
testl %eax, %eax
je 0x384a
movq (%r14), %rdi
movq %r13, %rsi
callq 0x4428
testq %rax, %rax
jne 0x35a7
movq (%r14), %rdi
leaq 0x41ee(%rip), %rsi      # 0x778b
callq 0x4428
testq %rax, %rax
je 0x35b9
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x2a25
movl %eax, -0x2c(%rbp)
pushq $0x2
popq %r15
decl %r15d
movq (%r14), %rdi
pushq $0x20
popq %rsi
callq 0x41bc
movq (%r14), %r12
testq %rax, %rax
je 0x375c
movb (%r12), %al
cmpb $0x23, %al
je 0x375c
cmpl $0x0, -0x3c(%rbp)
je 0x35fb
leaq 0x4109(%rip), %rdi      # 0x76f5
movq %rbx, %rsi
callq 0x31ab
movq (%r14), %r12
movb (%r12), %al
movl %r15d, -0x4c(%rbp)
testl %r15d, %r15d
movl $0x0, %ecx
movl -0x2c(%rbp), %edx
cmovnel %ecx, %edx
movl %edx, -0x2c(%rbp)
cmpb $0x4c, %al
movl -0x40(%rbp), %r15d
jne 0x3627
leaq 0x4230(%rip), %rdi      # 0x784f
movq %rbx, %rsi
callq 0x31ab
movq %r12, %rdi
pushq $0x20
popq %rsi
callq 0x4354
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2997
pushq $0x68
popq %rdi
callq 0x1070
movq 0x18a8(%rbx), %rcx
movslq %r15d, %r13
movq %rax, (%rcx,%r13,8)
testq %rax, %rax
jne 0x366a
leaq 0x3f47(%rip), %rdi      # 0x75a9
movq %rbx, %rsi
callq 0x31ab
movq (%r12), %rdi
callq 0x4228
movq 0x18a8(%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movq %rax, 0x10(%rcx)
movq 0x8(%r12), %rdi
callq 0x3fac
movq 0x18a8(%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movl %eax, 0x60(%rcx)
movq %r12, -0x68(%rbp)
movq 0x10(%r12), %rdi
callq 0x3fac
movq 0x18a8(%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movl %eax, 0x64(%rcx)
movl -0x2c(%rbp), %r12d
movl %r12d, 0x58(%rcx)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x29ff
xorl %edi, %edi
callq 0x4344
movq 0x18a8(%rbx), %rcx
movq (%rcx,%r13,8), %rdx
movq %rax, (%rdx)
testq %rax, %rax
jne 0x36f9
leaq 0x3ebf(%rip), %rdi      # 0x75a9
movq %rbx, %rsi
callq 0x31ab
movq 0x18a8(%rbx), %rcx
cmpl $0x1, %r12d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl $0x0, %edx
cmovel %edx, %eax
pushq $-0x1
popq %rdx
cmovll %edx, %eax
movq (%rcx,%r13,8), %rcx
movl %eax, 0x4c(%rcx)
cmpl $0x2, %r12d
movl -0x4c(%rbp), %r15d
je 0x3834
cmpl $0x1, %r12d
movq -0x68(%rbp), %r12
jne 0x3747
movq -0x48(%rbp), %r13
cmpq $0x0, (%r13)
jne 0x3747
movq (%r12), %rdi
callq 0x4228
movq %rax, (%r13)
incl -0x40(%rbp)
movq %r12, %rdi
callq 0x2527
movq (%r14), %r12
leaq 0x4009(%rip), %r13      # 0x7765
movq %r12, %rdi
pushq $0x2d
popq %rsi
callq 0x41bc
testq %rax, %rax
je 0x382b
movq (%r14), %rdi
pushq $0x20
popq %rsi
callq 0x41bc
testq %rax, %rax
jne 0x382b
movq (%r14), %rdi
pushq $0x2d
popq %rsi
callq 0x4354
movq %rax, %r12
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x28f4
cmpq $0x0, 0x10(%rbx)
jne 0x37b7
leaq 0x4076(%rip), %rdi      # 0x7825
movq %rbx, %rsi
callq 0x31ab
cmpq $0x0, (%rbx)
jne 0x37cc
leaq 0x4077(%rip), %rdi      # 0x783b
movq %rbx, %rsi
callq 0x31ab
movq (%r12), %rdi
movq -0x48(%rbp), %rax
movq (%rax), %rsi
callq 0x4270
testl %eax, %eax
je 0x37f1
movq 0x8(%r12), %rdi
movq (%rbx), %rsi
callq 0x4270
testl %eax, %eax
jne 0x3816
movq (%r12), %rdi
movq (%rbx), %rsi
callq 0x4270
testl %eax, %eax
je 0x3820
movq 0x8(%r12), %rdi
movq -0x48(%rbp), %rax
movq (%rax), %rsi
callq 0x4270
testl %eax, %eax
je 0x3820
movl $0x1, 0x1884(%rbx)
incl -0x3c(%rbp)
movq %r12, %rdi
callq 0x2527
movq 0x8(%r14), %r14
jmp 0x3567
cmpq $0x0, (%rbx)
movq %rbx, %r13
movq -0x68(%rbp), %r12
jne 0x3747
jmp 0x373a
movq -0x48(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3865
cmpq $0x0, (%rbx)
leaq 0x3fdc(%rip), %rax      # 0x783b
movq %rax, -0x58(%rbp)
jne 0x3871
movq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x31ab
movq -0x60(%rbp), %r14
testq %r14, %r14
je 0x3888
movq (%r14), %rdi
callq 0x40e4
movq 0x8(%r14), %r14
jmp 0x3875
movq %rbx, %rdi
callq 0x2018
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop