// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/dvb_print_si.c
// Function: handle_section
static void handle_section(uint16_t i_pid, uint8_t *p_section)
{
    uint8_t i_table_id = psi_get_tableid(p_section);

    if (!psi_validate(p_section)) {
        switch (i_print_type) {
        case PRINT_XML:
            printf("<ERROR type=\"invalid_section\" pid=\"%hu\"/>\n", i_pid);
            break;
        default:
            printf("invalid section on PID %hu\n", i_pid);
        }
        free(p_section);
        return;
    }

    switch (i_table_id) {
    case PAT_TABLE_ID:
        handle_pat_section(i_pid, p_section);
        break;

    case CAT_TABLE_ID:
        handle_cat_section(i_pid, p_section);
        break;

    case TSDT_TABLE_ID:
        handle_tsdt_section(i_pid, p_section);
        break;

    case PMT_TABLE_ID:
        handle_pmt(i_pid, p_section);
        break;

    case NIT_TABLE_ID_ACTUAL:
        handle_nit_section(i_pid, p_section);
        break;

    case BAT_TABLE_ID:
        handle_bat_section(i_pid, p_section);
        break;

    case SDT_TABLE_ID_ACTUAL:
        handle_sdt_section(i_pid, p_section);
        break;

    case TDT_TABLE_ID:
        handle_tdt_section(i_pid, p_section);
        break;

    case TOT_TABLE_ID:
        handle_tot_section(i_pid, p_section);
        break;

    case RST_TABLE_ID:
        handle_rst_section(i_pid, p_section);
        break;

    case DIT_TABLE_ID:
        handle_dit_section(i_pid, p_section);
        break;

    case SIT_TABLE_ID:
        handle_sit_section(i_pid, p_section);
        break;

    case EIT_TABLE_ID_PF_ACTUAL:
        handle_eit_section(i_pid, p_section);
        break;

    case SCTE35_TABLE_ID:
        handle_scte35_section(i_pid, p_section);
        break;

    case AIT_TABLE_ID:
        handle_ait_section(i_pid, p_section);
        break;

    default:
        free( p_section );
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3530
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3540
testb $0x1, %al
jne 0x315d
movl 0x351ce(%rip), %eax     # 0x382f0
subl $0x1, %eax
jne 0x313d
jmp 0x3129
movzwl -0x2(%rbp), %esi
leaq 0x20cdd(%rip), %rdi     # 0x23e11
movb $0x0, %al
callq 0x20b0
jmp 0x314f
movzwl -0x2(%rbp), %esi
leaq 0x20cf4(%rip), %rdi     # 0x23e3c
movb $0x0, %al
callq 0x20b0
movq -0x10(%rbp), %rdi
callq 0x2030
jmp 0x3366
movzbl -0x11(%rbp), %eax
movl %eax, -0x18(%rbp)
testl %eax, %eax
je 0x3237
jmp 0x316e
movl -0x18(%rbp), %eax
subl $0x1, %eax
je 0x324c
jmp 0x317c
movl -0x18(%rbp), %eax
subl $0x2, %eax
je 0x3276
jmp 0x318a
movl -0x18(%rbp), %eax
subl $0x3, %eax
je 0x3261
jmp 0x3198
movl -0x18(%rbp), %eax
subl $0x40, %eax
je 0x328b
jmp 0x31a6
movl -0x18(%rbp), %eax
subl $0x42, %eax
je 0x32b5
jmp 0x31b4
movl -0x18(%rbp), %eax
subl $0x4a, %eax
je 0x32a0
jmp 0x31c2
movl -0x18(%rbp), %eax
subl $0x4e, %eax
je 0x3327
jmp 0x31d0
movl -0x18(%rbp), %eax
subl $0x70, %eax
je 0x32ca
jmp 0x31de
movl -0x18(%rbp), %eax
subl $0x71, %eax
je 0x32f1
jmp 0x31ec
movl -0x18(%rbp), %eax
subl $0x73, %eax
je 0x32df
jmp 0x31fa
movl -0x18(%rbp), %eax
subl $0x74, %eax
je 0x334b
jmp 0x3208
movl -0x18(%rbp), %eax
subl $0x7e, %eax
je 0x3303
jmp 0x3216
movl -0x18(%rbp), %eax
subl $0x7f, %eax
je 0x3315
jmp 0x3224
movl -0x18(%rbp), %eax
subl $0xfc, %eax
je 0x3339
jmp 0x335d
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3590
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3620
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x36b0
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3740
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x39d0
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3a60
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3bf0
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3c80
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3d30
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3de0
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3e90
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3f40
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x3ff0
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x4230
jmp 0x3366
movw -0x2(%rbp), %ax
movq -0x10(%rbp), %rsi
movzwl %ax, %edi
callq 0x42e0
jmp 0x3366
movq -0x10(%rbp), %rdi
callq 0x2030
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)