// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: put
local unsigned put(int out, ...) {
    // compute the total number of bytes
    unsigned count = 0;
    int n;
    va_list ap;
    va_start(ap, out);
    while ((n = va_arg(ap, int)) != 0) {
        va_arg(ap, val_t);
        count += (unsigned)abs(n);
    }
    va_end(ap);

    // allocate memory for the data
    unsigned char *wrap = alloc(NULL, count);
    unsigned char *next = wrap;

    // write the requested data to wrap[]
    va_start(ap, out);
    while ((n = va_arg(ap, int)) != 0) {
        val_t val = va_arg(ap, val_t);
        if (n < 0) {            // big endian
            n = -n << 3;
            do {
                n -= 8;
                *next++ = (unsigned char)(val >> n);
            } while (n);
        }
        else                    // little endian
            do {
                *next++ = (unsigned char)val;
                val >>= 8;
            } while (--n);
    }
    va_end(ap);

    // write wrap[] to out and return the number of bytes written
    writen(out, wrap, count);
    FREE(wrap);
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
testb %al, %al
je 0x10eee
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rdx, -0xf0(%rbp)
movq %rsi, -0xf8(%rbp)
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x110(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x104(%rbp)
cmpl $0x28, %eax
ja 0x10f7a
movq -0x110(%rbp), %rcx
movl -0x104(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x118(%rbp)
jmp 0x10f97
movq -0x110(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
je 0x1101c
leaq -0x30(%rbp), %rax
movq %rax, -0x128(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x11c(%rbp)
cmpl $0x28, %eax
ja 0x10fe3
movq -0x128(%rbp), %rcx
movl -0x11c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x130(%rbp)
jmp 0x11000
movq -0x128(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movl -0xc(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
jmp 0x10f3f
leaq -0x30(%rbp), %rax
movl -0x8(%rbp), %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edi
callq 0xac60
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x140(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x134(%rbp)
cmpl $0x28, %eax
ja 0x11099
movq -0x140(%rbp), %rcx
movl -0x134(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x148(%rbp)
jmp 0x110b6
movq -0x140(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
je 0x111aa
leaq -0x30(%rbp), %rax
movq %rax, -0x158(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x14c(%rbp)
cmpl $0x28, %eax
ja 0x11106
movq -0x158(%rbp), %rcx
movl -0x14c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x160(%rbp)
jmp 0x11123
movq -0x158(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x11170
xorl %eax, %eax
subl -0xc(%rbp), %eax
shll $0x3, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
subl $0x8, %eax
movl %eax, -0xc(%rbp)
movq -0x48(%rbp), %rax
movl -0xc(%rbp), %ecx
shrq %cl, %rax
movb %al, %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
cmpl $0x0, -0xc(%rbp)
jne 0x11142
jmp 0x111a5
jmp 0x11172
movq -0x48(%rbp), %rax
movb %al, %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
shrq $0x8, %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x11172
jmp 0x111a5
jmp 0x1105e
movl -0x4(%rbp), %edi
movq -0x38(%rbp), %rsi
movl -0x8(%rbp), %eax
movl %eax, %edx
callq 0xe2c0
movq -0x38(%rbp), %rdi
callq 0x3050
movl -0x8(%rbp), %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq