<commit_before>/*      s l b d i s _ c
 *
 * This module handles the dis-assembly of an SROFF module.  It is
 * based on the MINIX mdb disassembler (see notice below), although
 * significant changes have been made from the original.
 *
 * The system has been modified to be a 2 pass system:
 *     Pass 1 is used to build up symbol tables.
 *     Pass 2 actually prints the disassembly.
 *
 * (c) Copyright 1991 <NAME>
 *     Email:  <EMAIL>
 *
 *     Permission to copy and/or distribute granted under the
 *     following conditions:
 *
 *     1). This notice must remain intact.
 *     2). The author is not responsible for the consequences of use
 *         this software, no matter how awful, even if they
 *         arise from defects in it.
 *     3). Altered version must not be represented as being the
 *         original software.
 *
 *  The original header from the MINIX source file now follows:
 *--------------------------------------------------------------------------
 * mdbdis.c - MINIX program disassembler                                    |
 *                                                                          |
 * Written by <NAME>                                              |
 *                                                                          |
 * This free software is provided for non-commerical use. No warrantee      |
 * of fitness for any use is implied. You get what you pay for. Anyone      |
 * may make modifications and distribute them, but please keep this header  |
 * in the distribution.                                                     |
 *--------------------------------------------------------------------------
 */

#include "slb.h"
#include <stdarg.h>
#include <stdint.h>
#ifndef WIN32
#include <byteswap.h>
#else
static uint16_t bswap_16(uint16_t val) {
  return (uint16_t)(val << 8) + (val >> 8);
}
static uint32_t bswap_32(uint32_t val) {
  return (uint32_t)(((uint32_t)bswap_16(val & 0xffff) << 16) |
                    (uint32_t)bswap_16(val >> 16));
}
#endif

PRIVATE short gword         _PROTOTYPE((void));
PRIVATE long  glong         _PROTOTYPE((void));
PRIVATE void  reladdr       _PROTOTYPE((char));
PRIVATE void  movem         _PROTOTYPE((int, int, int));
PRIVATE void  opmode        _PROTOTYPE((char *, int, int, int, int));
PRIVATE int   op1           _PROTOTYPE((int, int));
PRIVATE void  op2           _PROTOTYPE((int, int, int, int, int));
PRIVATE void  symbolic      _PROTOTYPE((long, char));
PRIVATE void  Long_Label    _PROTOTYPE((char));

#define BYTE 0
#define WORD 1
#define LONG 2

struct label {
    struct label * next;       /* Linkage fields */<commit_msg>add swap function for clang<commit_after>/*      s l b d i s _ c
 *
 * This module handles the dis-assembly of an SROFF module.  It is
 * based on the MINIX mdb disassembler (see notice below), although
 * significant changes have been made from the original.
 *
 * The system has been modified to be a 2 pass system:
 *     Pass 1 is used to build up symbol tables.
 *     Pass 2 actually prints the disassembly.
 *
 * (c) Copyright 1991 <NAME>
 *     Email:  <EMAIL>
 *
 *     Permission to copy and/or distribute granted under the
 *     following conditions:
 *
 *     1). This notice must remain intact.
 *     2). The author is not responsible for the consequences of use
 *         this software, no matter how awful, even if they
 *         arise from defects in it.
 *     3). Altered version must not be represented as being the
 *         original software.
 *
 *  The original header from the MINIX source file now follows:
 *--------------------------------------------------------------------------
 * mdbdis.c - MINIX program disassembler                                    |
 *                                                                          |
 * Written by <NAME>                                              |
 *                                                                          |
 * This free software is provided for non-commerical use. No warrantee      |
 * of fitness for any use is implied. You get what you pay for. Anyone      |
 * may make modifications and distribute them, but please keep this header  |
 * in the distribution.                                                     |
 *--------------------------------------------------------------------------
 */

#include "slb.h"
#include <stdarg.h>
#include <stdint.h>

#if defined(WIN32) || defined(__clang__)
static uint16_t bswap_16(uint16_t val) {
  return (uint16_t)(val << 8) + (val >> 8);
}
static uint32_t bswap_32(uint32_t val) {
  return (uint32_t)(((uint32_t)bswap_16(val & 0xffff) << 16) |
                    (uint32_t)bswap_16(val >> 16));
}
#else
#include <byteswap.h>
#endif

PRIVATE short gword         _PROTOTYPE((void));
PRIVATE long  glong         _PROTOTYPE((void));
PRIVATE void  reladdr       _PROTOTYPE((char));
PRIVATE void  movem         _PROTOTYPE((int, int, int));
PRIVATE void  opmode        _PROTOTYPE((char *, int, int, int, int));
PRIVATE int   op1           _PROTOTYPE((int, int));
PRIVATE void  op2           _PROTOTYPE((int, int, int, int, int));
PRIVATE void  symbolic      _PROTOTYPE((long, char));
PRIVATE void  Long_Label    _PROTOTYPE((char));

#define BYTE 0
#define WORD 1
#define LONG 2

struct label {
    struct label * next;       /* Linkage fields */
{'fraction_non_alphanumeric': 0.13729891507669287, 'fraction_numerical': 0.017957351290684626, 'mean_word_length': 1.649653121902874, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4840280', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1409, 'n_words': 549}