// File: /workspace/github_c_makefile_star2_O2/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 0x2b9(%rip), %rsi       # 0x1660
pushq $0x2
popq %rdi
callq 0x10e0
cmpq $-0x1, %rax
je 0x15ed
movq %rbx, %rdi
callq 0x1ce3
movq %rsp, %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x1737
movq (%rbx), %rdi
callq 0x16b9
callq 0x169c
leaq 0x10(%rsp), %r14
andq $0x0, (%r14)
leaq 0x5c66(%rip), %r15      # 0x7052
leaq 0x5c69(%rip), %r13      # 0x705c
xorl %edi, %edi
movq %r14, %rsi
callq 0x31d8
testl %eax, %eax
jle 0x15db
movq 0x10(%rsp), %rdi
pushq $0x3b
popq %rsi
callq 0x2cf0
testq %rax, %rax
je 0x15c0
movq %rax, %rbp
movq %rax, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x15b8
callq 0x2e80
testq %rax, %rax
je 0x15b8
movq %rax, %r12
cmpq $0x0, (%rax)
je 0x15b0
movq (%rsp), %rsi
movq %r12, %rdi
callq 0x24b4
testl %eax, %eax
je 0x159f
movq (%r12), %rdi
movq %r15, %rsi
callq 0x28e0
testl %eax, %eax
je 0x14fc
movq (%r12), %rdi
movq %r13, %rsi
callq 0x28e0
testl %eax, %eax
je 0x1539
movq (%r12), %rdi
leaq 0x5bca(%rip), %rsi      # 0x7059
callq 0x28e0
testl %eax, %eax
je 0x1564
movq (%r12), %rdi
leaq 0x5bb0(%rip), %rsi      # 0x7057
callq 0x28e0
testl %eax, %eax
je 0x1575
movq (%r12), %rdi
leaq 0x5ba1(%rip), %rsi      # 0x7060
callq 0x28e0
testl %eax, %eax
je 0x1586
movq (%r12), %rdi
leaq 0x5b8c(%rip), %rsi      # 0x7063
callq 0x28e0
testl %eax, %eax
je 0x1593
movq (%rsp), %rdi
leaq 0x5b59(%rip), %rsi      # 0x7048
movq %r12, %rdx
callq 0x266c
jmp 0x159f
movq 0x8(%r12), %rdi
testq %rdi, %rdi
je 0x15ff
cmpq $0x0, 0x10(%r12)
leaq 0x5b51(%rip), %rsi      # 0x7068
jne 0x152d
callq 0x2bf8
leaq 0x5b5d(%rip), %rsi      # 0x7082
testl %eax, %eax
jne 0x1624
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x38b8
jmp 0x159f
movq (%rsp), %rdi
callq 0x235a
movq %rax, 0x8(%rsp)
movq %r12, %rdi
addq $0x8, %rdi
leaq 0x8(%rsp), %rsi
callq 0x19d4
movq 0x8(%rsp), %rdi
callq 0x232d
jmp 0x159f
movq %r12, %rsi
addq $0x8, %rsi
movq %rsp, %rdi
callq 0x18dc
jmp 0x159f
movq %r12, %rsi
addq $0x8, %rsi
movq %rsp, %rdi
callq 0x18b4
jmp 0x159f
movq %r12, %rdi
movq %rsp, %rsi
callq 0x126c
jmp 0x159f
movq %r12, %rdi
addq $0x8, %rdi
callq 0x17d8
movq %r12, %rdi
callq 0x2bc4
addq $0x8, %rbx
jmp 0x1421
movq %r12, %rdi
callq 0x2bc4
movq %rbp, %rdi
callq 0x2bc4
movq %r14, %rdi
callq 0x2ba8
movq (%rsp), %rdi
callq 0x16b9
callq 0x169c
jmp 0x13f3
callq 0x1714
movq (%rsp), %rdi
callq 0x232d
xorl %eax, %eax
jmp 0x15f0
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1714
movq (%rsp), %rdi
callq 0x232d
movq %r12, %rdi
callq 0x2bc4
movq %rbp, %rdi
callq 0x2bc4
xorl %edi, %edi
callq 0x1150
callq 0x1714
movq (%rsp), %rdi
callq 0x232d
movq 0x8(%r12), %rdi
callq 0x30b4
movl %eax, 0xaa92(%rip)      # 0xc0d4
movq %r12, %rdi
callq 0x2bc4
movq %rbp, %rdi
callq 0x2bc4
movl 0xaa7c(%rip), %edi      # 0xc0d4
callq 0x1150
nopl (%rax)