<commit_before>message JumpTbl {
    repeated    int64       table_entries = 1;
    required    int32       zero_offset = 2;
}

message JumpIndexTbl {
    required    bytes       table_entries = 1;
    required    int32       zero_offset = 2;
}

message Instruction {
    required    bytes             inst_bytes = 1;
    required    int64             inst_addr = 2;
    optional    int64             true_target = 3;
    optional    int64             false_target = 4;
    required    int32             inst_len = 5;
    optional    int64             data_offset = 6;
    optional    string            ext_call_name = 7;
    optional    int64             call_target = 8;
    optional    int32             reloc_offset = 9;
    optional    JumpTbl           jump_table = 10;
    optional    JumpIndexTbl      jump_index_table = 11;
    optional    string            ext_data_name = 12;
}

message Block {
    repeated    Instruction insts = 1;
    required    int64       base_address = 2;
    //the block_follows list is used to rebuild the basic block CFG, so it 
    //should contain the list of base_addresses for blocks following this 
    //block in the CFG
    repeated    int64       block_follows = 3;
}

message Function {
    repeated    Block   blocks = 1;
    required    int64   entry_address = 2;
}

message ExternalFunction {
    enum CallingConvention {
      CallerCleanup = 0;
      CalleeCleanup = 1;
      FastCall      = 2;
    }

    required    string            symbol_name = 1;
    required    CallingConvention calling_convention = 2;
    required    bool              has_return = 3;
    required    bool              no_return = 4;
    required    int32             argument_count = 5;
}

message ExternalData {
    required    string      symbol_name = 1;
    required    int32       data_size = 2;
}


message DataSymbol {
    required int64 base_address = 1;
    required string symbol_name = 2;
}

message Data {
    required    int64           base_address = 1;
    required    bytes           data = 2;
    repeated    DataSymbol      symbols = 3;    
    required    bool            read_only = 4;
}

message EntrySymbolExtra {
    required    int32                               entry_argc = 1;
    required    ExternalFunction.CallingConvention  entry_cconv = 2;
    required    bool                                does_return = 3;
}

message EntrySymbol {
    required    string                              entry_name = 1;
    required    int64                               entry_address = 2;
    optional    EntrySymbolExtra                    entry_extra = 3;
}

message Module {
    repeated    Function            internal_funcs = 1;
    repeated    ExternalFunction    external_funcs = 2;
    repeated    Data                internal_data = 3;
    required    string              module_name = 4;
    repeated    EntrySymbol         entries = 5;
    repeated    ExternalData        external_data = 6;
}

message Annotated_Instruction {
    required string instr_name = 1;
    required string instr_string = 2;
    required int64  inst_addr = 3;
    required string inst_addr_hex = 4;
    required int32  inst_len = 5; 
    required int32  op_count = 6; 

    required bool   is_branch_instruction = 7; 
    optional bool   is_resolved = 8; 

    message Edge {
        required int64 inst_addr = 1;
    	required string kind = 2;
	optional string label = 3; 
	}

    enum Operand_Type {
    	 unknown = 0; 
      	 immediate = 1;
      	 register = 2;
      	 memory = 3;
	 address = 4;
	 }

    message Operand {
        required int32 pos = 1;	
	required string value = 2;
	optional Operand_Type type = 3 [default = unknown];
	}

    repeated Edge target_to = 9; 
    repeated Edge referered_from = 10; 
    repeated Operand argument = 11;
}


message Disassembly {
    repeated Annotated_Instruction instr = 1;
}
<commit_msg>enum issues<commit_after>message JumpTbl {
    repeated    int64       table_entries = 1;
    required    int32       zero_offset = 2;
}

message JumpIndexTbl {
    required    bytes       table_entries = 1;
    required    int32       zero_offset = 2;
}

message Instruction {
    required    bytes             inst_bytes = 1;
    required    int64             inst_addr = 2;
    optional    int64             true_target = 3;
    optional    int64             false_target = 4;
    required    int32             inst_len = 5;
    optional    int64             data_offset = 6;
    optional    string            ext_call_name = 7;
    optional    int64             call_target = 8;
    optional    int32             reloc_offset = 9;
    optional    JumpTbl           jump_table = 10;
    optional    JumpIndexTbl      jump_index_table = 11;
    optional    string            ext_data_name = 12;
}

message Block {
    repeated    Instruction insts = 1;
    required    int64       base_address = 2;
    //the block_follows list is used to rebuild the basic block CFG, so it 
    //should contain the list of base_addresses for blocks following this 
    //block in the CFG
    repeated    int64       block_follows = 3;
}

message Function {
    repeated    Block   blocks = 1;
    required    int64   entry_address = 2;
}

message ExternalFunction {
    enum CallingConvention {
      CallerCleanup = 0;
      CalleeCleanup = 1;
      FastCall      = 2;
    }

    required    string            symbol_name = 1;
    required    CallingConvention calling_convention = 2;
    required    bool              has_return = 3;
    required    bool              no_return = 4;
    required    int32             argument_count = 5;
}

message ExternalData {
    required    string      symbol_name = 1;
    required    int32       data_size = 2;
}


message DataSymbol {
    required int64 base_address = 1;
    required string symbol_name = 2;
}

message Data {
    required    int64           base_address = 1;
    required    bytes           data = 2;
    repeated    DataSymbol      symbols = 3;    
    required    bool            read_only = 4;
}

message EntrySymbolExtra {
    required    int32                               entry_argc = 1;
    required    ExternalFunction.CallingConvention  entry_cconv = 2;
    required    bool                                does_return = 3;
}

message EntrySymbol {
    required    string                              entry_name = 1;
    required    int64                               entry_address = 2;
    optional    EntrySymbolExtra                    entry_extra = 3;
}

message Module {
    repeated    Function            internal_funcs = 1;
    repeated    ExternalFunction    external_funcs = 2;
    repeated    Data                internal_data = 3;
    required    string              module_name = 4;
    repeated    EntrySymbol         entries = 5;
    repeated    ExternalData        external_data = 6;
}

message Annotated_Instruction {
    required string instr_name = 1;
    required string instr_string = 2;
    required int64  inst_addr = 3;
    required string inst_addr_hex = 4;
    required int32  inst_len = 5; 
    required int32  op_count = 6; 

    required bool   is_branch_instruction = 7; 
    optional bool   is_resolved = 8; 

    message Edge {
        required int64 inst_addr = 1;
    	required string kind = 2;
	optional string label = 3; 
	}

//    enum Operand_Type {
//    	 unknown = 0; 
//      	 immediate = 1;
//      	 register = 2;
//      	 memory = 3;
//	 address = 4;
//	 }


    message Operand {
        required int32 pos = 1;	
	required string value = 2;
//	optional Operand_Type type = 3 [default = unknown];
	}

    repeated Edge target_to = 9; 
    repeated Edge referered_from = 10; 
    repeated Operand argument = 11;
}


message Disassembly {
    repeated Annotated_Instruction instr = 1;
}

{'fraction_non_alphanumeric': 0.05202833226014166, 'fraction_numerical': 0.03219575016097875, 'mean_word_length': 1.677007928300586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '6168707', 'n_tokens_mistral': 2387, 'n_tokens_neox': 2161, 'n_words': 675}