LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdmarker.c
// Function: jpeg_save_markers
GLOBAL(void)
jpeg_save_markers (j_decompress_ptr cinfo, int marker_code,
		   unsigned int length_limit)
{
  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
  long maxlength;
  jpeg_marker_parser_method processor;

  /* Length limit mustn't be larger than what we can allocate
   * (should only be a concern in a 16-bit environment).
   */
  maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct);
  if (((long) length_limit) > maxlength)
    length_limit = (unsigned int) maxlength;

  /* Choose processor routine to use.
   * APP0/APP14 have special requirements.
   */
  if (length_limit) {
    processor = save_marker;
    /* If saving APP0/APP14, save at least enough for our internal use. */
    if (marker_code == (int) M_APP0 && length_limit < APP0_DATA_LEN)
      length_limit = APP0_DATA_LEN;
    else if (marker_code == (int) M_APP14 && length_limit < APP14_DATA_LEN)
      length_limit = APP14_DATA_LEN;
  } else {
    processor = skip_variable;
    /* If discarding APP0/APP14, use our regular on-the-fly processor. */
    if (marker_code == (int) M_APP0 || marker_code == (int) M_APP14)
      processor = get_interesting_appn;
  }

  if (marker_code == (int) M_COM) {
    marker->process_COM = processor;
    marker->length_limit_COM = length_limit;
  } else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) {
    marker->process_APPn[marker_code - (int) M_APP0] = processor;
    marker->length_limit_APPn[marker_code - (int) M_APP0] = length_limit;
  } else
    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code);
}

// Assembly:
movq 0x248(%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x60(%rcx), %r8
addq $-0x20, %r8
movl %edx, %ecx
cmpq %rcx, %r8
cmovgel %edx, %r8d
testl %r8d, %r8d
je 0x7d365
cmpl $0xe0, %esi
jne 0x7d38b
cmpl $0xe, %r8d
jae 0x7d38b
leaq 0x93(%rip), %rdx        # 0x7d3f1
movl $0xe, %ecx
jmp 0x7d3cc
cmpl $0xee, %esi
leaq -0x1a4(%rip), %rcx      # 0x7d1ce
leaq -0x271(%rip), %rdx      # 0x7d108
cmoveq %rcx, %rdx
cmpl $0xe0, %esi
cmoveq %rcx, %rdx
xorl %ecx, %ecx
jmp 0x7d3a9
cmpl $0xd, %r8d
movl $0xc, %ecx
cmovael %r8d, %ecx
cmpl $0xee, %esi
cmovnel %r8d, %ecx
leaq 0x48(%rip), %rdx        # 0x7d3f1
cmpl $0xfe, %esi
jne 0x7d3bc
movq %rdx, 0x28(%rax)
movl %ecx, 0xb0(%rax)
retq
movl %esi, %r8d
andl $-0x10, %r8d
cmpl $0xe0, %r8d
jne 0x7d3df
addl $0xffffff20, %esi       # imm = 0xFFFFFF20
movq %rdx, 0x30(%rax,%rsi,8)
movl %ecx, 0xb4(%rax,%rsi,4)
retq
movq (%rdi), %rax
movl $0x44, 0x28(%rax)
movl %esi, 0x2c(%rax)
movq (%rdi), %rax
jmpq *(%rax)
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdmarker.c
// Function: examine_app14
LOCAL(void)
examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,
	       unsigned int datalen, INT32 remaining)
/* Examine first few bytes from an APP14.
 * Take appropriate action if it is an Adobe marker.
 * datalen is # of bytes at data[], remaining is length of rest of marker data.
 */
{
  unsigned int version, flags0, flags1, transform;

  if (datalen >= APP14_DATA_LEN &&
      GETJOCTET(data[0]) == 0x41 &&
      GETJOCTET(data[1]) == 0x64 &&
      GETJOCTET(data[2]) == 0x6F &&
      GETJOCTET(data[3]) == 0x62 &&
      GETJOCTET(data[4]) == 0x65) {
    /* Found Adobe APP14 marker */
    version = (GETJOCTET(data[5]) << 8) + GETJOCTET(data[6]);
    flags0 = (GETJOCTET(data[7]) << 8) + GETJOCTET(data[8]);
    flags1 = (GETJOCTET(data[9]) << 8) + GETJOCTET(data[10]);
    transform = GETJOCTET(data[11]);
    TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform);
    cinfo->saw_Adobe_marker = TRUE;
    cinfo->Adobe_transform = (UINT8) transform;
  } else {
    /* Start of APP14 does not match "Adobe", or too short */
    TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining));
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0xc, %edx
jb 0x7dcb9
cmpb $0x41, (%rsi)
jne 0x7dcb9
cmpb $0x64, 0x1(%rsi)
jne 0x7dcb9
cmpb $0x6f, 0x2(%rsi)
jne 0x7dcb9
cmpb $0x62, 0x3(%rsi)
jne 0x7dcb9
cmpb $0x65, 0x4(%rsi)
jne 0x7dcb9
movzwl 0x5(%rsi), %eax
rolw $0x8, %ax
movzwl 0x7(%rsi), %ecx
movzwl %ax, %eax
rolw $0x8, %cx
movzwl %cx, %ecx
movzwl 0x9(%rsi), %edx
rolw $0x8, %dx
movzwl %dx, %edx
movzbl 0xb(%rsi), %ebp
movq (%rbx), %r8
movl %eax, 0x2c(%r8)
movl %ecx, 0x30(%r8)
movl %edx, 0x34(%r8)
movl %ebp, 0x38(%r8)
movl $0x4c, 0x28(%r8)
movq %rbx, %rdi
movl $0x1, %esi
callq *0x8(%r8)
movl $0x1, 0x180(%rbx)
movb %bpl, 0x184(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq (%rbx), %rax
movl $0x4e, 0x28(%rax)
addl %edx, %ecx
movl %ecx, 0x2c(%rax)
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdhuff.c
// Function: jpeg_huff_decode
GLOBAL(int)
jpeg_huff_decode (bitread_working_state * state,
		  register bit_buf_type get_buffer, register int bits_left,
		  d_derived_tbl * htbl, int min_bits)
{
  register int l = min_bits;
  register INT32 code;

  /* HUFF_DECODE has determined that the code is at least min_bits */
  /* bits long, so fetch that many bits in one swoop. */

  CHECK_BIT_BUFFER(*state, l, return -1);
  code = GET_BITS(l);

  /* Collect the rest of the Huffman code one bit at a time. */
  /* This is per Figure F.16 in the JPEG spec. */

  while (code > htbl->maxcode[l]) {
    code <<= 1;
    CHECK_BIT_BUFFER(*state, 1, return -1);
    code |= GET_BITS(1);
    l++;
  }

  /* Unload the local registers */
  state->get_buffer = get_buffer;
  state->bits_left = bits_left;

  /* With garbage input we may reach the sentinel value l = 17. */

  if (l > 16) {
    WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE);
    return 0;			/* fake a zero as the safest result */
  }

  return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdi, %r14
cmpl %r8d, %edx
jge 0x7e0f0
movq %r14, %rdi
movl %ebp, %ecx
callq 0x7df73
testl %eax, %eax
je 0x7e19d
movq 0x10(%r14), %rsi
movl 0x18(%r14), %edx
subl %ebp, %edx
movq %rsi, %rax
movl %edx, %ecx
sarq %cl, %rax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %ebp, %ecx
shll %cl, %r15d
notl %r15d
andl %eax, %r15d
movslq %ebp, %r12
cmpq %r15, (%rbx,%r12,8)
jge 0x7e15a
testl %edx, %edx
jg 0x7e131
movq %r14, %rdi
movl $0x1, %ecx
callq 0x7df73
testl %eax, %eax
je 0x7e19d
movq 0x10(%r14), %rsi
movl 0x18(%r14), %edx
movq %r15, %rax
addq %r15, %rax
decl %edx
xorl %r15d, %r15d
btq %rdx, %rsi
setb %r15b
orq %rax, %r15
leaq 0x1(%r12), %rax
cmpq 0x8(%rbx,%r12,8), %r15
movq %rax, %r12
jg 0x7e114
movl %eax, %ebp
jmp 0x7e15d
movq %r12, %rax
movq %rsi, 0x10(%r14)
movl %edx, 0x18(%r14)
cmpl $0x11, %ebp
jl 0x7e184
movq 0x20(%r14), %rdi
movq (%rdi), %rax
movl $0x76, 0x28(%rax)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq *0x8(%rax)
xorl %eax, %eax
jmp 0x7e1a2
movq 0x118(%rbx), %rcx
addl 0x90(%rbx,%rax,8), %r15d
movslq %r15d, %rax
movzbl 0x11(%rcx,%rax), %eax
jmp 0x7e1a2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdhuff.c
// Function: jinit_huff_decoder
GLOBAL(void)
jinit_huff_decoder (j_decompress_ptr cinfo)
{
  huff_entropy_ptr entropy;
  int i;

  entropy = (huff_entropy_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(huff_entropy_decoder));
  cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
  entropy->pub.start_pass = start_pass_huff_decoder;
  entropy->pub.decode_mcu = decode_mcu;

  /* Mark tables unallocated */
  for (i = 0; i < NUM_HUFF_TBLS; i++) {
    entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl $0x170, %edx            # imm = 0x170
movl $0x1, %esi
callq *(%rax)
movq %rax, 0x250(%rbx)
leaq 0x23(%rip), %rcx        # 0x7e1f0
movq %rcx, (%rax)
leaq 0x17d(%rip), %rcx       # 0x7e354
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x70(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdphuff.c
// Function: jinit_phuff_decoder
GLOBAL(void)
jinit_phuff_decoder (j_decompress_ptr cinfo)
{
  phuff_entropy_ptr entropy;
  int *coef_bit_ptr;
  int ci, i;

  entropy = (phuff_entropy_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(phuff_entropy_decoder));
  cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
  entropy->pub.start_pass = start_pass_phuff_decoder;

  /* Mark derived tables unallocated */
  for (i = 0; i < NUM_HUFF_TBLS; i++) {
    entropy->derived_tbls[i] = NULL;
  }

  /* Create progression status table */
  cinfo->coef_bits = (int (*)[DCTSIZE2])
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				cinfo->num_components*DCTSIZE2*SIZEOF(int));
  coef_bit_ptr = & cinfo->coef_bits[0][0];
  for (ci = 0; ci < cinfo->num_components; ci++) 
    for (i = 0; i < DCTSIZE2; i++)
      *coef_bit_ptr++ = -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl $0x68, %edx
movl $0x1, %esi
callq *(%rax)
movq %rax, 0x250(%rbx)
leaq 0x5b(%rip), %rcx        # 0x7e85c
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movq 0x8(%rbx), %rax
movslq 0x38(%rbx), %rdx
shlq $0x8, %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq *(%rax)
movq %rax, 0xc0(%rbx)
cmpl $0x0, 0x38(%rbx)
jle 0x7e857
movq %rax, %r14
xorl %ebp, %ebp
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movl $0xff, %esi
callq 0xe260
addq $0x100, %r14            # imm = 0x100
incl %ebp
cmpl 0x38(%rbx), %ebp
jl 0x7e837
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdphuff.c
// Function: decode_mcu_DC_refine
METHODDEF(jboolean)
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{   
  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
  int p1 = 1 << cinfo->Al;	/* 1 in the bit position being coded */
  int blkn;
  JBLOCKROW block;
  BITREAD_STATE_VARS;

  /* Process restart marker if needed; may have to suspend */
  if (cinfo->restart_interval) {
    if (entropy->restarts_to_go == 0)
      if (! process_restart(cinfo))
	return FALSE;
  }

  /* Not worth the cycles to check insufficient_data here,
   * since we will not change the data anyway if we read zeroes.
   */

  /* Load up working state */
  BITREAD_LOAD_STATE(cinfo,entropy->bitstate);

  /* Outer loop handles each block in the MCU */

  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
    block = MCU_data[blkn];

    /* Encoded data is simply the next bit of the two's-complement DC value */
    CHECK_BIT_BUFFER(br_state, 1, return FALSE);
    if (GET_BITS(1))
      (*block)[0] |= p1;
    /* Note: since we use |=, repeating the assignment later is safe */
  }

  /* Completed MCU, so update state */
  BITREAD_SAVE_STATE(cinfo,entropy->bitstate);

  /* Account for restart interval (no-op if not using restarts) */
  entropy->restarts_to_go--;

  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movb 0x218(%rdi), %cl
movl $0x1, %ebp
shll %cl, %ebp
movq %rsi, %r14
movq 0x250(%rdi), %r12
cmpl $0x0, 0x170(%rdi)
je 0x7efd4
cmpl $0x0, 0x3c(%r12)
jne 0x7efd4
movq %rbx, %rdi
callq 0x7f502
testl %eax, %eax
je 0x7f06a
movq %rbx, 0x20(%rsp)
movq 0x28(%rbx), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rdi
movq %rdi, 0x8(%rsp)
movq 0x18(%r12), %rsi
movl 0x20(%r12), %edx
cmpl $0x0, 0x1e0(%rbx)
jle 0x7f04d
xorl %r13d, %r13d
movq (%r14,%r13,8), %r15
testl %edx, %edx
jg 0x7f025
movq %rsp, %rdi
movl $0x1, %ecx
callq 0x7df73
testl %eax, %eax
je 0x7f06a
movq 0x10(%rsp), %rsi
movl 0x18(%rsp), %edx
decl %edx
btq %rdx, %rsi
jae 0x7f031
orw %bp, (%r15)
incq %r13
movslq 0x1e0(%rbx), %rax
cmpq %rax, %r13
jl 0x7f003
movq (%rsp), %rcx
movq 0x8(%rsp), %rdi
movq 0x28(%rbx), %rax
movq %rcx, (%rax)
movq %rdi, 0x8(%rax)
movq %rsi, 0x18(%r12)
movl %edx, 0x20(%r12)
decl 0x3c(%r12)
movl $0x1, %eax
jmp 0x7f06c
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdphuff.c
// Function: process_restart
LOCAL(jboolean)
process_restart (j_decompress_ptr cinfo)
{
  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
  int ci;

  /* Throw away any unused bits remaining in bit buffer; */
  /* include any full bytes in next_marker's count of discarded bytes */
  cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
  entropy->bitstate.bits_left = 0;

  /* Advance past the RSTn marker */
  if (! (*cinfo->marker->read_restart_marker) (cinfo))
    return FALSE;

  /* Re-initialize DC predictions to 0 */
  for (ci = 0; ci < cinfo->comps_in_scan; ci++)
    entropy->saved.last_dc_val[ci] = 0;
  /* Re-init EOB run count, too */
  entropy->saved.EOBRUN = 0;

  /* Reset restart counter */
  entropy->restarts_to_go = cinfo->restart_interval;

  /* Reset out-of-data flag, unless read_restart_marker left us smack up
   * against a marker.  In that case we will end up treating the next data
   * segment as empty, and we can avoid producing bogus output pixels by
   * leaving the flag set.
   */
  if (cinfo->unread_marker == 0)
    entropy->pub.insufficient_data = FALSE;

  return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x248(%rdi), %rax
movq 0x250(%rdi), %r14
movl 0x20(%r14), %ecx
leal 0x7(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x3, %edx
addl %edx, 0x24(%rax)
movl $0x0, 0x20(%r14)
callq *0x10(%rax)
testl %eax, %eax
je 0x7f585
cmpl $0x0, 0x1b0(%rbx)
jle 0x7f55b
xorl %eax, %eax
movl $0x0, 0x2c(%r14,%rax,4)
incq %rax
movslq 0x1b0(%rbx), %rcx
cmpq %rcx, %rax
jl 0x7f543
movl $0x0, 0x28(%r14)
movl 0x170(%rbx), %eax
movl %eax, 0x3c(%r14)
movl $0x1, %eax
cmpl $0x0, 0x21c(%rbx)
jne 0x7f587
movl $0x0, 0x10(%r14)
jmp 0x7f587
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdmainct.c
// Function: process_data_simple_main
METHODDEF(void)
process_data_simple_main (j_decompress_ptr cinfo,
			  JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
			  JDIMENSION out_rows_avail)
{
  my_main_ptr mainp = (my_main_ptr) cinfo->main;
  JDIMENSION rowgroups_avail;

  /* Read input data if we haven't filled the main buffer yet */
  if (! mainp->buffer_full) {
    if (! (*cinfo->coef->decompress_data) (cinfo, mainp->buffer))
      return;			/* suspension forced, can do nothing more */
    mainp->buffer_full = TRUE;	/* OK, we have an iMCU row to work with */
  }

  /* There are always min_DCT_scaled_size row groups in an iMCU row. */
  rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size;
  /* Note: at the bottom of the image, we may pass extra garbage row groups
   * to the postprocessor.  The postprocessor has to check for bottom
   * of image anyway (at row resolution), so no point in us doing it too.
   */

  /* Feed the postprocessor */
  (*cinfo->post->post_process_data) (cinfo, mainp->buffer,
				     &mainp->rowgroup_ctr, rowgroups_avail,
				     output_buf, out_row_ctr, out_rows_avail);

  /* Has postprocessor consumed all the data yet? If so, mark buffer empty */
  if (mainp->rowgroup_ctr >= rowgroups_avail) {
    mainp->buffer_full = FALSE;
    mainp->rowgroup_ctr = 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x228(%rdi), %r13
cmpl $0x0, 0x60(%r13)
jne 0x7fd03
movq 0x230(%r15), %rax
leaq 0x10(%r13), %rsi
movq %r15, %rdi
callq *0x18(%rax)
testl %eax, %eax
je 0x7fd39
movl $0x1, 0x60(%r13)
movl 0x1a0(%r15), %r12d
movq 0x238(%r15), %rax
leaq 0x10(%r13), %rsi
leaq 0x64(%r13), %rdx
movl %ebp, (%rsp)
movq %r15, %rdi
movl %r12d, %ecx
movq %r14, %r8
movq %rbx, %r9
callq *0x8(%rax)
cmpl %r12d, 0x64(%r13)
jb 0x7fd39
movq $0x0, 0x60(%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdcoefct.c
// Function: start_output_pass
METHODDEF(void)
start_output_pass (j_decompress_ptr cinfo)
{
#ifdef BLOCK_SMOOTHING_SUPPORTED
  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;

  /* If multipass, check to see whether to use block smoothing on this pass */
  if (coef->pub.coef_arrays != NULL) {
    if (cinfo->do_block_smoothing && smoothing_ok(cinfo))
      coef->pub.decompress_data = decompress_smooth_data;
    else
      coef->pub.decompress_data = decompress_data;
  }
#endif
  cinfo->output_iMCU_row = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x230(%rdi), %r14
cmpq $0x0, 0x20(%r14)
je 0x80028
cmpl $0x0, 0x68(%rbx)
je 0x8001d
cmpl $0x0, 0x138(%rbx)
je 0x8001d
cmpq $0x0, 0xc0(%rbx)
je 0x8001d
movq 0xd8(%r14), %rax
testq %rax, %rax
jne 0x7ff59
movq 0x8(%rbx), %rax
movslq 0x38(%rbx), %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq *(%rax)
movq %rax, 0xd8(%r14)
cmpl $0x0, 0x38(%rbx)
jle 0x8001d
movq 0x130(%rbx), %rcx
xorl %edx, %edx
movl $0x1, %esi
xorl %edi, %edi
xorl %r8d, %r8d
movq 0x50(%rcx), %r9
testq %r9, %r9
je 0x8001d
cmpw $0x0, (%r9)
je 0x8001d
cmpw $0x0, 0x2(%r9)
je 0x8001d
cmpw $0x0, 0x10(%r9)
je 0x8001d
cmpw $0x0, 0x20(%r9)
je 0x8001d
cmpw $0x0, 0x12(%r9)
je 0x8001d
cmpw $0x0, 0x4(%r9)
je 0x8001d
movq 0xc0(%rbx), %r9
movq %rdi, %r10
shlq $0x8, %r10
cmpl $0x0, (%r9,%r10)
js 0x8001d
addq %rdx, %r9
movl $0x1, %r10d
movl (%r9,%r10,4), %r11d
movl %r11d, (%rax,%r10,4)
testl %r11d, %r11d
cmovnel %esi, %r8d
incq %r10
cmpq $0x6, %r10
jne 0x7ffd8
addq $0x18, %rax
incq %rdi
addq $0x60, %rcx
movslq 0x38(%rbx), %r9
addq $0x100, %rdx            # imm = 0x100
cmpq %r9, %rdi
jl 0x7ff76
testl %r8d, %r8d
je 0x8001d
leaq 0x689(%rip), %rax       # 0x806a4
jmp 0x80024
leaq 0x1cb(%rip), %rax       # 0x801ef
movq %rax, 0x18(%r14)
movl $0x0, 0xb8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdpostct.c
// Function: jinit_d_post_controller
GLOBAL(void)
jinit_d_post_controller (j_decompress_ptr cinfo, jboolean need_full_buffer)
{
  my_post_ptr post;

  post = (my_post_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(my_post_controller));
  cinfo->post = (struct jpeg_d_post_controller *) post;
  post->pub.start_pass = start_pass_dpost;
  post->whole_image = NULL;	/* flag for no virtual arrays */
  post->buffer = NULL;		/* flag for no strip buffer */

  /* Create the quantization buffer, if needed */
  if (cinfo->quantize_colors) {
    /* The buffer strip height is max_v_samp_factor, which is typically
     * an efficient number of rows for upsampling to return.
     * (In the presence of output rescaling, we might want to be smarter?)
     */
    post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor;
    if (need_full_buffer) {
      /* Two-pass color quantization: need full-image storage. */
      /* We round up the number of rows to a multiple of the strip height. */
#ifdef QUANT_2PASS_SUPPORTED
      post->whole_image = (*cinfo->mem->request_virt_sarray)
	((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
	 cinfo->output_width * cinfo->out_color_components,
	 (JDIMENSION) jround_up((long) cinfo->output_height,
				(long) post->strip_height),
	 post->strip_height);
#else
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
#endif /* QUANT_2PASS_SUPPORTED */
    } else {
      /* One-pass color quantization: just make a strip buffer. */
      post->buffer = (*cinfo->mem->alloc_sarray)
	((j_common_ptr) cinfo, JPOOL_IMAGE,
	 cinfo->output_width * cinfo->out_color_components,
	 post->strip_height);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movq 0x8(%rdi), %rax
movl $0x30, %edx
movl $0x1, %esi
callq *(%rax)
movq %rax, %rbx
movq %rax, 0x238(%r14)
leaq 0x7d(%rip), %rax        # 0x80ebb
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
cmpl $0x0, 0x6c(%r14)
je 0x80eb2
movl 0x19c(%r14), %ecx
movl %ecx, 0x20(%rbx)
movl 0x90(%r14), %r15d
imull 0x88(%r14), %r15d
movq 0x8(%r14), %rax
testl %ebp, %ebp
je 0x80ea0
movq 0x20(%rax), %r12
movl 0x8c(%r14), %edi
movq %rcx, %rsi
callq 0x85ca1
movl 0x20(%rbx), %r9d
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
movl %r15d, %ecx
movl %eax, %r8d
callq *%r12
movq %rax, 0x10(%rbx)
jmp 0x80eb2
movq %r14, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq *0x10(%rax)
movq %rax, 0x18(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdpostct.c
// Function: start_pass_dpost
METHODDEF(void)
start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
{
  my_post_ptr post = (my_post_ptr) cinfo->post;

  switch (pass_mode) {
  case JBUF_PASS_THRU:
    if (cinfo->quantize_colors) {
      /* Single-pass processing with color quantization. */
      post->pub.post_process_data = post_process_1pass;
      /* We could be doing buffered-image output before starting a 2-pass
       * color quantization; in that case, jinit_d_post_controller did not
       * allocate a strip buffer.  Use the virtual-array buffer as workspace.
       */
      if (post->buffer == NULL) {
	post->buffer = (*cinfo->mem->access_virt_sarray)
	  ((j_common_ptr) cinfo, post->whole_image,
	   (JDIMENSION) 0, post->strip_height, TRUE);
      }
    } else {
      /* For single-pass processing without color quantization,
       * I have no work to do; just call the upsampler directly.
       */
      post->pub.post_process_data = cinfo->upsample->upsample;
    }
    break;
#ifdef QUANT_2PASS_SUPPORTED
  case JBUF_SAVE_AND_PASS:
    /* First pass of 2-pass quantization */
    if (post->whole_image == NULL)
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    post->pub.post_process_data = post_process_prepass;
    break;
  case JBUF_CRANK_DEST:
    /* Second pass of 2-pass quantization */
    if (post->whole_image == NULL)
      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    post->pub.post_process_data = post_process_2pass;
    break;
#endif /* QUANT_2PASS_SUPPORTED */
  default:
    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
    break;
  }
  post->starting_row = post->next_row = 0;
}

// Assembly:
pushq %rbx
movq 0x238(%rdi), %rbx
cmpl $0x3, %esi
je 0x80f21
cmpl $0x2, %esi
je 0x80f05
testl %esi, %esi
jne 0x80f3d
cmpl $0x0, 0x6c(%rdi)
je 0x80f4b
leaq 0x86(%rip), %rax        # 0x80f64
movq %rax, 0x8(%rbx)
cmpq $0x0, 0x18(%rbx)
jne 0x80f5a
movq 0x8(%rdi), %rax
movq 0x10(%rbx), %rsi
movl 0x20(%rbx), %ecx
xorl %edx, %edx
movl $0x1, %r8d
callq *0x38(%rax)
movq %rax, 0x18(%rbx)
jmp 0x80f5a
cmpq $0x0, 0x10(%rbx)
jne 0x80f18
movq (%rdi), %rax
movl $0x4, 0x28(%rax)
callq *(%rax)
leaq 0x199(%rip), %rax       # 0x810b8
jmp 0x80f56
cmpq $0x0, 0x10(%rbx)
jne 0x80f34
movq (%rdi), %rax
movl $0x4, 0x28(%rax)
callq *(%rax)
leaq 0xaa(%rip), %rax        # 0x80fe5
jmp 0x80f56
movq (%rdi), %rax
movl $0x4, 0x28(%rax)
callq *(%rax)
jmp 0x80f5a
movq 0x260(%rdi), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rbx)
movq $0x0, 0x24(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdpostct.c
// Function: post_process_prepass
METHODDEF(void)
post_process_prepass (j_decompress_ptr cinfo,
		      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
		      JDIMENSION in_row_groups_avail,
		      JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
		      JDIMENSION out_rows_avail)
{
  my_post_ptr post = (my_post_ptr) cinfo->post;
  JDIMENSION old_next_row, num_rows;

  /* Reposition virtual buffer if at start of strip. */
  if (post->next_row == 0) {
    post->buffer = (*cinfo->mem->access_virt_sarray)
	((j_common_ptr) cinfo, post->whole_image,
	 post->starting_row, post->strip_height, TRUE);
  }

  /* Upsample some data (up to a strip height's worth). */
  old_next_row = post->next_row;
  (*cinfo->upsample->upsample) (cinfo,
		input_buf, in_row_group_ctr, in_row_groups_avail,
		post->buffer, &post->next_row, post->strip_height);

  /* Allow quantizer to scan new data.  No data is emitted, */
  /* but we advance out_row_ctr so outer loop can tell when we're done. */
  if (post->next_row > old_next_row) {
    num_rows = post->next_row - old_next_row;
    (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row,
					 (JSAMPARRAY) NULL, (int) num_rows);
    *out_row_ctr += num_rows;
  }

  /* Advance if we filled the strip. */
  if (post->next_row >= post->strip_height) {
    post->starting_row += post->strip_height;
    post->next_row = 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movl %ecx, %r9d
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %r14
movq 0x238(%rdi), %rbx
leaq 0x28(%rbx), %r12
movl 0x28(%rbx), %r15d
testl %r15d, %r15d
je 0x8101e
movq 0x18(%rbx), %r8
jmp 0x81049
movq 0x8(%r14), %rax
movq 0x10(%rbx), %rsi
movl 0x24(%rbx), %edx
movl 0x20(%rbx), %ecx
movq %r14, %rdi
movl $0x1, %r8d
movl %r9d, %r15d
callq *0x38(%rax)
movl %r15d, %r9d
movq %rax, %r8
movq %rax, 0x18(%rbx)
movl 0x28(%rbx), %r15d
movq 0x260(%r14), %rax
movl 0x20(%rbx), %ecx
movl %ecx, (%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl %r9d, %ecx
movq %r12, %r9
callq *0x8(%rax)
movl 0x28(%rbx), %eax
movl %eax, %ebp
subl %r15d, %ebp
jbe 0x81098
movq 0x270(%r14), %rax
movl %r15d, %esi
shlq $0x3, %rsi
addq 0x18(%rbx), %rsi
movq %r14, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq *0x8(%rax)
movq 0x10(%rsp), %rax
addl %ebp, (%rax)
movl 0x28(%rbx), %eax
movl 0x20(%rbx), %ecx
cmpl %ecx, %eax
jb 0x810a9
addl %ecx, 0x24(%rbx)
movl $0x0, 0x28(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdpostct.c
// Function: post_process_2pass
METHODDEF(void)
post_process_2pass (j_decompress_ptr cinfo,
		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
		    JDIMENSION in_row_groups_avail,
		    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
		    JDIMENSION out_rows_avail)
{
  my_post_ptr post = (my_post_ptr) cinfo->post;
  JDIMENSION num_rows, max_rows;

  /* Reposition virtual buffer if at start of strip. */
  if (post->next_row == 0) {
    post->buffer = (*cinfo->mem->access_virt_sarray)
	((j_common_ptr) cinfo, post->whole_image,
	 post->starting_row, post->strip_height, FALSE);
  }

  /* Determine number of rows to emit. */
  num_rows = post->strip_height - post->next_row; /* available in strip */
  max_rows = out_rows_avail - *out_row_ctr; /* available in output area */
  if (num_rows > max_rows)
    num_rows = max_rows;
  /* We have to check bottom of image here, can't depend on upsampler. */
  max_rows = cinfo->output_height - post->starting_row;
  if (num_rows > max_rows)
    num_rows = max_rows;

  /* Quantize and emit data. */
  (*cinfo->cquantize->color_quantize) (cinfo,
		post->buffer + post->next_row, output_buf + *out_row_ctr,
		(int) num_rows);
  *out_row_ctr += num_rows;

  /* Advance if we filled the strip. */
  post->next_row += num_rows;
  if (post->next_row >= post->strip_height) {
    post->starting_row += post->strip_height;
    post->next_row = 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rdi, %r14
movl 0x40(%rsp), %r13d
movq 0x238(%rdi), %r12
movl 0x28(%r12), %ecx
testl %ecx, %ecx
je 0x810e8
movq 0x18(%r12), %rax
jmp 0x8110e
movq 0x8(%r14), %rax
movq 0x10(%r12), %rsi
movl 0x24(%r12), %edx
movl 0x20(%r12), %ecx
movq %r14, %rdi
xorl %r8d, %r8d
callq *0x38(%rax)
movq %rax, 0x18(%r12)
movl 0x28(%r12), %ecx
movl 0x20(%r12), %edx
subl %ecx, %edx
movl (%rbx), %edi
subl %edi, %r13d
cmpl %r13d, %edx
cmovbl %edx, %r13d
movl 0x8c(%r14), %ebp
subl 0x24(%r12), %ebp
cmpl %ebp, %r13d
cmovbl %r13d, %ebp
movq 0x270(%r14), %r8
movl %ecx, %ecx
leaq (%rax,%rcx,8), %rsi
leaq (%r15,%rdi,8), %rdx
movq %r14, %rdi
movl %ebp, %ecx
callq *0x8(%r8)
addl %ebp, (%rbx)
addl 0x28(%r12), %ebp
movl %ebp, 0x28(%r12)
movl 0x20(%r12), %eax
cmpl %eax, %ebp
jb 0x81171
addl %eax, 0x24(%r12)
movl $0x0, 0x28(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jddctmgr.c
// Function: jinit_inverse_dct
GLOBAL(void)
jinit_inverse_dct (j_decompress_ptr cinfo)
{
  my_idct_ptr idct;
  int ci;
  jpeg_component_info *compptr;

  idct = (my_idct_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(my_idct_controller));
  cinfo->idct = (struct jpeg_inverse_dct *) idct;
  idct->pub.start_pass = start_pass;

  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    /* Allocate and pre-zero a multiplier table for each component */
    compptr->dct_table =
      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				  SIZEOF(multiplier_table));
    MEMZERO(compptr->dct_table, SIZEOF(multiplier_table));
    /* Mark multiplier table not yet set up for any method */
    idct->cur_method[ci] = -1;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl $0x80, %edx
movl $0x1, %esi
callq *(%rax)
movq %rax, %r14
movq %rax, 0x258(%rbx)
leaq 0x61(%rip), %rax        # 0x8120d
movq %rax, (%r14)
cmpl $0x0, 0x38(%rbx)
jle 0x81201
movq 0x130(%rbx), %r15
addq $0x58, %r15
xorl %r12d, %r12d
movq 0x8(%rbx), %rax
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movl $0x1, %esi
callq *(%rax)
movq %rax, (%r15)
movl $0x100, %edx            # imm = 0x100
movq %rax, %rdi
xorl %esi, %esi
callq 0xe260
movl $0xffffffff, 0x58(%r14,%r12,4) # imm = 0xFFFFFFFF
incq %r12
movslq 0x38(%rbx), %rax
addq $0x60, %r15
cmpq %rax, %r12
jl 0x811c3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdsample.c
// Function: h2v1_fancy_upsample
METHODDEF(void)
h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
		     JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
  JSAMPARRAY output_data = *output_data_ptr;
  register JSAMPROW inptr, outptr;
  register int invalue;
  register JDIMENSION colctr;
  int inrow;

  for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
    inptr = input_data[inrow];
    outptr = output_data[inrow];
    /* Special case for first column */
    invalue = GETJSAMPLE(*inptr++);
    *outptr++ = (JSAMPLE) invalue;
    *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2);

    for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {
      /* General case: 3/4 * nearer pixel + 1/4 * further pixel */
      invalue = GETJSAMPLE(*inptr++) * 3;
      *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2);
      *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2);
    }

    /* Special case for last column */
    invalue = GETJSAMPLE(*inptr);
    *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2);
    *outptr++ = (JSAMPLE) invalue;
  }
}

// Assembly:
cmpl $0x0, 0x19c(%rdi)
jle 0x82bcb
pushq %rbx
movq (%rcx), %rax
xorl %ecx, %ecx
movq (%rdx,%rcx,8), %r8
movq (%rax,%rcx,8), %r10
leaq 0x1(%r8), %r9
movzbl (%r8), %r11d
movb %r11b, (%r10)
leal (%r11,%r11,2), %r11d
movzbl 0x1(%r8), %r8d
addl %r11d, %r8d
addl $0x2, %r8d
shrl $0x2, %r8d
movb %r8b, 0x1(%r10)
movl 0x28(%rsi), %r11d
leaq 0x2(%r10), %r8
addl $-0x2, %r11d
je 0x82b99
movzbl (%r9), %r10d
leal (%r10,%r10,2), %r10d
movzbl -0x1(%r9), %ebx
addl %r10d, %ebx
incl %ebx
shrl $0x2, %ebx
movb %bl, (%r8)
movzbl 0x1(%r9), %ebx
incq %r9
addl %ebx, %r10d
addl $0x2, %r10d
shrl $0x2, %r10d
movb %r10b, 0x1(%r8)
addq $0x2, %r8
decl %r11d
jne 0x82b5d
leaq -0x2(%r8), %r10
movzbl (%r9), %r11d
leal (%r11,%r11,2), %ebx
movzbl -0x1(%r9), %r9d
addl %ebx, %r9d
incl %r9d
shrl $0x2, %r9d
movb %r9b, (%r8)
movb %r11b, 0x3(%r10)
incq %rcx
movslq 0x19c(%rdi), %r8
cmpq %r8, %rcx
jl 0x82b24
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdsample.c
// Function: h2v1_upsample
METHODDEF(void)
h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
  JSAMPARRAY output_data = *output_data_ptr;
  register JSAMPROW inptr, outptr;
  register JSAMPLE invalue;
  JSAMPROW outend;
  int inrow;

  for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
    inptr = input_data[inrow];
    outptr = output_data[inrow];
    outend = outptr + cinfo->output_width;
    while (outptr < outend) {
      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
      *outptr++ = invalue;
      *outptr++ = invalue;
    }
  }
}

// Assembly:
movl 0x19c(%rdi), %esi
testl %esi, %esi
jle 0x82c24
pushq %rbx
movq (%rcx), %rax
xorl %ecx, %ecx
movl 0x88(%rdi), %r8d
testq %r8, %r8
je 0x82c18
movq (%rax,%rcx,8), %rsi
addq %rsi, %r8
movq (%rdx,%rcx,8), %r9
xorl %r10d, %r10d
movb (%r9,%r10), %r11b
leaq (%rsi,%r10,2), %rbx
addq $0x2, %rbx
movb %r11b, -0x2(%rbx)
movb %r11b, -0x1(%rbx)
incq %r10
cmpq %r8, %rbx
jb 0x82bf6
movl 0x19c(%rdi), %esi
incq %rcx
movslq %esi, %r8
cmpq %r8, %rcx
jl 0x82bdc
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdsample.c
// Function: h2v2_upsample
METHODDEF(void)
h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
  JSAMPARRAY output_data = *output_data_ptr;
  register JSAMPROW inptr, outptr;
  register JSAMPLE invalue;
  JSAMPROW outend;
  int inrow, outrow;

  inrow = outrow = 0;
  while (outrow < cinfo->max_v_samp_factor) {
    inptr = input_data[inrow];
    outptr = output_data[outrow];
    outend = outptr + cinfo->output_width;
    while (outptr < outend) {
      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
      *outptr++ = invalue;
      *outptr++ = invalue;
    }
    jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
		      1, cinfo->output_width);
    inrow++;
    outrow += 2;
  }
}

// Assembly:
cmpl $0x0, 0x19c(%rdi)
jle 0x82e00
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq (%rcx), %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movl 0x88(%r14), %eax
movl $0x0, %r9d
testq %rax, %rax
je 0x82dcd
movq (%r15,%r12,8), %rcx
addq %rcx, %rax
movq (%rbx,%r13,8), %rdx
xorl %esi, %esi
movb (%rdx,%rsi), %dil
leaq (%rcx,%rsi,2), %r8
addq $0x2, %r8
movb %dil, -0x2(%r8)
movb %dil, -0x1(%r8)
incq %rsi
cmpq %rax, %r8
jb 0x82daa
movl 0x88(%r14), %r9d
movl %r12d, %ecx
orl $0x1, %ecx
movq %r15, %rdi
movl %r12d, %esi
movq %r15, %rdx
movl $0x1, %r8d
callq 0x85cb7
incq %r13
addq $0x2, %r12
cmpl %r12d, 0x19c(%r14)
jg 0x82d8b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdsample.c
// Function: int_upsample
METHODDEF(void)
int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
	      JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
  JSAMPARRAY output_data = *output_data_ptr;
  register JSAMPROW inptr, outptr;
  register JSAMPLE invalue;
  register int h;
  JSAMPROW outend;
  int h_expand, v_expand;
  int inrow, outrow;

  h_expand = upsample->h_expand[compptr->component_index];
  v_expand = upsample->v_expand[compptr->component_index];

  inrow = outrow = 0;
  while (outrow < cinfo->max_v_samp_factor) {
    /* Generate one output row with proper horizontal expansion */
    inptr = input_data[inrow];
    outptr = output_data[outrow];
    outend = outptr + cinfo->output_width;
    while (outptr < outend) {
      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
      for (h = h_expand; h > 0; h--) {
	*outptr++ = invalue;
      }
    }
    /* Generate any additional output rows by duplicating the first one */
    if (v_expand > 1) {
      jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
			v_expand-1, cinfo->output_width);
    }
    inrow++;
    outrow += v_expand;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x20(%rsp)
cmpl $0x0, 0x19c(%rdi)
jle 0x82ef9
movq %rdi, %rbx
movq (%rcx), %rax
movq %rax, 0x10(%rsp)
movq 0x260(%rdi), %rax
movslq 0x4(%rsi), %rcx
movzbl 0xf2(%rax,%rcx), %r14d
movzbl 0xe8(%rax,%rcx), %r12d
leal -0x1(%r14), %eax
movl %eax, 0xc(%rsp)
movl %r12d, %r15d
decl %r15d
incq %r15
movq $0x0, 0x18(%rsp)
xorl %r13d, %r13d
movq %rdi, 0x30(%rsp)
movq %r14, 0x28(%rsp)
movl 0x88(%rbx), %r14d
testq %r14, %r14
je 0x82eb4
movq 0x10(%rsp), %rax
movq (%rax,%r13,8), %rbp
addq %rbp, %r14
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rbx
testq %r12, %r12
je 0x82eac
movzbl (%rbx), %esi
movq %rbp, %rdi
movq %r12, %rdx
callq 0xe260
addq %r15, %rbp
incq %rbx
cmpq %r14, %rbp
jb 0x82e96
movq 0x28(%rsp), %r14
cmpb $0x2, %r14b
movq 0x30(%rsp), %rbx
jb 0x82ee4
leal 0x1(%r13), %ecx
movl 0x88(%rbx), %r9d
movq 0x10(%rsp), %rdi
movl %r13d, %esi
movq %rdi, %rdx
movl 0xc(%rsp), %r8d
callq 0x85cb7
incq 0x18(%rsp)
addq %r14, %r13
cmpl %r13d, 0x19c(%rbx)
jg 0x82e70
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdcolor.c
// Function: ycc_rgb_convert
METHODDEF(void)
ycc_rgb_convert (j_decompress_ptr cinfo,
		 JSAMPIMAGE input_buf, JDIMENSION input_row,
		 JSAMPARRAY output_buf, int num_rows)
{
  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
  register int y, cb, cr;
  register JSAMPROW outptr;
  register JSAMPROW inptr0, inptr1, inptr2;
  register JDIMENSION col;
  JDIMENSION num_cols = cinfo->output_width;
  /* copy these pointers into registers if possible */
  register JSAMPLE * range_limit = cinfo->sample_range_limit;
  register int * Crrtab = cconvert->Cr_r_tab;
  register int * Cbbtab = cconvert->Cb_b_tab;
  register INT32 * Crgtab = cconvert->Cr_g_tab;
  register INT32 * Cbgtab = cconvert->Cb_g_tab;
  SHIFT_TEMPS

  while (--num_rows >= 0) {
    inptr0 = input_buf[0][input_row];
    inptr1 = input_buf[1][input_row];
    inptr2 = input_buf[2][input_row];
    input_row++;
    outptr = *output_buf++;
    for (col = 0; col < num_cols; col++) {
      y  = GETJSAMPLE(inptr0[col]);
      cb = GETJSAMPLE(inptr1[col]);
      cr = GETJSAMPLE(inptr2[col]);
      /* Range-limiting is essential due to noise introduced by DCT losses. */
      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
      outptr[RGB_GREEN] = range_limit[y +
			      ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
						 SCALEBITS))];
      outptr[RGB_BLUE] =  range_limit[y + Cbbtab[cb]];
      outptr += RGB_PIXELSIZE;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, -0x18(%rsp)
movl %edx, -0x1c(%rsp)
movq %rsi, -0x10(%rsp)
testl %r8d, %r8d
jle 0x83296
movq 0x1a8(%rdi), %rax
movq 0x268(%rdi), %rbx
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %r10
movq 0x20(%rbx), %r11
movq 0x28(%rbx), %rbx
movl 0x88(%rdi), %edi
movq %r8, -0x8(%rsp)
testq %rdi, %rdi
je 0x83278
movl -0x1c(%rsp), %r12d
movq -0x10(%rsp), %rcx
movq (%rcx), %r14
movq 0x8(%rcx), %r15
movq (%r14,%r12,8), %r14
movq (%r15,%r12,8), %r15
movq 0x10(%rcx), %r13
movq (%r13,%r12,8), %r12
movq -0x18(%rsp), %rcx
movq (%rcx), %r13
xorl %ebp, %ebp
movzbl (%r14,%rbp), %r9d
movzbl (%r15,%rbp), %esi
movzbl (%r12,%rbp), %r8d
movslq (%rdx,%r8,4), %rcx
addq %r9, %rcx
movb (%rax,%rcx), %cl
movb %cl, (%r13)
movq (%r11,%r8,8), %rcx
addq (%rbx,%rsi,8), %rcx
shrq $0x10, %rcx
movslq %ecx, %rcx
addq %r9, %rcx
movb (%rax,%rcx), %cl
movb %cl, 0x1(%r13)
movslq (%r10,%rsi,4), %rcx
addq %r9, %rcx
movb (%rax,%rcx), %cl
movb %cl, 0x2(%r13)
addq $0x3, %r13
incq %rbp
cmpq %rbp, %rdi
jne 0x83228
movq -0x8(%rsp), %rcx
leal -0x1(%rcx), %ebp
incl -0x1c(%rsp)
addq $0x8, -0x18(%rsp)
cmpl $0x2, %ecx
movl %ebp, %r8d
jge 0x831f2
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdcolor.c
// Function: gray_rgb_convert
METHODDEF(void)
gray_rgb_convert (j_decompress_ptr cinfo,
		  JSAMPIMAGE input_buf, JDIMENSION input_row,
		  JSAMPARRAY output_buf, int num_rows)
{
  register JSAMPROW inptr, outptr;
  register JDIMENSION col;
  JDIMENSION num_cols = cinfo->output_width;

  while (--num_rows >= 0) {
    inptr = input_buf[0][input_row++];
    outptr = *output_buf++;
    for (col = 0; col < num_cols; col++) {
      /* We can dispense with GETJSAMPLE() here */
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
      outptr += RGB_PIXELSIZE;
    }
  }
}

// Assembly:
testl %r8d, %r8d
jle 0x833d2
movl 0x88(%rdi), %eax
testq %rax, %rax
je 0x833bf
movq (%rsi), %rdi
movl %edx, %r9d
movq (%rdi,%r9,8), %rdi
movq (%rcx), %r9
addq $0x2, %r9
xorl %r10d, %r10d
movb (%rdi,%r10), %r11b
movb %r11b, (%r9)
movb %r11b, -0x1(%r9)
movb %r11b, -0x2(%r9)
incq %r10
addq $0x3, %r9
cmpq %r10, %rax
jne 0x833a4
leal -0x1(%r8), %edi
incl %edx
addq $0x8, %rcx
cmpl $0x2, %r8d
movl %edi, %r8d
jge 0x8338b
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdcolor.c
// Function: null_convert
METHODDEF(void)
null_convert (j_decompress_ptr cinfo,
	      JSAMPIMAGE input_buf, JDIMENSION input_row,
	      JSAMPARRAY output_buf, int num_rows)
{
  register JSAMPROW inptr, outptr;
  register JDIMENSION count;
  register int num_components = cinfo->num_components;
  JDIMENSION num_cols = cinfo->output_width;
  int ci;

  while (--num_rows >= 0) {
    for (ci = 0; ci < num_components; ci++) {
      inptr = input_buf[ci][input_row];
      outptr = output_buf[0] + ci;
      for (count = num_cols; count > 0; count--) {
	*outptr = *inptr++;	/* needn't bother with GETJSAMPLE() here */
	outptr += num_components;
      }
    }
    input_row++;
    output_buf++;
  }
}

// Assembly:
testl %r8d, %r8d
jle 0x8343d
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl 0x88(%rdi), %eax
movl 0x38(%rdi), %edi
movslq %edi, %r9
testl %edi, %edi
jle 0x83424
movl %edx, %r10d
xorl %r11d, %r11d
testq %rax, %rax
je 0x8341c
movq (%rcx), %rbx
addq %r11, %rbx
movq (%rsi,%r11,8), %r14
movq (%r14,%r10,8), %r14
xorl %r15d, %r15d
movb (%r14,%r15), %bpl
movb %bpl, (%rbx)
addq %r9, %rbx
incq %r15
cmpl %r15d, %eax
jne 0x8340a
incq %r11
cmpq %rdi, %r11
jne 0x833f4
leal -0x1(%r8), %r10d
incl %edx
addq $0x8, %rcx
cmpl $0x1, %r8d
movl %r10d, %r8d
jg 0x833ea
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jquant1.c
// Function: alloc_fs_workspace
LOCAL(void)
alloc_fs_workspace (j_decompress_ptr cinfo)
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  size_t arraysize;
  int i;

  arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
  for (i = 0; i < cinfo->out_color_components; i++) {
    cquantize->fserrors[i] = (FSERRPTR)
      (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
  }
}

// Assembly:
cmpl $0x0, 0x90(%rdi)
jle 0x83d68
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x88(%rdi), %r14d
addl $0x2, %r14d
addq %r14, %r14
movq 0x270(%rdi), %r15
xorl %r12d, %r12d
movq 0x8(%rbx), %rax
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq *0x8(%rax)
movq %rax, 0x70(%r15,%r12,8)
incq %r12
movslq 0x90(%rbx), %rax
cmpq %rax, %r12
jl 0x83d37
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jquant1.c
// Function: color_quantize3
METHODDEF(void)
color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
		 JSAMPARRAY output_buf, int num_rows)
/* Fast path for out_color_components==3, no dithering */
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  register int pixcode;
  register JSAMPROW ptrin, ptrout;
  JSAMPROW colorindex0 = cquantize->colorindex[0];
  JSAMPROW colorindex1 = cquantize->colorindex[1];
  JSAMPROW colorindex2 = cquantize->colorindex[2];
  int row;
  JDIMENSION col;
  JDIMENSION width = cinfo->output_width;

  for (row = 0; row < num_rows; row++) {
    ptrin = input_buf[row];
    ptrout = output_buf[row];
    for (col = width; col > 0; col--) {
      pixcode  = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]);
      pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]);
      pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]);
      *ptrout++ = (JSAMPLE) pixcode;
    }
  }
}

// Assembly:
testl %ecx, %ecx
jle 0x83de0
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x270(%rdi), %rax
movq 0x30(%rax), %r9
movq (%r9), %rax
movq 0x8(%r9), %r8
movq 0x10(%r9), %r9
movl 0x88(%rdi), %edi
movl %ecx, %ecx
xorl %r10d, %r10d
testq %rdi, %rdi
je 0x83dd0
movq (%rdx,%r10,8), %r11
movq (%rsi,%r10,8), %rbx
xorl %r14d, %r14d
movzbl (%rbx), %r15d
movzbl 0x1(%rbx), %r12d
movb (%r8,%r12), %bpl
addb (%rax,%r15), %bpl
movzbl 0x2(%rbx), %r15d
addb (%r9,%r15), %bpl
movb %bpl, (%r11,%r14)
incq %r14
addq $0x3, %rbx
cmpl %r14d, %edi
jne 0x83da6
incq %r10
cmpq %rcx, %r10
jne 0x83d96
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jquant1.c
// Function: color_quantize
METHODDEF(void)
color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
		JSAMPARRAY output_buf, int num_rows)
/* General case, no dithering */
{
  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
  JSAMPARRAY colorindex = cquantize->colorindex;
  register int pixcode, ci;
  register JSAMPROW ptrin, ptrout;
  int row;
  JDIMENSION col;
  JDIMENSION width = cinfo->output_width;
  register int nc = cinfo->out_color_components;

  for (row = 0; row < num_rows; row++) {
    ptrin = input_buf[row];
    ptrout = output_buf[row];
    for (col = width; col > 0; col--) {
      pixcode = 0;
      for (ci = 0; ci < nc; ci++) {
	pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]);
      }
      *ptrout++ = (JSAMPLE) pixcode;
    }
  }
}

// Assembly:
testl %ecx, %ecx
jle 0x83e6a
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x270(%rdi), %rax
movq 0x30(%rax), %rax
movl 0x88(%rdi), %r8d
movl 0x90(%rdi), %edi
leal -0x1(%rdi), %r9d
incq %r9
movl %ecx, %ecx
xorl %r10d, %r10d
testl %r8d, %r8d
je 0x83e58
movq (%rdx,%r10,8), %r11
movq (%rsi,%r10,8), %rbx
movl %r8d, %ebp
testl %edi, %edi
jle 0x83e4b
xorl %r15d, %r15d
xorl %r14d, %r14d
movq (%rax,%r15,8), %r12
movzbl (%rbx,%r15), %r13d
addb (%r12,%r13), %r14b
incq %r15
cmpq %r15, %rdi
jne 0x83e31
addq %r9, %rbx
jmp 0x83e4e
xorl %r14d, %r14d
movb %r14b, (%r11)
incq %r11
decl %ebp
jne 0x83e27
incq %r10
cmpq %rcx, %r10
jne 0x83e17
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq