lm_check:
    pusha

    pushfd
    pop eax
    mov ecx, eax

    xor eax, 1 << 21
    
    push eax
    popfd

    pushfd
    pop eax

    xor eax, ecx
    jz .done

    mov eax, 0x80000000
    cpuid
    cmp eax, 0x80000001
    jb .done

    mov eax, 0x80000001
    cpuid
    test edx, 1 << 29
    jz .done

    mov si, STR_LM_COMPAT
    call printf
    popa
    ret

    .done:
        popa
        mov si, STR_NO_LM
        call printf
        jmp $ 
{'avg_line_length': 11.921052631578947, 'max_line_length': 25, 'alphanum_fraction': 0.5121412803532008, 'licenses': ['MIT'], 'repository_name': 'wsngamerz/wsn_os', 'path': 'src/boot/lm_check.asm', 'size': 453, 'lang': 'Assembly'}