// File: /workspace/github_c_makefile_star2_O1/ffoissey[P]minishell_42/srcs/ft_minishell.c
// Function: main
int			main(int ac, char **av, char **envp)
{
	char		*line;
	t_list_ex	*env;

	(void)ac;
	(void)av;
	if (signal(SIGINT, ft_ctrlc) == SIG_ERR)
		return (1);
	env = ft_dup_env(envp);
	ft_shlvl(&env);
	ft_set_global(env);
	ft_print_prompt();
	line = NULL;
	while (get_next_line(0, &line) > 0)
	{
		ft_split_line(line, &env);
		ft_strdel(&line);
		ft_set_global(env);
		ft_print_prompt();
	}
	ft_free_global();
	ft_freelistex(env);
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
leaq 0x2e0(%rip), %rsi       # 0x1694
movl $0x2, %edi
callq 0x10f0
cmpq $-0x1, %rax
je 0x1621
movq %rbx, %rdi
callq 0x1d92
movq %rsp, %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x179e
movq (%rbx), %rdi
callq 0x1702
callq 0x16e5
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
xorl %edi, %edi
callq 0x33b4
testl %eax, %eax
jle 0x160f
leaq 0x8(%rsp), %r14
leaq 0x5c40(%rip), %r15      # 0x7052
leaq 0x5c43(%rip), %rbp      # 0x705c
movq 0x8(%rsp), %rdi
movl $0x3b, %esi
callq 0x2efc
testq %rax, %rax
je 0x15e7
movq %rax, %r12
movq (%rax), %rdi
testq %rdi, %rdi
je 0x15df
movq %r12, %rbx
addq $0x8, %rbx
callq 0x3050
testq %rax, %rax
je 0x15df
movq %rax, %r13
cmpq $0x0, (%rax)
je 0x15d7
movq (%rsp), %rsi
movq %r13, %rdi
callq 0x25ee
testl %eax, %eax
je 0x1591
movq (%r13), %rdi
movq %r15, %rsi
callq 0x2a9c
testl %eax, %eax
je 0x1513
movq (%r13), %rdi
movq %rbp, %rsi
callq 0x2a9c
testl %eax, %eax
je 0x1535
movq (%r13), %rdi
leaq 0x5bb0(%rip), %rsi      # 0x7059
callq 0x2a9c
testl %eax, %eax
je 0x1560
movq (%r13), %rdi
leaq 0x5b96(%rip), %rsi      # 0x7057
callq 0x2a9c
testl %eax, %eax
je 0x15ab
movq (%r13), %rdi
leaq 0x5b87(%rip), %rsi      # 0x7060
callq 0x2a9c
testl %eax, %eax
je 0x15bc
movq (%r13), %rdi
leaq 0x5b72(%rip), %rsi      # 0x7063
callq 0x2a9c
testl %eax, %eax
je 0x15c9
movq (%rsp), %rdi
leaq 0x5b3f(%rip), %rsi      # 0x7048
movq %r13, %rdx
callq 0x27a0
jmp 0x1591
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0x1635
cmpq $0x0, 0x10(%r13)
je 0x1571
movl $0x2, %edi
leaq 0x5b35(%rip), %rsi      # 0x7068
jmp 0x158a
movq (%rsp), %rdi
callq 0x2481
movq %rax, 0x10(%rsp)
movq %r13, %rdi
addq $0x8, %rdi
leaq 0x10(%rsp), %rsi
callq 0x1a7c
movq 0x10(%rsp), %rdi
callq 0x2454
jmp 0x1591
movq %r13, %rsi
addq $0x8, %rsi
movq %rsp, %rdi
callq 0x198a
jmp 0x1591
callq 0x2de0
testl %eax, %eax
jne 0x165a
movl $0x2, %edi
leaq 0x5af8(%rip), %rsi      # 0x7082
xorl %eax, %eax
callq 0x3af8
movq %r13, %rdi
callq 0x2da8
movq (%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x1447
jmp 0x15df
movq %r13, %rsi
addq $0x8, %rsi
movq %rsp, %rdi
callq 0x1958
jmp 0x1591
movq %r13, %rdi
movq %rsp, %rsi
callq 0x127c
jmp 0x1591
movq %r13, %rdi
addq $0x8, %rdi
callq 0x1854
jmp 0x1591
movq %r13, %rdi
callq 0x2da8
movq %r12, %rdi
callq 0x2da8
movq %r14, %rdi
callq 0x2d88
movq (%rsp), %rdi
callq 0x1702
callq 0x16e5
xorl %edi, %edi
movq %r14, %rsi
callq 0x33b4
testl %eax, %eax
jg 0x1419
callq 0x177b
movq (%rsp), %rdi
callq 0x2454
xorl %eax, %eax
jmp 0x1626
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x177b
movq (%rsp), %rdi
callq 0x2454
movq %r13, %rdi
callq 0x2da8
movq %r12, %rdi
callq 0x2da8
xorl %edi, %edi
callq 0x1160
callq 0x177b
movq (%rsp), %rdi
callq 0x2454
movq 0x8(%r13), %rdi
callq 0x325c
movl %eax, 0xaa65(%rip)      # 0xc0dc
movq %r13, %rdi
callq 0x2da8
movq %r12, %rdi
callq 0x2da8
movl 0xaa4f(%rip), %edi      # 0xc0dc
callq 0x1160
nop