// File: /workspace/github_c_makefile_star2_O2/madler[P]pigz/pigz.c
// Function: more_zip_entries
local int more_zip_entries(void) {
    unsigned long sig;
    int ret, n;
    unsigned char *first;
    unsigned tmp2;              // for macro
    unsigned long tmp4;         // for macro
    unsigned char const central[] = {0x50, 0x4b, 1, 2};

    sig = GET4();
    ret = !g.in_eof && sig == 0x04034b50;   // true if another entry follows
    if (!g.list || g.verbosity < 2)
        return ret;

    // if it was a central file header signature, then already four bytes
    // into a central directory header -- otherwise search for the next one
    n = sig == 0x02014b50 ? 4 : 0;  // number of bytes into central header
    for (;;) {
        // assure that more input is available
        if (g.in_left == 0 && load() == 0)      // never found it!
            return ret;
        if (n == 0) {
            // look for first byte in central signature
            first = memchr(g.in_next, central[0], g.in_left);
            if (first == NULL) {
                // not found -- go get the next buffer and keep looking
                g.in_left = 0;
            }
            else {
                // found -- continue search at next byte
                n++;
                g.in_left -= first - g.in_next + 1;
                g.in_next = first + 1;
            }
        }
        else if (n < 4) {
            // look for the remaining bytes in the central signature
            if (g.in_next[0] == central[n]) {
                n++;
                g.in_next++;
                g.in_left--;
            }
            else
                n = 0;      // mismatch -- restart search with this byte
        }
        else {
            // Now in a suspected central file header, just past the signature.
            // Read the rest of the fixed-length portion of the header.
            unsigned char head[CEN];
            size_t need = CEN, part = 0, len, i;

            if (need > g.in_left) {     // will only need to do this once
                part = g.in_left;
                memcpy(head + CEN - need, g.in_next, part);
                need -= part;
                g.in_left = 0;
                if (load() == 0)                // never found it!
                    return ret;
            }
            memcpy(head + CEN - need, g.in_next, need);

            // Determine to sufficient probability that this is the droid we're
            // looking for, by checking the CRC and the local header offset.
            if (PULL4L(head + 12) == g.out_check && PULL4L(head + 38) == 0) {
                // Update the number of bytes consumed from the current buffer.
                g.in_next += need;
                g.in_left -= need;

                // Get the comment length.
                len = PULL2L(head + 28);
                if (len == 0)                   // no comment
                    return ret;

                // Skip the file name and extra field.
                SKIP(PULL2L(head + 24) + (unsigned long)PULL2L(head + 26));

                // Save the comment field.
                need = len;
                g.hcomm = alloc(NULL, len + 1);
                while (need > g.in_left) {
                    memcpy(g.hcomm + len - need, g.in_next, g.in_left);
                    need -= g.in_left;
                    g.in_left = 0;
                    if (load() == 0) {          // premature EOF
                        RELEASE(g.hcomm);
                        return ret;
                    }
                }
                memcpy(g.hcomm + len - need, g.in_next, need);
                g.in_next += need;
                g.in_left -= need;
                for (i = 0; i < len; i++)
                    if (g.hcomm[i] == 0)
                        g.hcomm[i] = ' ';
                g.hcomm[len] = 0;
                return ret;
            }
            else {
                // Nope, false alarm. Restart the search at the first byte
                // after what we thought was the central file header signature.
                if (part) {
                    // Move buffer data up and insert the part of the header
                    // data read from the previous buffer.
                    memmove(g.in_next + part, g.in_next, g.in_left);
                    memcpy(g.in_next, head, part);
                    g.in_left += part;
                }
                n = 0;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x1987d(%rip), %rcx     # 0x24470
testq %rcx, %rcx
je 0xac98
decq %rcx
movq %rcx, 0x1986a(%rip)     # 0x24470
movq 0x1985b(%rip), %rax     # 0x24468
leaq 0x1(%rax), %rdx
movq %rdx, 0x19850(%rip)     # 0x24468
movzbl (%rax), %r15d
testq %rcx, %rcx
je 0xacac
decq %rcx
movq %rcx, 0x19841(%rip)     # 0x24470
movq 0x19832(%rip), %rax     # 0x24468
leaq 0x1(%rax), %rdx
movq %rdx, 0x19827(%rip)     # 0x24468
movzbl (%rax), %ebx
shll $0x8, %ebx
orq %r15, %rbx
testq %rcx, %rcx
je 0xacc1
decq %rcx
movq %rcx, 0x19817(%rip)     # 0x24470
movq 0x19808(%rip), %rax     # 0x24468
leaq 0x1(%rax), %rdx
movq %rdx, 0x197fd(%rip)     # 0x24468
movzbl (%rax), %r14d
testq %rcx, %rcx
je 0xacd3
decq %rcx
movq %rcx, 0x197f2(%rip)     # 0x24470
movq 0x197e3(%rip), %rax     # 0x24468
leaq 0x1(%rax), %rcx
movq %rcx, 0x197d8(%rip)     # 0x24468
movzbl (%rax), %eax
shll $0x8, %eax
jmp 0xace2
cmpl $0x0, 0x197d9(%rip)     # 0x24478
je 0xae95
xorl %r14d, %r14d
xorl %ebx, %ebx
jmp 0xace0
cmpl $0x0, 0x197c5(%rip)     # 0x24478
je 0xaf04
xorl %r14d, %r14d
movq %r15, %rbx
jmp 0xace0
cmpl $0x0, 0x197b0(%rip)     # 0x24478
je 0xaf20
xorl %r14d, %r14d
jmp 0xace0
cmpl $0x0, 0x1979e(%rip)     # 0x24478
je 0xaf3d
xorl %eax, %eax
addq %rax, %r14
shlq $0x10, %r14
orq %rbx, %r14
cmpl $0x0, 0x19785(%rip)     # 0x24478
sete %al
cmpq $0x4034b50, %r14        # imm = 0x4034B50
sete %cl
andb %al, %cl
movzbl %cl, %eax
cmpl $0x0, 0x116b4(%rip)     # 0x1c3c0
je 0xb011
cmpl $0x2, 0x11657(%rip)     # 0x1c370
jl 0xb011
movl %eax, 0xc(%rsp)
xorl %eax, %eax
cmpq $0x2014b50, %r14        # imm = 0x2014B50
sete %al
shll $0x2, %eax
pushq $0x50
popq %rbp
pushq $0x2a
popq %rbx
leaq 0x10(%rsp), %r14
movl %eax, %r15d
cmpq $0x0, 0x19728(%rip)     # 0x24470
jne 0xad58
callq 0xb020
testq %rax, %rax
je 0xb00d
testl %r15d, %r15d
je 0xad96
cmpl $0x3, %r15d
jg 0xaddf
movq 0x196fe(%rip), %rcx     # 0x24468
movb (%rcx), %dl
movl %r15d, %esi
xorl %eax, %eax
leaq 0xada8(%rip), %rdi      # 0x15b20
cmpb (%rsi,%rdi), %dl
jne 0xad3d
incl %r15d
incq %rcx
movq %rcx, 0x196de(%rip)     # 0x24468
decq 0x196df(%rip)           # 0x24470
movl %r15d, %eax
jmp 0xad3d
movq 0x196cb(%rip), %r12     # 0x24468
movq 0x196cc(%rip), %r15     # 0x24470
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x32b0
testq %rax, %rax
je 0xae86
movq %rax, %rcx
notq %rcx
addq %r12, %r15
addq %rcx, %r15
movq %r15, 0x196a3(%rip)     # 0x24470
incq %rax
movq %rax, 0x19691(%rip)     # 0x24468
pushq $0x1
popq %rax
jmp 0xad3d
movq 0x1968a(%rip), %r15     # 0x24470
movq 0x1967b(%rip), %r12     # 0x24468
cmpq $0x29, %r15
ja 0xae26
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3360
andq $0x0, 0x19667(%rip)     # 0x24470
callq 0xb020
testq %rax, %rax
je 0xb00d
movq %rbx, %r13
subq %r15, %r13
movq 0x19644(%rip), %r12     # 0x24468
jmp 0xae2c
movq %rbx, %r13
xorl %r15d, %r15d
leaq 0x3a(%rsp), %rdi
subq %r13, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3360
movl 0x1c(%rsp), %eax
cmpq 0x19646(%rip), %rax     # 0x24490
jne 0xae53
cmpl $0x0, 0x36(%rsp)
je 0xaeb2
testq %r15, %r15
je 0xae8e
leaq (%r12,%r15), %rdi
movq 0x1960d(%rip), %rdx     # 0x24470
movq %r12, %rsi
callq 0x3490
movq 0x195f6(%rip), %rdi     # 0x24468
movq %r14, %rsi
movq %r15, %rdx
callq 0x3360
addq %r15, 0x195ec(%rip)     # 0x24470
jmp 0xae8e
andq $0x0, 0x195e2(%rip)     # 0x24470
xorl %eax, %eax
jmp 0xad3d
callq 0xb020
movq 0x195cf(%rip), %rcx     # 0x24470
testq %rax, %rax
jne 0xabfc
xorl %r15d, %r15d
jmp 0xac1c
addq %r13, %r12
movq %r12, 0x195ac(%rip)     # 0x24468
subq %r13, 0x195ad(%rip)     # 0x24470
movzwl 0x2c(%rsp), %ebx
testq %rbx, %rbx
je 0xb00d
movzwl 0x28(%rsp), %eax
movzwl 0x2a(%rsp), %ecx
addq %rax, %rcx
pushq $-0x3
popq %rbp
movq %rcx, %r14
movq 0x19585(%rip), %rax     # 0x24470
subq %rax, %r14
jbe 0xaf57
callq 0xb020
movq %r14, %rcx
testq %rax, %rax
jne 0xaee4
movl %ebp, %eax
jmp 0xb011
callq 0xb020
movq 0x19560(%rip), %rcx     # 0x24470
testq %rax, %rax
jne 0xac25
xorl %ebx, %ebx
jmp 0xac47
callq 0xb020
movq 0x19544(%rip), %rcx     # 0x24470
testq %rax, %rax
jne 0xac4f
xorl %r14d, %r14d
jmp 0xac6f
callq 0xb020
testq %rax, %rax
je 0xace0
movq 0x1951e(%rip), %rcx     # 0x24470
jmp 0xac74
subq %rcx, %rax
movq %rax, 0x1950f(%rip)     # 0x24470
addq %rcx, 0x19500(%rip)     # 0x24468
leaq 0x1(%rbx), %rsi
xorl %edi, %edi
callq 0x9db6
movq %rax, 0x1149e(%rip)     # 0x1c418
movq %rbx, %r14
movq 0x194ec(%rip), %rdx     # 0x24470
movq 0x1148d(%rip), %rdi     # 0x1c418
addq %rbx, %rdi
subq %r14, %rdi
movq 0x194d0(%rip), %rsi     # 0x24468
cmpq %rdx, %r14
jbe 0xafd6
callq 0x3360
subq 0x194c7(%rip), %r14     # 0x24470
andq $0x0, 0x194bf(%rip)     # 0x24470
callq 0xb020
testq %rax, %rax
jne 0xaf7d
movq 0x11456(%rip), %rdi     # 0x1c418
testq %rdi, %rdi
je 0xb00d
callq 0x3050
andq $0x0, 0x11444(%rip)     # 0x1c418
jmp 0xb00d
movq %r14, %rdx
callq 0x3360
addq %r14, 0x19483(%rip)     # 0x24468
subq %r14, 0x19484(%rip)     # 0x24470
xorl %eax, %eax
movq 0x11423(%rip), %rcx     # 0x1c418
cmpq %rax, %rbx
je 0xb009
cmpb $0x0, (%rcx,%rax)
jne 0xb004
movb $0x20, (%rcx,%rax)
incq %rax
jmp 0xafee
movb $0x0, (%rcx,%rbx)
movl 0xc(%rsp), %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq