// File: /workspace/github_cpp_makefile_star2_O2/salleaffaire[P]MXFParser/klv.cpp
// Function: klv_item::validate()
bool klv_item::validate() {
   bool rval = true;
   if (mKey[0] != KLV_UL_HEADER_IOD) {
      std::cout << " Invalid OID, should be equal to " 
                << std::hex << std::setfill('0') << std::setw(2) 
                << KLV_UL_HEADER_IOD << std::endl;
      rval = false;
   } 
   if (mKey[1] != KLV_UL_HEADER_ULSIZE) {
      std::cout << " Invalid UL Size, should be equal to " 
                << std::hex << std::setfill('0') << std::setw(2) 
                << KLV_UL_HEADER_ULSIZE << std::endl;
      rval = false;
   }
   if (mKey[2] != KLV_UL_DESIGNATOR_ULCODE) {
      std::cout << " Invalid UL Code, should be equal to " 
                << std::hex << std::setfill('0') << std::setw(2) 
                << KLV_UL_DESIGNATOR_ULCODE << std::endl;
      rval = false;
   }
   if (mKey[3] != KLV_UL_DESIGNATOR_SMPTE_DESIGNATOR) {
      std::cout << " Invalid SMPTE Designator, should be equal to " 
                << std::hex << std::setfill('0') << std::setw(2) 
                << KLV_UL_DESIGNATOR_SMPTE_DESIGNATOR << std::endl;
      rval = false;
   }
   
   if (rval) {
      std::cout << " KLV Key is valid" << std::endl; 
   }
   
   return rval;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x6, (%rdi)
sete %bpl
je 0x3027
movq 0x6000(%rip), %rdi      # 0x8fd8
leaq 0x315b(%rip), %rsi      # 0x613a
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x2220
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
pushq $0x6
popq %rsi
movq %rax, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x20d0
cmpb $0xe, 0x1(%rbx)
je 0x3085
movq 0x5fa4(%rip), %rdi      # 0x8fd8
leaq 0x3121(%rip), %rsi      # 0x615c
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x2220
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
pushq $0xe
popq %rsi
movq %rax, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x20d0
xorl %ebp, %ebp
cmpb $0x2b, 0x2(%rbx)
jne 0x30b0
cmpb $0x34, 0x3(%rbx)
jne 0x3110
testb %bpl, %bpl
je 0x310c
movq 0x5f3b(%rip), %rdi      # 0x8fd8
leaq 0x3133(%rip), %rsi      # 0x61d7
callq 0x2180
movb $0x1, %bl
jmp 0x3160
movq 0x5f21(%rip), %rdi      # 0x8fd8
leaq 0x30c4(%rip), %rsi      # 0x6182
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x2220
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
pushq $0x2b
popq %rsi
movq %rax, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x20d0
cmpb $0x34, 0x3(%rbx)
jne 0x3110
xorl %ebx, %ebx
jmp 0x3168
movq 0x5ec1(%rip), %rdi      # 0x8fd8
leaq 0x308a(%rip), %rsi      # 0x61a8
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x2220
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
pushq $0x34
popq %rsi
movq %rax, %rdi
callq 0x2270
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x20d0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop