// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x6, (%rdi)
sete %bpl
je 0x3967
movq 0x671a(%rip), %r14      # 0x9fd8
leaq 0x3875(%rip), %rsi      # 0x713a
movl $0x21, %edx
movq %r14, %rdi
callq 0x21a0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x3918
movq %r15, %rdi
movl $0x20, %esi
callq 0x2150
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x10(%r14,%rax)
movq %r14, %rdi
movl $0x6, %esi
callq 0x2230
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20e0
cmpb $0xe, 0x1(%rbx)
je 0x3a23
movq 0x6660(%rip), %r14      # 0x9fd8
leaq 0x37dd(%rip), %rsi      # 0x715c
movl $0x25, %edx
movq %r14, %rdi
callq 0x21a0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x39d2
movq %r15, %rdi
movl $0x20, %esi
callq 0x2150
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x10(%r14,%rax)
movq %r14, %rdi
movl $0xe, %esi
callq 0x2230
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20e0
xorl %ebp, %ebp
cmpb $0x2b, 0x2(%rbx)
je 0x3adf
movq 0x65a4(%rip), %r14      # 0x9fd8
leaq 0x3747(%rip), %rsi      # 0x7182
movl $0x25, %edx
movq %r14, %rdi
callq 0x21a0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x3a8e
movq %r15, %rdi
movl $0x20, %esi
callq 0x2150
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x10(%r14,%rax)
movq %r14, %rdi
movl $0x2b, %esi
callq 0x2230
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20e0
xorl %ebp, %ebp
cmpb $0x34, 0x3(%rbx)
je 0x3b98
movq 0x64e8(%rip), %rbx      # 0x9fd8
leaq 0x36b1(%rip), %rsi      # 0x71a8
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r14
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x3b47
movq %r14, %rdi
movl $0x20, %esi
callq 0x2150
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x30, 0xe0(%r14)
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x10(%rbx,%rax)
movq %rbx, %rdi
movl $0x34, %esi
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20e0
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x3bdf
movq 0x6434(%rip), %rbx      # 0x9fd8
leaq 0x362c(%rip), %rsi      # 0x71d7
movl $0x11, %edx
movq %rbx, %rdi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20e0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq