// File: /workspace/github_c_makefile_star2_O1/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, -0x49(%rsp)
xorl %edx, %edx
leaq 0xb0e(%rip), %r14       # 0x12540
xorl %eax, %eax
xorl %r15d, %r15d
movq %rdi, -0x8(%rsp)
movzbl %r15b, %ecx
movq (%rdi,%rcx,8), %r12
movzbl 0x1(%r12), %ecx
andl $0xf, %ecx
movl %ecx, %r8d
shll $0x8, %r8d
movzbl 0x2(%r12), %esi
orl %esi, %r8d
decw %r8w
movzwl %r8w, %r8d
je 0x11a94
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
xorl %r10d, %r10d
movl %r11d, %r9d
shll $0x8, %r9d
shrl $0x18, %r11d
movzbl (%r12,%r10), %ebx
xorl %r11d, %ebx
xorl (%r14,%rbx,4), %r9d
incq %r10
movl %r9d, %r11d
cmpq %r10, %r8
jne 0x11a73
jmp 0x11a9a
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movzbl (%r12,%r8), %r10d
movl %r9d, %r11d
shrl $0x18, %r11d
cmpl %r10d, %r11d
jne 0x11cf4
movl %r9d, %r10d
shrl $0x10, %r10d
cmpb %r10b, 0x1(%r12,%r8)
jne 0x11cf4
movl %r9d, %r10d
shrl $0x8, %r10d
cmpb %r10b, 0x2(%r12,%r8)
jne 0x11cf4
cmpb %r9b, 0x3(%r12,%r8)
jne 0x11cf4
movq %r15, -0x30(%rsp)
movq %rax, -0x38(%rsp)
shll $0x8, %ecx
leal (%rsi,%rcx), %eax
decl %eax
movzbl 0x8(%r12), %esi
andl $0xf, %esi
shll $0x8, %esi
movzbl 0x9(%r12), %r8d
leaq (%rsi,%r8), %r9
leaq (%r12,%r9), %rcx
addq $0xc, %rcx
movq %rcx, -0x40(%rsp)
leaq (%rsi,%r8), %rcx
addq $0xc, %rcx
movq %rcx, -0x18(%rsp)
movzwl %ax, %ecx
xorl %r9d, %r9d
xorl %r10d, %r10d
movq %r12, -0x20(%rsp)
movq %rcx, -0x28(%rsp)
cmpq %rcx, -0x18(%rsp)
jle 0x11b3f
xorl %r15d, %r15d
jmp 0x11b8b
movq -0x40(%rsp), %r15
testb %r10b, %r10b
je 0x11b7e
movl %r9d, %eax
movq -0x40(%rsp), %r15
movq %r15, %rsi
subq %r12, %rsi
addq $0x6, %rsi
cmpq %rcx, %rsi
jg 0x11b3a
movzbl 0x4(%r15), %esi
andl $0xf, %esi
shll $0x8, %esi
movzbl 0x5(%r15), %r8d
orq %rsi, %r8
addq %r8, %r15
addq $0x6, %r15
incb %al
jne 0x11b51
movq %r15, %rax
subq %r12, %rax
cmpq %rcx, %rax
cmovgeq %rdx, %r15
testq %r15, %r15
je 0x11cd0
movl %r9d, -0x44(%rsp)
incl %r10d
movl %r10d, -0x48(%rsp)
movzwl (%r15), %r12d
rolw $0x8, %r12w
movzwl 0x2(%r15), %r8d
rolw $0x8, %r8w
xorl %eax, %eax
movzbl %al, %esi
movq (%rdi,%rsi,8), %rsi
movzbl 0x1(%rsi), %r9d
andl $0xf, %r9d
shll $0x8, %r9d
movzbl 0x2(%rsi), %r10d
addl %r10d, %r9d
decl %r9d
movzbl 0x8(%rsi), %r10d
andl $0xf, %r10d
shll $0x8, %r10d
movzbl 0x9(%rsi), %r11d
leaq (%r10,%r11), %rbx
leaq (%rsi,%rbx), %rcx
addq $0xc, %rcx
addq %r10, %r11
addq $0xc, %r11
movzwl %r9w, %r14d
xorl %r9d, %r9d
xorl %ebp, %ebp
xorl %edi, %edi
cmpq %r14, %r11
jle 0x11c0e
xorl %ebx, %ebx
jmp 0x11c58
movq %rcx, %rbx
testb %bpl, %bpl
je 0x11c4b
movl %r9d, %r13d
movq %rcx, %rbx
movq %rbx, %r10
subq %rsi, %r10
addq $0x6, %r10
cmpq %r14, %r10
jg 0x11c0a
movzbl 0x4(%rbx), %r10d
andl $0xf, %r10d
shll $0x8, %r10d
movzbl 0x5(%rbx), %edx
orq %r10, %rdx
addq %rdx, %rbx
addq $0x6, %rbx
incb %r13b
jne 0x11c1c
movq %rbx, %rdx
subq %rsi, %rdx
cmpq %r14, %rdx
cmovgeq %rdi, %rbx
testq %rbx, %rbx
je 0x11c7f
movzwl (%rbx), %edx
rolw $0x8, %dx
cmpw %r12w, %dx
jne 0x11c78
movzwl 0x2(%rbx), %edx
rolw $0x8, %dx
cmpw %r8w, %dx
je 0x11c83
incl %ebp
decb %r9b
jmp 0x11c05
xorl %edx, %edx
jmp 0x11c8a
xorl %edx, %edx
movq %rbx, -0x10(%rsp)
testq %rbx, %rbx
movq -0x8(%rsp), %rdi
jne 0x11ca9
incb %al
cmpb -0x49(%rsp), %al
jbe 0x11bb6
xorl %eax, %eax
movl -0x48(%rsp), %r10d
jmp 0x11cb3
movl -0x48(%rsp), %r10d
movq -0x10(%rsp), %rax
movl -0x44(%rsp), %r9d
decb %r9b
cmpq %r15, %rax
movq -0x20(%rsp), %r12
movq -0x28(%rsp), %rcx
je 0x11b33
jmp 0x11cef
movq -0x30(%rsp), %r15
incb %r15b
cmpb -0x49(%rsp), %r15b
seta %al
leaq 0x859(%rip), %r14       # 0x12540
jbe 0x11a3c
jmp 0x11cf4
movq -0x38(%rsp), %rax
andb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq