// File: /workspace/github_c_makefile_star2_O2/ffoissey[P]minishell_42/srcs/ft_env.c
// Function: ft_process_env
void		ft_process_env(char **tab, t_list_ex **lst)
{
	int			i;
	int			flag_i;
	t_list_ex	*new_env;
	char		*tmp;
	char		*tmp2;

	i = 0;
	flag_i = 0;
	new_env = NULL;
	if (!ft_env_options(tab, &i, &flag_i))
		return ;
	while (tab[i] && (tmp = ft_strchr(tab[i], '=')))
	{
		tmp2 = ft_strsub(tab[i], 0, tmp - tab[i]);
		ft_lst_changevalue(flag_i ? &new_env : lst, tmp2, tmp + 1);
		ft_strdel(&tmp2);
		i++;
	}
	if (!tab[i])
		ft_lst_printenv(flag_i ? new_env : *lst);
	else if (!ft_is_builtin(tab[i], lst, &new_env, flag_i))
		ft_process_out((flag_i ? new_env : *lst), "env", tab + i);
	ft_freelistex(new_env);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
andq $0x0, 0x8(%rsp)
xorl %ecx, %ecx
pushq $0x1
popq %rdx
movq %rdi, %rbx
xorl %r15d, %r15d
movq (%rdi,%rcx,8), %rax
testq %rax, %rax
je 0x1a76
cmpb $0x2d, (%rax)
jne 0x1a76
movb 0x1(%rax), %r8b
cmpb $0x2d, %r8b
je 0x1a76
addq $0x2, %rax
cmpb $0x69, %r8b
jne 0x1a20
movb (%rax), %r8b
incq %rax
movl %edx, %r15d
jmp 0x1a0f
movzbl %r8b, %eax
testl %eax, %eax
jne 0x1a31
incq %rcx
addq $0x8, %rbx
jmp 0x19f3
movsbl %r8b, %edx
leaq 0x56be(%rip), %rsi      # 0x70fa
pushq $0x2
popq %rbx
movl %ebx, %edi
xorl %eax, %eax
callq 0x38b8
leaq 0x56c6(%rip), %rsi      # 0x7115
movl %ebx, %edi
xorl %eax, %eax
callq 0x38b8
leaq 0x56d7(%rip), %rsi      # 0x7136
movl %ebx, %edi
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x38b8
testl %r15d, %r15d
leaq 0x8(%rsp), %rcx
movq %rsi, 0x18(%rsp)
cmoveq %rsi, %rcx
movq %rcx, 0x10(%rsp)
pushq $0x3d
popq %rbp
leaq 0x20(%rsp), %r13
testq %rax, %rax
je 0x1bdc
movq %rax, %rdi
movl %ebp, %esi
callq 0x2958
movq (%rbx), %r12
testq %rax, %rax
je 0x1aec
movq %rax, %r14
movq %rax, %rdx
subq %r12, %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2b38
movq %rax, 0x20(%rsp)
incq %r14
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2258
movq %r13, %rdi
callq 0x2ba8
movq 0x8(%rbx), %rax
addq $0x8, %rbx
jmp 0x1a94
testq %r12, %r12
je 0x1bdc
leaq 0x5556(%rip), %rsi      # 0x7052
movq %r12, %rdi
callq 0x28e0
testl %eax, %eax
je 0x1beb
leaq 0x554d(%rip), %rsi      # 0x7060
movq %r12, %rdi
callq 0x28e0
testl %eax, %eax
je 0x1beb
leaq 0x5532(%rip), %rsi      # 0x705c
movq %r12, %rdi
callq 0x28e0
testl %eax, %eax
je 0x1beb
leaq 0x5518(%rip), %rsi      # 0x7059
movq %r12, %rdi
callq 0x28e0
testl %eax, %eax
je 0x1beb
leaq 0x54ff(%rip), %rsi      # 0x7057
movq %r12, %rdi
callq 0x28e0
testl %eax, %eax
je 0x1beb
testl %r15d, %r15d
je 0x1bc3
movq 0x8(%rsp), %rdi
leaq 0x55f0(%rip), %rsi      # 0x7169
callq 0x22f9
testq %rax, %rax
jne 0x1bc3
movq 0x18(%rsp), %rax
movq (%rax), %rdi
leaq 0x55d7(%rip), %rsi      # 0x7169
callq 0x22f9
testq %rax, %rax
je 0x1bc3
movq 0x18(%rsp), %rax
movq (%rax), %rdi
leaq 0x55be(%rip), %r14      # 0x7169
movq %r14, %rsi
callq 0x22f9
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2258
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x548a(%rip), %rsi      # 0x705c
movq %rbx, %rdx
callq 0x266c
jmp 0x1bff
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x22c6
jmp 0x1bff
leaq 0x555f(%rip), %rsi      # 0x7151
pushq $0x2
popq %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x38b8
movq 0x8(%rsp), %rdi
callq 0x232d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq