<commit_before>bits 64
global sadd
sadd:
    add esi, edi
    jo .over

.ok:
    mov eax, esi
    ret
    
.over:
    js .max
    
.min:
    mov eax, 0x80000000
    ret

.max:
    mov eax, 0x7fffffff
    ret

global sadd_pushf_cmov
sadd_pushf_cmov:
    mov ecx, 0x80000000
    mov edx, 0x7fffffff
    
    add esi, edi
    
    pushf
    pop rax
    not rax
    
    test ax, 0x0801
    cmovz esi, ecx
    
    test ax, 0x0880
    cmovz esi, edx

    mov eax, esi
    ret

global sadd_setcc_cmov
sadd_setcc_cmov:
    mov r15d, 0x80000000
    mov r14d, 0x7fffffff
    mov eax, esi
    xor esi, esi
    xor ecx, ecx
    xor edx, edx
    
    add eax, edi
    seto dl
    setc cl
    sets sil
    
    test dl, cl
    cmovnz eax, r15d
    
    test dl, sil
    cmovnz eax, r14d
    
    ret<commit_msg>use INT_{MIN,MAX} symbolics in asm<commit_after>INT_MIN equ 0x80000000
INT_MAX equ 0x7fffffff

bits 64
global sadd
sadd:
    add esi, edi
    jo .over

.ok:
    mov eax, esi
    ret
    
.over:
    js .max
    
.min:
    mov eax, INT_MIN
    ret

.max:
    mov eax, INT_MAX
    ret

global sadd_pushf_cmov
sadd_pushf_cmov:
    mov ecx, INT_MIN
    mov edx, INT_MAX
    
    add esi, edi
    
    pushf
    pop rax
    not rax
    
    test ax, 0x0801
    cmovz esi, ecx
    
    test ax, 0x0880
    cmovz esi, edx

    mov eax, esi
    ret

global sadd_setcc_cmov
sadd_setcc_cmov:
    mov r15d, INT_MIN
    mov r14d, INT_MAX
    mov eax, esi
    xor esi, esi
    xor ecx, ecx
    xor edx, edx
    
    add eax, edi
    seto dl
    setc cl
    sets sil
    
    test dl, cl
    cmovnz eax, r15d
    
    test dl, sil
    cmovnz eax, r14d
    
    ret
{'fraction_non_alphanumeric': 0.0491504854368932, 'fraction_numerical': 0.050970873786407765, 'mean_word_length': 1.625796178343949, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 8, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1592813', 'n_tokens_mistral': 811, 'n_tokens_neox': 736, 'n_words': 217}