// File: lvandeve[P]lodepng/lodepng.cpp
// Function: readChunk_mDCV(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_mDCV(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
  if(chunkLength != 24) return 119; /*invalid mDCV chunk size*/

  info->mdcv_defined = 1;
  info->mdcv_red_x = 256u * data[0] + data[1];
  info->mdcv_red_y = 256u * data[2] + data[3];
  info->mdcv_green_x = 256u * data[4] + data[5];
  info->mdcv_green_y = 256u * data[6] + data[7];
  info->mdcv_blue_x = 256u * data[8] + data[9];
  info->mdcv_blue_y = 256u * data[10] + data[11];
  info->mdcv_white_x = 256u * data[12] + data[13];
  info->mdcv_white_y = 256u * data[14] + data[15];
  info->mdcv_max_luminance = 16777216u * data[16] + 65536u * data[17] + 256u * data[18] + data[19];
  info->mdcv_min_luminance = 16777216u * data[20] + 65536u * data[21] + 256u * data[22] + data[23];

  return 0; /* OK */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x18, -0x20(%rbp)
je 0xbd63
movl $0x77, -0x4(%rbp)
jmp 0xbee1
movq -0x10(%rbp), %rax
movl $0x1, 0x128(%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x12c(%rax)
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x130(%rax)
movq -0x18(%rbp), %rax
movzbl 0x4(%rax), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
movzbl 0x5(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x134(%rax)
movq -0x18(%rbp), %rax
movzbl 0x6(%rax), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x138(%rax)
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
movzbl 0x9(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x13c(%rax)
movq -0x18(%rbp), %rax
movzbl 0xa(%rax), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
movzbl 0xb(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x140(%rax)
movq -0x18(%rbp), %rax
movzbl 0xc(%rax), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
movzbl 0xd(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x144(%rax)
movq -0x18(%rbp), %rax
movzbl 0xe(%rax), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
movzbl 0xf(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x148(%rax)
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %ecx
shll $0x18, %ecx
movq -0x18(%rbp), %rax
movzbl 0x11(%rax), %eax
shll $0x10, %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
movzbl 0x12(%rax), %eax
shll $0x8, %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
movzbl 0x13(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14c(%rax)
movq -0x18(%rbp), %rax
movzbl 0x14(%rax), %ecx
shll $0x18, %ecx
movq -0x18(%rbp), %rax
movzbl 0x15(%rax), %eax
shll $0x10, %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
movzbl 0x16(%rax), %eax
shll $0x8, %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
movzbl 0x17(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x150(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)