// File: /workspace/github_c_makefile_star2_O2/KhronosGroup[P]dfdutils/createdfd.c
// Function: createDFDUnpacked
uint32_t *createDFDUnpacked(int bigEndian, int numChannels, int bytes,
                            int redBlueSwap, enum VkSuffix suffix)
{
    uint32_t *DFD;
    if (bigEndian) {
        int channelCounter, channelByte;
        /* Number of samples = number of channels * bytes per channel */
        DFD = writeHeader(numChannels * bytes, numChannels * bytes, suffix, i_COLOR);
        /* First loop over the channels */
        for (channelCounter = 0; channelCounter < numChannels; ++channelCounter) {
            int channel = channelCounter;
            if (redBlueSwap && (channel == 0 || channel == 2)) {
                channel ^= 2;
            }
            /* Loop over the bytes that constitute a channel */
            for (channelByte = 0; channelByte < bytes; ++channelByte) {
                writeSample(DFD, channelCounter * bytes + channelByte, channel,
                            8, 8 * (channelCounter * bytes + bytes - channelByte - 1),
                            channelByte == bytes-1, channelByte == 0, suffix);
            }
        }

    } else { /* Little-endian */

        int sampleCounter;
        /* One sample per channel */
        DFD = writeHeader(numChannels, numChannels * bytes, suffix, i_COLOR);
        for (sampleCounter = 0; sampleCounter < numChannels; ++sampleCounter) {
            int channel = sampleCounter;
            if (redBlueSwap && (channel == 0 || channel == 2)) {
                channel ^= 2;
            }
            writeSample(DFD, sampleCounter, channel,
                        8 * bytes, 8 * sampleCounter * bytes,
                        1, 1, suffix);
        }
    }
    return DFD;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebx
movl %ecx, 0xc(%rsp)
movl %edx, %r12d
movl %esi, %r14d
movl %edx, %esi
imull %r14d, %esi
testl %edi, %edi
je 0x17b8
movl %r14d, %ebp
xorl %r14d, %r14d
movl %esi, %edi
movq %rbx, 0x30(%rsp)
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x1833
movq %rax, 0x10(%rsp)
testl %r12d, %r12d
movl $0x0, %r13d
cmovgl %r12d, %r13d
leal -0x1(%r12), %ebx
testl %ebp, %ebp
cmovlel %r14d, %ebp
movl %ebp, 0x1c(%rsp)
leal (,%r12,8), %eax
movl %eax, 0x18(%rsp)
leal -0x8(,%r12,8), %r15d
xorl %eax, %eax
movq %r12, 0x28(%rsp)
cmpl 0x1c(%rsp), %eax
je 0x181f
movl %eax, %ebp
xorl $0x2, %ebp
testl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
cmovnel %eax, %ebp
cmpl $0x0, 0xc(%rsp)
movl %eax, 0x20(%rsp)
cmovel %eax, %ebp
xorl %r12d, %r12d
movl %r15d, 0x24(%rsp)
cmpl %r12d, %r13d
je 0x179b
leal (%r14,%r12), %esi
xorl %r9d, %r9d
cmpl %r12d, %ebx
sete %r9b
xorl %eax, %eax
testl %r12d, %r12d
sete %al
movq 0x10(%rsp), %rdi
movl %ebp, %edx
pushq $0x8
popq %rcx
movl %r15d, %r8d
pushq 0x30(%rsp)
pushq %rax
callq 0x18aa
popq %rax
popq %rcx
incl %r12d
addl $-0x8, %r15d
jmp 0x175e
movl 0x20(%rsp), %eax
incl %eax
movl 0x24(%rsp), %r15d
addl 0x18(%rsp), %r15d
movq 0x28(%rsp), %r12
addl %r12d, %r14d
jmp 0x1733
xorl %ebp, %ebp
movl %r14d, %edi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x1833
movq %rax, 0x10(%rsp)
shll $0x3, %r12d
testl %r14d, %r14d
cmovlel %ebp, %r14d
pushq $0x1
popq %r15
xorl %r13d, %r13d
cmpl %r13d, %r14d
je 0x181f
movl %r13d, %edx
xorl $0x2, %edx
testl $0x7ffffffd, %r13d      # imm = 0x7FFFFFFD
cmovnel %r13d, %edx
cmpl $0x0, 0xc(%rsp)
cmovel %r13d, %edx
movq 0x10(%rsp), %rdi
movl %r13d, %esi
movl %r12d, %ecx
movl %ebp, %r8d
movl %r15d, %r9d
pushq %rbx
pushq $0x1
callq 0x18aa
popq %rax
popq %rcx
incl %r13d
addl %r12d, %ebp
jmp 0x17dd
movq 0x10(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq