?? RIGHT := 110 ??
MODULE ocm$process_bti_records;
*copyc osd$default_pragmats
?? PUSH (LISTEXT := ON) ??
*copyc oct$single_module_predictor_hdr
*copyc oct$section_directory
*copyc oct$offset_change_list
*copyc llt$section_address
*copyc llt$information_element
*copyc ocp$new_offset
?? POP ??

*copyc och$process_bti_records

  PROCEDURE [XDCL] ocp$process_bti_records (module_predictor: ^oct$module_predictor;
        module_predictor_header: ^oct$single_module_predictor_hdr;
        section_directory: ^oct$section_directory;
        bti_records: ^llt$binding_section_template;
        number_of_template_items: 0 .. llc$max_binding_items);

    VAR
      bsocvs: ^oct$offset_change_list,
      j: 0 .. llc$max_binding_items;

    IF module_predictor_header^.length_binding_socv > 0 THEN
      bsocvs := #PTR (module_predictor_header^.binding_section_ocv, module_predictor^);
    ELSE
      bsocvs := NIL;
    IFEND;
    FOR j := 1 TO number_of_template_items DO
      IF bsocvs <> NIL THEN
        bti_records^ [j].binding_offset := ocp$new_offset (bti_records^ [j].binding_offset, bsocvs);
      IFEND;
      IF bti_records^ [j].kind = llc$current_module THEN
        bti_records^ [j].offset := ocp$new_offset (bti_records^ [j].offset, section_directory^ [bti_records^
              [j].section_ordinal].section_offset_change_vector);
        bti_records^ [j].section_ordinal := section_directory^ [bti_records^ [j].section_ordinal].
              new_section_number;
      IFEND;
    FOREND;
  PROCEND ocp$process_bti_records;
MODEND ocm$process_bti_records;
