LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/vtereshkov[P]umka-lang/src/umka_vm.c
// Function: qsortFastCompare
static int qsortFastCompare(const void *a, const void *b, void *context)
{
    FastCompareContext *fastCompareContext = (FastCompareContext *)context;

    const Type *itemType = fastCompareContext->itemType;
    const int sign = fastCompareContext->ascending ? 1 : -1;
    Error *error = fastCompareContext->error;

    Slot lhsItem = {.ptrVal = (char *)a + fastCompareContext->offset};
    Slot rhsItem = {.ptrVal = (char *)b + fastCompareContext->offset};

    doDerefImpl(&lhsItem, itemType->kind, error);
    doDerefImpl(&rhsItem, itemType->kind, error);

    const int64_t itemDiff = doCompare(lhsItem, rhsItem, itemType, error); 
    return itemDiff == 0 ? 0 : itemDiff > 0 ? sign : -sign;   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r12
movq (%rdx), %rbx
movq 0x8(%rdx), %r13
movb 0x10(%rdx), %r15b
movq 0x18(%rdx), %rcx
movl (%rbx), %ebp
testq %rdi, %rdi
je 0x724fb
addq %r13, %r12
addl $-0x4, %ebp
cmpl $0x16, %ebp
ja 0x72432
leaq 0x9ac2(%rip), %rax      # 0x7beb0
movslq (%rax,%rbp,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movq (%r12), %r12
jmp 0x7244d
movzbl (%r12), %r12d
jmp 0x7244d
movslq (%r12), %r12
jmp 0x7244d
movzwl (%r12), %r12d
jmp 0x7244d
movl (%r12), %r12d
jmp 0x7244d
movsbq (%r12), %r12
jmp 0x7244d
movswq (%r12), %r12
jmp 0x7244d
cvtss2sd (%r12), %xmm0
movq %xmm0, %r12
jmp 0x7244d
movq 0x20(%rcx), %rdi
leaq 0x4bd3(%rip), %rdx      # 0x77010
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movq %rcx, %rbp
callq *0x8(%rcx)
movq %rbp, %rcx
movl (%rbx), %ebp
testq %r14, %r14
je 0x72510
addq %r13, %r14
addl $-0x4, %ebp
cmpl $0x16, %ebp
ja 0x724a9
leaq 0x9aa2(%rip), %rax      # 0x7bf0c
movslq (%rax,%rbp,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movq (%r14), %r14
jmp 0x724c4
movzbl (%r14), %r14d
jmp 0x724c4
movslq (%r14), %r14
jmp 0x724c4
movzwl (%r14), %r14d
jmp 0x724c4
movl (%r14), %r14d
jmp 0x724c4
movsbq (%r14), %r14
jmp 0x724c4
movswq (%r14), %r14
jmp 0x724c4
xorps %xmm0, %xmm0
cvtss2sd (%r14), %xmm0
movq %xmm0, %r14
jmp 0x724c4
movq 0x20(%rcx), %rdi
leaq 0x4b5c(%rip), %rdx      # 0x77010
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movq %rcx, %r13
callq *0x8(%rcx)
movq %r13, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x48d31
movzbl %r15b, %edx
decl %edx
orl $0x1, %edx
movl %edx, %ecx
negl %ecx
xorl %esi, %esi
testq %rax, %rax
cmovgl %edx, %ecx
cmovel %esi, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, %rdi
movq %rcx, (%rsp)
callq 0xbf51
movq (%rsp), %rcx
jmp 0x723dc
movq %rcx, %rdi
movq %rcx, (%rsp)
callq 0xbf67
movq (%rsp), %rcx
jmp 0x72458
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/acquire-thread-per-display.c
// Function: AcquireThreadMain
void* AcquireThreadMain(void* Arg) {
    egl_display* Display = Arg;

    while (1) {
        if (Display->PageFlipPending) {
            continue;
        }
        EGLint StreamState = EGLQueryStreamState(Display->DisplayDevice, Display->Stream);
        if (StreamState == EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR) {
            NEWTIME(StreamAcquire);
            EGLStreamAcquire(Display);
            ENDTIME(StreamAcquire);
        }

    }
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x2ae9(%rip), %r14      # 0x5028
leaq 0x2af5(%rip), %r15      # 0x503b
cmpb $0x0, 0x50(%rbx)
jne 0x2546
movq 0x30(%rbx), %rdi
movq 0x40(%rbx), %rsi
callq 0x35bb
cmpl $0x3218, %eax           # imm = 0x3218
jne 0x2546
xorl %eax, %eax
callq 0x42d5
movss %xmm0, 0xc(%rsp)
movq %rbx, %rdi
callq 0x3057
xorl %eax, %eax
callq 0x42d5
subss 0xc(%rsp), %xmm0
mulss 0x2a7a(%rip), %xmm0     # 0x5004
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x2050
jmp 0x2546
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/edid.c
// Function: drm_edid_destroy
void drm_edid_destroy(drm_edid *edid) {
   free(edid->MonitorName);
   free(edid->SerialNumber);
   free(edid->EISAID);
   free(edid->PNPID);
   free(edid);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2210
movq 0x8(%rbx), %rdi
callq 0x2210
movq 0x10(%rbx), %rdi
callq 0x2210
movq 0x18(%rbx), %rdi
callq 0x2210
movq %rbx, %rdi
popq %rbx
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/edid.c
// Function: edid_parse_string
static char* edid_parse_string(const uint8_t *data) {
   char *text;
   int i;
   int replaced = 0;

   /* this is always 12 bytes, but we can't guarantee it's null
    * terminated or not junk. */
   text = strndup ((const char *) data, 12);

   /* remove insane chars */
   for (i = 0; text[i] != '\0'; i++) {
       if (text[i] == '\n' ||
           text[i] == '\r')
           text[i] = '\0';
   }

   /* nothing left? */
   if (text[0] == '\0') {
       free (text);
       text = NULL;
       goto out;
   }

   /* ensure string is printable */
   for (i = 0; text[i] != '\0'; i++) {
       if (!isprint (text[i])) {
           text[i] = '-';
           replaced++;
       }
   }

   /* if the string is random junk, ignore the string */
   if (replaced > 4) {
       free (text);
       text = NULL;
       goto out;
   }
out:
   return text;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0xc, %esi
callq 0x2410
movq %rax, %rbx
movzbl (%rax), %ecx
cmpl $0xa, %ecx
je 0x29a1
cmpl $0xd, %ecx
je 0x29a1
testl %ecx, %ecx
jne 0x29a4
jmp 0x29a9
movb $0x0, (%rax)
incq %rax
jmp 0x298e
cmpb $0x0, (%rbx)
je 0x29e7
movb (%rbx), %bpl
testb %bpl, %bpl
je 0x29f1
callq 0x2250
movq (%rax), %rax
movq %rbx, %rcx
incq %rcx
xorl %edx, %edx
movsbq %bpl, %rsi
testb $0x40, 0x1(%rax,%rsi,2)
jne 0x29d7
movb $0x2d, -0x1(%rcx)
incl %edx
movb (%rcx), %bpl
incq %rcx
testb %bpl, %bpl
jne 0x29c6
cmpl $0x5, %edx
jl 0x29f1
movq %rbx, %rdi
callq 0x2210
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: ExtensionIsSupported
EGLBoolean ExtensionIsSupported(const char *extensionString,
                                const char *extension)
{
    const char *endOfExtensionString;
    const char *currentExtension = extensionString;
    size_t extensionLength;

    if ((extensionString == NULL) || (extension == NULL)) {
        return EGL_FALSE;
    }

    extensionLength = strlen(extension);

    endOfExtensionString = extensionString + strlen(extensionString);

    while (currentExtension < endOfExtensionString) {
        const size_t currentExtensionLength = strcspn(currentExtension, " ");
        if ((extensionLength == currentExtensionLength) &&
            (strncmp(extension, currentExtension,
                     extensionLength) == 0)) {
            return EGL_TRUE;
        }
        currentExtension += (currentExtensionLength + 1);
    }
    return EGL_FALSE;
}

// Assembly:
testq %rdi, %rdi
sete %dl
testq %rsi, %rsi
sete %cl
xorl %eax, %eax
orb %dl, %cl
jne 0x2a96
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x2230
movq %rax, %r12
movq %r15, %rdi
callq 0x2230
movq %rax, %r13
addq %r15, %r13
leaq 0x36a3(%rip), %rbp      # 0x60e6
cmpq %r13, %r15
jae 0x2a7f
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2390
movq %rax, %rbx
cmpq %rax, %r12
jne 0x2a6d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2130
testl %eax, %eax
je 0x2a7b
addq %rbx, %r15
incq %r15
movb $0x1, %al
testb %al, %al
jne 0x2a43
jmp 0x2a83
xorl %eax, %eax
jmp 0x2a75
xorl %eax, %eax
jmp 0x2a88
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: GetEglExtensionFunctionPointers
void GetEglExtensionFunctionPointers(void)
{
    pEglQueryDevicesEXT = (PFNEGLQUERYDEVICESEXTPROC)
        GetProcAddress("eglQueryDevicesEXT");

    pEglQueryDeviceStringEXT = (PFNEGLQUERYDEVICESTRINGEXTPROC)
        GetProcAddress("eglQueryDeviceStringEXT");

    pEglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC)
        GetProcAddress("eglGetPlatformDisplayEXT");

    pEglGetOutputLayersEXT = (PFNEGLGETOUTPUTLAYERSEXTPROC)
        GetProcAddress("eglGetOutputLayersEXT");

    pEglCreateStreamKHR = (PFNEGLCREATESTREAMKHRPROC)
        GetProcAddress("eglCreateStreamKHR");

    pEglStreamConsumerOutputEXT = (PFNEGLSTREAMCONSUMEROUTPUTEXTPROC)
        GetProcAddress("eglStreamConsumerOutputEXT");

    pEglCreateStreamProducerSurfaceKHR = (PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)
        GetProcAddress("eglCreateStreamProducerSurfaceKHR");

    pEglQueryStreamKHR = (PFNEGLQUERYSTREAMKHRPROC)
        GetProcAddress("eglQueryStreamKHR");

    pEglStreamConsumerAcquireAttribNV = (PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC)
        GetProcAddress("eglStreamConsumerAcquireAttribNV");

    pEglStreamConsumerReleaseAttribNV = (PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC)
        GetProcAddress("eglStreamConsumerReleaseAttribNV");

    pEglCreateStreamAttribNV = (PFNEGLCREATESTREAMATTRIBNVPROC)
        GetProcAddress("eglCreateStreamAttribNV");

    pEglOutputLayerAttribEXT = (PFNEGLOUTPUTLAYERATTRIBEXTPROC)
        GetProcAddress("eglOutputLayerAttribEXT");

    pEglQueryOutputLayerAttribEXT = (PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC)
        GetProcAddress("eglQueryOutputLayerAttribEXT");
}

// Assembly:
pushq %rax
leaq 0x25d6(%rip), %rdi      # 0x5075
callq 0x2b91
movq %rax, 0x5785(%rip)      # 0x8230
leaq 0x25d6(%rip), %rdi      # 0x5088
callq 0x2b91
movq %rax, 0x577a(%rip)      # 0x8238
leaq 0x25db(%rip), %rdi      # 0x50a0
callq 0x2b91
movq %rax, 0x576f(%rip)      # 0x8240
leaq 0x25e1(%rip), %rdi      # 0x50b9
callq 0x2b91
movq %rax, 0x5764(%rip)      # 0x8248
leaq 0x25e4(%rip), %rdi      # 0x50cf
callq 0x2b91
movq %rax, 0x5759(%rip)      # 0x8250
leaq 0x25e4(%rip), %rdi      # 0x50e2
callq 0x2b91
movq %rax, 0x574e(%rip)      # 0x8258
leaq 0x25ec(%rip), %rdi      # 0x50fd
callq 0x2b91
movq %rax, 0x5743(%rip)      # 0x8260
leaq 0x25fb(%rip), %rdi      # 0x511f
callq 0x2b91
movq %rax, 0x5738(%rip)      # 0x8268
leaq 0x25fa(%rip), %rdi      # 0x5131
callq 0x2b91
movq %rax, 0x572d(%rip)      # 0x8270
leaq 0x2608(%rip), %rdi      # 0x5152
callq 0x2b91
movq %rax, 0x5722(%rip)      # 0x8278
leaq 0x2616(%rip), %rdi      # 0x5173
callq 0x2b91
movq %rax, 0x5717(%rip)      # 0x8280
leaq 0x261b(%rip), %rdi      # 0x518b
callq 0x2b91
movq %rax, 0x570c(%rip)      # 0x8288
leaq 0x2620(%rip), %rdi      # 0x51a3
callq 0x2b91
movq %rax, 0x5701(%rip)      # 0x8290
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: GetProcAddress
static void *GetProcAddress(const char *functionName)
{
    void *ptr = (void *) eglGetProcAddress(functionName);

    if (ptr == NULL) {
        Fatal("eglGetProcAddress(%s) failed.\n", functionName);
    }

    return ptr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x21d0
movq %rax, %rbx
testq %rax, %rax
jne 0x2bb6
leaq 0x2c3a(%rip), %rdi      # 0x57e6
movq %r14, %rsi
xorl %eax, %eax
callq 0x41e8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: GetDrmFd
int GetDrmFd(EGLDeviceEXT device)
{
    const char *deviceExtensionString =
        pEglQueryDeviceStringEXT(device, EGL_EXTENSIONS);

    const char *drmDeviceFile;
    int fd;

    if (!ExtensionIsSupported(deviceExtensionString, "EGL_EXT_device_drm")) {
        Fatal("EGL_EXT_device_drm extension not found.\n");
    }

    drmDeviceFile = pEglQueryDeviceStringEXT(device, EGL_DRM_DEVICE_FILE_EXT);

    if (drmDeviceFile == NULL) {
        Fatal("No DRM device file found for EGL device.\n");
    }
    printf("Device file: %s\n", drmDeviceFile);

    // Open with nonblock so we can query for vsync events
    // using drmHandleEvent without blocking
    fd = open(drmDeviceFile, O_RDWR | O_NONBLOCK, 0);

    if (fd < 0) {
        Fatal("Unable to open DRM device file.\n");
    }

    return fd;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x3055, %esi           # imm = 0x3055
callq *0x551b(%rip)           # 0x8238
leaq 0x255c(%rip), %rsi      # 0x5280
movq %rax, %rdi
callq 0x29fc
testl %eax, %eax
jne 0x2d3e
leaq 0x258d(%rip), %rdi      # 0x52c4
xorl %eax, %eax
callq 0x41e8
movq %rbx, %rdi
movl $0x3233, %esi           # imm = 0x3233
callq *0x54ec(%rip)           # 0x8238
movq %rax, %rbx
testq %rax, %rax
jne 0x2d62
leaq 0x2592(%rip), %rdi      # 0x52ed
xorl %eax, %eax
callq 0x41e8
leaq 0x25ae(%rip), %rdi      # 0x5317
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2050
movq %rbx, %rdi
movl $0x802, %esi            # imm = 0x802
xorl %edx, %edx
xorl %eax, %eax
callq 0x23e0
movl %eax, %ebx
testl %eax, %eax
jns 0x2d98
leaq 0x2597(%rip), %rdi      # 0x5328
xorl %eax, %eax
callq 0x41e8
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: GetEglContext
EGLContext GetEglContext(EGLDisplay eglDpy, EGLConfig eglConfig) {
    /* Create an EGL context using the EGL config. */
    EGLint contextAttribs[] = { EGL_NONE };
    EGLContext eglContext =
        eglCreateContext(eglDpy, eglConfig, EGL_NO_CONTEXT, contextAttribs);

    if (eglContext == NULL) {
        Fatal("eglCreateContext() failed.\n");
    }
    return eglContext;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rcx
movl $0x3038, (%rcx)         # imm = 0x3038
xorl %edx, %edx
callq 0x21a0
movq %rax, %rbx
testq %rax, %rax
jne 0x3003
leaq 0x2577(%rip), %rdi      # 0x5573
xorl %eax, %eax
callq 0x41e8
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: PrintDisplayLayerSwapInterval
void PrintDisplayLayerSwapInterval(egl_display* Display) {
    EGLAttrib SwapInterval;
    pEglQueryOutputLayerAttribEXT(Display->DisplayDevice, Display->Layer,
        EGL_SWAP_INTERVAL_EXT, &SwapInterval);
    printf("Swap interval for %s is %li\n",
        Display->MonitorName,
        SwapInterval);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
movq 0x48(%rbx), %rsi
movq %rsp, %r14
movl $0x322f, %edx           # imm = 0x322F
movq %r14, %rcx
callq *0x5264(%rip)           # 0x8290
movq 0x10(%rbx), %rsi
movq (%r14), %rdx
leaq 0x2555(%rip), %rdi      # 0x558f
xorl %eax, %eax
callq 0x2050
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: EGLStreamAcquire
void EGLStreamAcquire(egl_display* Display) {
    // Ask the Display's EGLStream to acquire the new frame,
    // and pass a data pointer to pass along to drmHandleEvent
    EGLAttrib AcquireAttribs[] = {
        EGL_DRM_FLIP_EVENT_DATA_NV, (EGLAttrib)Display,
        EGL_NONE
    };

    EGLBoolean Result = pEglStreamConsumerAcquireAttribNV(
        Display->DisplayDevice,
        Display->Stream,
        AcquireAttribs);
    if (Result == EGL_FALSE) {
        EGLCheck("eglStreamConsumerAcquireAttribNV");
    }
    Display->PageFlipPending = true;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdx
movq $0x333e, (%rdx)         # imm = 0x333E
movq %rdi, 0x8(%rdx)
movq $0x3038, 0x10(%rdx)     # imm = 0x3038
movq 0x30(%rdi), %rdi
movq 0x40(%rbx), %rsi
callq *0x51ed(%rip)           # 0x8270
testl %eax, %eax
jne 0x3093
leaq 0x20a3(%rip), %rdi      # 0x5131
callq 0x309d
movb $0x1, 0x50(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: EGLSwapDisplay
void EGLSwapDisplay(egl_display* Display) {

    NEWTIME(eglSwapBuffers);
    eglSwapBuffers(Display->DisplayDevice, Display->Surface);
    ENDTIME(eglSwapBuffers);

    NEWTIME(StreamAcquire);
    EGLStreamAcquire(Display);
    ENDTIME(StreamAcquire);


}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
callq 0x42d5
movss %xmm0, 0x4(%rsp)
movq 0x20(%rbx), %rsi
movq 0x30(%rbx), %rdi
callq 0x2270
xorl %eax, %eax
callq 0x42d5
subss 0x4(%rsp), %xmm0
mulss 0x1ed9(%rip), %xmm0     # 0x5004
cvtss2sd %xmm0, %xmm0
leaq 0x1ef2(%rip), %r14      # 0x5028
leaq 0x1f16(%rip), %rsi      # 0x5053
movq %r14, %rdi
movb $0x1, %al
callq 0x2050
xorl %eax, %eax
callq 0x42d5
movss %xmm0, 0x4(%rsp)
movq %rbx, %rdi
callq 0x3057
xorl %eax, %eax
callq 0x42d5
subss 0x4(%rsp), %xmm0
mulss 0x1e93(%rip), %xmm0     # 0x5004
cvtss2sd %xmm0, %xmm0
leaq 0x1ebf(%rip), %rsi      # 0x503b
movq %r14, %rdi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: InitGLEW
void InitGLEW() {
    // Initialize GLEW
    glewExperimental = GL_TRUE;
    if(glewInit() != GLEW_OK) {
        Fatal("Could not init glew.\n");
    }
    GLenum GLEWError = glGetError();
    if (GLEWError) {
        printf("GLEW returned error: %i\n", GLEWError);
    }
}

// Assembly:
pushq %rax
movq 0x4bbf(%rip), %rax      # 0x7fc8
movb $0x1, (%rax)
callq 0x2290
testl %eax, %eax
je 0x3423
leaq 0x227b(%rip), %rdi      # 0x5697
xorl %eax, %eax
callq 0x41e8
callq 0x2110
testl %eax, %eax
je 0x343d
leaq 0x227a(%rip), %rdi      # 0x56ad
movl %eax, %esi
xorl %eax, %eax
popq %rcx
jmp 0x2050
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: SetupEGL
egl_state* SetupEGL() {
    egl_state* EGL = calloc(1, sizeof(egl_state));

    // Setup global EGL state
    GetEglExtensionFunctionPointers();

    EGL->Device = GetEglDevice();

    int drmFd = GetDrmFd(EGL->Device);
    // Set up EGL state for each connected display
    kms_plane* Planes = SetDisplayModes(drmFd, &EGL->DisplaysCount);

    EGL->DRMFD         = drmFd;
    EGL->DisplayDevice = GetEglDisplay(EGL->Device, drmFd);
    EGL->Config        = GetEglConfig(EGL->DisplayDevice);
    EGL->RootContext   = GetEglContext(EGL->DisplayDevice, EGL->Config);


    EGL->Displays     = SetupEGLDisplays(EGL->DisplayDevice,
        EGL->Config, EGL->RootContext, Planes, EGL->DisplaysCount);

    EGLBoolean ret = eglMakeCurrent(EGL->DisplayDevice,
        EGL->Displays->Surface, EGL->Displays->Surface,
        EGL->RootContext);
    if (!ret) Fatal("Couldn't make main context current\n");

    InitGLEW();

    // Disable EGL VSync
    // (seems to have no effect)
    for (int DisplayIndex = 0; DisplayIndex < EGL->DisplaysCount; DisplayIndex++) {
        egl_display* Display = &EGL->Displays[DisplayIndex];
        eglMakeCurrent(Display->DisplayDevice,
            Display->Surface, Display->Surface,
            Display->Context);
        eglSwapInterval(Display->DisplayDevice, 0);
    }

    // Create a drmEventContext configured to
    // call our PageFlipEventHandler function
    // when a page flip occurs
    EGL->DRMEventContext.page_flip_handler = PageFlipEventHandler;
    // EGL->DRMEventContext.vblank_handler    = VBlankEventHandler;
    EGL->DRMEventContext.version           = 2;

    return EGL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x1, %edi
movl $0x60, %esi
callq 0x2370
movq %rax, %rbx
callq 0x2a97
callq 0x2bc1
movq %rax, 0x20(%rbx)
movq %rax, %rdi
callq 0x2d0e
movl %eax, %ebp
leaq 0x8(%rbx), %r14
movl %eax, %edi
movq %r14, %rsi
callq 0x3608
movq %rax, %r15
movl %ebp, 0x30(%rbx)
movq 0x20(%rbx), %rdi
movl %ebp, %esi
callq 0x2d9c
movq %rax, 0x18(%rbx)
movq %rax, %rdi
callq 0x2e97
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x2fd6
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rdi
movq 0x28(%rbx), %rsi
movl 0x8(%rbx), %r8d
movq %rax, %rdx
movq %r15, %rcx
callq 0x318d
movq %rax, (%rbx)
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rdi
movq 0x20(%rax), %rdx
movq %rdx, %rsi
callq 0x21b0
testl %eax, %eax
jne 0x34f0
leaq 0x21dd(%rip), %rdi      # 0x56c6
xorl %eax, %eax
callq 0x41e8
callq 0x3401
cmpl $0x0, (%r14)
jle 0x3538
movl $0x30, %r14d
xorl %r15d, %r15d
movq (%rbx), %r12
movq (%r12,%r14), %rdi
movq -0x10(%r12,%r14), %rdx
movq -0x8(%r12,%r14), %rcx
movq %rdx, %rsi
callq 0x21b0
movq (%r12,%r14), %rdi
xorl %esi, %esi
callq 0x22e0
incq %r15
movslq 0x8(%rbx), %rax
addq $0x58, %r14
cmpq %rax, %r15
jl 0x3504
leaq 0x17(%rip), %rax        # 0x3556
movq %rax, 0x48(%rbx)
movl $0x2, 0x38(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: PageFlipEventHandler
static void PageFlipEventHandler(int fd, unsigned int frame,
                    unsigned int sec, unsigned int usec,
                    void *data)
{
    egl_display* Display = (egl_display*)data;
    (void)fd; (void)frame; (void)sec; (void)usec; (void)data;
    Display->PageFlipPending = false;

    float Now = GetTime();
    if (Display->LastPageFlip > 0) {
        printf("%20s page flip interval: %.2fms\n",
            Display->EDID->MonitorName,
            (Now - Display->LastPageFlip) * 1000);
    }

    Display->LastPageFlip = Now;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movb $0x0, 0x50(%r8)
xorl %eax, %eax
callq 0x42d5
movaps %xmm0, %xmm2
movss 0x54(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x35b0
movq (%rbx), %rax
movq (%rax), %rsi
movaps %xmm2, %xmm1
subss %xmm0, %xmm1
mulss 0x1a75(%rip), %xmm1     # 0x5004
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x2268(%rip), %rdi      # 0x5805
movb $0x1, %al
movss %xmm2, 0xc(%rsp)
callq 0x2050
movss 0xc(%rsp), %xmm2
movss %xmm2, 0x54(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/egl.c
// Function: EGLQueryStreamState
EGLint EGLQueryStreamState(EGLDisplay eglDpy, EGLStreamKHR eglStream) {
     EGLint streamState;
     EGLBoolean r = pEglQueryStreamKHR(eglDpy, eglStream, EGL_STREAM_STATE_KHR, &streamState);
     if (r == EGL_FALSE) {
         EGLCheck("Query Stream");
     }

     return streamState;
 }

// Assembly:
pushq %rax
leaq 0x4(%rsp), %rcx
movl $0x3214, %edx           # imm = 0x3214
callq *0x4c9c(%rip)           # 0x8268
testl %eax, %eax
jne 0x35dc
leaq 0x2113(%rip), %rdi      # 0x56ea
callq 0x309d
movl 0x4(%rsp), %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/kms.c
// Function: AssignPropertyIDsOneType
static void AssignPropertyIDsOneType(int drmFd,
                                     uint32_t objectID,
                                     uint32_t objectType,
                                     struct PropertyIDAddresses *table,
                                     size_t tableLen)
{
    uint32_t i;
    drmModeObjectPropertiesPtr pModeObjectProperties =
        drmModeObjectGetProperties(drmFd, objectID, objectType);

    if (pModeObjectProperties == NULL) {
        Fatal("Unable to query mode object properties.\n");
    }

    for (i = 0; i < pModeObjectProperties->count_props; i++) {

        uint32_t j;
        drmModePropertyPtr pProperty =
            drmModeGetProperty(drmFd, pModeObjectProperties->props[i]);

        if (pProperty == NULL) {
            Fatal("Unable to query property.\n");
        }
        for (j = 0; j < tableLen; j++) {
            if (strcmp(table[j].name, pProperty->name) == 0) {
                *(table[j].ptr) = pProperty->prop_id;
                break;
            }
        }

        drmModeFreeProperty(pProperty);
    }

    drmModeFreeObjectProperties(pModeObjectProperties);

    for (i = 0; i < tableLen; i++) {
        if (*(table[i].ptr) == 0) {
            Fatal("Unable to find property ID for \'%s\'.\n", table[i].name);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movl %edi, 0xc(%rsp)
callq 0x2190
movq %rax, %r15
testq %rax, %rax
jne 0x40f9
leaq 0x1f94(%rip), %rdi      # 0x6086
xorl %eax, %eax
callq 0x41e8
cmpl $0x0, (%r15)
je 0x4195
xorl %ebp, %ebp
movq %r15, 0x10(%rsp)
movq 0x8(%r15), %rax
movl (%rax,%rbp,4), %esi
movl 0xc(%rsp), %edi
callq 0x2170
movq %rax, (%rsp)
testq %rax, %rax
jne 0x4131
leaq 0x1dc1(%rip), %rdi      # 0x5eeb
xorl %eax, %eax
callq 0x41e8
testq %rbx, %rbx
je 0x4178
movq (%rsp), %r13
addq $0x8, %r13
movl $0x1, %r15d
xorl %r12d, %r12d
shlq $0x4, %r12
movq (%r14,%r12), %rdi
movq %r13, %rsi
callq 0x2350
testl %eax, %eax
je 0x4168
movl %r15d, %r12d
incl %r15d
cmpq %rbx, %r12
jb 0x4147
jmp 0x4178
addq %r14, %r12
movq (%rsp), %rax
movl (%rax), %eax
movq 0x8(%r12), %rcx
movl %eax, (%rcx)
movq (%rsp), %rdi
callq 0x2260
incq %rbp
movq 0x10(%rsp), %r15
movl (%r15), %eax
cmpq %rax, %rbp
jb 0x410a
movq %r15, %rdi
callq 0x2150
testq %rbx, %rbx
je 0x41d7
movl $0x1, %ebp
leaq 0x1f01(%rip), %r15      # 0x60af
xorl %eax, %eax
shlq $0x4, %rax
movq 0x8(%r14,%rax), %rcx
cmpl $0x0, (%rcx)
jne 0x41ce
addq %r14, %rax
movq (%rax), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x41e8
movl %ebp, %eax
incl %ebp
cmpq %rbx, %rax
jb 0x41b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/utils.c
// Function: Fatal
void Fatal(const char *format, ...)
{
    va_list ap;

    fprintf(stderr, "ERROR: ");

    va_start(ap, format);
    vfprintf(stderr, format, ap);
    va_end(ap);

    exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x424b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x3d9e(%rip), %r15      # 0x7ff0
movq (%r15), %rcx
leaq 0x1e84(%rip), %rdi      # 0x60e0
movl $0x7, %esi
movl $0x1, %edx
callq 0x23c0
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %r14, 0x10(%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x21c0
movl $0x1, %edi
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/utils.c
// Function: GetTime
float GetTime()
{
    static struct timeval InitialTime = {0, 0};
    if (InitialTime.tv_sec == 0)
    {
        gettimeofday(&InitialTime, NULL);
    }
    struct timeval Now;
    gettimeofday(&Now, NULL);

    struct timeval TimeSinceStart = { Now.tv_sec - InitialTime.tv_sec, Now.tv_usec - InitialTime.tv_usec };

    return (TimeSinceStart.tv_sec + (TimeSinceStart.tv_usec / 1000000.0));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x3fb6(%rip)      # 0x8298
jne 0x42f2
leaq 0x3fad(%rip), %rdi      # 0x8298
xorl %esi, %esi
callq 0x20f0
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20f0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq 0x3f8b(%rip), %rax      # 0x8298
subq 0x3f8c(%rip), %rcx      # 0x82a0
cvtsi2sd %rax, %xmm0
cvtsi2sd %rcx, %xmm1
divsd 0x1db2(%rip), %xmm1     # 0x60d8
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/utils.c
// Function: TickFPS
void TickFPS(fps* FPS) {
    struct timeval Now;
    gettimeofday(&Now, NULL);

    FPS->Frames++;

    int NowSecond = Now.tv_sec;
    if (NowSecond > FPS->CurrentSecond) {
        printf("%40s: %i FPS\n", FPS->Name, FPS->Frames);
        FPS->Frames = 0;
        FPS->CurrentSecond = NowSecond;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x20f0
movl (%rbx), %edx
movl 0x4(%rbx), %eax
incl %edx
movl %edx, (%rbx)
movl (%r14), %ebp
cmpl %ebp, %eax
jge 0x43a5
movq 0x8(%rbx), %rsi
leaq 0x1d56(%rip), %rdi      # 0x60eb
xorl %eax, %eax
callq 0x2050
movl $0x0, (%rbx)
movl %ebp, 0x4(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/utils.c
// Function: GLCheck
void GLCheck(const char* name) {
    GLenum err = glGetError();
    if (err != GL_NO_ERROR) {
        printf("%s: ", name);
        switch (err) {
            case GL_INVALID_ENUM: printf("Invalid enum\n");
                break;
            case GL_INVALID_VALUE: printf("Invalid value\n");
                break;
            case GL_INVALID_OPERATION: printf("Invalid operation\n");
                break;
            case GL_INVALID_FRAMEBUFFER_OPERATION: printf("Invalid framebuffer op\n");
                break;
            case GL_OUT_OF_MEMORY: printf("GL Out of memory\n");
                break;
        }
        exit(1);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x2110
testl %eax, %eax
jne 0x43c6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %eax, %ebx
leaq 0x1412(%rip), %rdi      # 0x57e1
movq %r14, %rsi
xorl %eax, %eax
callq 0x2050
leal -0x500(%rbx), %eax
cmpl $0x6, %eax
ja 0x4403
movl $0x67, %ecx
btl %ebx, %ecx
jae 0x4403
movl %eax, %eax
leaq 0x1d71(%rip), %rcx      # 0x6168
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
callq 0x20b0
movl $0x1, %edi
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/utils.c
// Function: EnableGLDebug
void EnableGLDebug() {
    glDebugMessageCallback(DebugCallback, NULL);
    glDebugMessageControl(GL_DONT_CARE,
        GL_DONT_CARE, GL_DONT_CARE, 0, 0, GL_TRUE);
    glEnable(GL_DEBUG_OUTPUT);
}

// Assembly:
pushq %rax
movq 0x3bc0(%rip), %rax      # 0x7fe8
leaq -0x22(%rip), %rdi       # 0x440d
xorl %esi, %esi
callq *(%rax)
movq 0x3b86(%rip), %rax      # 0x7fc0
movl $0x1100, %edi           # imm = 0x1100
movl $0x1100, %esi           # imm = 0x1100
movl $0x1100, %edx           # imm = 0x1100
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq *(%rax)
movl $0x92e0, %edi           # imm = 0x92E0
popq %rax
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O1/lukexi[P]eglstreams-mini/src/utils.c
// Function: NextPowerOfTwo
int NextPowerOfTwo(int x) {
    x--;
    x |= x >> 1; // handle 2 bit numbers
    x |= x >> 2; // handle 4 bit numbers
    x |= x >> 4; // handle 8 bit numbers
    x |= x >> 8; // handle 16 bit numbers
    x |= x >> 16; // handle 32 bit numbers
    x++;
    return x;
}

// Assembly:
leal -0x1(%rdi), %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %edx
sarl $0x8, %edx
orl %ecx, %edx
movl %edx, %eax
sarl $0x10, %eax
orl %edx, %eax
incl %eax
retq
// File: /workspace/github_c_makefile_star2_O1/endeav0r[P]hvm/src/hvm.c
// Function: core_dump
void core_dump (struct _vm * vm)
{
    FILE * fh;

    fh = fopen("core", "wb");
    if (fh == NULL)
        return;

    fwrite(vm->mem, 1, 65536, fh);

    fclose(fh);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x3c2a(%rip), %rdi      # 0x5004
leaq 0x3c28(%rip), %rsi      # 0x5009
callq 0x1270
testq %rax, %rax
je 0x1412
movq %rax, %rbx
movq (%r14), %rdi
movl $0x1, %esi
movl $0x10000, %edx          # imm = 0x10000
movq %rax, %rcx
callq 0x1290
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/endeav0r[P]hvm/src/hvm.c
// Function: main
int main (int argc, char * argv [])
{
    struct _vm * vm;
    int error;

    if (argc != 2) {
        fprintf(stderr, "Usage: %s <hvm program>\n", argv[0]);
        return 0;
    }

    signal(SIGINT, int_handler);

    vm = vm_load(argv[1]);
    main_loop = 1;

    while (main_loop) {
        //printf("%s\n", vm_ins_str(vm));
        error = vm_step(vm);
        if (error) {
            switch (error) {
            case VM_HALTED :
                break;
            case VM_BAD_INSTRUCTION :
                printf("VM Encountered Bad Instruction\n");
                printf("%s\n", vm_registers_str(vm));
                break;
            }
            break;
        }
    }

    core_dump(vm);
    vm_destroy(vm);

    return 0;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
cmpl $0x2, %edi
jne 0x149f
leaq -0x1b(%rip), %rsi       # 0x141a
movl $0x2, %edi
callq 0x11b0
movq 0x8(%rbx), %rdi
callq 0x39e8
movq %rax, %rbx
movl $0x1, 0x6d1f(%rip)      # 0x8174
cmpl $0x0, 0x6d18(%rip)      # 0x8174
je 0x148b
movq %rbx, %rdi
callq 0x3cc5
testl %eax, %eax
je 0x1455
cmpl $0x2, %eax
jne 0x148b
leaq 0x3baf(%rip), %rdi      # 0x5025
callq 0x10b0
movq %rbx, %rdi
callq 0x3bcf
movq %rax, %rdi
callq 0x10b0
movq %rbx, %rdi
callq 0x13cc
movq %rbx, %rdi
callq 0x3ace
xorl %eax, %eax
popq %rbx
retq
movq %rbx, %rdi
callq 0x12c0
jmp 0x149b
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/iciamyplant[P]Cub3d-Linux/src/parsing.c
// Function: ft_parsing_map
int		ft_parsing_map(char *fichier, t_recup *recup)
{
	int			fd;
	int			ret;
	char		*str;

	ret = 1;
	str = NULL;
	fd = open(fichier, O_RDONLY);
	if (!(recup->map = malloc(sizeof(char*) * recup->nblines)))
		return (0);
	while (ret != 0)
	{
		ret = get_next_line(fd, &str, recup);
		if (recup->insidemap == 1 && ft_lignevide(str) == 0 &&
				recup->count < recup->nblines)
			recup->lignevide = 1;
		if ((recup->insidemap = ft_is_map(str, recup)) == 1)
		{
			recup->count++;
			ft_copy_map(str, recup);
		}
		free(str);
	}
	close(fd);
	ft_init_sprite(recup);
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq $0x0, (%rsp)
xorl %esi, %esi
xorl %eax, %eax
callq 0x7410
movl %eax, %ebp
movslq 0x40(%rbx), %rdi
shlq $0x3, %rdi
callq 0x7100
movq %rax, 0x48(%rbx)
testq %rax, %rax
je 0x7624
movq %rsp, %r14
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x9d13
movl %eax, %r15d
cmpl $0x1, 0x80(%rbx)
jne 0x75de
movq (%rsp), %rdi
callq 0xa1dd
testl %eax, %eax
jne 0x75de
movl 0x84(%rbx), %eax
cmpl 0x40(%rbx), %eax
jge 0x75de
movl $0x1, 0x7c(%rbx)
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x7dd3
movl %eax, 0x80(%rbx)
cmpl $0x1, %eax
jne 0x7607
incl 0x84(%rbx)
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x7ce6
movq (%rsp), %rdi
callq 0x7190
testl %r15d, %r15d
jne 0x75a6
movl %ebp, %edi
callq 0x7040
movq %rbx, %rdi
callq 0x851c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/iciamyplant[P]Cub3d-Linux/src/parsing.c
// Function: ft_parsing
void	ft_parsing(char *fichier, t_recup *recup)
{
	int			fd;
	int			ret;
	char		*str;

	ret = 1;
	str = NULL;
	if ((fd = open(fichier, O_DIRECTORY)) != -1)
		ft_error(recup, "Invalide : is a directory\n");
	if ((fd = open(fichier, O_RDONLY)) == -1)
		ft_error(recup, "Fichier .cub invalide\n");
	recup->erreur = 0;
	while (ret != 0)
	{
		ret = get_next_line(fd, &str, recup);
		if (recup->erreur == 2)
			ft_error(recup, "La partie parsing detecte une erreur\n");
		ft_color_resolution(&str, recup);
		ft_texture(str, recup);
		ft_map(str, recup);
		free(str);
	}
	close(fd);
	if (recup->sizeline == 0 || recup->nblines == 0)
		ft_error(recup, "Map absente\n");
	ft_parsing_map(fichier, recup);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rsp)
movl $0x10000, %esi          # imm = 0x10000
xorl %eax, %eax
callq 0x7410
cmpl $-0x1, %eax
je 0x766a
leaq 0x59a2(%rip), %rsi      # 0xd004
movq %rbx, %rdi
callq 0x978c
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x7410
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x768c
leaq 0x599b(%rip), %rsi      # 0xd01f
movq %rbx, %rdi
callq 0x978c
movl $0x0, 0x74(%rbx)
movq %rsp, %r15
leaq 0x5999(%rip), %r12      # 0xd036
movl %ebp, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x9d13
movl %eax, %r13d
cmpl $0x2, 0x74(%rbx)
jne 0x76be
movq %rbx, %rdi
movq %r12, %rsi
callq 0x978c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7b68
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x7ac5
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x7e60
movq (%rsp), %rdi
callq 0x7190
testl %r13d, %r13d
jne 0x769d
movl %ebp, %edi
callq 0x7040
cmpl $0x0, 0x44(%rbx)
je 0x7702
cmpl $0x0, 0x40(%rbx)
jne 0x7711
leaq 0x5953(%rip), %rsi      # 0xd05c
movq %rbx, %rdi
callq 0x978c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x756c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/iciamyplant[P]Cub3d-Linux/src/parsing.c
// Function: ft_cub
int		ft_cub(char *str, t_recup *recup)
{
	int			i;

	i = 0;
	while (str[i] != '\0')
		i++;
	while (str[i] != '.')
	{
		i--;
		if (i == 0)
		{
			ft_error(recup, "Nom de la map invalide\n");
			return (0);
		}
	}
	if (str[i + 1] == 'c' && str[i + 2] == 'u' && str[i + 3] == 'b')
		ft_parsing(str, recup);
	else
		ft_error(recup, "Nom de la map invalide\n");
	return (0);
}

// Assembly:
xorl %eax, %eax
cmpb $0x0, (%rdi,%rax)
leaq 0x1(%rax), %rax
jne 0x772d
pushq %rax
cmpb $0x2e, -0x1(%rdi,%rax)
je 0x774a
decq %rax
cmpq $0x1, %rax
jne 0x7738
jmp 0x7765
cmpb $0x63, (%rdi,%rax)
jne 0x7765
cmpb $0x75, 0x1(%rdi,%rax)
jne 0x7765
cmpb $0x62, 0x2(%rdi,%rax)
jne 0x7765
callq 0x7631
jmp 0x7777
leaq 0x58fd(%rip), %rax      # 0xd069
movq %rsi, %rdi
movq %rax, %rsi
callq 0x978c
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/iciamyplant[P]Cub3d-Linux/src/parsing.c
// Function: main
int		main(int argc, char **argv)
{
	t_recup recup;

	recup.save = 0;
	ft_initialisation(&recup);
	if (argc == 2 || (argc == 3 && ft_check_save(argv[2]) == 1))
	{
		if (argc == 3)
			recup.save = 1;
		ft_cub(argv[1], &recup);
	}
	else
		write(1, "Error\nArguments invalides\n", 30);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %rdi
movl $0x0, 0x68(%rdi)
callq 0x7f82
cmpl $0x2, %ebp
je 0x77bf
cmpl $0x3, %ebp
jne 0x77cf
movq 0x10(%rbx), %rdi
callq 0x9b72
cmpl $0x1, %eax
jne 0x77cf
cmpl $0x3, %ebp
jne 0x77bf
movl $0x1, 0x70(%rsp)
movq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x772b
jmp 0x77e5
leaq 0x58ab(%rip), %rsi      # 0xd081
movl $0x1e, %edx
movl $0x1, %edi
callq 0x73d0
xorl %eax, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/iciamyplant[P]Cub3d-Linux/src/parsing_color_resolution_texture.c
// Function: ft_atoi2
int		ft_atoi2(const char *str, t_recup *recup)
{
	int		sum;

	sum = 0;
	if (str[1] != ' ' || ft_charinstr((char *)str, ',') == 1)
		recup->erreur = 2;
	while (str[recup->i] == ' ' || str[recup->i] == '\t'
			|| str[recup->i] == ',' || str[recup->i] == '\n'
			|| str[recup->i] == '\r' || str[recup->i] == '\v'
			|| str[recup->i] == '\f')
		recup->i++;
	if (str[recup->i] == '-' || str[recup->i] == '+')
		recup->erreur = 2;
	while (str[recup->i] >= '0' && str[recup->i] <= '9')
	{
		if (sum > 21474636)
			break ;
		sum = (sum * 10) + (str[recup->i] - 48);
		recup->i++;
	}
	while (str[recup->i] >= '0' && str[recup->i] <= '9')
		recup->i++;
	return (sum);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x20, 0x1(%rdi)
jne 0x7816
movq %r14, %rdi
movl $0x2c, %esi
callq 0x7f0e
cmpl $0x1, %eax
jne 0x781d
movl $0x2, 0x74(%rbx)
movslq 0x8(%rbx), %rcx
leal 0x1(%rcx), %eax
addq %r14, %rcx
movzbl (%rcx), %edx
leal -0x9(%rdx), %esi
cmpl $0x5, %esi
jae 0x783c
movl %eax, 0x8(%rbx)
incq %rcx
incl %eax
jmp 0x7827
cmpl $0x2b, %edx
jg 0x784b
cmpl $0x20, %edx
je 0x7832
jmp 0x78d3
cmpl $0x2c, %edx
je 0x7832
cmpl $0x2d, %edx
jne 0x785c
movl $0x2, 0x74(%rbx)
movslq 0x8(%rbx), %rsi
movb (%r14,%rsi), %cl
xorl %eax, %eax
cmpb $0x30, %cl
jl 0x789d
leaq (%rsi,%r14), %rdx
incq %rdx
incl %esi
xorl %eax, %eax
cmpb $0x39, %cl
ja 0x789d
cmpl $0x147ad4c, %eax        # imm = 0x147AD4C
jg 0x789d
leal (%rax,%rax,4), %eax
addb $-0x30, %cl
movsbl %cl, %ecx
leal (%rcx,%rax,2), %eax
movl %esi, 0x8(%rbx)
movb (%rdx), %cl
incq %rdx
incl %esi
cmpb $0x2f, %cl
jg 0x7876
movslq 0x8(%rbx), %rdx
movb (%r14,%rdx), %cl
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x78cb
leaq (%rdx,%r14), %rcx
incq %rcx
incl %edx
movl %edx, 0x8(%rbx)
movb (%rcx), %sil
addb $-0x30, %sil
incq %rcx
incl %edx
cmpb $0xa, %sil
jb 0x78b6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x2b, %edx
je 0x7855
jmp 0x785c
// File: /workspace/github_c_makefile_star2_O1/iciamyplant[P]Cub3d-Linux/src/parsing_color_resolution_texture.c
// Function: ft_atoi3
int		ft_atoi3(const char *str, t_recup *recup)
{
	int		verify;

	verify = 0;
	if (str[1] != ' ')
		recup->erreur = 2;
	ft_atoi3_check(str, recup);
	while (str[recup->i] == ' ' || str[recup->i] == '\t' || str[recup->i]
			== ',' || str[recup->i] == '\n' || str[recup->i] == '\r'
			|| str[recup->i] == '\v' || str[recup->i] == '\f')
	{
		recup->i++;
		verify = 0;
		if (str[recup->i] >= '0' && str[recup->i] <= '9')
			recup->indicateur2++;
		while (str[recup->i] >= '0' && str[recup->i] <= '9')
		{
			verify = (verify * 10) + str[recup->i] - 48;
			recup->sum = (recup->sum * 10) + (str[recup->i] - 48);
			recup->i++;
		}
		if (verify > 255 || verify < 0)
			recup->erreur = 2;
	}
	return (recup->sum);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x20, 0x1(%rdi)
je 0x78f8
movl $0x2, 0x74(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa154
movl 0x8(%rbx), %ecx
leaq 0x1(%r14), %rax
movslq %ecx, %rdx
movzbl (%r14,%rdx), %ecx
leal -0x9(%rcx), %esi
cmpl $0x5, %esi
jae 0x79a1
leaq 0x1(%rdx), %rcx
movl %ecx, 0x8(%rbx)
movb 0x1(%r14,%rdx), %dl
addb $-0x30, %dl
cmpb $0x9, %dl
ja 0x7935
incl 0x60(%rbx)
movb (%r14,%rcx), %r8b
leal -0x30(%r8), %esi
xorl %edx, %edx
cmpb $0x9, %sil
ja 0x798d
movl 0x8c(%rbx), %edi
movslq %ecx, %rsi
addq %rax, %rsi
movsbl %r8b, %r8d
leal (%rdx,%rdx,4), %edx
leal (%r8,%rdx,2), %edx
addl $-0x30, %edx
leal (%rdi,%rdi,4), %edi
leal (%r8,%rdi,2), %edi
addl $-0x30, %edi
movl %edi, 0x8c(%rbx)
incl %ecx
movl %ecx, 0x8(%rbx)
movb (%rsi), %r8b
leal -0x30(%r8), %r9d
incq %rsi
cmpb $0xa, %r9b
jb 0x7951
cmpl $0x100, %edx            # imm = 0x100
setae %dl
testb %dl, %dl
je 0x790a
movl $0x2, 0x74(%rbx)
jmp 0x790a
cmpl $0x2c, %ecx
je 0x791e
cmpl $0x20, %ecx
je 0x791e
movl 0x8c(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/iciamyplant[P]Cub3d-Linux/src/parsing_color_resolution_texture.c
// Function: ft_path_texture
int		ft_path_texture(char *str, char **texture, t_recup *recup, int j)
{
	recup->count2 = 0;
	if (*texture != NULL)
	{
		recup->erreur = 2;
		return (0);
	}
	if (ft_charinstr(str, '.') == 0 || ft_charinstr(str, '/') == 0
			|| ft_strlen2(str) <= 2)
		recup->erreur = 2;
	while (str[j] != '.')
	{
		if (str[j] != ' ' && str[j] != '.')
			recup->erreur = 2;
		j++;
	}
	if (!(*texture = (char *)(malloc(sizeof(char) * (ft_strlen2(str) + 1)))))
		recup->erreur = 2;
	while (str[j] != '\0')
	{
		(*texture)[recup->count2] = str[j];
		recup->count2++;
		j++;
	}
	(*texture)[recup->count2] = '\0';
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl $0x0, 0x88(%rdx)
cmpq $0x0, (%rsi)
je 0x79eb
movl $0x2, 0x74(%rbx)
jmp 0x7ab4
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x2e, %esi
callq 0x7f0e
testl %eax, %eax
je 0x7a1f
movq %r15, %rdi
movl $0x2f, %esi
callq 0x7f0e
testl %eax, %eax
je 0x7a1f
movq %r15, %rdi
callq 0x7ee0
cmpl $0x2, %eax
jg 0x7a26
movl $0x2, 0x74(%rbx)
movslq %ebp, %r13
leaq (%r15,%r13), %r12
incq %r12
shlq $0x20, %r13
movabsq $0x100000000, %rax      # imm = 0x100000000
movzbl -0x1(%r12), %ecx
cmpl $0x20, %ecx
je 0x7a55
cmpl $0x2e, %ecx
je 0x7a5d
movl $0x2, 0x74(%rbx)
incq %r12
addq %rax, %r13
jmp 0x7a3e
movq %r15, %rdi
callq 0x7ee0
incl %eax
movslq %eax, %rdi
callq 0x7100
movq %rax, (%r14)
testq %rax, %rax
jne 0x7a7e
movl $0x2, 0x74(%rbx)
sarq $0x20, %r13
movb (%r15,%r13), %al
testb %al, %al
je 0x7aa6
movq (%r14), %rcx
movslq 0x88(%rbx), %rdx
movb %al, (%rcx,%rdx)
incl 0x88(%rbx)
movb (%r12), %al
incq %r12
jmp 0x7a86
movq (%r14), %rax
movslq 0x88(%rbx), %rcx
movb $0x0, (%rax,%rcx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/iciamyplant[P]Cub3d-Linux/src/parsing_color_resolution_texture.c
// Function: ft_texture
void	ft_texture(char *str, t_recup *recup)
{
	int			i;
	static int	j = 0;

	i = 0;
	if (str[i] == 'S' && str[i + 1] == 'O')
		ft_path_texture(str, &recup->no, recup, 2);
	else if (str[i] == 'N' && str[i + 1] == 'O')
		ft_path_texture(str, &recup->so, recup, 2);
	else if (str[i] == 'E' && str[i + 1] == 'A')
		ft_path_texture(str, &recup->we, recup, 2);
	else if (str[i] == 'W' && str[i + 1] == 'E')
		ft_path_texture(str, &recup->ea, recup, 2);
	else if (str[i] == 'S' && str[i + 1] != 'O')
		ft_path_texture(str, &recup->sp, recup, 1);
	else if (str[0] != 'N' && str[0] != 'S' && str[0] != 'W' && str[0] != 'E'
			&& str[0] != 'R' && str[0] != 'F' && str[0] != 'C'
			&& str[0] > 65 && str[0] < 122)
		recup->erreur = 2;
	j++;
}

// Assembly:
pushq %rax
movq %rsi, %rdx
movzbl (%rdi), %eax
cmpl $0x53, %eax
jne 0x7add
cmpb $0x4f, 0x1(%rdi)
jne 0x7add
leaq 0x18(%rdx), %rsi
jmp 0x7b1d
cmpl $0x45, %eax
je 0x7b02
cmpl $0x57, %eax
je 0x7b13
cmpl $0x4e, %eax
jne 0x7b29
cmpb $0x4f, 0x1(%rdi)
jne 0x7af8
leaq 0x20(%rdx), %rsi
jmp 0x7b1d
cmpl $0x57, %eax
je 0x7b13
cmpl $0x45, %eax
jne 0x7b29
cmpb $0x41, 0x1(%rdi)
jne 0x7b0e
leaq 0x28(%rdx), %rsi
jmp 0x7b1d
cmpl $0x57, %eax
jne 0x7b29
cmpb $0x45, 0x1(%rdi)
jne 0x7b29
leaq 0x30(%rdx), %rsi
movl $0x2, %ecx
callq 0x79c1
jmp 0x7b46
cmpl $0x53, %eax
jne 0x7b34
cmpb $0x4f, 0x1(%rdi)
jne 0x7b4e
leal -0x43(%rax), %ecx
cmpl $0x14, %ecx
ja 0x7b59
movl $0x11880d, %esi         # imm = 0x11880D
btl %ecx, %esi
jae 0x7b59
incl 0xd758(%rip)            # 0x152a4
popq %rax
retq
leaq 0x38(%rdx), %rsi
movl $0x1, %ecx
jmp 0x7b22
addb $-0x42, %al
cmpb $0x37, %al
ja 0x7b46
movl $0x2, 0x74(%rdx)
jmp 0x7b46
// File: /workspace/github_c_makefile_star2_O1/iciamyplant[P]Cub3d-Linux/src/parsing_color_resolution_texture.c
// Function: ft_color_resolution
void	ft_color_resolution(char **str, t_recup *recup)
{
	int			i;

	i = 0;
	recup->i = 1;
	if (recup->sizeline > 0 && (recup->no == NULL || recup->so == NULL ||
				recup->we == NULL || recup->ea == NULL || recup->sp == NULL))
		recup->erreur = 2;
	if ((recup->no != NULL || recup->so != NULL || recup->we != NULL ||
				recup->ea != NULL || recup->sp != NULL) && (recup->rx == 0
				|| recup->ry == 0))
		recup->erreur = 2;
	if (*str[i] == 'R')
	{
		if (recup->rx != 0 && recup->ry != 0)
			recup->erreur = 2;
		recup->rx = ft_atoi2(*str, recup);
		recup->ry = ft_atoi2(*str, recup);
		if (ft_atoi2(*str, recup) > 0 || recup->rx == 0 || recup->ry == 0)
			recup->erreur = 2;
	}
	else if (*str[i] == 'F')
		recup->f = ft_atoi3(*str, recup);
	else if (*str[i] == 'C')
		recup->c = ft_atoi3(*str, recup);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, 0x8(%rsi)
cmpl $0x0, 0x44(%rsi)
jle 0x7ba9
cmpq $0x0, 0x18(%rbx)
je 0x7ba2
cmpq $0x0, 0x20(%rbx)
je 0x7ba2
cmpq $0x0, 0x28(%rbx)
je 0x7ba2
cmpq $0x0, 0x30(%rbx)
je 0x7ba2
cmpq $0x0, 0x38(%rbx)
jne 0x7ba9
movl $0x2, 0x74(%rbx)
cmpq $0x0, 0x18(%rbx)
jne 0x7bcc
cmpq $0x0, 0x20(%rbx)
jne 0x7bcc
cmpq $0x0, 0x28(%rbx)
jne 0x7bcc
cmpq $0x0, 0x30(%rbx)
jne 0x7bcc
cmpq $0x0, 0x38(%rbx)
je 0x7bde
cmpl $0x0, (%rbx)
je 0x7bd7
cmpl $0x0, 0x4(%rbx)
jne 0x7bde
movl $0x2, 0x74(%rbx)
movq (%r14), %rdi
movzbl (%rdi), %eax
cmpl $0x43, %eax
je 0x7c42
cmpl $0x46, %eax
je 0x7c35
cmpl $0x52, %eax
jne 0x7c4d
cmpl $0x0, (%rbx)
je 0x7c05
cmpl $0x0, 0x4(%rbx)
je 0x7c05
movl $0x2, 0x74(%rbx)
movq %rbx, %rsi
callq 0x77f4
movl %eax, (%rbx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x77f4
movl %eax, 0x4(%rbx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x77f4
testl %eax, %eax
jle 0x7c55
movl $0x2, 0x74(%rbx)
jmp 0x7c4d
movq %rbx, %rsi
callq 0x78e1
movl %eax, 0xc(%rbx)
jmp 0x7c4d
movq %rbx, %rsi
callq 0x78e1
movl %eax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x0, (%rbx)
je 0x7c2c
cmpl $0x0, 0x4(%rbx)
jne 0x7c4d
jmp 0x7c2c
nop