// File: /workspace/github_c_makefile_star2_O3/videolan[P]bitstream/examples/./bitstream/dvb/si/nit.h
// Function: nit_table_validate
static inline bool nit_table_validate(uint8_t **pp_sections)
{
    uint8_t i_last_section = psi_table_get_lastsection(pp_sections);
    uint8_t i;

    for (i = 0; i <= i_last_section; i++) {
        uint8_t *p_section = psi_table_get_section(pp_sections, i);
        uint8_t *p_ts;
        int j = 0;

        if (!psi_check_crc(p_section))
            return false;

        while ((p_ts = nit_get_ts(p_section, j)) != NULL) {
            j++;
            /* check that the TS is not already in the table */
            if (nit_table_find_ts(pp_sections, nitn_get_tsid(p_ts),
                                  nitn_get_onid(p_ts)) != p_ts)
                return false;
        }
    }

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %rax
movb 0x7(%rax), %al
movb %al, -0x2b(%rsp)
xorl %ebx, %ebx
leaq 0xb9a(%rip), %r15       # 0x11600
movzbl %bl, %eax
movq (%rdi,%rax,8), %rsi
movzbl 0x1(%rsi), %r8d
movzbl 0x2(%rsi), %r9d
andl $0xf, %r8d
movl %r8d, %eax
shll $0x8, %eax
orl %r9d, %eax
decw %ax
je 0x10ab6
movzwl %ax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %edx, %edx
movl %ecx, %r10d
shll $0x8, %r10d
shrl $0x18, %ecx
movzbl (%rsi,%rdx), %r11d
xorl %ecx, %r11d
movl %r10d, %ecx
xorl (%r15,%r11,4), %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x10a93
jmp 0x10abd
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %eax, %eax
movzbl (%rsi,%rax), %edx
movl %ecx, %r10d
shrl $0x18, %r10d
cmpl %edx, %r10d
jne 0x10cc4
movl %ecx, %edx
shrl $0x10, %edx
cmpb %dl, 0x1(%rsi,%rax)
jne 0x10cc4
movl %ecx, %edx
shrl $0x8, %edx
cmpb %dl, 0x2(%rsi,%rax)
jne 0x10cc4
cmpb %cl, 0x3(%rsi,%rax)
jne 0x10cc4
shll $0x8, %r8d
leal (%r9,%r8), %edx
decl %edx
movzbl 0x8(%rsi), %eax
movzbl 0x9(%rsi), %ecx
andl $0xf, %eax
shll $0x8, %eax
leaq (%rax,%rcx), %r8
addq $0xc, %r8
movzwl %dx, %r9d
cmpq %r9, %r8
jle 0x10b33
incb %bl
cmpb -0x2b(%rsp), %bl
jbe 0x10a66
jmp 0x10cd1
orq %rcx, %rax
leaq (%rsi,%rax), %r10
addq $0xc, %r10
xorl %r11d, %r11d
xorl %ebp, %ebp
movq %r8, %rax
movq %r10, %r14
testb %bpl, %bpl
je 0x10b87
movl %r11d, %eax
movq %r10, %r14
movq %r14, %rcx
subq %rsi, %rcx
addq $0x6, %rcx
cmpq %r9, %rcx
jg 0x10b22
movzbl 0x4(%r14), %ecx
movzbl 0x5(%r14), %edx
andl $0xf, %ecx
shll $0x8, %ecx
orq %rdx, %rcx
addq %rcx, %r14
addq $0x6, %r14
incb %al
jne 0x10b54
movq %r14, %rax
subq %rsi, %rax
cmpq %r9, %rax
jge 0x10b22
movl %r11d, -0x24(%rsp)
movq %r10, -0x20(%rsp)
movq %r9, -0x18(%rsp)
movq %r8, -0x10(%rsp)
movq %rbx, -0x8(%rsp)
incb %bpl
movl %ebp, -0x28(%rsp)
movzwl (%r14), %ebp
rolw $0x8, %bp
movzwl 0x2(%r14), %eax
rolw $0x8, %ax
movw %ax, -0x2a(%rsp)
xorl %r12d, %r12d
movzbl %r12b, %eax
movq %rdi, %r9
movq (%rdi,%rax,8), %r13
movzbl 0x1(%r13), %eax
movzbl 0x2(%r13), %ecx
andl $0xf, %eax
shll $0x8, %eax
leal (%rcx,%rax), %edx
decl %edx
movzbl 0x8(%r13), %eax
movzbl 0x9(%r13), %ecx
andl $0xf, %eax
shll $0x8, %eax
leaq (%rax,%rcx), %r10
addq $0xc, %r10
movzwl %dx, %r11d
cmpq %r11, %r10
jle 0x10c18
incb %r12b
cmpb -0x2b(%rsp), %r12b
movq %r9, %rdi
jbe 0x10bc5
jmp 0x10cc4
orq %rcx, %rax
leaq (%rax,%r13), %rdi
addq $0xc, %rdi
xorl %r8d, %r8d
xorl %ecx, %ecx
movq %r10, %rdx
movq %rdi, %rax
testb %cl, %cl
je 0x10c6a
movl %r8d, %edx
movq %rdi, %rax
movq %rax, %rbx
subq %r13, %rbx
addq $0x6, %rbx
cmpq %r11, %rbx
jg 0x10c06
movzbl 0x4(%rax), %ebx
movzbl 0x5(%rax), %r15d
andl $0xf, %ebx
shll $0x8, %ebx
orq %r15, %rbx
addq %rbx, %rax
addq $0x6, %rax
incb %dl
jne 0x10c38
movq %rax, %rdx
subq %r13, %rdx
cmpq %r11, %rdx
jge 0x10c06
movzwl (%rax), %edx
rolw $0x8, %dx
cmpw %bp, %dx
jne 0x10c8a
movzwl 0x2(%rax), %edx
rolw $0x8, %dx
cmpw -0x2a(%rsp), %dx
je 0x10c91
incb %cl
decb %r8b
jmp 0x10c28
movl -0x24(%rsp), %r11d
decb %r11b
cmpq %r14, %rax
movq %r9, %rdi
movq -0x8(%rsp), %rbx
leaq 0x955(%rip), %r15       # 0x11600
movq -0x10(%rsp), %r8
movq -0x18(%rsp), %r9
movq -0x20(%rsp), %r10
movl -0x28(%rsp), %ebp
je 0x10b43
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x10cc6