LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/asm.h
// Function: ASM_RR_m
static inline void ASM_RR_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t bit0 = MEM_getByte(mem, address) & 1;
    MEM_setByte(mem, address, (MEM_getByte(mem, address) >> 1) | (CPU_getFlagC(cpu) << 7));
    CPU_setFlagZ(cpu, MEM_getByte(mem, address) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, (int) bit0);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x6ae9
movl %eax, %ebp
movq %r15, %rdi
movl %r14d, %esi
callq 0x6ae9
movb 0x2(%rbx), %cl
shrb %al
shlb $0x3, %cl
andb $-0x80, %cl
orb %al, %cl
movzbl %cl, %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x6b5a
movq %r15, %rdi
movl %r14d, %esi
callq 0x6ae9
testb %al, %al
sete %al
movb 0x2(%rbx), %cl
andb $0xf, %cl
shlb $0x7, %al
shlb $0x4, %bpl
andb $0x10, %bpl
orb %al, %bpl
orb %cl, %bpl
movb %bpl, 0x2(%rbx)
addw $0x2, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/asm.h
// Function: ASM_SRA_m
static inline void ASM_SRA_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t bit7mask = MEM_getByte(mem, address) & (1U << 7);
    uint8_t result = (MEM_getByte(mem, address) >> 1) | bit7mask;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, MEM_getByte(mem, address) & 1);
    MEM_setByte(mem, address, result);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x6ae9
movl %eax, %r12d
andb $-0x80, %r12b
movq %r14, %rdi
movl %ebp, %esi
callq 0x6ae9
movl %eax, %r15d
shrb %r15b
orb %r12b, %r15b
testb %r15b, %r15b
sete %al
movb 0x2(%rbx), %cl
andb $0x1f, %cl
shlb $0x7, %al
orb %cl, %al
movb %al, 0x2(%rbx)
movq %r14, %rdi
movl %ebp, %esi
callq 0x6ae9
movb 0x2(%rbx), %cl
andb $-0x11, %cl
shlb $0x4, %al
andb $0x10, %al
orb %cl, %al
movb %al, 0x2(%rbx)
movzbl %r15b, %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x6b5a
addw $0x2, 0xc(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/asm.h
// Function: ASM_SWAP_m
static inline void ASM_SWAP_m(CPU* cpu, Memory* mem, uint16_t address) {
    MEM_setByte(mem, address, (MEM_getByte(mem, address) << 4) | (MEM_getByte(mem, address) & 0xF0) >> 4);
    CPU_setFlagZ(cpu, MEM_getByte(mem, address) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, 0);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x6ae9
movl %eax, %r15d
movq %r14, %rdi
movl %ebp, %esi
callq 0x6ae9
shlb $0x4, %r15b
shrb $0x4, %al
orb %r15b, %al
movzbl %al, %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x6b5a
movq %r14, %rdi
movl %ebp, %esi
callq 0x6ae9
testb %al, %al
sete %al
movb 0x2(%rbx), %cl
andb $0xf, %cl
shlb $0x7, %al
orb %cl, %al
movb %al, 0x2(%rbx)
addw $0x2, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/asm.h
// Function: ASM_SRL_m
static inline void ASM_SRL_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t result = MEM_getByte(mem, address) >> 1;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, MEM_getByte(mem, address) & 1);
    MEM_setByte(mem, address, result);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x6ae9
movl %eax, %r15d
cmpb $0x2, %al
setb %al
shrb %r15b
movb 0x2(%rbx), %cl
andb $0x1f, %cl
shlb $0x7, %al
orb %cl, %al
movb %al, 0x2(%rbx)
movq %r14, %rdi
movl %ebp, %esi
callq 0x6ae9
movb 0x2(%rbx), %cl
andb $-0x11, %cl
shlb $0x4, %al
andb $0x10, %al
orb %cl, %al
movb %al, 0x2(%rbx)
movzbl %r15b, %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x6b5a
addw $0x2, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/gpu.c
// Function: GPU_destroy
void GPU_destroy(GPU* gpu) {
    free(gpu->backgroundMap);
    gpu->backgroundMap = NULL;
    free(gpu->framebuffer);
    gpu->framebuffer = NULL;
    free(gpu);
    gpu = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x21b0
movq $0x0, 0x18(%rbx)
movq 0x8(%rbx), %rdi
callq 0x21b0
movq %rbx, %rdi
popq %rbx
jmp 0x21b0
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/joypad.c
// Function: JOY_update
void JOY_update(Joypad* joy, Memory* mem) {
    uint8_t* JOYP = &(mem->logicalMemory[REG_JOYP]);
    *JOYP |= 0xCF;

    if (!getBit(*JOYP, 5)) {
        // Action buttons
        if (joy->a) *JOYP = setBit(*JOYP, 0, 0);
        if (joy->b) *JOYP = setBit(*JOYP, 1, 0);
        if (joy->select) *JOYP = setBit(*JOYP, 2, 0);
        if (joy->start) *JOYP = setBit(*JOYP, 3, 0);
    }
    if (!getBit(*JOYP, 4)) {
        // Direction buttons
        if (joy->right) *JOYP = setBit(*JOYP, 0, 0);
        if (joy->left) *JOYP = setBit(*JOYP, 1, 0);
        if (joy->up) *JOYP = setBit(*JOYP, 2, 0);
        if (joy->down) *JOYP = setBit(*JOYP, 3, 0);
    }

    if ((*JOYP & 0xF) != 0xF) {
        // Request joypad interrupt
        mem->logicalMemory[REG_IF] |= 0x10;
    }
}

// Assembly:
movb 0xff00(%rsi), %cl
movl %ecx, %eax
orb $-0x31, %al
movb %al, 0xff00(%rsi)
testb $0x20, %cl
jne 0x632c
cmpl $0x0, (%rdi)
je 0x6302
andb $-0x22, %al
movb %al, 0xff00(%rsi)
cmpl $0x0, 0x4(%rdi)
je 0x6310
andb $-0x3, %al
movb %al, 0xff00(%rsi)
cmpl $0x0, 0xc(%rdi)
je 0x631e
andb $-0x5, %al
movb %al, 0xff00(%rsi)
cmpl $0x0, 0x8(%rdi)
je 0x632c
andb $-0x9, %al
movb %al, 0xff00(%rsi)
testb $0x10, %al
jne 0x6368
cmpl $0x0, 0x1c(%rdi)
je 0x633e
andb $-0x12, %al
movb %al, 0xff00(%rsi)
cmpl $0x0, 0x18(%rdi)
je 0x634c
andb $-0x13, %al
movb %al, 0xff00(%rsi)
cmpl $0x0, 0x10(%rdi)
je 0x635a
andb $-0x5, %al
movb %al, 0xff00(%rsi)
cmpl $0x0, 0x14(%rdi)
je 0x6368
andb $-0x9, %al
movb %al, 0xff00(%rsi)
notb %al
testb $0xf, %al
je 0x6375
orb $0x10, 0xff0f(%rsi)
retq
nop
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/main.c
// Function: quit
int quit(CPU* cpu, GPU* gpu, Memory* mem, Audio* audio, Timer* timer, Joypad* joy, int returnCode) {
    // Dump external RAM to save
    if (mem->battery) {
        char* saveFileName = malloc(strlen(mem->romPath) + 5); // freed at the end of this block
        snprintf(saveFileName, strlen(mem->romPath) + 5, "%s.sav", mem->romPath);
        FILE* file = fopen(saveFileName, "wb+");
        for (int i = 0; i < (mem->extRamBanksNo * 0x2000); ++i) {
            fputc(mem->extRamBanks[i], file);
        }
        fclose(file);
        free(saveFileName);
    }

    // Destroy components
    CPU_destroy(cpu);
    GPU_destroy(gpu);
    MEM_destroy(mem);
    AUD_destroy(audio);
    TIMER_destroy(timer);
    JOY_destroy(joy);

    return returnCode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, %r15
movq %rcx, 0x10(%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movl 0x50(%rsp), %r14d
cmpl $0x0, 0x10040(%rdx)
je 0x69be
movq %r15, (%rsp)
movq %rbx, 0x8(%rsp)
movq 0x10048(%r12), %r14
movq %r14, %rdi
callq 0x20c0
leaq 0x5(%rax), %r15
movq %r15, %rdi
callq 0x2200
movq %rax, %rbx
leaq 0x20db(%rip), %rdx      # 0x8a22
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2250
leaq 0x20cb(%rip), %rsi      # 0x8a29
movq %rbx, %rdi
callq 0x21a0
movq %rax, %r14
cmpl $0x0, 0x10030(%r12)
jle 0x69a0
xorl %r15d, %r15d
movq 0x10028(%r12), %rax
movzbl (%rax,%r15), %edi
movq %r14, %rsi
callq 0x21e0
incq %r15
movslq 0x10030(%r12), %rax
shlq $0xd, %rax
cmpq %rax, %r15
jl 0x6977
movq %r14, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x21b0
movq 0x8(%rsp), %rbx
movl 0x50(%rsp), %r14d
movq (%rsp), %r15
movq %rbp, %rdi
callq 0x2b19
movq %r13, %rdi
callq 0x5a89
movq %r12, %rdi
callq 0x6a8b
movq 0x10(%rsp), %rdi
callq 0x252b
movq %r15, %rdi
callq 0x6fef
movq %rbx, %rdi
callq 0x62db
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/memory.c
// Function: MEM_getByte
uint8_t MEM_getByte(Memory* mem, uint16_t address) {
    if (address < OFFSET_ROMBANKN) {
        // ROM bank 0
        return mem->romBank0[address - OFFSET_ROMBANK0];

    } else if (address < OFFSET_VIDEORAM) {
        // ROM bank N
        return mem->romBankN[address - OFFSET_ROMBANKN];

    } else if (address >= OFFSET_EXTRAM && address < OFFSET_WORKRAMBANK0) {
        // External RAM
        return mem->extRamBanksNo != 0 && mem->extRamEnabled
            ? mem->extRam[address - OFFSET_EXTRAM]
            : 0xFF;

    } else {
        return mem->logicalMemory[address];
    }
}

// Assembly:
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x6afd
movzwl %si, %eax
addq 0x10000(%rdi), %rax
jmp 0x6b57
testw %si, %si
js 0x6b17
movq 0x10008(%rdi), %rax
movzwl %si, %ecx
addq %rcx, %rax
addq $-0x4000, %rax          # imm = 0xC000
jmp 0x6b57
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpl $0xa000, %eax           # imm = 0xA000
jne 0x6b4e
movb $-0x1, %al
cmpl $0x0, 0x10030(%rdi)
je 0x6b59
cmpb $0x1, 0x10034(%rdi)
jne 0x6b59
movq 0x10010(%rdi), %rax
movzwl %si, %ecx
addq %rcx, %rax
addq $-0xa000, %rax          # imm = 0xFFFF6000
jmp 0x6b57
movzwl %si, %eax
addq %rax, %rdi
movq %rdi, %rax
movb (%rax), %al
retq
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/memory.c
// Function: MEM_setByte
void MEM_setByte(Memory* mem, uint16_t address, uint8_t value) {
    if ((address > 0xDFFF && address < 0xFE00) || (address > 0xFE9F && address < 0xFF00)) {
        //fprintf(stdout, "[MEM] warning: attempt to write to restricted address %04x\n", address);
    } else if (address < OFFSET_VIDEORAM) {
        // Handle MBC operations
        CART_mbcDispatch(mem, address, value);

    } else if (address >= OFFSET_EXTRAM && address < OFFSET_WORKRAMBANK0 && mem->extRamBanksNo != 0 && mem->extRamEnabled) {
        //printf("extram write %d\n", mem->extRamBanksNo);
        //getchar();
        // Set external RAM
        mem->extRam[address - OFFSET_EXTRAM] = value;

    } else if (address == REG_DIV) {
        // Reset the DIV register
        mem->logicalMemory[REG_DIV] = 0;

    } else if (address == REG_DMA) {
        // Initiate a DMA transfer
        MEM_dmaBegin(mem, value);
        mem->logicalMemory[address] = value;

    } else if (address == REG_TAC) {
        // Preserve last 3 bits only (set rest to 1)
        mem->logicalMemory[address] = 0xF8 | (value & 0x7);

    } else {
        mem->logicalMemory[address] = value;
    }
}

// Assembly:
leal 0x2000(%rsi), %eax
movzwl %ax, %eax
cmpl $0x1e00, %eax           # imm = 0x1E00
setb %al
leal 0x160(%rsi), %ecx
cmpw $0x60, %cx
setb %cl
orb %al, %cl
je 0x6b7d
retq
testw %si, %si
js 0x6b8d
movzwl %si, %esi
movzbl %dl, %edx
jmp 0x2a35
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpl $0xa000, %eax           # imm = 0xA000
jne 0x6bc1
cmpl $0x0, 0x10030(%rdi)
je 0x6bc1
cmpb $0x1, 0x10034(%rdi)
jne 0x6bc1
movq 0x10010(%rdi), %rax
movzwl %si, %ecx
andl $0x1fff, %ecx           # imm = 0x1FFF
movb %dl, (%rax,%rcx)
retq
movzwl %si, %eax
cmpl $0xff46, %eax           # imm = 0xFF46
je 0x6beb
cmpl $0xff07, %eax           # imm = 0xFF07
je 0x6be1
cmpl $0xff04, %eax           # imm = 0xFF04
jne 0x6c09
movb $0x0, 0xff04(%rdi)
retq
orb $-0x8, %dl
movb %dl, 0xff07(%rdi)
retq
movb %dl, 0x10054(%rdi)
movb $0x0, 0x10055(%rdi)
movl $0x1, 0x10050(%rdi)
movb %dl, 0xff46(%rdi)
retq
movb %dl, (%rdi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/memory.c
// Function: MEM_popFromStack
uint16_t MEM_popFromStack(Memory* mem, uint16_t* SP) {
    *SP += 2;
    uint8_t byteUpper = MEM_getByte(mem, *SP - 1);
    uint8_t byteLower = MEM_getByte(mem, *SP - 2);
    return (byteUpper << 8) | byteLower;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzwl (%rsi), %r14d
leal 0x2(%r14), %eax
movw %ax, (%rsi)
leal 0x1(%r14), %eax
movzwl %ax, %esi
callq 0x6ae9
movl %eax, %ebp
movq %rbx, %rdi
movl %r14d, %esi
callq 0x6ae9
movzbl %bpl, %ecx
shll $0x8, %ecx
movzbl %al, %eax
orl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/memory.c
// Function: MEM_setRomBank
void MEM_setRomBank(Memory* mem, uint8_t bankNo) {
    // Mask the bank number to the required no. of bits
    if (bankNo >= mem->romBanksNo) {
        unsigned int requiredBits = intlog2(mem->romBanksNo);
        uint8_t _mask = (0xFF << requiredBits) & 0xFF;
        uint8_t mask = ~_mask;
        bankNo &= mask;
    }

    mem->romBankN = mem->romBanks + (0x4000 * bankNo);
}

// Assembly:
movl 0x10020(%rdi), %eax
cmpl %esi, %eax
jg 0x6f4d
testl %eax, %eax
je 0x6f3a
xorl %ecx, %ecx
cmpl $0x1, %eax
je 0x6f3f
movl %eax, %edx
shrl %edx
incl %ecx
cmpl $0x3, %eax
movl %edx, %eax
ja 0x6f2d
jmp 0x6f3f
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0xff, %eax
shll %cl, %eax
notb %al
andb %sil, %al
movl %eax, %esi
movzbl %sil, %eax
shll $0xe, %eax
addq 0x10018(%rdi), %rax
movq %rax, 0x10008(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/memory.c
// Function: MEM_dmaUpdate
void MEM_dmaUpdate(Memory* mem) {
    if (!mem->dmaInProgress) return;
    uint16_t sourceAddress = (mem->dmaAddressUpper << 8) | mem->dmaPosition;
    uint16_t destAddress = 0xFE00 | mem->dmaPosition;
    MEM_setByte(mem, destAddress, MEM_getByte(mem, sourceAddress));

    if (mem->dmaPosition == 0x9F) {
        mem->dmaPosition = 0x00;
        mem->dmaInProgress = 0;
    } else {
        ++(mem->dmaPosition);
    }
}

// Assembly:
cmpl $0x0, 0x10050(%rdi)
je 0x6fe4
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x10054(%rdi), %eax
shll $0x8, %eax
movzbl 0x10055(%rdi), %ebp
orl %ebp, %eax
movzwl %ax, %esi
callq 0x6ae9
movzbl %al, %edx
orl $0xfe00, %ebp           # imm = 0xFE00
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6b5a
movb 0x10055(%rbx), %al
cmpb $-0x61, %al
jne 0x6fd6
movb $0x0, 0x10055(%rbx)
movl $0x0, 0x10050(%rbx)
jmp 0x6fde
incb %al
movb %al, 0x10055(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/qad114[P]yobeboy/src/timer.c
// Function: TIMER_update
void TIMER_update(CPU* cpu, Memory* mem, Timer* timer) {
    uint8_t* TIMA = &(mem->logicalMemory[REG_TIMA]);
    uint8_t TAC = mem->logicalMemory[REG_TAC];

    // Update DIV every 256 machine cycles
    if (timer->divCounter == 64) {//256) {
        timer->divCounter = 0;
        updateDiv(mem, timer);
    } else {
        ++(timer->divCounter);
    }

    // Update TIMA
    if (!getBit(TAC, 2)) {
        timer->timaCounter = 0;
        *TIMA = 0;
        return;
    }

    int interval = 0;
    switch (TAC & 0x3) {
        case 0: interval = 256; break;
        case 1: interval = 4; break;
        case 2: interval = 16; break;
        case 3: interval = 64; break;
    }

    //++(timer->timaCounter);
    if (timer->timaCounter >= interval) {
        timer->timaCounter = (timer->timaCounter - interval + 1);
        updateTima(mem, timer);
    } else {
        ++(timer->timaCounter);
    }
}

// Assembly:
movzbl 0xff07(%rsi), %eax
movl (%rdx), %ecx
cmpl $0x40, %ecx
jne 0x7022
movl $0x0, (%rdx)
movb 0xff04(%rsi), %cl
testb %cl, %cl
jne 0x7018
movb 0xff04(%rsi), %cl
incb %cl
movb %cl, 0xff04(%rsi)
jmp 0x7026
incl %ecx
movl %ecx, (%rdx)
testb $0x4, %al
jne 0x7039
movl $0x0, 0x4(%rdx)
movb $0x0, 0xff05(%rsi)
retq
andl $0x3, %eax
leaq 0x1af5(%rip), %r8       # 0x8b38
movl 0x4(%rdx), %ecx
movl %ecx, %edi
subl (%r8,%rax,4), %edi
jge 0x7054
incl %ecx
movl %ecx, 0x4(%rdx)
retq
incl %edi
movl %edi, 0x4(%rdx)
movb 0xff05(%rsi), %al
cmpb $-0x1, %al
je 0x7067
incb %al
jmp 0x7074
movb 0xff06(%rsi), %al
orb $0x4, 0xff0f(%rsi)
movb %al, 0xff05(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/alias.c
// Function: get_my_alias
char		**get_my_alias()
{
  int		i;
  int		j;
  char		*txt;
  char		**alias;
  char		**valid_tab;

  i = 0;
  j = 0;
  txt = my_strdup(MY_ALIAS);
  if ((alias = my_str_to_wordtab(txt, '\n')) == NULL)
    return (NULL);
  if ((valid_tab = malloc(sizeof(char *) * ((my_tablen(alias)) + 1))) == NULL)
    return (NULL);
  while (alias[i] != NULL)
    {
      if ((my_find_str(alias[i], "alias ") == 1))
	valid_tab[j++] = my_strdup(alias[i]);
      i += 1;
    }
  valid_tab[j] = NULL;
  free_all(txt, alias);
  return (valid_tab);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x4bc4(%rip), %rdi      # 0x700e
callq 0x4d90
movq %rax, %rbx
movq %rax, %rdi
movl $0xa, %esi
callq 0x4c9f
testq %rax, %rax
je 0x24e8
movq %rax, %r14
movq %rax, %rdi
callq 0x4788
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x2140
testq %rax, %rax
je 0x24e8
movq %rax, %r15
movq (%r14), %rdi
xorl %r13d, %r13d
testq %rdi, %rdi
je 0x24d3
movq %r14, %rbp
addq $0x8, %rbp
leaq 0x4b70(%rip), %r12      # 0x7013
movq %r12, %rsi
callq 0x46c8
cmpl $0x1, %eax
jne 0x24c3
movq -0x8(%rbp), %rdi
callq 0x4d90
movslq %r13d, %rcx
incl %r13d
movq %rax, (%r15,%rcx,8)
movq (%rbp), %rdi
addq $0x8, %rbp
testq %rdi, %rdi
jne 0x24a3
movslq %r13d, %r13
movq $0x0, (%r15,%r13,8)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4715
jmp 0x24eb
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/alias.c
// Function: cut_alias
char		**cut_alias(char **tab)
{
  int		i;
  int		j;
  char		**alias;
  char		buffer[2];

  if ((alias = malloc(sizeof(char *) * ((my_tablen(tab)) + 1))) == NULL)
    return (NULL);
  i = 0;
  buffer[1] = '\0';
  while (tab[i] != NULL)
    {
      j = 0;
      alias[i] = NULL;
      while (tab[i][j] != ' ')
	j += 1;
      while (tab[i][++j] != '=')
	{
	  buffer[0] = tab[i][j];
	  alias[i] = my_strcat(alias[i], buffer, 1);
	}
      i += 1;
    }
  alias[i] = NULL;
  return (alias);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x4788
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x2140
movq %rax, %r14
testq %rax, %rax
je 0x25a7
movb $0x0, 0xf(%rsp)
movq (%rbx), %rax
xorl %r12d, %r12d
testq %rax, %rax
je 0x259f
leaq 0xe(%rsp), %r15
movq $0x0, (%r14,%r12,8)
movl $0x2, %ecx
xorl %edx, %edx
movq %rcx, %r13
cmpb $0x20, (%rax,%rdx)
leaq 0x1(%rdx), %rdx
leaq 0x1(%rcx), %rcx
jne 0x254d
movl %edx, %ecx
movb (%rax,%rcx), %cl
cmpb $0x3d, %cl
je 0x2592
xorl %eax, %eax
movb %cl, 0xe(%rsp)
movq %rax, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x4f08
movq (%rbx,%r12,8), %rcx
movb (%rcx,%r13), %cl
incq %r13
cmpb $0x3d, %cl
jne 0x256a
movq %rax, (%r14,%r12,8)
movq 0x8(%rbx,%r12,8), %rax
incq %r12
testq %rax, %rax
jne 0x253e
movq $0x0, (%r14,%r12,8)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/alias.c
// Function: cut_commands
char		**cut_commands(char **tab)
{
  int		i;
  int		j;
  char		**commands;
  char		buffer[2];

  if ((commands = malloc(sizeof(char *) * ((my_tablen(tab)) + 1))) == NULL)
    return (NULL);
  i = 0;
  buffer[1] = '\0';
  while (tab[i] != NULL)
    {
      j = 0;
      commands[i] = NULL;
      while (tab[i][j] != '\'')
	j += 1;
      while (tab[i][++j] != '\'')
	{
	  buffer[0] = tab[i][j];
	  commands[i] = my_strcat(commands[i], buffer, 1);
	}
      i += 1;
    }
  commands[i] = NULL;
  return (commands);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x4788
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x2140
movq %rax, %r14
testq %rax, %rax
je 0x2662
movb $0x0, 0xf(%rsp)
movq (%rbx), %rax
xorl %r12d, %r12d
testq %rax, %rax
je 0x265a
leaq 0xe(%rsp), %r15
movq $0x0, (%r14,%r12,8)
movl $0x2, %ecx
xorl %edx, %edx
movq %rcx, %r13
cmpb $0x27, (%rax,%rdx)
leaq 0x1(%rdx), %rdx
leaq 0x1(%rcx), %rcx
jne 0x2608
movl %edx, %ecx
movb (%rax,%rcx), %cl
cmpb $0x27, %cl
je 0x264d
xorl %eax, %eax
movb %cl, 0xe(%rsp)
movq %rax, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x4f08
movq (%rbx,%r12,8), %rcx
movb (%rcx,%r13), %cl
incq %r13
cmpb $0x27, %cl
jne 0x2625
movq %rax, (%r14,%r12,8)
movq 0x8(%rbx,%r12,8), %rax
incq %r12
testq %rax, %rax
jne 0x25f9
movq $0x0, (%r14,%r12,8)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/alias.c
// Function: create_new_command
char		**create_new_command(char **commands, char **alias,
				     t_info_shell *shell, int size)
{
  t_count	ct;
  char		**new_tab;
  char		**tmp;

  (1 == 1) ? (ct.i = 0, ct.j = 0, ct.k = 0) : 1;
  if ((new_tab= malloc(sizeof(char *) * size)) == NULL)
    return (NULL);
  while (shell->tab[ct.i] != NULL)
    {
      ct.l = -1;
      while (alias[++ct.l] != NULL)
	{
	  if (((my_strcmp(shell->tab[ct.i], alias[ct.l])) == 0) && ++ct.i)
	    {
	      tmp = my_str_to_wordtab(commands[ct.l], ' ');
	      while (tmp[ct.k] != NULL)
		new_tab[ct.j++] = my_strdup(tmp[ct.k++]);
	    }
	}
      new_tab[ct.j++] = my_strdup(shell->tab[ct.i++]);
      if (new_tab[ct.j - 1] == NULL)
	break ;
    }
  (1 == 1) ? (new_tab[ct.j] = NULL, free_all(NULL, tmp)) : 1;
  return (new_tab);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, 0x30(%rsp)
movslq %ecx, %rdi
shlq $0x3, %rdi
callq 0x2140
movq %rax, %r15
testq %rax, %rax
je 0x27bf
movq $0x0, 0x8(%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
movq %r15, 0x28(%rsp)
movq %r13, 0x20(%rsp)
movq 0x18(%r14), %rax
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x27ad
movq %rsi, 0x18(%rsp)
movq (%r13), %rsi
testq %rsi, %rsi
je 0x278e
xorl %ebx, %ebx
movq 0x18(%r14), %rax
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4752
testl %eax, %eax
jne 0x2772
incl %r12d
jne 0x2702
xorl %r12d, %r12d
jmp 0x2772
movq 0x30(%rsp), %rax
movq (%rax,%rbx,8), %rdi
movl $0x20, %esi
callq 0x4c9f
movslq 0x8(%rsp), %rdx
movq (%rax,%rdx,8), %rdi
testq %rdi, %rdi
movq %rax, 0x18(%rsp)
je 0x2772
movl %ebp, 0x14(%rsp)
movslq %ebp, %rcx
leaq (%rax,%rdx,8), %rbp
addq $0x8, %rbp
leaq (%r15,%rcx,8), %r15
xorl %r13d, %r13d
callq 0x4d90
movq %rax, (%r15,%r13,8)
movq (%rbp,%r13,8), %rdi
incq %r13
testq %rdi, %rdi
jne 0x273e
movq 0x8(%rsp), %rax
addl %r13d, %eax
movq %rax, 0x8(%rsp)
movl 0x14(%rsp), %ebp
addl %r13d, %ebp
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %r13
movq 0x8(%r13,%rbx,8), %rsi
incq %rbx
testq %rsi, %rsi
jne 0x26e4
movq 0x18(%r14), %rax
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdi
incl %r12d
callq 0x4d90
movslq %ebp, %rcx
incl %ebp
movq %rax, (%r15,%rcx,8)
testq %rax, %rax
movq 0x18(%rsp), %rsi
jne 0x26bc
movslq %ebp, %rax
movq $0x0, (%r15,%rax,8)
xorl %edi, %edi
callq 0x4715
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/alias.c
// Function: recognize_my_alias
int		recognize_my_alias(char **commands,
				   char **alias, t_info_shell *shell)
{
  int		i;
  int		j;
  int		size;

  i = -1;
  size = (my_tablen(shell->tab) + my_tablen(commands)) + 1;
  while (shell->tab[++i] != NULL)
    {
      j = -1;
      while (alias[++j] != NULL)
	{
	  if ((my_strcmp(shell->tab[i], alias[j])) == 0)
	    {
	      if (my_tablen(shell->tab) != 1)
		shell->tab = create_new_command(commands, alias, shell, size);
	      else
		{
		  free_all(NULL, shell->tab);
		  shell->tab = my_str_to_wordtab(commands[j], ' ');
		}
	      return (0);
	    }
	}
    }
  return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x18(%rdx), %rdi
callq 0x4788
movl %eax, %r12d
movq %r14, %rdi
callq 0x4788
movq 0x18(%rbx), %rcx
movl $0x1, %ebp
cmpq $0x0, (%rcx)
je 0x288c
addl %r12d, %eax
incl %eax
movl %eax, 0x4(%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq (%r15,%r13), %rsi
movq 0x18(%rbx), %rax
testq %rsi, %rsi
je 0x283b
movq (%rax,%r12,8), %rdi
callq 0x4752
addq $0x8, %r13
testl %eax, %eax
jne 0x281b
jmp 0x284a
cmpq $0x0, 0x8(%rax,%r12,8)
leaq 0x1(%r12), %r12
jne 0x2818
jmp 0x288c
movq 0x18(%rbx), %rdi
callq 0x4788
cmpl $0x1, %eax
jne 0x2874
movq 0x18(%rbx), %rsi
xorl %edi, %edi
callq 0x4715
movq -0x8(%r14,%r13), %rdi
movl $0x20, %esi
callq 0x4c9f
jmp 0x2886
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl 0x4(%rsp), %ecx
callq 0x2673
movq %rax, 0x18(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/alias_detection.c
// Function: create_my_alias
int		create_my_alias(t_info_shell *shell)
{
  char		*new_alias;

  if (alias_check(shell) == 0)
    {
      new_alias = create_valid_alias(shell->tab);
      if (shell->alias_value == 0)
	shell->alias_tab = add_new_alias(shell->alias_tab, new_alias);
      shell->alias_value = 0;
    }
  return (0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x29ec
testl %eax, %eax
jne 0x28d3
movq 0x18(%rbx), %rdi
callq 0x2a80
cmpl $0x0, 0x44(%rbx)
jne 0x28cc
movq 0x30(%rbx), %rdi
movq %rax, %rsi
callq 0x2b21
movq %rax, 0x30(%rbx)
movl $0x0, 0x44(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/alias_detection.c
// Function: replace_existing_alias
int		replace_existing_alias(char *new_alias, t_info_shell *shell)
{
  char		**alias;
  int		i;

  i = 0;
  alias = cut_alias(shell->alias_tab);
  while (alias[i] != NULL)
    {
      if (my_strcmp(alias[i], new_alias) == 0)
	{
	  shell->alias_tab[i] = my_strdup(create_valid_alias(shell->tab));
	  shell->alias_value = 1;
	}
      i += 1;
    }
  free_all(NULL, alias);
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rsi), %rdi
callq 0x24fd
movq %rax, %r15
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2936
xorl %r12d, %r12d
movq %r14, %rsi
callq 0x4752
testl %eax, %eax
jne 0x2928
movq 0x18(%rbx), %rdi
callq 0x2a80
movq %rax, %rdi
callq 0x4d90
movq 0x30(%rbx), %rcx
movq %rax, (%rcx,%r12)
movl $0x1, 0x44(%rbx)
movq 0x8(%r15,%r12), %rdi
addq $0x8, %r12
testq %rdi, %rdi
jne 0x28fc
xorl %edi, %edi
movq %r15, %rsi
callq 0x4715
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/alias_detection.c
// Function: my_alias
int		my_alias(t_info_shell *shell)
{
  char		**alias;
  char		**commands;

  if (((alias = cut_alias(shell->alias_tab)) == NULL)
      || ((commands = cut_commands(shell->alias_tab)) == NULL))
    return (84);
  if ((my_strcmp(shell->tab[0], "alias") == 0)
      && (shell->tab[1] != NULL)
      && (shell->tab[2] != NULL))
    replace_existing_alias(shell->tab[1], shell);
  recognize_my_alias(commands, alias, shell);
  free_all(NULL, alias);
  free_all(NULL, commands);
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x30(%rdi), %rdi
callq 0x24fd
movl $0x54, %r12d
testq %rax, %rax
je 0x29bd
movq %rax, %rbx
movq 0x30(%r14), %rdi
callq 0x25b8
testq %rax, %rax
je 0x29bd
movq %rax, %r15
movq 0x18(%r14), %rax
movq (%rax), %rdi
leaq 0x468b(%rip), %rsi      # 0x701a
callq 0x4752
testl %eax, %eax
je 0x29cc
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x27d1
xorl %r12d, %r12d
xorl %edi, %edi
movq %rbx, %rsi
callq 0x4715
xorl %edi, %edi
movq %r15, %rsi
callq 0x4715
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%r14), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x2998
cmpq $0x0, 0x10(%rax)
je 0x2998
movq %r14, %rsi
callq 0x28d7
jmp 0x2998
nop
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/create_alias.c
// Function: alias_check
int		alias_check(t_info_shell *shell)
{
  if (my_tablen(shell->tab) == 1)
    {
      my_printf("%t", shell->alias_tab);
      return (1);
    }
  if (my_tablen(shell->tab) == 2)
    return (1);
  if ((my_strcmp(shell->tab[0], shell->tab[1]) == 0) && (shell->tab[2] != NULL))
    {
      my_printf("%s", ALIAS_ERROR);
      return (1);
    }
  if ((my_strcmp(shell->tab[0], shell->tab[1]) == 0))
    return (1);
  return (0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
callq 0x4788
cmpl $0x1, %eax
jne 0x2a1a
movq 0x30(%r14), %rsi
leaq 0x4614(%rip), %rdi      # 0x7020
xorl %eax, %eax
callq 0x5bb6
movl $0x1, %ebx
jmp 0x2a76
movq 0x18(%r14), %rdi
callq 0x4788
movl $0x1, %ebx
cmpl $0x2, %eax
je 0x2a76
movq 0x18(%r14), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x4752
movq 0x18(%r14), %rcx
testl %eax, %eax
je 0x2a5a
movq (%rcx), %rdi
movq 0x8(%rcx), %rsi
callq 0x4752
xorl %ebx, %ebx
testl %eax, %eax
sete %bl
jmp 0x2a76
cmpq $0x0, 0x10(%rcx)
je 0x2a45
leaq 0x4780(%rip), %rdi      # 0x71e8
leaq 0x45b4(%rip), %rsi      # 0x7023
xorl %eax, %eax
callq 0x5bb6
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/create_alias.c
// Function: create_valid_alias
char		*create_valid_alias(char **tab)
{
  int		i;
  char		*command;

  i = 2;
  command = NULL;
  command = my_strcat(my_strcat(my_strcat(tab[0], " ", 2), tab[1], 2), "='", 1);
  while (tab[i] != NULL)
    {
      if (i != 2)
	command = my_strcat(command, " ", 1);
      command = my_strcat(command, tab[i], 1);
      i += 1;
    }
  command = my_strcat(command, "'\0", 2);
  return (command);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x457a(%rip), %rsi      # 0x700c
movl $0x2, %edx
callq 0x4f08
movq 0x8(%rbx), %rsi
movq %rax, %rdi
movl $0x2, %edx
callq 0x4f08
leaq 0x4594(%rip), %rsi      # 0x7048
movq %rax, %rdi
movl $0x1, %edx
callq 0x4f08
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x2b08
xorl %r15d, %r15d
leaq 0x4538(%rip), %r14      # 0x700c
testq %r15, %r15
je 0x2aee
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x4f08
movq 0x10(%rbx,%r15,8), %rsi
movq %rax, %rdi
movl $0x1, %edx
callq 0x4f08
movq 0x18(%rbx,%r15,8), %rsi
incq %r15
testq %rsi, %rsi
jne 0x2ad4
leaq 0x453c(%rip), %rsi      # 0x704b
movq %rax, %rdi
movl $0x2, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x4f08
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/my_alias/create_alias.c
// Function: add_new_alias
char		**add_new_alias(char **tab, char *command)
{
  int		i;
  char		**new_tab;

  i = 0;
  if ((new_tab = malloc(sizeof(char *) * ((my_tablen(tab) + 1) + 1))) == NULL)
    return (NULL);
  while (tab[i] != NULL)
    {
      new_tab[i] = my_strdup(tab[i]);
      i += 1;
    }
  new_tab[i] = my_strdup(command);
  new_tab[i + 1] = NULL;
  free_all(command, tab);
  return (new_tab);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4788
cltq
leaq 0x10(,%rax,8), %rdi
callq 0x2140
movq %rax, %r15
testq %rax, %rax
je 0x2b89
movq (%rbx), %rdi
xorl %r12d, %r12d
testq %rdi, %rdi
je 0x2b69
callq 0x4d90
movq %rax, (%r15,%r12,8)
movq 0x8(%rbx,%r12,8), %rdi
incq %r12
jmp 0x2b51
movq %r14, %rdi
callq 0x4d90
movq %rax, (%r15,%r12,8)
movq $0x0, 0x8(%r15,%r12,8)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4715
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/builtin/my_cd.c
// Function: cd_minus
int		cd_minus(char *path, char **dir, char **save)
{
  if ((my_strcmp(path, "-") == 0))
    {
      if (*dir != NULL)
	{
	  *save = getcwd((char *)NULL, 0);
	  chdir(*dir);
	}
      else
	my_printf("%s", CD_DIR);
      *dir = *save;
      return (0);
    }
  return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x446a(%rip), %rsi      # 0x706a
callq 0x4752
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x2c49
cmpq $0x0, (%rbx)
je 0x2c2c
xorl %edi, %edi
xorl %esi, %esi
callq 0x20c0
movq %rax, (%r14)
movq (%rbx), %rdi
callq 0x2090
jmp 0x2c41
leaq 0x45b5(%rip), %rdi      # 0x71e8
leaq 0x4432(%rip), %rsi      # 0x706c
xorl %eax, %eax
callq 0x5bb6
movq (%r14), %rax
movq %rax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/builtin/my_cd.c
// Function: my_cd
int		my_cd(t_info_shell *shell)
{
  char		*path;
  static char	*dir = NULL;
  static char	*save = NULL;

  if (cd_check(shell->tab) == 1)
    return (0);
  if (shell->tab[1] == NULL)
    path = get_path(environ, "HOME");
  else
    path = shell->tab[1];
  if ((cd_minus(path, &dir, &save)) == 0)
    return (0);
  dir = getcwd((char *)NULL, 0);
  if ((chdir(path)) == -1)
    {
      shell->exit_value = 1;
      my_printf("%s: %s.\n", path, strerror(errno));
      return (84);
    }
  free(path);
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq $-0x1, %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
leaq 0x1(%rcx), %rcx
jne 0x2c64
cmpq $0x3, %rcx
jb 0x2c93
leaq 0x456b(%rip), %rdi      # 0x71e8
leaq 0x43cd(%rip), %rsi      # 0x7051
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x5bb6
jmp 0x2d26
movq 0x8(%rax), %r14
testq %r14, %r14
jne 0x2cb5
movq 0x8345(%rip), %rax      # 0xafe8
movq (%rax), %rdi
leaq 0x43dd(%rip), %rsi      # 0x708a
callq 0x49ce
movq %rax, %r14
leaq 0x853c(%rip), %rsi      # 0xb1f8
leaq 0x853d(%rip), %rdx      # 0xb200
movq %r14, %rdi
callq 0x2bef
xorl %r15d, %r15d
testl %eax, %eax
je 0x2d26
xorl %edi, %edi
xorl %esi, %esi
callq 0x20c0
movq %rax, 0x8516(%rip)      # 0xb1f8
movq %r14, %rdi
callq 0x2090
cmpl $-0x1, %eax
je 0x2cf9
movq %r14, %rdi
callq 0x2030
jmp 0x2d26
movl $0x1, 0x3c(%rbx)
callq 0x2040
movl (%rax), %edi
callq 0x21d0
leaq 0x437c(%rip), %rdi      # 0x708f
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5bb6
movl $0x54, %r15d
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/builtin/my_display_env.c
// Function: my_display_env
int		my_display_env(t_info_shell *shell)
{
  int		i;

  (void)shell;
  i = 0;
  while (environ[i] != NULL)
    {
      my_printf("%s\n", environ[i]);
      i += 1;
    }
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x82ac(%rip), %r14      # 0xafe8
movq (%r14), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0x2d6e
movl $0x8, %r15d
leaq 0x465b(%rip), %rbx      # 0x73af
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5bb6
movq (%r14), %rax
movq (%rax,%r15), %rsi
addq $0x8, %r15
testq %rsi, %rsi
jne 0x2d54
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/builtin/my_setenv.c
// Function: check
int		check(t_info_shell *shell)
{
  int		i;

  i = 0;
  if (shell->tab[1] == NULL)
    {
      my_display_env(shell);
      return (0);
    }
  if (verif_first_letter(shell->tab[1]) == 1)
    {
      my_printf("%s%s", SETENV_NAME, SETENV_LETTER);
      return (1);
    }
  if (my_str_isalpha(shell->tab[1]) == 1)
    {
      my_printf("%s %s\n", SETENV_NAME, SETENV_ALPHA);
      return (1);
    }
  while (shell->tab[i++] != NULL)
    if (i > 3)
      {
	my_printf("%s", SETENV_AV);
	return (1);
      }
  return (0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x2daa
callq 0x4d7e
cmpl $0x1, %eax
jne 0x2db6
leaq 0x42fe(%rip), %rdi      # 0x7098
leaq 0x42fc(%rip), %rsi      # 0x709d
leaq 0x4310(%rip), %rdx      # 0x70b8
jmp 0x2ddd
movq %rbx, %rdi
callq 0x2d30
xorl %eax, %eax
jmp 0x2de9
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x4d50
cmpl $0x1, %eax
jne 0x2deb
leaq 0x4434(%rip), %rdi      # 0x7203
leaq 0x42c7(%rip), %rsi      # 0x709d
leaq 0x42f2(%rip), %rdx      # 0x70cf
xorl %eax, %eax
callq 0x5bb6
movl $0x1, %eax
popq %rbx
retq
movq 0x18(%rbx), %rcx
xorl %eax, %eax
xorl %edx, %edx
cmpq $0x0, (%rcx,%rdx,8)
je 0x2de9
incq %rdx
cmpq $0x4, %rdx
jne 0x2df3
leaq 0x43de(%rip), %rdi      # 0x71e8
leaq 0x42df(%rip), %rsi      # 0x70f0
xorl %eax, %eax
callq 0x5bb6
jmp 0x2de4
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/builtin/my_setenv.c
// Function: my_set_env
int		my_set_env(t_info_shell *shell)
{
  if (check(shell) == 1)
    {
      shell->exit_value = 1;
      return (1);
    }
  if (shell->tab[2] == NULL)
    {
      if ((shell->tab[2] = malloc(sizeof(char) * 1)) == NULL)
	return (84);
      shell->tab[2][0] = '\0';
    }
  setenv(shell->tab[1], shell->tab[2], 1);
  return (0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2d78
testl %eax, %eax
je 0x2e38
movl $0x1, 0x3c(%rbx)
movl $0x1, %eax
jmp 0x2e7b
movq 0x18(%rbx), %r14
movq 0x10(%r14), %rsi
testq %rsi, %rsi
jne 0x2e6b
movl $0x1, %edi
callq 0x2140
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x2e83
movq 0x18(%rbx), %rax
movq 0x10(%rax), %rax
movb $0x0, (%rax)
movq 0x18(%rbx), %r14
movq 0x10(%r14), %rsi
movq 0x8(%r14), %rdi
movl $0x1, %edx
callq 0x2060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x54, %eax
jmp 0x2e7b
nop
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/builtin/my_unsetenv.c
// Function: check_tab
int		check_tab(char **tab)
{
  int		i;

  i = 0;
  while (tab[i] != NULL)
    i += 1;
  if (i == 1)
    {
      my_printf("unsetenv: Too few arguments.\n");
      return (1);
    }
  return (0);
}

// Assembly:
xorl %ecx, %ecx
cmpq $0x0, (%rdi,%rcx,8)
leaq 0x1(%rcx), %rcx
jne 0x2e8e
xorl %eax, %eax
cmpq $0x2, %rcx
jne 0x2eb9
pushq %rax
leaq 0x4264(%rip), %rdi      # 0x710d
xorl %eax, %eax
callq 0x5bb6
movl $0x1, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/builtin/my_unsetenv.c
// Function: my_unset_env
int		my_unset_env(t_info_shell *shell)
{
  int		i;

  if (check_tab(shell->tab) == 1)
    return (1);
  i = 1;
  while (shell->tab[i] != NULL)
    {
      if (shell->tab[i] == NULL)
	break ;
      unsetenv(shell->tab[i]);
      i += 1;
    }
  return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
xorl %ecx, %ecx
cmpq $0x0, (%rax,%rcx,8)
leaq 0x1(%rcx), %rcx
jne 0x2ec7
cmpq $0x2, %rcx
jne 0x2eed
leaq 0x422e(%rip), %rdi      # 0x710d
xorl %eax, %eax
callq 0x5bb6
movl $0x1, %ebp
jmp 0x2f14
movq 0x8(%rax), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x2f14
movl $0x10, %r14d
callq 0x2180
movq 0x18(%rbx), %rax
movq (%rax,%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x2efe
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/execution/execute_command.c
// Function: core_exec
char		*core_exec(t_info_shell *shell, char *env_path,
			   char *valid_path, char **paths)
{
  int		i;

  i = 0;
  while (paths[i] != NULL)
    {
      if ((paths[i] = my_strcat(paths[i], "/", 1)) == NULL
	  || (shell->tab[0] != NULL
	      && (paths[i] = my_strcat(paths[i], shell->tab[0], 1)) == NULL))
	return (NULL);
      if (shell->tab[0] != NULL && access(shell->tab[0], X_OK) != -1)
	{
	  valid_path = my_strcat(shell->tab[0], NULL, 2);
	  free_all(env_path, paths);
	  return (valid_path);
	}
      if (shell->tab[0] != NULL && access(paths[i], X_OK) != -1)
	{
	  valid_path = my_strcat(paths[i], NULL, 2);
	  free_all(env_path, paths);
	  return (valid_path);
	}
      i += 1;
    }
  return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x2fe9
movq %rcx, %rbx
movq %rsi, %r14
leaq 0x41c8(%rip), %r12      # 0x7131
movq %rcx, %r13
movq %r12, %rsi
movl $0x1, %edx
callq 0x4f08
movq %rax, (%r13)
testq %rax, %rax
je 0x2fe9
movq 0x18(%r15), %rcx
movq (%rcx), %rsi
testq %rsi, %rsi
je 0x2fdc
movq %rax, %rdi
movl $0x1, %edx
callq 0x4f08
movq %rax, (%r13)
testq %rax, %rax
je 0x2fe9
movq 0x18(%r15), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2fdc
movl $0x1, %esi
callq 0x2170
movq 0x18(%r15), %rcx
cmpl $-0x1, %eax
jne 0x2ff8
cmpq $0x0, (%rcx)
je 0x2fdc
movq (%r13), %rdi
movl $0x1, %esi
callq 0x2170
cmpl $-0x1, %eax
jne 0x2ff5
movq 0x8(%r13), %rdi
addq $0x8, %r13
testq %rdi, %rdi
jne 0x2f6c
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r13, %rcx
movq (%rcx), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4f08
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4715
movq %r15, %rax
jmp 0x2feb
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/execution/execute_command.c
// Function: is_valid_command
char		*is_valid_command(t_info_shell *shell)
{
  char		*without_path;
  char		*env_path;
  char		*valid_path;
  char		**paths;
  char		*output;

  if ((env_path = get_path(environ, "PATH")) == NULL)
    env_path = shell->path_save;
  if ((paths = my_str_to_wordtab(env_path, ':')) == NULL)
    {
      without_path = my_strcat(PATH, PATH_TWO, 2);
      without_path = my_strcat(without_path, PATH_THREE, 2);
      paths = my_str_to_wordtab(without_path, ':');
    }
  valid_path = NULL;
  if ((output = core_exec(shell, env_path, valid_path, paths)) != NULL)
    return (output);
  free_all(env_path, paths);
  return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x7fbf(%rip), %rax      # 0xafe8
movq (%rax), %rdi
leaq 0x4100(%rip), %rsi      # 0x7133
callq 0x49ce
movq %rax, %rbx
testq %rax, %rax
jne 0x3044
movq 0x10(%r14), %rbx
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x4c9f
movq %rax, %r15
testq %rax, %rax
jne 0x3095
leaq 0x40d8(%rip), %rdi      # 0x7138
leaq 0x40fa(%rip), %rsi      # 0x7161
movl $0x2, %edx
callq 0x4f08
leaq 0x4116(%rip), %rsi      # 0x718e
movq %rax, %rdi
movl $0x2, %edx
callq 0x4f08
movq %rax, %rdi
movl $0x3a, %esi
callq 0x4c9f
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x2f44
movq %rax, %r14
testq %rax, %rax
jne 0x30b6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4715
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/execution/execute_command.c
// Function: execute_command
int		execute_command(t_info_shell *shell)
{
  int		i;
  char		*valid_path;

  i = 0;
  while (i < 11)
    {
      if (my_strcmp(shell->tab[0], g_key[i].code) == 0)
	{
	  g_key[i].fc(shell);
	  return (shell->exit_value);
	}
      i += 1;
    }
  valid_path = is_valid_command(shell);
  shell->exit_value = exec(shell, valid_path);
  return (shell->exit_value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x8, %r14d
leaq 0x7a9c(%rip), %r15      # 0xab70
movq 0x18(%rbx), %rax
movq (%rax), %rdi
movq -0x8(%r14,%r15), %rsi
callq 0x4752
testl %eax, %eax
je 0x310e
addq $0x10, %r14
cmpq $0xb8, %r14
jne 0x30d4
movq %rbx, %rdi
callq 0x301a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x33b8
movl %eax, 0x3c(%rbx)
jmp 0x3118
movq %rbx, %rdi
callq *(%r14,%r15)
movl 0x3c(%rbx), %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/execution/execution_in_chain.c
// Function: change_command
int		change_command(t_info_shell *shell)
{
  t_count	ct;
  char		*tmp;

  (1 == 1) ? (ct.i = 0, ct.j = 0, ct.k = 0) : 1;
  if ((tmp = malloc(sizeof(char) * (my_strlen(shell->command)))) == NULL)
    return (84);
  if ((shell->mem = malloc(sizeof(char)
			   * (my_strlen(shell->command)))) == NULL)
    return (84);
  while (shell->command[ct.i] != ';')
    {
      if (shell->command[ct.i] == '\0')
	return (free_tmp(shell, tmp));
      tmp[ct.j++] = shell->command[ct.i++];
    }
  tmp[ct.j] = '\0';
  while (shell->command[++ct.i] != '\0')
    shell->mem[ct.k++] = shell->command[ct.i];
  shell->mem[ct.k] = '\0';
  shell->command = my_strdup(tmp);
  free(tmp);
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x4704
movslq %eax, %rdi
callq 0x2140
movl $0x54, %r15d
testq %rax, %rax
je 0x31ed
movq %rax, %r14
movq (%rbx), %rdi
callq 0x4704
movslq %eax, %rdi
callq 0x2140
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x31ed
movq (%rbx), %rdx
xorl %ecx, %ecx
movzbl (%rdx,%rcx), %esi
cmpl $0x3b, %esi
je 0x3192
testl %esi, %esi
je 0x3182
movb %sil, (%r14,%rcx)
incq %rcx
jmp 0x316c
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x47c4
movl %ecx, %esi
movb $0x0, (%r14,%rsi)
leal 0x1(%rcx), %esi
movb (%rdx,%rsi), %sil
xorl %r15d, %r15d
testb %sil, %sil
je 0x31d4
movl $0x2, %eax
xorl %edx, %edx
movq 0x8(%rbx), %rdi
movb %sil, (%rdi,%rdx)
incq %rdx
movq (%rbx), %rsi
addq %rax, %rsi
movb (%rcx,%rsi), %sil
incq %rax
testb %sil, %sil
jne 0x31af
movq 0x8(%rbx), %rax
movl %edx, %ecx
jmp 0x31d6
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movq %r14, %rdi
callq 0x4d90
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x2030
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/execution/execution_in_chain.c
// Function: change_tab
int		change_tab(t_info_shell *shell)
{
  t_count	ct;
  char		**tmp;

  ct.i = 0;
  ct.j = 0;
  ct.k = 0;
  if (((tmp = malloc(sizeof(char *) * (shell->tablen + 1))) == NULL)
      || ((shell->tab_mem = malloc(sizeof(char *) * shell->tablen)) == NULL))
    return (84);
  while (my_strcmp(shell->tab[ct.i], ";") != 0)
    {
      if (shell->tab[ct.i] == NULL)
	{
	  shell->tab_mem[0] = NULL;
	  return (0);
	}
      tmp[ct.j++] = shell->tab[ct.i++];
    }
  tmp[ct.j] = NULL;
  while (shell->tab[++ct.i] != NULL)
    shell->tab_mem[ct.k++] = my_strdup(shell->tab[ct.i]);
  shell->tab_mem[ct.k] = NULL;
  shell->tab = tmp;
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x38(%rdi), %r12
leaq 0x8(,%r12,8), %rdi
callq 0x2140
movl $0x54, %r15d
testq %rax, %rax
je 0x32ff
movq %rax, %r14
shlq $0x3, %r12
movq %r12, %rdi
callq 0x2140
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x32ff
movq 0x18(%rbx), %rax
movq (%rax), %rdi
leaq 0x3f96(%rip), %rsi      # 0x71e2
callq 0x4752
testl %eax, %eax
je 0x3289
xorl %ecx, %ecx
leaq 0x3f84(%rip), %r15      # 0x71e2
movq 0x18(%rbx), %rax
movq (%rax,%rcx,8), %rdx
testq %rdx, %rdx
je 0x32dd
leaq 0x1(%rcx), %r12
movq %rdx, (%r14,%rcx,8)
movq 0x8(%rax,%rcx,8), %rdi
movq %r15, %rsi
callq 0x4752
movq %r12, %rcx
testl %eax, %eax
jne 0x325e
jmp 0x328c
xorl %r12d, %r12d
movl %r12d, %eax
movq $0x0, (%r14,%rax,8)
movq 0x18(%rbx), %rcx
movslq %r12d, %rdx
movq 0x8(%rcx,%rdx,8), %rdi
xorl %r15d, %r15d
testq %rdi, %rdi
je 0x32ed
leaq 0x10(,%rax,8), %r12
xorl %ecx, %ecx
movq %rcx, %r13
callq 0x4d90
movq 0x20(%rbx), %rdx
leaq 0x1(%r13), %rcx
movq %rax, (%rdx,%r13,8)
movq 0x18(%rbx), %rax
addq %r12, %rax
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
jne 0x32b5
movl %ecx, %eax
jmp 0x32ef
movq 0x20(%rbx), %rax
movq $0x0, (%rax)
xorl %r15d, %r15d
jmp 0x32ff
xorl %eax, %eax
movq 0x20(%rbx), %rcx
movq $0x0, (%rcx,%rax,8)
movq %r14, 0x18(%rbx)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/MaxenceEpitech[P]42sh/execution/execution_in_chain.c
// Function: execution_in_chain
int		execution_in_chain(t_info_shell *shell)
{
  wordexp_t     p;
  char          **wordextab;

  shell->mem = BOOL;
  while (shell->mem != NULL)
    {
      if (((change_command(shell)) == 84)
	  || ((change_tab(shell)) == 84)
	  || ((my_magic_quote(shell)) == 84))
	return (84);
      if ((wordexp(shell->command, &p, 0)) == 0)
	{
	  wordextab = p.we_wordv;
	  shell->tab = copy_my_tab(wordextab);
	  wordfree(&p);
	}
      if (((my_alias(shell)) == 84) || ((parsing(shell)) == 84))
	return (84);
      shell->command = shell->mem;
      shell->tab = shell->tab_mem;
    }
  return (shell->exit_value);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x3cf0(%rip), %rax      # 0x700e
movq %rax, 0x8(%rdi)
leaq 0x8(%rsp), %r14
movl $0x54, %ebp
movq %rbx, %rdi
callq 0x3120
cmpl $0x54, %eax
je 0x33ab
movq %rbx, %rdi
callq 0x31f6
cmpl $0x54, %eax
je 0x33ab
movq %rbx, %rdi
callq 0x59dd
cmpl $0x54, %eax
je 0x33ab
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x21c0
testl %eax, %eax
jne 0x337a
movq 0x10(%rsp), %rdi
callq 0x3fe0
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x21a0
movq %rbx, %rdi
callq 0x294e
cmpl $0x54, %eax
je 0x33ab
movq %rbx, %rdi
callq 0x377b
cmpl $0x54, %eax
je 0x33ab
movq 0x8(%rbx), %rax
movq 0x20(%rbx), %rcx
movq %rax, (%rbx)
movq %rcx, 0x18(%rbx)
testq %rax, %rax
jne 0x332c
movl 0x3c(%rbx), %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop