// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: put_header
local length_t put_header(void) {
    length_t len;

    if (g.form > 1) {               // zip
        // write local header -- we don't know yet whether the lengths will fit
        // in 32 bits or not, so we have to assume that they might not and put
        // in a Zip64 extra field so that the data descriptor that appears
        // after the compressed data is interpreted with 64-bit lengths
        len = put(g.outd,
            4, (val_t)0x04034b50,   // local header signature
            2, (val_t)45,           // version needed to extract (4.5)
            2, (val_t)8,            // flags: data descriptor follows data
            2, (val_t)8,            // deflate
            4, (val_t)time2dos(g.mtime),
            4, (val_t)0,            // crc (not here)
            4, (val_t)LOW32,        // compressed length (not here)
            4, (val_t)LOW32,        // uncompressed length (not here)
            2, (val_t)(strlen(g.name == NULL ? g.alias : g.name)),  // name len
            2, (val_t)29,           // length of extra field (see below)
            0);

        // write file name (use g.alias for stdin)
        len += writen(g.outd, g.name == NULL ? g.alias : g.name,
                      strlen(g.name == NULL ? g.alias : g.name));

        // write Zip64 and extended timestamp extra field blocks (29 bytes)
        len += put(g.outd,
            2, (val_t)0x0001,       // Zip64 extended information ID
            2, (val_t)16,           // number of data bytes in this block
            8, (val_t)0,            // uncompressed length (not here)
            8, (val_t)0,            // compressed length (not here)
            2, (val_t)0x5455,       // extended timestamp ID
            2, (val_t)5,            // number of data bytes in this block
            1, (val_t)1,            // flag presence of mod time
            4, (val_t)g.mtime,      // mod time
            0);
    }
    else if (g.form) {              // zlib
        if (g.comment != NULL)
            complain("can't store comment in zlib format -- ignoring");
        unsigned head;
        head = (0x78 << 8) +        // deflate, 32K window
               (g.level >= 9 ? 3 << 6 :
                g.level == 1 ? 0 << 6:
                g.level >= 6 || g.level == Z_DEFAULT_COMPRESSION ? 1 << 6 :
                2 << 6);            // optional compression level clue
        head += 31 - (head % 31);   // make it a multiple of 31
        len = put(g.outd,
            -2, (val_t)head,        // zlib format uses big-endian order
            0);
    }
    else {                          // gzip
        len = put(g.outd,
            1, (val_t)31,
            1, (val_t)139,
            1, (val_t)8,            // deflate
            1, (val_t)((g.name != NULL ? 8 : 0) +
                       (g.comment != NULL ? 16 : 0)),
            4, (val_t)g.mtime,
            1, (val_t)(g.level >= 9 ? 2 : g.level == 1 ? 4 : 0),
            1, (val_t)3,            // unix
            0);
        if (g.name != NULL)
            len += writen(g.outd, g.name, strlen(g.name) + 1);
        if (g.comment != NULL)
            len += writen(g.outd, g.comment, strlen(g.comment) + 1);
    }
    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
cmpl $0x1, 0x134e6(%rip)     # 0x237c8
jle 0x104ef
movl 0x134a6(%rip), %eax     # 0x23794
movl %eax, -0x1c(%rbp)
movq 0x13500(%rip), %rdi     # 0x237f8
callq 0x111d0
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x134d7(%rip)     # 0x237e0
jne 0x10318
movq 0x134d6(%rip), %rax     # 0x237e8
movq %rax, -0x28(%rbp)
jmp 0x10323
movq 0x134c1(%rip), %rax     # 0x237e0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x31a0
movl -0x1c(%rbp), %edi
movq -0x18(%rbp), %r11
movl $0x4, %esi
movl $0x4034b50, %edx        # imm = 0x4034B50
movl $0x2, %r9d
movl $0x2d, %r8d
xorl %ecx, %ecx
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl %r9d, %ecx
movq $0x8, (%rsp)
movl $0x2, 0x8(%rsp)
movq $0x8, 0x10(%rsp)
movl $0x4, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movl $0x4, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x4, 0x38(%rsp)
movq %r10, 0x40(%rsp)
movl $0x4, 0x48(%rsp)
movq %r10, 0x50(%rsp)
movl $0x2, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movl $0x2, 0x68(%rsp)
movq $0x1d, 0x70(%rsp)
movl $0x0, 0x78(%rsp)
movb $0x0, %al
callq 0x10eb0
movl %eax, %eax
movq %rax, -0x8(%rbp)
movl 0x133b4(%rip), %eax     # 0x23794
movl %eax, -0x2c(%rbp)
cmpq $0x0, 0x133f5(%rip)     # 0x237e0
jne 0x103fa
movq 0x133f4(%rip), %rax     # 0x237e8
movq %rax, -0x38(%rbp)
jmp 0x10405
movq 0x133df(%rip), %rax     # 0x237e0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, 0x133cb(%rip)     # 0x237e0
jne 0x10424
movq 0x133ca(%rip), %rax     # 0x237e8
movq %rax, -0x48(%rbp)
jmp 0x1042f
movq 0x133b5(%rip), %rax     # 0x237e0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x31a0
movl -0x2c(%rbp), %edi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0xe2c0
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movl 0x1333f(%rip), %edi     # 0x23794
movq 0x1339c(%rip), %rax     # 0x237f8
movl $0x2, %ecx
movl $0x1, %edx
movl $0x10, %r8d
movl $0x8, %r9d
xorl %esi, %esi
xorl %esi, %esi
movl %ecx, %esi
movq $0x0, (%rsp)
movl $0x8, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movq $0x5455, 0x20(%rsp)     # imm = 0x5455
movl $0x2, 0x28(%rsp)
movq $0x5, 0x30(%rsp)
movl $0x1, 0x38(%rsp)
movq $0x1, 0x40(%rsp)
movl $0x4, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movl $0x0, 0x58(%rsp)
movb $0x0, %al
callq 0x10eb0
movl %eax, %eax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1073d
cmpl $0x0, 0x132d2(%rip)     # 0x237c8
je 0x105b6
cmpq $0x0, 0x132ec(%rip)     # 0x237f0
je 0x10514
leaq 0xd349(%rip), %rdi      # 0x1d856
movb $0x0, %al
callq 0x49e0
cmpl $0x9, 0x132f1(%rip)     # 0x2380c
jl 0x10527
movl $0xc0, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1056e
cmpl $0x1, 0x132de(%rip)     # 0x2380c
jne 0x10537
xorl %eax, %eax
movl %eax, -0x50(%rbp)
jmp 0x10568
movb $0x1, %al
cmpl $0x6, 0x132cc(%rip)     # 0x2380c
movb %al, -0x51(%rbp)
jge 0x10552
cmpl $-0x1, 0x132c0(%rip)    # 0x2380c
sete %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %dl
movl $0x80, %eax
movl $0x40, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addl $0x7800, %eax           # imm = 0x7800
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl $0x1f, %ecx
xorl %edx, %edx
divl %ecx
movl $0x1f, %eax
subl %edx, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl 0x131fc(%rip), %edi     # 0x23794
movl -0xc(%rbp), %eax
movl %eax, %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
movb $0x0, %al
callq 0x10eb0
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0x1073b
movl 0x131d8(%rip), %eax     # 0x23794
movl %eax, -0x6c(%rbp)
movq 0x1321a(%rip), %rdx     # 0x237e0
xorl %eax, %eax
movl $0x8, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movq 0x13215(%rip), %rsi     # 0x237f0
xorl %ecx, %ecx
movl $0x10, %edx
cmpq $0x0, %rsi
cmovnel %edx, %ecx
addl %ecx, %eax
cltq
movq %rax, -0x68(%rbp)
movq 0x13200(%rip), %rax     # 0x237f8
movq %rax, -0x60(%rbp)
cmpl $0x9, 0x13209(%rip)     # 0x2380c
jl 0x1060f
movl $0x2, %eax
movl %eax, -0x70(%rbp)
jmp 0x10625
movl 0x131f7(%rip), %edx     # 0x2380c
xorl %eax, %eax
movl $0x4, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x70(%rbp)
movq -0x60(%rbp), %r10
movq -0x68(%rbp), %r11
movl -0x6c(%rbp), %edi
movl -0x70(%rbp), %eax
cltq
movl $0x1, %r9d
movl $0x1f, %edx
movl $0x8b, %r8d
xorl %ecx, %ecx
movl %r9d, %esi
movl %r9d, %ecx
movq $0x8, (%rsp)
movl $0x1, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl $0x4, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movl $0x1, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movl $0x1, 0x38(%rsp)
movq $0x3, 0x40(%rsp)
movl $0x0, 0x48(%rsp)
movb $0x0, %al
callq 0x10eb0
movl %eax, %eax
movq %rax, -0x8(%rbp)
cmpq $0x0, 0x13135(%rip)     # 0x237e0
je 0x106e8
movl 0x130e1(%rip), %eax     # 0x23794
movl %eax, -0x7c(%rbp)
movq 0x13123(%rip), %rax     # 0x237e0
movq %rax, -0x78(%rbp)
movq 0x13118(%rip), %rdi     # 0x237e0
callq 0x31a0
movl -0x7c(%rbp), %edi
movq -0x78(%rbp), %rsi
movq %rax, %rdx
addq $0x1, %rdx
callq 0xe2c0
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, 0x13100(%rip)     # 0x237f0
je 0x10739
movl 0x1309c(%rip), %eax     # 0x23794
movl %eax, -0x8c(%rbp)
movq 0x130eb(%rip), %rax     # 0x237f0
movq %rax, -0x88(%rbp)
movq 0x130dd(%rip), %rdi     # 0x237f0
callq 0x31a0
movl -0x8c(%rbp), %edi
movq -0x88(%rbp), %rsi
movq %rax, %rdx
addq $0x1, %rdx
callq 0xe2c0
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1073b
jmp 0x1073d
movq -0x8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw (%rax,%rax)