<commit_before>/* Copyright (c) 2015, <NAME> <<EMAIL>>
 * All rights reserved.
 * See LICENSE for licensing details.
 */

#define __SYSCALL_OUTPUT_REG__            "=a" ( ret )

#ifdef __LP64__
   #define __SYSCALL_OPCODE__                "syscall"

   #define __SYSCALL_INPUT_REGS__                    \
      "a" ( n ), "D" ( a0 ), "S" ( a1 ), "d" ( a2 ), \
      "r" ( a3 ), "r" ( a4 ), "r" ( a5 )

   #define __SYSCALL_CLOBBERS__ "rcx", "r11", "memory"

#else
   #define __SYSCALL_OPCODE__              "int $0x80"

   #define __SYSCALL_INPUT_REGS__                    \
      "a" ( n ), "b" ( a0 ), "c" ( a1 ), "d" ( a2 ), \
      "S" ( a3 ), "D" ( a4 )

   #define __SYSCALL_CLOBBERS__

#endif

long syscall6( long n, long a0, long a1, long a2, long a3, long a4, long a5 )
{
   unsigned long ret;

   __asm__ volatile( __SYSCALL_OPCODE__
                     : __SYSCALL_OUTPUT_REG__
                     : __SYSCALL_INPUT_REGS__
                     : __SYSCALL_CLOBBERS__ );

   return( ret );
}

long inline syscall5( long n, long a0, long a1, long a2, long a3, long a4 )
{
   return( syscall6( n, a0, a1, a2, a3, a4, ( long )( 0 ) ) );
}

long inline syscall4( long n, long a0, long a1, long a2, long a3 )
{
   return( syscall5( n, a0, a1, a2, a3, ( long )( 0 ) ) );
}

long inline syscall3( long n, long a0, long a1, long a2 )
{
   return( syscall4( n, a0, a1, a2, ( long )( 0 ) ) );
}

long inline syscall2( long n, long a0, long a1 )
{
   return( syscall3( n, a0, a1, ( long )( 0 ) ) );
}

long inline syscall1( long n, long a0 )
{
   return( syscall2( n, a0, ( long )( 0 ) ) );
}

long inline syscall0( long n )
{<commit_msg>Fix up register ordering in syscall<commit_after>/* Copyright (c) 2015, <NAME> <<EMAIL>>
 * All rights reserved.
 * See LICENSE for licensing details.
 */

#define __SYSCALL_OUTPUT_REG__            "=a" ( ret )

#ifdef __LP64__
   #define __SYSCALL_OPCODE__                "syscall"

   #define __SYSCALL_PREAMBLE__                      \
      register long r10 __asm__( "r10" ) = a3,       \
                    r08	__asm__( "r8" )  = a4,       \
                    r09 __asm__( "r9" )  = a5

   #define __SYSCALL_INPUT_REGS__                    \
      "a" ( n ), "D" ( a0 ), "S" ( a1 ), "d" ( a2 ), \
      "r" ( r08 ), "r" ( r09 ), "r" ( r10 )

   #define __SYSCALL_CLOBBERS__ "rcx", "r11", "memory"

#else
   #define __SYSCALL_OPCODE__              "int $0x80"

   #define __SYSCALL_PREAMBLE__                      \
      register long ebp __asm__( "ebp" )  = a6

   #define __SYSCALL_INPUT_REGS__                    \
      "a" ( n ), "d" ( a0 ), "c" ( a1 ), "D" ( a2 ), \
      "S" ( a3 ), "r" ( ebp )

   #define __SYSCALL_CLOBBERS__               "memory"

#endif

long syscall6( long n, long a0, long a1, long a2, long a3, long a4, long a5 )
{
   unsigned long ret;
   __SYSCALL_PREAMBLE__;

   __asm__ volatile( __SYSCALL_OPCODE__
                     : __SYSCALL_OUTPUT_REG__
                     : __SYSCALL_INPUT_REGS__
                     : __SYSCALL_CLOBBERS__ );

   return( ret );
}

inline long syscall5( long n, long a0, long a1, long a2, long a3, long a4 )
{
   return( syscall6( n, a0, a1, a2, a3, a4, ( long )( 0 ) ) );
}

inline long syscall4( long n, long a0, long a1, long a2, long a3 )
{
   return( syscall5( n, a0, a1, a2, a3, ( long )( 0 ) ) );
}

inline long syscall3( long n, long a0, long a1, long a2 )
{
   return( syscall4( n, a0, a1, a2, ( long )( 0 ) ) );
}

inline long syscall2( long n, long a0, long a1 )
{
   return( syscall3( n, a0, a1, ( long )( 0 ) ) );
}

inline long syscall1( long n, long a0 )
{
   return( syscall2( n, a0, ( long )( 0 ) ) );
}

inline long syscall0( long n )
{
{'fraction_non_alphanumeric': 0.13826015816743933, 'fraction_numerical': 0.045268611944368695, 'mean_word_length': 2.046511627906977, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6132929', 'n_tokens_mistral': 1552, 'n_tokens_neox': 1437, 'n_words': 417}