// File: OpenFirework[P]MyJPEG_Decoder/./jpeg/jpeg_decoder.cpp
// Function: MCU::toRGB()
RGB **toRGB() {
        RGB **ret = new RGB *[maxHeight*8];
        for (int i = 0; i < maxHeight*8; i++) { 
            ret[i] = new RGB[maxWidth*8];
        }

        for (int i = 0; i < maxHeight * 8; i++) {
            for (int j = 0; j < maxWidth * 8; j++) {
                double Y = trans(1, i, j);
                double Cb = trans(2, i, j);
                double Cr = trans(3, i, j);
                ret[i][j].R = chomp(Y + 1.402*Cr + 128);
                ret[i][j].G = chomp(Y - 0.34414*Cb - 0.71414*Cr + 128);
                ret[i][j].B = chomp(Y + 1.772*Cb + 128);
            }
        }
        return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movzbl 0x6c56(%rip), %eax      # 0xb851
shll $0x3, %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movzbl 0x6c1b(%rip), %ecx      # 0xb851
shll $0x3, %ecx
cmpl %ecx, %eax
jge 0x4c84
movzbl 0x6c0c(%rip), %eax      # 0xb850
shll $0x3, %eax
cltq
movl $0x3, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4c2c
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movzbl 0x6bbc(%rip), %ecx      # 0xb851
shll $0x3, %ecx
cmpl %ecx, %eax
jge 0x4e1a
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movzbl 0x6b9f(%rip), %ecx      # 0xb850
shll $0x3, %ecx
cmpl %ecx, %eax
jge 0x4e0a
movq -0x40(%rbp), %rdi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl $0x1, %esi
callq 0x56c0
movq -0x40(%rbp), %rdi
movsd %xmm0, -0x28(%rbp)
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl $0x2, %esi
callq 0x56c0
movq -0x40(%rbp), %rdi
movsd %xmm0, -0x30(%rbp)
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl $0x3, %esi
callq 0x56c0
movq -0x40(%rbp), %rdi
movsd %xmm0, -0x38(%rbp)
movsd -0x28(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
movsd 0x332b(%rip), %xmm2     # 0x8048
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x32fb(%rip), %xmm1     # 0x8028
addsd %xmm1, %xmm0
callq 0x57b0
movq -0x40(%rbp), %rdi
movb %al, %cl
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x3, %rdx, %rdx
addq %rdx, %rax
movb %cl, (%rax)
movsd -0x28(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movsd 0x32d9(%rip), %xmm2     # 0x8040
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x38(%rbp), %xmm0
movsd 0x32bc(%rip), %xmm2     # 0x8038
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x329c(%rip), %xmm1     # 0x8028
addsd %xmm1, %xmm0
callq 0x57b0
movq -0x40(%rbp), %rdi
movb %al, %cl
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x3, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x1(%rax)
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
movsd 0x3269(%rip), %xmm2     # 0x8030
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x3251(%rip), %xmm1     # 0x8028
addsd %xmm1, %xmm0
callq 0x57b0
movb %al, %cl
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x3, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x2(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4ca7
jmp 0x4e0c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4c8b
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop