// File: /workspace/github_cpp_makefile_star2_O3/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 0x3880
movq 0x67fa(%rip), %r14      # 0x9fd8
leaq 0x3955(%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), %rcx
leaq (%r14,%rcx), %r15
cmpb $0x0, 0xe1(%r14,%rcx)
jne 0x3834
movq %r15, %rdi
movl $0x20, %esi
callq 0x2150
movb $0x1, 0xe1(%r15)
movq (%r14), %rax
movb $0x30, 0xe0(%r15)
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 0x3935
movq 0x6747(%rip), %r14      # 0x9fd8
leaq 0x38c4(%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), %rcx
leaq (%r14,%rcx), %r15
cmpb $0x0, 0xe1(%r14,%rcx)
jne 0x38e7
movq %r15, %rdi
movl $0x20, %esi
callq 0x2150
movb $0x1, 0xe1(%r15)
movq (%r14), %rax
movb $0x30, 0xe0(%r15)
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)
jne 0x3970
cmpb $0x34, 0x3(%rbx)
jne 0x3a26
testb %bpl, %bpl
je 0x3a1f
movq 0x6683(%rip), %r14      # 0x9fd8
leaq 0x387b(%rip), %rsi      # 0x71d7
movl $0x11, %edx
movq %r14, %rdi
callq 0x21a0
movb $0x1, %bl
jmp 0x3aa7
movq 0x6661(%rip), %r14      # 0x9fd8
leaq 0x3804(%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), %rcx
leaq (%r14,%rcx), %r15
cmpb $0x0, 0xe1(%r14,%rcx)
jne 0x39cd
movq %r15, %rdi
movl $0x20, %esi
callq 0x2150
movb $0x1, 0xe1(%r15)
movq (%r14), %rax
movb $0x30, 0xe0(%r15)
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
cmpb $0x34, 0x3(%rbx)
jne 0x3a26
xorl %ebx, %ebx
jmp 0x3ace
movq 0x65ab(%rip), %rbx      # 0x9fd8
leaq 0x3774(%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), %rcx
leaq (%rbx,%rcx), %r14
cmpb $0x0, 0xe1(%rbx,%rcx)
jne 0x3a80
movq %r14, %rdi
movl $0x20, %esi
callq 0x2150
movb $0x1, 0xe1(%r14)
movq (%rbx), %rax
movb $0x30, 0xe0(%r14)
movq -0x18(%rax), %rax
movq $0x2, 0x10(%rbx,%rax)
movq %rbx, %rdi
movl $0x34, %esi
callq 0x2230
movq %rax, %r14
xorl %ebx, %ebx
movq (%r14), %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
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop