// File: /workspace/github_c_makefile_star2_O0/lukexi[P]eglstreams-mini/src/egl.c
// Function: EGLCheck
void EGLCheck(const char* name) {
    EGLint err = eglGetError();
    if (err != EGL_SUCCESS) {
        printf("%s: ", name);
        switch (err) {
            case EGL_NOT_INITIALIZED:
                printf("EGL is not initialized, or could not be initialized, for the specified EGL display connection.\n");
                break;
            case EGL_BAD_ACCESS:
                printf("EGL cannot access a requested resource (for example a context is bound in another thread).\n");
                break;
            case EGL_BAD_ALLOC:
                printf("EGL failed to allocate resources for the requested operation.\n");
                break;
            case EGL_BAD_ATTRIBUTE:
                printf("An unrecognized attribute or attribute value was passed in the attribute list.\n");
                break;
            case EGL_BAD_CONTEXT:
                printf("An EGLContext argument does not name a valid EGL rendering context.\n");
                break;
            case EGL_BAD_CONFIG:
                printf("An EGLConfig argument does not name a valid EGL frame buffer configuration.\n");
                break;
            case EGL_BAD_CURRENT_SURFACE:
                printf("The current surface of the calling thread is a window, pixel buffer or pixmap that is no longer valid.\n");
                break;
            case EGL_BAD_DISPLAY:
                printf("An EGLDisplay argument does not name a valid EGL display connection.\n");
                break;
            case EGL_BAD_SURFACE:
                printf("An EGLSurface argument does not name a valid surface (window, pixel buffer or pixmap) configured for GL rendering.\n");
                break;
            case EGL_BAD_MATCH:
                printf("Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).\n");
                break;
            case EGL_BAD_PARAMETER:
                printf("One or more argument values are invalid.\n");
                break;
            case EGL_BAD_NATIVE_PIXMAP:
                printf("A NativePixmapType argument does not refer to a valid native pixmap.\n");
                break;
            case EGL_BAD_NATIVE_WINDOW:
                printf("A NativeWindowType argument does not refer to a valid native window.\n");
                break;
            case EGL_CONTEXT_LOST:
                printf("A power management event has occurred. The application must destroy all contexts and reinitialise OpenGL ES state and objects to continue rendering.\n");
                break;
        }
        exit(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0x2300
movl %eax, -0xc(%rbp)
cmpl $0x3000, -0xc(%rbp)     # imm = 0x3000
je 0x3645
movq -0x8(%rbp), %rsi
leaq 0x3360(%rip), %rdi      # 0x687c
xorl %eax, %eax
callq 0x2050
movl -0xc(%rbp), %eax
addl $0xffffcfff, %eax       # imm = 0xFFFFCFFF
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xd, %eax
ja 0x363b
movq -0x18(%rbp), %rax
leaq 0x2b3b(%rip), %rcx      # 0x6080
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x332c(%rip), %rdi      # 0x6881
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x3379(%rip), %rdi      # 0x68e1
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x33c2(%rip), %rdi      # 0x693d
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x33ee(%rip), %rdi      # 0x697c
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x342b(%rip), %rdi      # 0x69cc
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x345d(%rip), %rdi      # 0x6a11
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x349a(%rip), %rdi      # 0x6a5e
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x34f2(%rip), %rdi      # 0x6ac6
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x3528(%rip), %rdi      # 0x6b0c
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x358c(%rip), %rdi      # 0x6b80
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x35e9(%rip), %rdi      # 0x6bed
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x3603(%rip), %rdi      # 0x6c17
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x3639(%rip), %rdi      # 0x6c5d
movb $0x0, %al
callq 0x2050
jmp 0x363b
leaq 0x366f(%rip), %rdi      # 0x6ca3
movb $0x0, %al
callq 0x2050
movl $0x1, %edi
callq 0x20d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)