// File: /workspace/github_c_makefile_star2_O1/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, %r14d
movl %ecx, %r12d
movl %esi, %r15d
movq %rdx, 0x8(%rsp)
movl %edx, %ebx
imull %esi, %ebx
xorl %ebp, %ebp
cmpl $0x8, %r8d
sete %bpl
shll $0x10, %ebp
addl $0x10101, %ebp          # imm = 0x10101
testl %edi, %edi
je 0x1996
leal (,%rbx,4), %eax
cltq
leaq 0x1c(,%rax,4), %r13
movq %r13, %rdi
callq 0x1080
movl %r13d, (%rax)
xorl %esi, %esi
movl %esi, 0x4(%rax)
movl %ebx, %edx
shll $0x14, %edx
addl $0x180002, %edx         # imm = 0x180002
movl %edx, 0x8(%rax)
movl %ebp, 0xc(%rax)
movl %esi, 0x10(%rax)
movl %ebx, 0x14(%rax)
movl %esi, 0x18(%rax)
movq %r15, 0x10(%rsp)
testl %r15d, %r15d
jle 0x1a30
movq %r14, 0x30(%rsp)
movq 0x8(%rsp), %rcx
movl %ecx, %ebx
negl %ebx
leal (,%rcx,8), %edx
movl %edx, 0x1c(%rsp)
leal -0x8(,%rcx,8), %edx
movl %edx, 0x4(%rsp)
xorl %edi, %edi
movl %r12d, 0x20(%rsp)
movq 0x30(%rsp), %r13
movl %edi, %r14d
xorl $0x2, %r14d
testl $0x7ffffffd, %edi       # imm = 0x7FFFFFFD
cmovnel %edi, %r14d
testl %r12d, %r12d
movl %edi, 0x24(%rsp)
cmovel %edi, %r14d
testl %ecx, %ecx
jle 0x1969
xorl %r12d, %r12d
movl 0x4(%rsp), %ebp
movq %rsi, 0x28(%rsp)
leal (%rbx,%r12), %ecx
movq 0x28(%rsp), %rdx
leal (%rdx,%r12), %esi
xorl %r9d, %r9d
cmpl $-0x1, %ecx
sete %r9b
xorl %r10d, %r10d
testl %r12d, %r12d
sete %r10b
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %edx
movl $0x8, %ecx
movl %ebp, %r8d
pushq %r13
pushq %r10
callq 0x1a3f
movq 0x38(%rsp), %rsi
movq %r15, %rax
addq $0x10, %rsp
incl %r12d
addl $-0x8, %ebp
movl %ebx, %ecx
addl %r12d, %ecx
jne 0x1915
movl 0x24(%rsp), %edi
incl %edi
movq 0x8(%rsp), %rcx
addl %ecx, %esi
movl 0x4(%rsp), %edx
addl 0x1c(%rsp), %edx
movl %edx, 0x4(%rsp)
cmpl 0x10(%rsp), %edi
movl 0x20(%rsp), %r12d
jne 0x18e9
jmp 0x1a30
leal (,%r15,4), %eax
cltq
leaq 0x1c(,%rax,4), %r13
movq %r13, %rdi
callq 0x1080
movl %r13d, (%rax)
xorl %r13d, %r13d
movl %r13d, 0x4(%rax)
movl %r15d, %ecx
shll $0x14, %ecx
addl $0x180002, %ecx         # imm = 0x180002
movl %ecx, 0x8(%rax)
movl %ebp, 0xc(%rax)
movl %r13d, 0x10(%rax)
movl %ebx, 0x14(%rax)
movl %r13d, 0x18(%rax)
testl %r15d, %r15d
jle 0x1a30
movq 0x8(%rsp), %rbx
shll $0x3, %ebx
xorl %ebp, %ebp
movq %r15, 0x10(%rsp)
movq %r14, %r15
movl %ebp, %edx
xorl $0x2, %edx
testl $0x7ffffffd, %ebp       # imm = 0x7FFFFFFD
cmovnel %ebp, %edx
testl %r12d, %r12d
cmovel %ebp, %edx
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
movl %ebx, %ecx
movl %r13d, %r8d
movl $0x1, %r9d
pushq %r15
pushq $0x1
callq 0x1a3f
movq %r14, %rax
addq $0x10, %rsp
incl %ebp
addl %ebx, %r13d
cmpl %ebp, 0x10(%rsp)
jne 0x19ee
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq