<commit_before>#include <signal.h>

#define DPS_SIZE 0x200
#define GCI_HUB_SIZE 0x400
#define GCI_HUB_HEADER_SIZE 0x100
#define GCI_NODE_SIZE 0x400

/* DPS */
#define DPS_UTIM64A 0x000
#define DPS_UTIM64B 0x040
#define DPS_UTIM64_SIZE 0x7f
#define DPS_UTIM64_TIMER_SIZE 0x3c

#define DPS_UTIM64_MCFGR 0x000
#define DPS_UTIM64_MCR 0x004
#define DPS_UTIM64_CC0R 0x00c
#define DPS_UTIM64_CC1R 0x014
#define DPS_UTIM64_CC2R 0x01c
#define DPS_UTIM64_CC3R 0x024
#define DPS_UTIM64_CC0CFGR 0x02c
#define DPS_UTIM64_CC1CFGR 0x030
#define DPS_UTIM64_CC2CFGR 0x034
#define DPS_UTIM64_CC3CFGR 0x038

#define DPS_UTIM64FLAGS 0x07c

#define UTIM64MCFG_ENA 0x1
#define UTIM64CFG_ENA 0x1
#define UTIM64CFG_IE 0x2
#define UTIM64CFG_BIT 0x4
#define UTIM64CFG_MODE 0x8
#define UTIM64FLAGS_A0 0x01
#define UTIM64FLAGS_A1 0x02
#define UTIM64FLAGS_A2 0x04
#define UTIM64FLAGS_A3 0x08
#define UTIM64FLAGS_B0 0x10
#define UTIM64FLAGS_B1 0x20
#define UTIM64FLAGS_B2 0x40
#define UTIM64FLAGS_B3 0x80

#define DPS_SCI 0x100
#define DPS_SCITXD 0x100
#define DPS_SCIRXD 0x104
#define DPS_SCICFG 0x108

#define DPS_MIMSR 0x120
#define DPS_LSFLAGS 0x1fc
#define DPS_LSFLAGS_SCIR 0x01

#define SCIRXD_VALID 0x80000000
#define SCICFG_TEN 0x1
#define SCICFG_REN 0x2
#define SCICFG_TCLR 0x1000
#define SCICFG_RCLR 0x2000
#define SCICFG_BDR_OFFSET 2
#define SCICFG_TIRE_MASK 0x1c0
#define SCICFG_TIRE_OFFSET 6
#define SCICFG_RIRE_MASK 0xe00
#define SCICFG_RIRE_OFFSET 9

#define UTIM64MCFG_ENA 0x1

/* GCI */
#define GCI_NODE_MAX 4
#define GCI_KMC_NUM 0
#define GCI_DISPLAY_NUM 1
#define GCI_MMCC_NUM 2

/* Display */
#define DISPLAY_CHAR_WIDTH 80
#define DISPLAY_CHAR_HEIGHT 34
#define DISPLAY_WIDTH 640
#define DISPLAY_HEIGHT 480
#define DISPLAY_BITMAP_OFFSET 0xc000

/* KMC */
#define KMC_SCANCODE_VALID 0x100

/* MMCC */
#define MMCC_BUFFER_OFFSET 0x040
#define MMCC_BUFFER_SIZE 0x200
#define MMCC_SECTOR_SIZE 512

#define GCI_MMCC_INIT_COMMAND 0x000
#define GCI_MMCC_SECTOR_READ 0x004
#define GCI_MMCC_SECTOR_WRITE 0x008

/* Priority */
#define GCI_KMC_PRIORITY 0x08
#define GCI_KMC_INT_PRIORITY 0xff
#define GCI_DISPLAY_PRIORITY 0xff
#define GCI_DISPLAY_INT_PRIORITY 0xff
#define GCI_MMCC_PRIORITY 0xff
#define GCI_MMCC_INT_PRIORITY 0xff

/* Area Size */
#define GCI_KMC_AREA_SIZE 0x0004
#define GCI_DISPLAY_CHAR_SIZE 0x0000c000
#define GCI_DISPLAY_BITMAP_SIZE 0x00400000
#define GCI_DISPLAY_AREA_SIZE (GCI_DISPLAY_CHAR_SIZE + GCI_DISPLAY_BITMAP_SIZE)
#define GCI_MMCC_AREA_SIZE 0x0240

/* I/O FIFO Buffer */
#define FIFO_USED(start, end, size) ((end + size - start) % size)
#define SCI_FIFO_RX_SIZE (16 + 1)
#define SCI_FIFO_TX_SIZE (16 + 1)
#define KMC_FIFO_SCANCODE_SIZE 128

/* FIFO files */
#define FIFO_SCI_TXD "./sci_txd"
#define FIFO_SCI_RXD "./sci_rxd"
#define FIFO_DISPLAY_CHAR "./gci_display_char"

/* MMC image */
#define GCI_MMCC_IMAGE_FILE "./mmc.img"

typedef volatile struct _gci_hub_info {
  unsigned int total;
  unsigned int space_size;
} gci_hub_info;

typedef volatile struct _gci_hub_node {
  unsigned int size;
  unsigned int priority;
  unsigned int _reserved1;
  unsigned int _reserved2;
  unsigned int _reserved3;
} gci_hub_node;

typedef volatile struct _gci_node_info {
  unsigned int area_size;
  unsigned int int_priority;
  volatile unsigned int int_factor;
  unsigned int _reserved;
} gci_node_info;<commit_msg>bug fixed: invalid struct gci_hub_node<commit_after>#include <signal.h>

#define DPS_SIZE 0x200
#define GCI_HUB_SIZE 0x400
#define GCI_HUB_HEADER_SIZE 0x100
#define GCI_NODE_SIZE 0x400

/* DPS */
#define DPS_UTIM64A 0x000
#define DPS_UTIM64B 0x040
#define DPS_UTIM64_SIZE 0x7f
#define DPS_UTIM64_TIMER_SIZE 0x3c

#define DPS_UTIM64_MCFGR 0x000
#define DPS_UTIM64_MCR 0x004
#define DPS_UTIM64_CC0R 0x00c
#define DPS_UTIM64_CC1R 0x014
#define DPS_UTIM64_CC2R 0x01c
#define DPS_UTIM64_CC3R 0x024
#define DPS_UTIM64_CC0CFGR 0x02c
#define DPS_UTIM64_CC1CFGR 0x030
#define DPS_UTIM64_CC2CFGR 0x034
#define DPS_UTIM64_CC3CFGR 0x038

#define DPS_UTIM64FLAGS 0x07c

#define UTIM64MCFG_ENA 0x1
#define UTIM64CFG_ENA 0x1
#define UTIM64CFG_IE 0x2
#define UTIM64CFG_BIT 0x4
#define UTIM64CFG_MODE 0x8
#define UTIM64FLAGS_A0 0x01
#define UTIM64FLAGS_A1 0x02
#define UTIM64FLAGS_A2 0x04
#define UTIM64FLAGS_A3 0x08
#define UTIM64FLAGS_B0 0x10
#define UTIM64FLAGS_B1 0x20
#define UTIM64FLAGS_B2 0x40
#define UTIM64FLAGS_B3 0x80

#define DPS_SCI 0x100
#define DPS_SCITXD 0x100
#define DPS_SCIRXD 0x104
#define DPS_SCICFG 0x108

#define DPS_MIMSR 0x120
#define DPS_LSFLAGS 0x1fc
#define DPS_LSFLAGS_SCIR 0x01

#define SCIRXD_VALID 0x80000000
#define SCICFG_TEN 0x1
#define SCICFG_REN 0x2
#define SCICFG_TCLR 0x1000
#define SCICFG_RCLR 0x2000
#define SCICFG_BDR_OFFSET 2
#define SCICFG_TIRE_MASK 0x1c0
#define SCICFG_TIRE_OFFSET 6
#define SCICFG_RIRE_MASK 0xe00
#define SCICFG_RIRE_OFFSET 9

#define UTIM64MCFG_ENA 0x1

/* GCI */
#define GCI_NODE_MAX 4
#define GCI_KMC_NUM 0
#define GCI_DISPLAY_NUM 1
#define GCI_MMCC_NUM 2

/* Display */
#define DISPLAY_CHAR_WIDTH 80
#define DISPLAY_CHAR_HEIGHT 34
#define DISPLAY_WIDTH 640
#define DISPLAY_HEIGHT 480
#define DISPLAY_BITMAP_OFFSET 0xc000

/* KMC */
#define KMC_SCANCODE_VALID 0x100

/* MMCC */
#define MMCC_BUFFER_OFFSET 0x040
#define MMCC_BUFFER_SIZE 0x200
#define MMCC_SECTOR_SIZE 512

#define GCI_MMCC_INIT_COMMAND 0x000
#define GCI_MMCC_SECTOR_READ 0x004
#define GCI_MMCC_SECTOR_WRITE 0x008

/* Priority */
#define GCI_KMC_PRIORITY 0x08
#define GCI_KMC_INT_PRIORITY 0xff
#define GCI_DISPLAY_PRIORITY 0xff
#define GCI_DISPLAY_INT_PRIORITY 0xff
#define GCI_MMCC_PRIORITY 0xff
#define GCI_MMCC_INT_PRIORITY 0xff

/* Area Size */
#define GCI_KMC_AREA_SIZE 0x0004
#define GCI_DISPLAY_CHAR_SIZE 0x0000c000
#define GCI_DISPLAY_BITMAP_SIZE (DISPLAY_WIDTH * DISPLAY_HEIGHT * 4)
#define GCI_DISPLAY_AREA_SIZE (GCI_DISPLAY_CHAR_SIZE + GCI_DISPLAY_BITMAP_SIZE)
#define GCI_MMCC_AREA_SIZE 0x0240

/* I/O FIFO Buffer */
#define FIFO_USED(start, end, size) ((end + size - start) % size)
#define SCI_FIFO_RX_SIZE (16 + 1)
#define SCI_FIFO_TX_SIZE (16 + 1)
#define KMC_FIFO_SCANCODE_SIZE 128

/* FIFO files */
#define FIFO_SCI_TXD "./sci_txd"
#define FIFO_SCI_RXD "./sci_rxd"
#define FIFO_DISPLAY_CHAR "./gci_display_char"

/* MMC image */
#define GCI_MMCC_IMAGE_FILE "./mmc.img"

typedef volatile struct _gci_hub_info {
  unsigned int total;
  unsigned int space_size;
} gci_hub_info;

typedef volatile struct _gci_hub_node {
  unsigned int size;
  unsigned int priority;
  unsigned int _reserved1;
  unsigned int _reserved2;
  unsigned int _reserved3;
  unsigned int _reserved4;
  unsigned int _reserved5;
  unsigned int _reserved6;
} gci_hub_node;

typedef volatile struct _gci_node_info {
  unsigned int area_size;
  unsigned int int_priority;
  volatile unsigned int int_factor;
  unsigned int _reserved;
} gci_node_info;
{'fraction_non_alphanumeric': 0.05739644970414201, 'fraction_numerical': 0.09600591715976331, 'mean_word_length': 6.545758928571429, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '5634798', 'n_tokens_mistral': 3424, 'n_tokens_neox': 2929, 'n_words': 672}