LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/png/deflate.c
// Function: flush_pending
local void flush_pending(strm)
    z_streamp strm;
{
    unsigned len = strm->state->pending;

    if (len > strm->avail_out) len = strm->avail_out;
    if (len == 0) return;

    zmemcpy(strm->next_out, strm->state->pending_out, len);
    strm->next_out  += len;
    strm->state->pending_out  += len;
    strm->total_out += len;
    strm->avail_out  -= len;
    strm->state->pending -= len;
    if (strm->state->pending == 0) {
        strm->state->pending_out = strm->state->pending_buf;
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movl 0x28(%rax), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0x20(%rcx), %eax
jbe 0x1171c3
movq 0x10(%rsp), %rax
movl 0x20(%rax), %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x1171cf
jmp 0x117282
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rsi
movl 0xc(%rsp), %eax
movl %eax, %edx
callq 0xf3d0
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x18(%rax)
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x20(%rax)
movl 0xc(%rsp), %eax
movl %eax, %ecx
movq 0x10(%rsp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rax
movl 0x20(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x20(%rax)
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movl 0x28(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x28(%rax)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
cmpl $0x0, 0x28(%rax)
jne 0x117282
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x10(%rax), %rcx
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq %rcx, 0x20(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/deflate.c
// Function: read_buf
local int read_buf(strm, buf, size)
    z_streamp strm;
    Bytef *buf;
    unsigned size;
{
    unsigned len = strm->avail_in;

    if (len > size) len = size;
    if (len == 0) return 0;

    strm->avail_in  -= len;

    if (strm->state->wrap == 1) {
        strm->adler = adler32(strm->adler, strm->next_in, len);
    }
#ifdef GZIP
    else if (strm->state->wrap == 2) {
        strm->adler = crc32(strm->adler, strm->next_in, len);
    }
#endif
    zmemcpy(buf, strm->next_in, len);
    strm->next_in  += len;
    strm->total_in += len;

    return (int)len;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jbe 0x119820
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jne 0x119834
movl $0x0, 0x24(%rsp)
jmp 0x1198fa
movl 0x8(%rsp), %edx
movq 0x18(%rsp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rax
cmpl $0x1, 0x2c(%rax)
jne 0x11987c
movq 0x18(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movl 0x8(%rsp), %edx
callq 0x131400
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x60(%rax)
jmp 0x1198b3
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rax
cmpl $0x2, 0x2c(%rax)
jne 0x1198b1
movq 0x18(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movl 0x8(%rsp), %edx
callq 0x113da0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x60(%rax)
jmp 0x1198b3
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movl 0x8(%rsp), %eax
movl %eax, %edx
callq 0xf3d0
movl 0x8(%rsp), %edx
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, (%rax)
movl 0x8(%rsp), %eax
movl %eax, %ecx
movq 0x18(%rsp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/inflate.c
// Function: inflateReset
int ZEXPORT inflateReset(strm)
z_streamp strm;
{
    struct inflate_state FAR *state;

    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    strm->total_in = strm->total_out = state->total = 0;
    strm->msg = Z_NULL;
    strm->adler = 1;        /* to support ill-conceived Java test suite */
    state->mode = HEAD;
    state->last = 0;
    state->havedict = 0;
    state->dmax = 32768U;
    state->head = Z_NULL;
    state->wsize = 0;
    state->whave = 0;
    state->wnext = 0;
    state->hold = 0;
    state->bits = 0;
    state->lencode = state->distcode = state->next = state->codes;
    state->sane = 1;
    state->back = -1;
    Tracev((stderr, "inflate: reset\n"));
    return Z_OK;
}

// Assembly:
movq %rdi, -0x10(%rsp)
cmpq $0x0, -0x10(%rsp)
je 0x119dd9
movq -0x10(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x119de6
movl $0xfffffffe, -0x4(%rsp) # imm = 0xFFFFFFFE
jmp 0x119efe
movq -0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rsp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rsp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rsp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rsp), %rax
movq $0x1, 0x60(%rax)
movq -0x18(%rsp), %rax
movl $0x0, (%rax)
movq -0x18(%rsp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rsp), %rax
movl $0x0, 0xc(%rax)
movq -0x18(%rsp), %rax
movl $0x8000, 0x14(%rax)     # imm = 0x8000
movq -0x18(%rsp), %rax
movq $0x0, 0x28(%rax)
movq -0x18(%rsp), %rax
movl $0x0, 0x34(%rax)
movq -0x18(%rsp), %rax
movl $0x0, 0x38(%rax)
movq -0x18(%rsp), %rax
movl $0x0, 0x3c(%rax)
movq -0x18(%rsp), %rax
movq $0x0, 0x48(%rax)
movq -0x18(%rsp), %rax
movl $0x0, 0x50(%rax)
movq -0x18(%rsp), %rcx
addq $0x550, %rcx            # imm = 0x550
movq -0x18(%rsp), %rax
movq %rcx, 0x88(%rax)
movq -0x18(%rsp), %rax
movq %rcx, 0x68(%rax)
movq -0x18(%rsp), %rax
movq %rcx, 0x60(%rax)
movq -0x18(%rsp), %rax
movl $0x1, 0x1be0(%rax)
movq -0x18(%rsp), %rax
movl $0xffffffff, 0x1be4(%rax) # imm = 0xFFFFFFFF
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/inflate.c
// Function: inflateReset2
int ZEXPORT inflateReset2(strm, windowBits)
z_streamp strm;
int windowBits;
{
    int wrap;
    struct inflate_state FAR *state;

    /* get the state */
    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;

    /* extract wrap request from windowBits parameter */
    if (windowBits < 0) {
        wrap = 0;
        windowBits = -windowBits;
    }
    else {
        wrap = (windowBits >> 4) + 1;
#ifdef GUNZIP
        if (windowBits < 48)
            windowBits &= 15;
#endif
    }

    /* set number of window bits, free window if different */
    if (windowBits && (windowBits < 8 || windowBits > 15))
        return Z_STREAM_ERROR;
    if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
        ZFREE(strm, state->window);
        state->window = Z_NULL;
    }

    /* update state and reset the rest of it */
    state->wrap = wrap;
    state->wbits = (unsigned)windowBits;
    return inflateReset(strm);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x119f31
movq 0x18(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x119f3e
movl $0xfffffffe, 0x24(%rsp) # imm = 0xFFFFFFFE
jmp 0x11a012
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x14(%rsp)
jge 0x119f67
movl $0x0, 0x10(%rsp)
xorl %eax, %eax
subl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x119f89
movl 0x14(%rsp), %eax
sarl $0x4, %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
cmpl $0x30, 0x14(%rsp)
jge 0x119f87
movl 0x14(%rsp), %eax
andl $0xf, %eax
movl %eax, 0x14(%rsp)
jmp 0x119f89
cmpl $0x0, 0x14(%rsp)
je 0x119fa8
cmpl $0x8, 0x14(%rsp)
jl 0x119f9e
cmpl $0xf, 0x14(%rsp)
jle 0x119fa8
movl $0xfffffffe, 0x24(%rsp) # imm = 0xFFFFFFFE
jmp 0x11a012
movq 0x8(%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x119fec
movq 0x8(%rsp), %rax
movl 0x30(%rax), %eax
cmpl 0x14(%rsp), %eax
je 0x119fec
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x50(%rcx), %rdi
movq 0x8(%rsp), %rcx
movq 0x40(%rcx), %rsi
callq *%rax
movq 0x8(%rsp), %rax
movq $0x0, 0x40(%rax)
movl 0x10(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x30(%rax)
movq 0x18(%rsp), %rdi
callq 0x119dc0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/inflate.c
// Function: inflateInit2_
int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
z_streamp strm;
int windowBits;
const char *version;
int stream_size;
{
    int ret;
    struct inflate_state FAR *state;

    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
        stream_size != (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (strm == Z_NULL) return Z_STREAM_ERROR;
    strm->msg = Z_NULL;                 /* in case we return an error */
    if (strm->zalloc == (alloc_func)0) {
        strm->zalloc = zcalloc;
        strm->opaque = (voidpf)0;
    }
    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
    state = (struct inflate_state FAR *)
            ZALLOC(strm, 1, sizeof(struct inflate_state));
    if (state == Z_NULL) return Z_MEM_ERROR;
    Tracev((stderr, "inflate: allocated\n"));
    strm->state = (struct internal_state FAR *)state;
    state->window = Z_NULL;
    ret = inflateReset2(strm, windowBits);
    if (ret != Z_OK) {
        ZFREE(strm, state);
        strm->state = Z_NULL;
    }
    return ret;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x11a058
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
movsbl 0x1f0f2(%rip), %ecx     # 0x13913f
cmpl %ecx, %eax
jne 0x11a058
cmpl $0x70, 0x14(%rsp)
je 0x11a065
movl $0xfffffffa, 0x34(%rsp) # imm = 0xFFFFFFFA
jmp 0x11a163
cmpq $0x0, 0x28(%rsp)
jne 0x11a07a
movl $0xfffffffe, 0x34(%rsp) # imm = 0xFFFFFFFE
jmp 0x11a163
movq 0x28(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x11a0b0
movq 0x28(%rsp), %rax
leaq 0x87f1(%rip), %rcx      # 0x122890
movq %rcx, 0x40(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x50(%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x11a0cc
movq 0x28(%rsp), %rax
leaq 0x8808(%rip), %rcx      # 0x1228d0
movq %rcx, 0x48(%rax)
movq 0x28(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x28(%rsp), %rcx
movq 0x50(%rcx), %rdi
movl $0x1, %esi
movl $0x1bf0, %edx           # imm = 0x1BF0
callq *%rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x11a101
movl $0xfffffffc, 0x34(%rsp) # imm = 0xFFFFFFFC
jmp 0x11a163
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x40(%rax)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x119f10
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x11a15b
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x28(%rsp), %rcx
movq 0x50(%rcx), %rdi
movq 0x8(%rsp), %rsi
callq *%rax
movq 0x28(%rsp), %rax
movq $0x0, 0x38(%rax)
movl 0x10(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/inflate.c
// Function: inflatePrime
int ZEXPORT inflatePrime(strm, bits, value)
z_streamp strm;
int bits;
int value;
{
    struct inflate_state FAR *state;

    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    if (bits < 0) {
        state->hold = 0;
        state->bits = 0;
        return Z_OK;
    }
    if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
    value &= (1L << bits) - 1;
    state->hold += value << state->bits;
    state->bits += bits;
    return Z_OK;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movl %edx, -0x18(%rsp)
cmpq $0x0, -0x10(%rsp)
je 0x11a1c1
movq -0x10(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x11a1ce
movl $0xfffffffe, -0x4(%rsp) # imm = 0xFFFFFFFE
jmp 0x11a27e
movq -0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rsp)
cmpl $0x0, -0x14(%rsp)
jge 0x11a206
movq -0x20(%rsp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rsp), %rax
movl $0x0, 0x50(%rax)
movl $0x0, -0x4(%rsp)
jmp 0x11a27e
cmpl $0x10, -0x14(%rsp)
jg 0x11a21e
movq -0x20(%rsp), %rax
movl 0x50(%rax), %eax
addl -0x14(%rsp), %eax
cmpl $0x20, %eax
jbe 0x11a228
movl $0xfffffffe, -0x4(%rsp) # imm = 0xFFFFFFFE
jmp 0x11a27e
movl -0x14(%rsp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
subq $0x1, %rcx
movslq -0x18(%rsp), %rax
andq %rcx, %rax
movl %eax, -0x18(%rsp)
movl -0x18(%rsp), %eax
movq -0x20(%rsp), %rcx
movl 0x50(%rcx), %ecx
shll %cl, %eax
movslq %eax, %rcx
movq -0x20(%rsp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movl -0x14(%rsp), %ecx
movq -0x20(%rsp), %rax
addl 0x50(%rax), %ecx
movl %ecx, 0x50(%rax)
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: tr_init
void ZLIB_INTERNAL _tr_init(s)
    deflate_state *s;
{
    tr_static_init();

    s->l_desc.dyn_tree = s->dyn_ltree;
    s->l_desc.stat_desc = &static_l_desc;

    s->d_desc.dyn_tree = s->dyn_dtree;
    s->d_desc.stat_desc = &static_d_desc;

    s->bl_desc.dyn_tree = s->bl_tree;
    s->bl_desc.stat_desc = &static_bl_desc;

    s->bi_buf = 0;
    s->bi_valid = 0;
    s->last_eob_len = 8; /* enough lookahead for inflate */
#ifdef DEBUG
    s->compressed_len = 0L;
    s->bits_sent = 0L;
#endif

    /* Initialize the first block of the first file: */
    init_block(s);
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
callq 0x11ecf0
movq (%rsp), %rcx
addq $0xc4, %rcx
movq (%rsp), %rax
movq %rcx, 0xb48(%rax)
movq (%rsp), %rax
leaq 0x5989d(%rip), %rcx     # 0x1784f8
movq %rcx, 0xb58(%rax)
movq (%rsp), %rcx
addq $0x9b8, %rcx            # imm = 0x9B8
movq (%rsp), %rax
movq %rcx, 0xb60(%rax)
movq (%rsp), %rax
leaq 0x59895(%rip), %rcx     # 0x178518
movq %rcx, 0xb70(%rax)
movq (%rsp), %rcx
addq $0xaac, %rcx            # imm = 0xAAC
movq (%rsp), %rax
movq %rcx, 0xb78(%rax)
movq (%rsp), %rax
leaq 0x5988d(%rip), %rcx     # 0x178538
movq %rcx, 0xb88(%rax)
movq (%rsp), %rax
movw $0x0, 0x1720(%rax)
movq (%rsp), %rax
movl $0x0, 0x1724(%rax)
movq (%rsp), %rax
movl $0x8, 0x171c(%rax)
movq (%rsp), %rdi
callq 0x11ed00
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: init_block
local void init_block(s)
    deflate_state *s;
{
    int n; /* iterates over tree elements */

    /* Initialize the trees. */
    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;

    s->dyn_ltree[END_BLOCK].Freq = 1;
    s->opt_len = s->static_len = 0L;
    s->last_lit = s->matches = 0;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl $0x0, -0xc(%rsp)
cmpl $0x11e, -0xc(%rsp)      # imm = 0x11E
jge 0x11ed38
movq -0x8(%rsp), %rax
movslq -0xc(%rsp), %rcx
movw $0x0, 0xc4(%rax,%rcx,4)
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x11ed0d
movl $0x0, -0xc(%rsp)
cmpl $0x1e, -0xc(%rsp)
jge 0x11ed68
movq -0x8(%rsp), %rax
movslq -0xc(%rsp), %rcx
movw $0x0, 0x9b8(%rax,%rcx,4)
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x11ed40
movl $0x0, -0xc(%rsp)
cmpl $0x13, -0xc(%rsp)
jge 0x11ed98
movq -0x8(%rsp), %rax
movslq -0xc(%rsp), %rcx
movw $0x0, 0xaac(%rax,%rcx,4)
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x11ed70
movq -0x8(%rsp), %rax
movw $0x1, 0x4c4(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x1710(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x1708(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x1718(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x16fc(%rax)
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: copy_block
local void copy_block(s, buf, len, header)
    deflate_state *s;
    charf    *buf;    /* the input data */
    unsigned len;     /* its length */
    int      header;  /* true if block header must be written */
{
    bi_windup(s);        /* align on byte boundary */
    s->last_eob_len = 8; /* enough lookahead for inflate */

    if (header) {
        put_short(s, (ush)len);
        put_short(s, (ush)~len);
#ifdef DEBUG
        s->bits_sent += 2*16;
#endif
    }
#ifdef DEBUG
    s->bits_sent += (ulg)len<<3;
#endif
    while (len--) {
        put_byte(s, *buf++);
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movl %ecx, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x1210c0
movq 0x10(%rsp), %rax
movl $0x8, 0x171c(%rax)
cmpl $0x0, (%rsp)
je 0x11f05a
movl 0x4(%rsp), %eax
movzwl %ax, %eax
andl $0xff, %eax
movb %al, %dl
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl 0x4(%rsp), %eax
movzwl %ax, %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl 0x4(%rsp), %eax
xorl $-0x1, %eax
movzwl %ax, %eax
andl $0xff, %eax
movb %al, %dl
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl 0x4(%rsp), %eax
xorl $-0x1, %eax
movzwl %ax, %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0x11f05c
movl 0x4(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rsp)
cmpl $0x0, %eax
je 0x11f0a1
movq 0x8(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rsp)
movb (%rax), %dl
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0x11f05c
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: bi_flush
local void bi_flush(s)
    deflate_state *s;
{
    if (s->bi_valid == 16) {
        put_short(s, s->bi_buf);
        s->bi_buf = 0;
        s->bi_valid = 0;
    } else if (s->bi_valid >= 8) {
        put_byte(s, (Byte)s->bi_buf);
        s->bi_buf >>= 8;
        s->bi_valid -= 8;
    }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
cmpl $0x10, 0x1724(%rax)
jne 0x11f6a2
movq -0x8(%rsp), %rax
movzwl 0x1720(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x8(%rsp), %rax
movzwl 0x1720(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x8(%rsp), %rax
movw $0x0, 0x1720(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x1724(%rax)
jmp 0x11f708
movq -0x8(%rsp), %rax
cmpl $0x8, 0x1724(%rax)
jl 0x11f706
movq -0x8(%rsp), %rax
movw 0x1720(%rax), %ax
movb %al, %dl
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x8(%rsp), %rax
movzwl 0x1720(%rax), %ecx
sarl $0x8, %ecx
movw %cx, 0x1720(%rax)
movq -0x8(%rsp), %rax
movl 0x1724(%rax), %ecx
subl $0x8, %ecx
movl %ecx, 0x1724(%rax)
jmp 0x11f708
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: detect_data_type
local int detect_data_type(s)
    deflate_state *s;
{
    /* black_mask is the bit mask of black-listed bytes
     * set bits 0..6, 14..25, and 28..31
     * 0xf3ffc07f = binary 11110011111111111100000001111111
     */
    unsigned long black_mask = 0xf3ffc07fUL;
    int n;

    /* Check for non-textual ("black-listed") bytes. */
    for (n = 0; n <= 31; n++, black_mask >>= 1)
        if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0))
            return Z_BINARY;

    /* Check for textual ("white-listed") bytes. */
    if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
            || s->dyn_ltree[13].Freq != 0)
        return Z_TEXT;
    for (n = 32; n < LITERALS; n++)
        if (s->dyn_ltree[n].Freq != 0)
            return Z_TEXT;

    /* There are no "black-listed" or "white-listed" bytes:
     * this stream either is empty or has tolerated ("gray-listed") bytes only.
     */
    return Z_BINARY;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl $0xf3ffc07f, %eax       # imm = 0xF3FFC07F
movq %rax, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
cmpl $0x1f, -0x1c(%rsp)
jg 0x11fbdd
movq -0x18(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x11fbc1
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movzwl 0xc4(%rax,%rcx,4), %eax
cmpl $0x0, %eax
je 0x11fbc1
movl $0x0, -0x4(%rsp)
jmp 0x11fc64
jmp 0x11fbc3
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
movq -0x18(%rsp), %rax
shrq %rax
movq %rax, -0x18(%rsp)
jmp 0x11fb87
movq -0x10(%rsp), %rax
movzwl 0xe8(%rax), %eax
cmpl $0x0, %eax
jne 0x11fc10
movq -0x10(%rsp), %rax
movzwl 0xec(%rax), %eax
cmpl $0x0, %eax
jne 0x11fc10
movq -0x10(%rsp), %rax
movzwl 0xf8(%rax), %eax
cmpl $0x0, %eax
je 0x11fc1a
movl $0x1, -0x4(%rsp)
jmp 0x11fc64
movl $0x20, -0x1c(%rsp)
cmpl $0x100, -0x1c(%rsp)     # imm = 0x100
jge 0x11fc5c
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movzwl 0xc4(%rax,%rcx,4), %eax
cmpl $0x0, %eax
je 0x11fc4d
movl $0x1, -0x4(%rsp)
jmp 0x11fc64
jmp 0x11fc4f
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x11fc22
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: build_bl_tree
local int build_bl_tree(s)
    deflate_state *s;
{
    int max_blindex;  /* index of last bit length code of non zero freq */

    /* Determine the bit length frequencies for literal and distance trees */
    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);

    /* Build the bit length tree: */
    build_tree(s, (tree_desc *)(&(s->bl_desc)));
    /* opt_len now includes the length of the tree representations, except
     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
     */

    /* Determine the number of bit length codes to send. The pkzip format
     * requires that at least 4 bit length codes be sent. (appnote.txt says
     * 3 but the actual value used is 4.)
     */
    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
    }
    /* Update opt_len to include the bit length tree and counts */
    s->opt_len += 3*(max_blindex+1) + 5+5+4;
    Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
            s->opt_len, s->static_len));

    return max_blindex;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0xc4, %rsi
movq 0x10(%rsp), %rax
movl 0xb50(%rax), %edx
callq 0x121a10
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x9b8, %rsi            # imm = 0x9B8
movq 0x10(%rsp), %rax
movl 0xb68(%rax), %edx
callq 0x121a10
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0xb78, %rsi            # imm = 0xB78
callq 0x11fc70
movl $0x12, 0xc(%rsp)
cmpl $0x3, 0xc(%rsp)
jl 0x120133
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rdx
leaq 0x1ed7f(%rip), %rcx     # 0x13ee90
movzbl (%rcx,%rdx), %ecx
movzwl 0xaae(%rax,%rcx,4), %eax
cmpl $0x0, %eax
je 0x120124
jmp 0x120133
jmp 0x120126
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x1200f9
movl 0xc(%rsp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
addl $0x5, %eax
addl $0x5, %eax
addl $0x4, %eax
movslq %eax, %rcx
movq 0x10(%rsp), %rax
addq 0x1708(%rax), %rcx
movq %rcx, 0x1708(%rax)
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: bi_windup
local void bi_windup(s)
    deflate_state *s;
{
    if (s->bi_valid > 8) {
        put_short(s, s->bi_buf);
    } else if (s->bi_valid > 0) {
        put_byte(s, (Byte)s->bi_buf);
    }
    s->bi_buf = 0;
    s->bi_valid = 0;
#ifdef DEBUG
    s->bits_sent = (s->bits_sent+7) & ~7;
#endif
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
cmpl $0x8, 0x1724(%rax)
jle 0x121135
movq -0x8(%rsp), %rax
movzwl 0x1720(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x8(%rsp), %rax
movzwl 0x1720(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0x121171
movq -0x8(%rsp), %rax
cmpl $0x0, 0x1724(%rax)
jle 0x12116f
movq -0x8(%rsp), %rax
movw 0x1720(%rax), %ax
movb %al, %dl
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0x121171
movq -0x8(%rsp), %rax
movw $0x0, 0x1720(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x1724(%rax)
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: gen_codes
local void gen_codes (tree, max_code, bl_count)
    ct_data *tree;             /* the tree to decorate */
    int max_code;              /* largest code with non zero frequency */
    ushf *bl_count;            /* number of codes at each bit length */
{
    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
    ush code = 0;              /* running code value */
    int bits;                  /* bit index */
    int n;                     /* code index */

    /* The distribution counts are first used to generate the code values
     * without bit reversal.
     */
    for (bits = 1; bits <= MAX_BITS; bits++) {
        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
    }
    /* Check that the bit counts in bl_count are consistent. The last code
     * must be all ones.
     */
    Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
            "inconsistent bit counts");
    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));

    for (n = 0;  n <= max_code; n++) {
        int len = tree[n].Len;
        if (len == 0) continue;
        /* Now reverse the bits */
        tree[n].Code = bi_reverse(next_code[len]++, len);

        Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
             n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
    }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movw $0x0, 0xe(%rsp)
movl $0x1, 0x8(%rsp)
cmpl $0xf, 0x8(%rsp)
jg 0x121943
movzwl 0xe(%rsp), %eax
movq 0x30(%rsp), %rcx
movl 0x8(%rsp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movzwl (%rcx,%rdx,2), %ecx
addl %ecx, %eax
shll %eax
movw %ax, %cx
movw %cx, 0xe(%rsp)
movslq 0x8(%rsp), %rax
movw %cx, 0x10(%rsp,%rax,2)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x121901
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x3c(%rsp), %eax
jg 0x1219ad
movq 0x40(%rsp), %rax
movslq 0x4(%rsp), %rcx
movzwl 0x2(%rax,%rcx,4), %eax
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jne 0x12196f
jmp 0x1219a0
movslq (%rsp), %rcx
movw 0x10(%rsp,%rcx,2), %ax
movw %ax, %dx
addw $0x1, %dx
movw %dx, 0x10(%rsp,%rcx,2)
movzwl %ax, %edi
movl (%rsp), %esi
callq 0x1219c0
movw %ax, %dx
movq 0x40(%rsp), %rax
movslq 0x4(%rsp), %rcx
movw %dx, (%rax,%rcx,4)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x12194b
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: bi_reverse
local unsigned bi_reverse(code, len)
    unsigned code; /* the value to invert */
    int len;       /* its bit length */
{
    register unsigned res = 0;
    do {
        res |= code & 1;
        code >>= 1, res <<= 1;
    } while (--len > 0);
    return res >> 1;
}

// Assembly:
movl %edi, -0x4(%rsp)
movl %esi, -0x8(%rsp)
movl $0x0, -0xc(%rsp)
movl -0x4(%rsp), %eax
andl $0x1, %eax
orl -0xc(%rsp), %eax
movl %eax, -0xc(%rsp)
movl -0x4(%rsp), %eax
shrl %eax
movl %eax, -0x4(%rsp)
movl -0xc(%rsp), %eax
shll %eax
movl %eax, -0xc(%rsp)
movl -0x8(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rsp)
cmpl $0x0, %eax
jg 0x1219d0
movl -0xc(%rsp), %eax
shrl %eax
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngrutil.c
// Function: png_get_uint_31
png_uint_32 PNGAPI
png_get_uint_31(png_structp png_ptr, png_bytep buf)
{
   png_uint_32 i = png_get_uint_32(buf);
   if (i > PNG_UINT_31_MAX)
     png_error(png_ptr, "PNG unsigned integer out of range");
   return (i);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
shll $0x18, %eax
movq 0x8(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq 0x8(%rsp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq 0x8(%rsp), %rcx
movzbl 0x3(%rcx), %ecx
addl %ecx, %eax
movl %eax, 0x4(%rsp)
cmpl $0x7fffffff, 0x4(%rsp)  # imm = 0x7FFFFFFF
jbe 0x12295f
movq 0x10(%rsp), %rdi
leaq 0x1c806(%rip), %rsi     # 0x13f160
callq 0x113860
movl 0x4(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngrutil.c
// Function: png_check_chunk_name
void /* PRIVATE */
png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name)
{
   png_debug(1, "in png_check_chunk_name");
   if (isnonalpha(chunk_name[0]) || isnonalpha(chunk_name[1]) ||
       isnonalpha(chunk_name[2]) || isnonalpha(chunk_name[3]))
   {
      png_chunk_error(png_ptr, "invalid chunk type");
   }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x41, %eax
jl 0x122b1e
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x7a, %eax
jg 0x122b1e
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x5a, %eax
jle 0x122a6e
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x61, %eax
jl 0x122b1e
movq 0x8(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x41, %eax
jl 0x122b1e
movq 0x8(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x7a, %eax
jg 0x122b1e
movq 0x8(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x5a, %eax
jle 0x122aae
movq 0x8(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x61, %eax
jl 0x122b1e
movq 0x8(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x41, %eax
jl 0x122b1e
movq 0x8(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x7a, %eax
jg 0x122b1e
movq 0x8(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x5a, %eax
jle 0x122ae6
movq 0x8(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x61, %eax
jl 0x122b1e
movq 0x8(%rsp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x41, %eax
jl 0x122b1e
movq 0x8(%rsp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x7a, %eax
jg 0x122b1e
movq 0x8(%rsp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x5a, %eax
jle 0x122b2f
movq 0x8(%rsp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x61, %eax
jge 0x122b2f
movq 0x10(%rsp), %rdi
leaq 0x1d453(%rip), %rsi     # 0x13ff7d
callq 0x113a60
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngrutil.c
// Function: png_crc_read
void /* PRIVATE */
png_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length)
{
   if (png_ptr == NULL)
      return;
   png_read_data(png_ptr, buf, length);
   png_calculate_crc(png_ptr, buf, length);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x122b5c
jmp 0x122b82
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
callq 0x103570
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
callq 0xfb770
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngrutil.c
// Function: png_crc_finish
int /* PRIVATE */
png_crc_finish(png_structp png_ptr, png_uint_32 skip)
{
   png_size_t i;
   png_size_t istop = png_ptr->zbuf_size;

   for (i = (png_size_t)skip; i > istop; i -= istop)
   {
      png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
   }
   if (i)
   {
      png_crc_read(png_ptr, png_ptr->zbuf, i);
   }

   if (png_crc_error(png_ptr))
   {
      if (((png_ptr->chunk_name[0] & 0x20) &&                /* Ancillary */
          !(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) ||
          (!(png_ptr->chunk_name[0] & 0x20) &&             /* Critical  */
          (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_USE)))
      {
         png_chunk_warning(png_ptr, "CRC error");
      }
      else
      {
         png_chunk_benign_error(png_ptr, "CRC error");
         return (0);
      }
      return (1);
   }

   return (0);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq 0x1a0(%rax), %rax
movq %rax, (%rsp)
movl 0x14(%rsp), %eax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
jbe 0x122bf6
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x198(%rax), %rsi
movq 0x18(%rsp), %rax
movq 0x1a0(%rax), %rdx
callq 0x122b40
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x8(%rsp)
jmp 0x122bb6
cmpq $0x0, 0x8(%rsp)
je 0x122c19
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x198(%rax), %rsi
movq 0x8(%rsp), %rdx
callq 0x122b40
movq 0x18(%rsp), %rdi
callq 0x122cd0
cmpl $0x0, %eax
je 0x122cb6
movq 0x18(%rsp), %rax
movzbl 0x244(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x122c55
movq 0x18(%rsp), %rax
movl 0x120(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x122c7e
movq 0x18(%rsp), %rax
movzbl 0x244(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x122c91
movq 0x18(%rsp), %rax
movl 0x120(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x122c91
movq 0x18(%rsp), %rdi
leaq 0x16afd(%rip), %rsi     # 0x139787
callq 0x113c60
jmp 0x122cac
movq 0x18(%rsp), %rdi
leaq 0x16aea(%rip), %rsi     # 0x139787
callq 0x113a60
movl $0x0, 0x24(%rsp)
jmp 0x122cbe
movl $0x1, 0x24(%rsp)
jmp 0x122cbe
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngrutil.c
// Function: png_crc_error
int /* PRIVATE */
png_crc_error(png_structp png_ptr)
{
   png_byte crc_bytes[4];
   png_uint_32 crc;
   int need_crc = 1;

   if (png_ptr->chunk_name[0] & 0x20)                     /* ancillary */
   {
      if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) ==
          (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN))
         need_crc = 0;
   }
   else                                                    /* critical */
   {
      if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE)
         need_crc = 0;
   }

#ifdef PNG_IO_STATE_SUPPORTED
   /* Inform the I/O callback that the chunk CRC is being read */
   /* PNG_IO_CHUNK_CRC requires the I/O to be done at once */
   png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_CRC;
#endif

   png_read_data(png_ptr, crc_bytes, 4);

   if (need_crc)
   {
      crc = png_get_uint_32(crc_bytes);
      return ((int)(crc != png_ptr->crc));
   }
   else
      return (0);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl $0x1, 0xc(%rsp)
movq 0x18(%rsp), %rax
movzbl 0x244(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x122d16
movq 0x18(%rsp), %rax
movl 0x120(%rax), %eax
andl $0x300, %eax            # imm = 0x300
cmpl $0x300, %eax            # imm = 0x300
jne 0x122d14
movl $0x0, 0xc(%rsp)
jmp 0x122d35
movq 0x18(%rsp), %rax
movl 0x120(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x122d33
movl $0x0, 0xc(%rsp)
jmp 0x122d35
movq 0x18(%rsp), %rax
movl $0x81, 0x490(%rax)
movq 0x18(%rsp), %rdi
leaq 0x14(%rsp), %rsi
movl $0x4, %edx
callq 0x103570
cmpl $0x0, 0xc(%rsp)
je 0x122da3
movzbl 0x14(%rsp), %eax
shll $0x18, %eax
movzbl 0x15(%rsp), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movzbl 0x16(%rsp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzbl 0x17(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x234(%rcx), %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x24(%rsp)
jmp 0x122dab
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngrutil.c
// Function: png_handle_IEND
void /* PRIVATE */
png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
   png_debug(1, "in png_handle_IEND");

   if (!(png_ptr->mode & PNG_HAVE_IHDR) || !(png_ptr->mode & PNG_HAVE_IDAT))
   {
      png_error(png_ptr, "No image in file");
   }

   png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND);

   if (length != 0)
   {
      png_warning(png_ptr, "Incorrect IEND chunk length");
   }
   png_crc_finish(png_ptr, length);

   info_ptr = info_ptr + 0; /* Quiet compiler warnings about unused info_ptr */
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq 0x10(%rsp), %rax
movl 0x11c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1238a8
movq 0x10(%rsp), %rax
movl 0x11c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x1238b9
movq 0x10(%rsp), %rdi
leaq 0x1ba64(%rip), %rsi     # 0x13f318
callq 0x113860
movq 0x10(%rsp), %rax
movl 0x11c(%rax), %ecx
orl $0x18, %ecx
movl %ecx, 0x11c(%rax)
cmpl $0x0, 0x4(%rsp)
je 0x1238e5
movq 0x10(%rsp), %rdi
leaq 0x1ba49(%rip), %rsi     # 0x13f329
callq 0x113940
movq 0x10(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x122b90
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngrutil.c
// Function: png_handle_pHYs
void /* PRIVATE */
png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
   png_byte buf[9];
   png_uint_32 res_x, res_y;
   int unit_type;

   png_debug(1, "in png_handle_pHYs");

   if (!(png_ptr->mode & PNG_HAVE_IHDR))
      png_error(png_ptr, "Missing IHDR before pHYs");
   else if (png_ptr->mode & PNG_HAVE_IDAT)
   {
      png_warning(png_ptr, "Invalid pHYs after IDAT");
      png_crc_finish(png_ptr, length);
      return;
   }
   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
   {
      png_warning(png_ptr, "Duplicate pHYs chunk");
      png_crc_finish(png_ptr, length);
      return;
   }

   if (length != 9)
   {
      png_warning(png_ptr, "Incorrect pHYs chunk length");
      png_crc_finish(png_ptr, length);
      return;
   }

   png_crc_read(png_ptr, buf, 9);
   if (png_crc_finish(png_ptr, 0))
      return;

   res_x = png_get_uint_32(buf);
   res_y = png_get_uint_32(buf + 4);
   unit_type = buf[8];
   png_set_pHYs(png_ptr, info_ptr, res_x, res_y, unit_type);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rax
movl 0x11c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x125b08
movq 0x30(%rsp), %rdi
leaq 0x19eed(%rip), %rsi     # 0x13f9ee
callq 0x113860
jmp 0x125b81
movq 0x30(%rsp), %rax
movl 0x11c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x125b3f
movq 0x30(%rsp), %rdi
leaq 0x19ee0(%rip), %rsi     # 0x13fa07
callq 0x113940
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x122b90
jmp 0x125c46
cmpq $0x0, 0x28(%rsp)
je 0x125b7d
movq 0x28(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x125b7d
movq 0x30(%rsp), %rdi
leaq 0x19eba(%rip), %rsi     # 0x13fa1f
callq 0x113940
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x122b90
jmp 0x125c46
jmp 0x125b7f
jmp 0x125b81
cmpl $0x9, 0x24(%rsp)
je 0x125bac
movq 0x30(%rsp), %rdi
leaq 0x19ea0(%rip), %rsi     # 0x13fa34
callq 0x113940
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x122b90
jmp 0x125c46
movq 0x30(%rsp), %rdi
leaq 0x1b(%rsp), %rsi
movl $0x9, %edx
callq 0x122b40
movq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x122b90
cmpl $0x0, %eax
je 0x125bd3
jmp 0x125c46
movzbl 0x1b(%rsp), %eax
shll $0x18, %eax
movzbl 0x1c(%rsp), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movzbl 0x1d(%rsp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzbl 0x1e(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0x14(%rsp)
movzbl 0x1f(%rsp), %eax
shll $0x18, %eax
movzbl 0x20(%rsp), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movzbl 0x21(%rsp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzbl 0x22(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0x10(%rsp)
movzbl 0x23(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %ecx
movl 0xc(%rsp), %r8d
callq 0xfd920
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngrutil.c
// Function: png_handle_tIME
void /* PRIVATE */
png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
   png_byte buf[7];
   png_time mod_time;

   png_debug(1, "in png_handle_tIME");

   if (!(png_ptr->mode & PNG_HAVE_IHDR))
      png_error(png_ptr, "Out of place tIME chunk");
   else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME))
   {
      png_warning(png_ptr, "Duplicate tIME chunk");
      png_crc_finish(png_ptr, length);
      return;
   }

   if (png_ptr->mode & PNG_HAVE_IDAT)
      png_ptr->mode |= PNG_AFTER_IDAT;

   if (length != 7)
   {
      png_warning(png_ptr, "Incorrect tIME chunk length");
      png_crc_finish(png_ptr, length);
      return;
   }

   png_crc_read(png_ptr, buf, 7);
   if (png_crc_finish(png_ptr, 0))
      return;

   mod_time.second = buf[6];
   mod_time.minute = buf[5];
   mod_time.hour = buf[4];
   mod_time.day = buf[3];
   mod_time.month = buf[2];
   mod_time.year = png_get_uint_16(buf);

   png_set_tIME(png_ptr, info_ptr, &mod_time);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movl 0x11c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x126848
movq 0x20(%rsp), %rdi
leaq 0x19434(%rip), %rsi     # 0x13fc75
callq 0x113860
jmp 0x126888
cmpq $0x0, 0x18(%rsp)
je 0x126886
movq 0x18(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x126886
movq 0x20(%rsp), %rdi
leaq 0x1941f(%rip), %rsi     # 0x13fc8d
callq 0x113940
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x122b90
jmp 0x12694e
jmp 0x126888
movq 0x20(%rsp), %rax
movl 0x11c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1268af
movq 0x20(%rsp), %rax
movl 0x11c(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0x11c(%rax)
cmpl $0x7, 0x14(%rsp)
je 0x1268d7
movq 0x20(%rsp), %rdi
leaq 0x193e0(%rip), %rsi     # 0x13fca2
callq 0x113940
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x122b90
jmp 0x12694e
movq 0x20(%rsp), %rdi
leaq 0xd(%rsp), %rsi
movl $0x7, %edx
callq 0x122b40
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x122b90
cmpl $0x0, %eax
je 0x1268fe
jmp 0x12694e
movb 0x13(%rsp), %al
movb %al, 0xa(%rsp)
movb 0x12(%rsp), %al
movb %al, 0x9(%rsp)
movb 0x11(%rsp), %al
movb %al, 0x8(%rsp)
movb 0x10(%rsp), %al
movb %al, 0x7(%rsp)
movb 0xf(%rsp), %al
movb %al, 0x6(%rsp)
movzbl 0xd(%rsp), %eax
shll $0x8, %eax
movzbl 0xe(%rsp), %ecx
addl %ecx, %eax
movw %ax, 0x4(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0xfe4a0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngtrans.c
// Function: png_set_swap
void PNGAPI
png_set_swap(png_structp png_ptr)
{
   png_debug(1, "in png_set_swap");

   if (png_ptr == NULL)
      return;
   if (png_ptr->bit_depth == 16)
      png_ptr->transformations |= PNG_SWAP_BYTES;
}

// Assembly:
movq %rdi, -0x8(%rsp)
cmpq $0x0, -0x8(%rsp)
jne 0x129e7f
jmp 0x129ea4
movq -0x8(%rsp), %rax
movzbl 0x24f(%rax), %eax
cmpl $0x10, %eax
jne 0x129ea4
movq -0x8(%rsp), %rax
movl 0x124(%rax), %ecx
orl $0x10, %ecx
movl %ecx, 0x124(%rax)
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngtrans.c
// Function: png_set_packing
void PNGAPI
png_set_packing(png_structp png_ptr)
{
   png_debug(1, "in png_set_packing");

   if (png_ptr == NULL)
      return;
   if (png_ptr->bit_depth < 8)
   {
      png_ptr->transformations |= PNG_PACK;
      png_ptr->usr_bit_depth = 8;
   }
}

// Assembly:
movq %rdi, -0x8(%rsp)
cmpq $0x0, -0x8(%rsp)
jne 0x129ebf
jmp 0x129ef0
movq -0x8(%rsp), %rax
movzbl 0x24f(%rax), %eax
cmpl $0x8, %eax
jge 0x129ef0
movq -0x8(%rsp), %rax
movl 0x124(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x124(%rax)
movq -0x8(%rsp), %rax
movb $0x8, 0x250(%rax)
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngtrans.c
// Function: png_set_packswap
void PNGAPI
png_set_packswap(png_structp png_ptr)
{
   png_debug(1, "in png_set_packswap");

   if (png_ptr == NULL)
      return;
   if (png_ptr->bit_depth < 8)
      png_ptr->transformations |= PNG_PACKSWAP;
}

// Assembly:
movq %rdi, -0x8(%rsp)
cmpq $0x0, -0x8(%rsp)
jne 0x129f0f
jmp 0x129f38
movq -0x8(%rsp), %rax
movzbl 0x24f(%rax), %eax
cmpl $0x8, %eax
jge 0x129f38
movq -0x8(%rsp), %rax
movl 0x124(%rax), %ecx
orq $0x10000, %rcx          # imm = 0x10000
movl %ecx, 0x124(%rax)
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngtrans.c
// Function: png_set_shift
void PNGAPI
png_set_shift(png_structp png_ptr, png_color_8p true_bits)
{
   png_debug(1, "in png_set_shift");

   if (png_ptr == NULL)
      return;
   png_ptr->transformations |= PNG_SHIFT;
   png_ptr->shift = *true_bits;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
cmpq $0x0, -0x8(%rsp)
jne 0x129f54
jmp 0x129f83
movq -0x8(%rsp), %rax
movl 0x124(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0x124(%rax)
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movl (%rcx), %edx
movl %edx, 0x2cd(%rax)
movb 0x4(%rcx), %cl
movb %cl, 0x2d1(%rax)
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngtrans.c
// Function: png_set_interlace_handling
int PNGAPI
png_set_interlace_handling(png_structp png_ptr)
{
   png_debug(1, "in png_set_interlace handling");

   if (png_ptr && png_ptr->interlaced)
   {
      png_ptr->transformations |= PNG_INTERLACE;
      return (7);
   }

   return (1);
}

// Assembly:
movq %rdi, -0x10(%rsp)
cmpq $0x0, -0x10(%rsp)
je 0x129fcc
movq -0x10(%rsp), %rax
movzbl 0x24b(%rax), %eax
cmpl $0x0, %eax
je 0x129fcc
movq -0x10(%rsp), %rax
movl 0x124(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x124(%rax)
movl $0x7, -0x4(%rsp)
jmp 0x129fd4
movl $0x1, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngtrans.c
// Function: png_set_filler
void PNGAPI
png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{
   png_debug(1, "in png_set_filler");

   if (png_ptr == NULL)
      return;
   png_ptr->transformations |= PNG_FILLER;
   png_ptr->filler = (png_uint_16)filler;
   if (filler_loc == PNG_FILLER_AFTER)
      png_ptr->flags |= PNG_FLAG_FILLER_AFTER;
   else
      png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER;

   /* This should probably go in the "do_read_filler" routine.
    * I attempted to do that in libpng-1.0.1a but that caused problems
    * so I restored it in libpng-1.0.2a
   */

   if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
   {
      png_ptr->usr_channels = 4;
   }

   /* Also I added this in libpng-1.0.2a (what happens when we expand
    * a less-than-8-bit grayscale to GA? */

   if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8)
   {
      png_ptr->usr_channels = 2;
   }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movl %edx, -0x10(%rsp)
cmpq $0x0, -0x8(%rsp)
jne 0x129ffa
jmp 0x12a0a7
movq -0x8(%rsp), %rax
movl 0x124(%rax), %ecx
orq $0x8000, %rcx           # imm = 0x8000
movl %ecx, 0x124(%rax)
movl -0xc(%rsp), %eax
movw %ax, %cx
movq -0x8(%rsp), %rax
movw %cx, 0x256(%rax)
cmpl $0x1, -0x10(%rsp)
jne 0x12a045
movq -0x8(%rsp), %rax
movl 0x120(%rax), %ecx
orl $0x80, %ecx
movl %ecx, 0x120(%rax)
jmp 0x12a05c
movq -0x8(%rsp), %rax
movl 0x120(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movl %ecx, 0x120(%rax)
movq -0x8(%rsp), %rax
movzbl 0x24e(%rax), %eax
cmpl $0x2, %eax
jne 0x12a079
movq -0x8(%rsp), %rax
movb $0x4, 0x253(%rax)
movq -0x8(%rsp), %rax
movzbl 0x24e(%rax), %eax
cmpl $0x0, %eax
jne 0x12a0a7
movq -0x8(%rsp), %rax
movzbl 0x24f(%rax), %eax
cmpl $0x8, %eax
jl 0x12a0a7
movq -0x8(%rsp), %rax
movb $0x2, 0x253(%rax)
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/png/pngtrans.c
// Function: png_set_add_alpha
void PNGAPI
png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{
   png_debug(1, "in png_set_add_alpha");

   if (png_ptr == NULL)
      return;
   png_set_filler(png_ptr, filler, filler_loc);
   png_ptr->transformations |= PNG_ADD_ALPHA;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x12a0cb
jmp 0x12a0f5
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x129fe0
movq 0x10(%rsp), %rax
movl 0x124(%rax), %ecx
orq $0x1000000, %rcx        # imm = 0x1000000
movl %ecx, 0x124(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)