LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNError.cpp
// Function: gaps::RNWarning(char const*, ...)
void RNWarning(const char *fmt, ...)
{
    /* Check error level */
    if (RNerror_level > 0) return;

#if (0) && (RN_OS == RN_WINDOWS)
    /* Display error message */
    char outbuf[256];
    outbuf[0] = '\0';
    if (fmt) {
	char buf[256];
        va_list args;
        va_start(args, fmt);
        vsprintf(buf, fmt, args);
	strcat(outbuf, buf);
        va_end(args);
        strcat(outbuf, "\n");
    }
    MessageBox(NULL, outbuf, "GAPS WARNING", MB_OK);
#endif
    
    /* Print error message */
    if (RNerror_file) {
        // perror("GAPS WARNING");
        if (fmt) {
	    va_list args;
	    va_start(args, fmt);
	    vfprintf(RNerror_file, fmt, args);
	    va_end(args);
	    fprintf(RNerror_file, "\n");
	}
    }
}

// Assembly:
subq $0xd8, %rsp
testb %al, %al
je 0x71acf
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testq %rdi, %rdi
je 0x71b43
cmpl $0x0, 0x476cf4(%rip)    # 0x4e87e8
jg 0x71b43
movq %rdi, %r10
movq 0x476ce0(%rip), %rdi    # 0x4e87e0
testq %rdi, %rdi
je 0x71b43
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq %r10, %rsi
callq 0xe5f0
movq 0x476ca7(%rip), %rsi    # 0x4e87e0
movl $0xa, %edi
callq 0xe5a0
addq $0xd8, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcapimin.c
// Function: jpeg_CreateCompress
GLOBAL(void)
jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
{
  int i;

  /* Guard against version mismatches between library and caller. */
  cinfo->mem = NULL;		/* so jpeg_destroy knows mem mgr not called */
  if (version != JPEG_LIB_VERSION)
    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
  if (structsize != SIZEOF(struct jpeg_compress_struct))
    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
	     (int) SIZEOF(struct jpeg_compress_struct), (int) structsize);

  /* For debugging purposes, we zero the whole master structure.
   * But the application has already set the err pointer, and may have set
   * client_data, so we have to save and restore those fields.
   * Note: if application hasn't set client_data, tools like Purify may
   * complain here.
   */
  {
    struct jpeg_error_mgr * err = cinfo->err;
    void * client_data = cinfo->client_data; /* ignore Purify complaint here */
    MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct));
    cinfo->err = err;
    cinfo->client_data = client_data;
  }
  cinfo->is_decompressor = FALSE;

  /* Initialize a memory manager instance for this object */
  jinit_memory_mgr((j_common_ptr) cinfo);

  /* Zero out pointers to permanent structures. */
  cinfo->progress = NULL;
  cinfo->dest = NULL;

  cinfo->comp_info = NULL;

  for (i = 0; i < NUM_QUANT_TBLS; i++)
    cinfo->quant_tbl_ptrs[i] = NULL;

  for (i = 0; i < NUM_HUFF_TBLS; i++) {
    cinfo->dc_huff_tbl_ptrs[i] = NULL;
    cinfo->ac_huff_tbl_ptrs[i] = NULL;
  }

  cinfo->script_space = NULL;

  cinfo->input_gamma = 1.0;	/* in case application forgets */

  /* OK, I'm ready */
  cinfo->global_state = CSTATE_START;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
cmpl $0x3e, %esi
je 0x71b86
movq (%rbx), %rax
movabsq $0x3e0000000c, %rcx     # imm = 0x3E0000000C
movq %rcx, 0x28(%rax)
movq (%rbx), %rax
movl %esi, 0x30(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
cmpq $0x208, %r14            # imm = 0x208
je 0x71baf
movq (%rbx), %rax
movabsq $0x20800000015, %rcx    # imm = 0x20800000015
movq %rcx, 0x28(%rax)
movq (%rbx), %rax
movl %r14d, 0x30(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq (%rbx), %r14
movq 0x18(%rbx), %r15
leaq 0x8(%rbx), %rdi
xorl %r12d, %r12d
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0xe260
movq %r14, (%rbx)
movq %r15, 0x18(%rbx)
movq %rbx, %rdi
callq 0x85ed0
movq %r12, 0x10(%rbx)
movq %r12, 0x28(%rbx)
movq %r12, 0x1f8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0xa8(%rbx)
movq %r12, 0xb8(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x40(%rbx)
movl $0x64, 0x24(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcapimin.c
// Function: jpeg_suppress_tables
GLOBAL(void)
jpeg_suppress_tables (j_compress_ptr cinfo, jboolean suppress)
{
  int i;
  JQUANT_TBL * qtbl;
  JHUFF_TBL * htbl;

  for (i = 0; i < NUM_QUANT_TBLS; i++) {
    if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL)
      qtbl->sent_table = suppress;
  }

  for (i = 0; i < NUM_HUFF_TBLS; i++) {
    if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL)
      htbl->sent_table = suppress;
    if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL)
      htbl->sent_table = suppress;
  }
}

// Assembly:
xorl %eax, %eax
movq 0x60(%rdi,%rax,8), %rcx
testq %rcx, %rcx
je 0x71c4f
movl %esi, 0x80(%rcx)
incq %rax
cmpq $0x4, %rax
jne 0x71c3f
movq $-0x4, %rax
movq 0xa0(%rdi,%rax,8), %rcx
testq %rcx, %rcx
je 0x71c72
movl %esi, 0x114(%rcx)
movq 0xc0(%rdi,%rax,8), %rcx
testq %rcx, %rcx
je 0x71c85
movl %esi, 0x114(%rcx)
incq %rax
jne 0x71c5f
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcapimin.c
// Function: jpeg_finish_compress
GLOBAL(void)
jpeg_finish_compress (j_compress_ptr cinfo)
{
  JDIMENSION iMCU_row;

  if (cinfo->global_state == CSTATE_SCANNING ||
      cinfo->global_state == CSTATE_RAW_OK) {
    /* Terminate first pass */
    if (cinfo->next_scanline < cinfo->image_height)
      ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
    (*cinfo->master->finish_pass) (cinfo);
  } else if (cinfo->global_state != CSTATE_WRCOEFS)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
  /* Perform any remaining passes */
  while (! cinfo->master->is_last_pass) {
    (*cinfo->master->prepare_for_pass) (cinfo);
    for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) {
      if (cinfo->progress != NULL) {
	cinfo->progress->pass_counter = (long) iMCU_row;
	cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows;
	(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
      }
      /* We bypass the main controller and invoke coef controller directly;
       * all work is being done from the coefficient buffer.
       */
      if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL))
	ERREXIT(cinfo, JERR_CANT_SUSPEND);
    }
    (*cinfo->master->finish_pass) (cinfo);
  }
  /* Write EOI, do final cleanup */
  (*cinfo->marker->write_file_trailer) (cinfo);
  (*cinfo->dest->term_destination) (cinfo);
  /* We can use jpeg_abort to release memory and reset global_state */
  jpeg_abort((j_common_ptr) cinfo);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x24(%rdi), %eax
leal -0x65(%rax), %ecx
cmpl $0x2, %ecx
jae 0x71cc4
movl 0x130(%rbx), %eax
cmpl 0x34(%rbx), %eax
jae 0x71cb7
movq (%rbx), %rax
movl $0x43, 0x28(%rax)
movq %rbx, %rdi
callq *(%rax)
movq 0x1b0(%rbx), %rax
addq $0x10, %rax
jmp 0x71cd9
cmpl $0x67, %eax
je 0x71d47
movq (%rbx), %rcx
movl $0x14, 0x28(%rcx)
movl %eax, 0x2c(%rcx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
jmp 0x71d47
movq %rbx, %rdi
callq *(%rax)
movl 0x140(%rbx), %eax
testl %eax, %eax
je 0x71d3a
xorl %r14d, %r14d
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x71d0a
movq %r14, 0x8(%rcx)
movl %eax, %eax
movq %rax, 0x10(%rcx)
movq %rbx, %rdi
callq *(%rcx)
movq 0x1c8(%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x8(%rax)
testl %eax, %eax
jne 0x71d2c
movq (%rbx), %rax
movl $0x18, 0x28(%rax)
movq %rbx, %rdi
callq *(%rax)
incq %r14
movl 0x140(%rbx), %eax
cmpq %rax, %r14
jb 0x71cf2
movq 0x1b0(%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x1b0(%rbx), %rax
cmpl $0x0, 0x1c(%rax)
je 0x71ce0
movq 0x1d0(%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq 0x28(%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x85c04
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcapimin.c
// Function: jpeg_write_marker
GLOBAL(void)
jpeg_write_marker (j_compress_ptr cinfo, int marker,
		   const JOCTET *dataptr, unsigned int datalen)
{
  JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val));

  if (cinfo->next_scanline != 0 ||
      (cinfo->global_state != CSTATE_SCANNING &&
       cinfo->global_state != CSTATE_RAW_OK &&
       cinfo->global_state != CSTATE_WRCOEFS))
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
  write_marker_byte = cinfo->marker->write_marker_byte;	/* copy for speed */
  while (datalen--) {
    (*write_marker_byte) (cinfo, *dataptr);
    dataptr++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
cmpl $0x0, 0x130(%rdi)
sete %cl
movl 0x24(%rdi), %eax
leal -0x65(%rax), %edx
cmpl $0x3, %edx
setb %dl
testb %dl, %cl
jne 0x71dbf
movq (%r14), %rcx
movl $0x14, 0x28(%rcx)
movl %eax, 0x2c(%rcx)
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
movq 0x1d0(%r14), %rax
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq *0x28(%rax)
testl %ebp, %ebp
je 0x71df9
movq 0x1d0(%r14), %rax
movq 0x30(%rax), %r15
movl %ebp, %r12d
xorl %r13d, %r13d
movzbl (%rbx,%r13), %esi
movq %r14, %rdi
callq *%r15
incq %r13
cmpl %r13d, %r12d
jne 0x71de6
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/jcapimin.c
// Function: jpeg_write_tables
GLOBAL(void)
jpeg_write_tables (j_compress_ptr cinfo)
{
  if (cinfo->global_state != CSTATE_START)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  /* (Re)initialize error mgr and destination modules */
  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
  (*cinfo->dest->init_destination) (cinfo);
  /* Initialize the marker writer ... bit of a crock to do it here. */
  jinit_marker_writer(cinfo);
  /* Write them tables! */
  (*cinfo->marker->write_tables_only) (cinfo);
  /* And clean up. */
  (*cinfo->dest->term_destination) (cinfo);
  /*
   * In library releases up through v6a, we called jpeg_abort() here to free
   * any working memory allocated by the destination manager and marker
   * writer.  Some applications had a problem with that: they allocated space
   * of their own from the library memory manager, and didn't want it to go
   * away during write_tables.  So now we do nothing.  This will cause a
   * memory leak if an app calls write_tables repeatedly without doing a full
   * compression cycle or otherwise resetting the JPEG object.  However, that
   * seems less bad than unexpectedly freeing memory in the normal case.
   * An app that prefers the old behavior can call jpeg_abort for itself after
   * each call to jpeg_write_tables().
   */
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x24(%rdi), %eax
cmpl $0x64, %eax
je 0x71e88
movq (%rbx), %rcx
movl $0x14, 0x28(%rcx)
movl %eax, 0x2c(%rcx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq 0x28(%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %rbx, %rdi
callq 0x73a58
movq 0x1d0(%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq 0x28(%rbx), %rax
movq %rbx, %rdi
popq %rbx
jmpq *0x20(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcapistd.c
// Function: jpeg_start_compress
GLOBAL(void)
jpeg_start_compress (j_compress_ptr cinfo, jboolean write_all_tables)
{
  if (cinfo->global_state != CSTATE_START)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  if (write_all_tables)
    jpeg_suppress_tables(cinfo, FALSE);	/* mark all tables to be written */

  /* (Re)initialize error mgr and destination modules */
  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
  (*cinfo->dest->init_destination) (cinfo);
  /* Perform master selection of active modules */
  jinit_compress_master(cinfo);
  /* Set up for the first pass */
  (*cinfo->master->prepare_for_pass) (cinfo);
  /* Ready for application to drive first pass through jpeg_write_scanlines
   * or jpeg_write_raw_data.
   */
  cinfo->next_scanline = 0;
  cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x24(%rdi), %eax
cmpl $0x64, %eax
je 0x71ee1
movq (%rbx), %rcx
movl $0x14, 0x28(%rcx)
movl %eax, 0x2c(%rcx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
testl %ebp, %ebp
je 0x71eef
movq %rbx, %rdi
xorl %esi, %esi
callq 0x71c3d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq 0x28(%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %rbx, %rdi
callq 0x72cc4
movq 0x1b0(%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl $0x0, 0x130(%rbx)
cmpl $0x1, 0x100(%rbx)
movl $0x66, %eax
sbbl $0x0, %eax
movl %eax, 0x24(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcapistd.c
// Function: jpeg_write_scanlines
GLOBAL(JDIMENSION)
jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines,
		      JDIMENSION num_lines)
{
  JDIMENSION row_ctr, rows_left;

  if (cinfo->global_state != CSTATE_SCANNING)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
  if (cinfo->next_scanline >= cinfo->image_height)
    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);

  /* Call progress monitor hook if present */
  if (cinfo->progress != NULL) {
    cinfo->progress->pass_counter = (long) cinfo->next_scanline;
    cinfo->progress->pass_limit = (long) cinfo->image_height;
    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
  }

  /* Give master control module another chance if this is first call to
   * jpeg_write_scanlines.  This lets output of the frame/scan headers be
   * delayed so that application can write COM, etc, markers between
   * jpeg_start_compress and jpeg_write_scanlines.
   */
  if (cinfo->master->call_pass_startup)
    (*cinfo->master->pass_startup) (cinfo);

  /* Ignore any extra scanlines at bottom of image. */
  rows_left = cinfo->image_height - cinfo->next_scanline;
  if (num_lines > rows_left)
    num_lines = rows_left;

  row_ctr = 0;
  (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines);
  cinfo->next_scanline += row_ctr;
  return row_ctr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x24(%rdi), %eax
cmpl $0x65, %eax
je 0x71f65
movq (%rbx), %rcx
movl $0x14, 0x28(%rcx)
movl %eax, 0x2c(%rcx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl 0x130(%rbx), %eax
cmpl 0x34(%rbx), %eax
jb 0x71f85
movq (%rbx), %rax
movl $0x7b, 0x28(%rax)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq *0x8(%rax)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x71fa4
movl 0x130(%rbx), %ecx
movq %rcx, 0x8(%rax)
movl 0x34(%rbx), %ecx
movq %rcx, 0x10(%rax)
movq %rbx, %rdi
callq *(%rax)
movq 0x1b0(%rbx), %rax
cmpl $0x0, 0x18(%rax)
je 0x71fb7
movq %rbx, %rdi
callq *0x8(%rax)
movl 0x34(%rbx), %ecx
subl 0x130(%rbx), %ecx
cmpl %ebp, %ecx
cmovael %ebp, %ecx
leaq 0x4(%rsp), %r15
movl $0x0, (%r15)
movq 0x1b8(%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x8(%rax)
movl (%r15), %eax
addl %eax, 0x130(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcapistd.c
// Function: jpeg_write_raw_data
GLOBAL(JDIMENSION)
jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
		     JDIMENSION num_lines)
{
  JDIMENSION lines_per_iMCU_row;

  if (cinfo->global_state != CSTATE_RAW_OK)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
  if (cinfo->next_scanline >= cinfo->image_height) {
    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);
    return 0;
  }

  /* Call progress monitor hook if present */
  if (cinfo->progress != NULL) {
    cinfo->progress->pass_counter = (long) cinfo->next_scanline;
    cinfo->progress->pass_limit = (long) cinfo->image_height;
    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
  }

  /* Give master control module another chance if this is first call to
   * jpeg_write_raw_data.  This lets output of the frame/scan headers be
   * delayed so that application can write COM, etc, markers between
   * jpeg_start_compress and jpeg_write_raw_data.
   */
  if (cinfo->master->call_pass_startup)
    (*cinfo->master->pass_startup) (cinfo);

  /* Verify that at least one iMCU row has been passed. */
  lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE;
  if (num_lines < lines_per_iMCU_row)
    ERREXIT(cinfo, JERR_BUFFER_SIZE);

  /* Directly compress the row. */
  if (! (*cinfo->coef->compress_data) (cinfo, data)) {
    /* If compressor did not consume the whole row, suspend processing. */
    return 0;
  }

  /* OK, we processed one iMCU row. */
  cinfo->next_scanline += lines_per_iMCU_row;
  return lines_per_iMCU_row;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x24(%rdi), %eax
cmpl $0x66, %eax
je 0x72024
movq (%rbx), %rcx
movl $0x14, 0x28(%rcx)
movl %eax, 0x2c(%rcx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl 0x34(%rbx), %eax
movl 0x130(%rbx), %ecx
cmpl %eax, %ecx
jae 0x72096
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x72047
movq %rcx, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movq %rbx, %rdi
callq *(%rdx)
movq 0x1b0(%rbx), %rax
cmpl $0x0, 0x18(%rax)
je 0x7205a
movq %rbx, %rdi
callq *0x8(%rax)
movl 0x13c(%rbx), %r15d
shll $0x3, %r15d
cmpl %ebp, %r15d
jbe 0x72079
movq (%rbx), %rax
movl $0x17, 0x28(%rax)
movq %rbx, %rdi
callq *(%rax)
movq 0x1c8(%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x8(%rax)
testl %eax, %eax
je 0x720ab
addl %r15d, 0x130(%rbx)
jmp 0x720ae
movq (%rbx), %rax
movl $0x7b, 0x28(%rax)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq *0x8(%rax)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcparam.c
// Function: jpeg_add_quant_table
GLOBAL(void)
jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
		      const unsigned int *basic_table,
		      int scale_factor, jboolean force_baseline)
/* Define a quantization table equal to the basic_table times
 * a scale factor (given as a percentage).
 * If force_baseline is TRUE, the computed quantization table entries
 * are limited to 1..255 for JPEG baseline compatibility.
 */
{
  JQUANT_TBL ** qtblptr;
  int i;
  long temp;

  /* Safety check to ensure start_compress not called yet. */
  if (cinfo->global_state != CSTATE_START)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS)
    ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl);

  qtblptr = & cinfo->quant_tbl_ptrs[which_tbl];

  if (*qtblptr == NULL)
    *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo);

  for (i = 0; i < DCTSIZE2; i++) {
    temp = ((long) basic_table[i] * scale_factor + 50L) / 100L;
    /* limit the values to the valid range */
    if (temp <= 0L) temp = 1L;
    if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */
    if (force_baseline && temp > 255L)
      temp = 255L;		/* limit to baseline range if requested */
    (*qtblptr)->quantval[i] = (UINT16) temp;
  }

  /* Initialize sent_table FALSE so table will be written to JPEG file. */
  (*qtblptr)->sent_table = FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r15
movl 0x24(%rdi), %eax
cmpl $0x64, %eax
je 0x720ef
movq (%r15), %rcx
movl $0x14, 0x28(%rcx)
movl %eax, 0x2c(%rcx)
movq (%r15), %rax
movq %r15, %rdi
callq *(%rax)
cmpl $0x4, %r12d
jb 0x7210b
movq (%r15), %rax
movl $0x1f, 0x28(%rax)
movl %r12d, 0x2c(%rax)
movq (%r15), %rax
movq %r15, %rdi
callq *(%rax)
movslq %r12d, %r12
movq 0x60(%r15,%r12,8), %rcx
testq %rcx, %rcx
jne 0x72128
movq %r15, %rdi
callq 0x85c60
movq %rax, %rcx
movq %rax, 0x60(%r15,%r12,8)
movslq %ebp, %rsi
xorl %edi, %edi
movabsq $-0x5c28f5c28f5c28f5, %r8 # imm = 0xA3D70A3D70A3D70B
movl $0xff, %r9d
movl (%r14,%rdi,4), %r10d
imulq %rsi, %r10
leaq 0x32(%r10), %rax
imulq %r8
leaq (%rdx,%r10), %rax
addq $0x32, %rax
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x6, %rax
addq %rdx, %rax
cmpq $0x2, %rax
jge 0x7216d
movl $0x1, %eax
movl $0x7fff, %edx           # imm = 0x7FFF
cmpq %rdx, %rax
jl 0x7217c
movl $0x7fff, %eax           # imm = 0x7FFF
cmpq $0x63ce, %r10           # imm = 0x63CE
movl %eax, %edx
cmovgel %r9d, %edx
testl %ebx, %ebx
cmovel %eax, %edx
movw %dx, (%rcx,%rdi,2)
incq %rdi
cmpq $0x40, %rdi
jne 0x7213d
movl $0x0, 0x80(%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcparam.c
// Function: jpeg_set_quality
GLOBAL(void)
jpeg_set_quality (j_compress_ptr cinfo, int quality, jboolean force_baseline)
/* Set or change the 'quality' (quantization) setting, using default tables.
 * This is the standard quality-adjusting entry point for typical user
 * interfaces; only those who want detailed control over quantization tables
 * would use the preceding three routines directly.
 */
{
  /* Convert user 0-100 rating to percentage scaling */
  quality = jpeg_quality_scaling(quality);

  /* Set up standard quality tables */
  jpeg_set_linear_quality(cinfo, quality, force_baseline);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
cmpl $0x2, %esi
movl $0x1, %eax
cmovgel %esi, %eax
cmpl $0x64, %eax
movl $0x64, %ecx
cmovll %eax, %ecx
cmpl $0x31, %esi
jg 0x7224d
movw $0x1388, %ax            # imm = 0x1388
xorl %edx, %edx
divw %cx
movzwl %ax, %ebp
jmp 0x72256
addl %ecx, %ecx
movl $0xc8, %ebp
subl %ecx, %ebp
leaq 0x37e93(%rip), %rdx     # 0xaa0f0
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x720bc
leaq 0x37f7d(%rip), %rdx     # 0xaa1f0
movq %r14, %rdi
movl $0x1, %esi
movl %ebp, %ecx
movl %ebx, %r8d
popq %rbx
popq %r14
popq %rbp
jmp 0x720bc
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcparam.c
// Function: fill_dc_scans
LOCAL(jpeg_scan_info *)
fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al)
/* Support routine: generate interleaved DC scan if possible, else N scans */
{
  int ci;

  if (ncomps <= MAX_COMPS_IN_SCAN) {
    /* Single interleaved DC scan */
    scanptr->comps_in_scan = ncomps;
    for (ci = 0; ci < ncomps; ci++)
      scanptr->component_index[ci] = ci;
    scanptr->Ss = scanptr->Se = 0;
    scanptr->Ah = Ah;
    scanptr->Al = Al;
    scanptr++;
  } else {
    /* Noninterleaved DC scan for each component */
    scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al);
  }
  return scanptr;
}

// Assembly:
movq %rdi, %rax
cmpl $0x5, %esi
jge 0x72a9a
movl %esi, (%rax)
testl %esi, %esi
jle 0x72a87
movl %esi, %edi
incl %esi
andl $-0x2, %esi
decq %rdi
movq %rdi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x2f871(%rip), %xmm1    # 0xa2280
xorl %edi, %edi
movdqa 0x2f877(%rip), %xmm2    # 0xa2290
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x2f877(%rip), %xmm4    # 0xa22a0
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %r8d
notl %r8d
testb $0x1, %r8b
je 0x72a61
movl %edi, 0x4(%rax,%rdi,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %r8d
testb $0x1, %r8b
je 0x72a7a
leal 0x1(%rdi), %r8d
movl %r8d, 0x8(%rax,%rdi,4)
addq $0x2, %rdi
paddq %xmm4, %xmm1
cmpq %rdi, %rsi
jne 0x72a29
movq $0x0, 0x14(%rax)
movl %edx, 0x1c(%rax)
movl %ecx, 0x20(%rax)
addq $0x24, %rax
retq
xorl %edi, %edi
movl $0x1, (%rax)
movl %edi, 0x4(%rax)
movq $0x0, 0x14(%rax)
movl %edx, 0x1c(%rax)
movl %ecx, 0x20(%rax)
addq $0x24, %rax
incl %edi
cmpl %edi, %esi
jne 0x72a9c
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcparam.c
// Function: add_huff_table
LOCAL(void)
add_huff_table (j_compress_ptr cinfo,
		JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
/* Define a Huffman table */
{
  int nsymbols, len;

  if (*htblptr == NULL)
    *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);

  /* Copy the number-of-symbols-of-each-code-length counts */
  MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));

  /* Validate the counts.  We do this here mainly so we can copy the right
   * number of symbols from the val[] array, without risking marching off
   * the end of memory.  jchuff.c will do a more thorough test later.
   */
  nsymbols = 0;
  for (len = 1; len <= 16; len++)
    nsymbols += bits[len];
  if (nsymbols < 1 || nsymbols > 256)
    ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);

  MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8));

  /* Initialize sent_table FALSE so table will be written to JPEG file. */
  (*htblptr)->sent_table = FALSE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movq (%rsi), %rax
testq %rax, %rax
jne 0x72ae5
movq %r15, %rdi
callq 0x85c7a
movq %rax, (%rbx)
movb 0x10(%r12), %cl
movb %cl, 0x10(%rax)
movdqu (%r12), %xmm0
movdqu %xmm0, (%rax)
pxor %xmm0, %xmm0
xorl %eax, %eax
pxor %xmm1, %xmm1
movd 0x1(%r12,%rax), %xmm2
punpcklbw %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3],xmm2[4],xmm0[4],xmm2[5],xmm0[5],xmm2[6],xmm0[6],xmm2[7],xmm0[7]
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
paddd %xmm2, %xmm1
addq $0x4, %rax
cmpq $0x10, %rax
jne 0x72b01
pshufd $0xee, %xmm1, %xmm0     # xmm0 = xmm1[2,3,2,3]
paddd %xmm1, %xmm0
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
paddd %xmm0, %xmm1
movd %xmm1, %r12d
movl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
leal (%r12,%rax), %ecx
cmpl %eax, %ecx
ja 0x72b51
movq (%r15), %rax
movl $0x8, 0x28(%rax)
movq %r15, %rdi
callq *(%rax)
movq (%rbx), %rdi
addq $0x11, %rdi
movl %r12d, %edx
movq %r14, %rsi
callq 0xe370
movq (%rbx), %rax
movl $0x0, 0x114(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdatadst.c
// Function: jpeg_stdio_dest
GLOBAL(void)
jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
{
  my_dest_ptr dest;

  /* The destination object is made permanent so that multiple JPEG images
   * can be written to the same file without re-executing jpeg_stdio_dest.
   * This makes it dangerous to use this manager and a different destination
   * manager serially with the same JPEG object, because their private object
   * sizes may be different.  Caveat programmer.
   */
  if (cinfo->dest == NULL) {	/* first time for this JPEG object? */
    cinfo->dest = (struct jpeg_destination_mgr *)
      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
				  SIZEOF(my_destination_mgr));
  }

  dest = (my_dest_ptr) cinfo->dest;
  dest->pub.init_destination = init_destination;
  dest->pub.empty_output_buffer = empty_output_buffer;
  dest->pub.term_destination = term_destination;
  dest->outfile = outfile;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x28(%rdi), %rax
testq %rax, %rax
jne 0x72ba0
movq %rdi, %r14
movq 0x8(%rdi), %rax
movl $0x38, %edx
xorl %esi, %esi
callq *(%rax)
movq %rax, 0x28(%r14)
leaq 0x26(%rip), %rcx        # 0x72bcd
movq %rcx, 0x10(%rax)
leaq 0x41(%rip), %rcx        # 0x72bf3
movq %rcx, 0x18(%rax)
leaq 0x8b(%rip), %rcx        # 0x72c48
movq %rcx, 0x20(%rax)
movq %rbx, 0x28(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jdatadst.c
// Function: term_destination
METHODDEF(void)
term_destination (j_compress_ptr cinfo)
{
  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
  size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer;

  /* Write any data remaining in the buffer */
  if (datacount > 0) {
    if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount)
      ERREXIT(cinfo, JERR_FILE_WRITE);
  }
  fflush(dest->outfile);
  /* Make sure we wrote the output file OK */
  if (ferror(dest->outfile))
    ERREXIT(cinfo, JERR_FILE_WRITE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %r15
movq 0x8(%r15), %rax
cmpq $0x1000, %rax           # imm = 0x1000
je 0x72c92
movl $0x1000, %r14d          # imm = 0x1000
subq %rax, %r14
movq 0x28(%r15), %rcx
movq 0x30(%r15), %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0xe8b0
cmpq %r14, %rax
je 0x72c92
movq (%rbx), %rax
movl $0x25, 0x28(%rax)
movq %rbx, %rdi
callq *(%rax)
movq 0x28(%r15), %rdi
callq 0xe520
movq 0x28(%r15), %rdi
callq 0xe870
testl %eax, %eax
je 0x72cbc
movq (%rbx), %rax
movl $0x25, 0x28(%rax)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *(%rax)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcinit.c
// Function: jinit_compress_master
GLOBAL(void)
jinit_compress_master (j_compress_ptr cinfo)
{
  /* Initialize master control (includes parameter checking/processing) */
  jinit_c_master_control(cinfo, FALSE /* full compression */);

  /* Preprocessing */
  if (! cinfo->raw_data_in) {
    jinit_color_converter(cinfo);
    jinit_downsampler(cinfo);
    jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */);
  }
  /* Forward DCT */
  jinit_forward_dct(cinfo);
  /* Entropy encoding: either Huffman or arithmetic coding. */
  if (cinfo->arith_code) {
    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
  } else {
    if (cinfo->progressive_mode) {
#ifdef C_PROGRESSIVE_SUPPORTED
      jinit_phuff_encoder(cinfo);
#else
      ERREXIT(cinfo, JERR_NOT_COMPILED);
#endif
    } else
      jinit_huff_encoder(cinfo);
  }

  /* Need a full-image coefficient buffer in any multi-pass mode. */
  jinit_c_coef_controller(cinfo,
		(jboolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));
  jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */);

  jinit_marker_writer(cinfo);

  /* We can now tell the memory manager to allocate virtual arrays. */
  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);

  /* Write the datastream header (SOI) immediately.
   * Frame and scan headers are postponed till later.
   * This lets application insert special markers after the SOI.
   */
  (*cinfo->marker->write_file_header) (cinfo);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x72d7c
cmpl $0x0, 0x100(%rbx)
jne 0x72cf2
movq %rbx, %rdi
callq 0x75b50
movq %rbx, %rdi
callq 0x76110
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74684
movq %rbx, %rdi
callq 0x79184
cmpl $0x0, 0x104(%rbx)
je 0x72d14
movq (%rbx), %rax
movl $0x1, 0x28(%rax)
movq %rbx, %rdi
callq *(%rax)
jmp 0x72d2f
cmpl $0x0, 0x134(%rbx)
je 0x72d27
movq %rbx, %rdi
callq 0x77f6c
jmp 0x72d2f
movq %rbx, %rdi
callq 0x76f9c
movl $0x1, %esi
cmpl $0x1, 0xf0(%rbx)
jg 0x72d4a
xorl %esi, %esi
cmpl $0x0, 0x108(%rbx)
setne %sil
movq %rbx, %rdi
callq 0x74dac
movq %rbx, %rdi
xorl %esi, %esi
callq 0x744d8
movq %rbx, %rdi
callq 0x73a58
movq 0x8(%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq 0x1d0(%rbx), %rax
movq %rbx, %rdi
popq %rbx
jmpq *(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcmarker.c
// Function: jinit_marker_writer
GLOBAL(void)
jinit_marker_writer (j_compress_ptr cinfo)
{
  my_marker_ptr marker;

  /* Create the subobject */
  marker = (my_marker_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
				SIZEOF(my_marker_writer));
  cinfo->marker = (struct jpeg_marker_writer *) marker;
  /* Initialize method pointers */
  marker->pub.write_file_header = write_file_header;
  marker->pub.write_frame_header = write_frame_header;
  marker->pub.write_scan_header = write_scan_header;
  marker->pub.write_file_trailer = write_file_trailer;
  marker->pub.write_tables_only = write_tables_only;
  marker->pub.write_marker_header = write_marker_header;
  marker->pub.write_marker_byte = write_marker_byte;
  /* Initialize private state */
  marker->last_restart_interval = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl $0x40, %edx
movl $0x1, %esi
callq *(%rax)
movq %rax, 0x1d0(%rbx)
leaq 0x4e(%rip), %rcx        # 0x73ac8
movq %rcx, (%rax)
leaq 0x26c(%rip), %rcx       # 0x73cf0
movq %rcx, 0x8(%rax)
leaq 0x364(%rip), %rcx       # 0x73df3
movq %rcx, 0x10(%rax)
leaq 0x551(%rip), %rcx       # 0x73feb
movq %rcx, 0x18(%rax)
leaq 0x562(%rip), %rcx       # 0x74007
movq %rcx, 0x20(%rax)
leaq 0x5fa(%rip), %rcx       # 0x740aa
movq %rcx, 0x28(%rax)
leaq 0x658(%rip), %rcx       # 0x74113
movq %rcx, 0x30(%rax)
movl $0x0, 0x38(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcmarker.c
// Function: write_file_header
METHODDEF(void)
write_file_header (j_compress_ptr cinfo)
{
  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;

  emit_marker(cinfo, M_SOI);	/* first the SOI */

  /* SOI is defined to reset restart interval to 0 */
  marker->last_restart_interval = 0;

  if (cinfo->write_JFIF_header)	/* next an optional JFIF APP0 */
    emit_jfif_app0(cinfo);
  if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */
    emit_adobe_app14(cinfo);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1d0(%rdi), %r15
movl $0xff, %r14d
movl $0xff, %esi
callq 0x74115
movq %rbx, %rdi
movl $0xd8, %esi
callq 0x74115
movl $0x0, 0x38(%r15)
cmpl $0x0, 0x120(%rbx)
je 0x73bfd
movq %rbx, %rdi
movl $0xff, %esi
callq 0x74115
movq %rbx, %rdi
movl $0xe0, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x10, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x4a, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x46, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x49, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x46, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movzbl 0x124(%rbx), %esi
movq %rbx, %rdi
callq 0x74115
movzbl 0x125(%rbx), %esi
movq %rbx, %rdi
callq 0x74115
movzbl 0x126(%rbx), %esi
movq %rbx, %rdi
callq 0x74115
movzwl 0x128(%rbx), %ebp
movl %ebp, %esi
shrl $0x8, %esi
movq %rbx, %rdi
callq 0x74115
andl %r14d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74115
movzwl 0x12a(%rbx), %ebp
movl %ebp, %esi
shrl $0x8, %esi
movq %rbx, %rdi
callq 0x74115
andl %r14d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
cmpl $0x0, 0x12c(%rbx)
je 0x73ce5
movq %rbx, %rdi
movl $0xff, %esi
callq 0x74115
movq %rbx, %rdi
movl $0xee, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movq %rbx, %rdi
movl $0xe, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x41, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x64, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x6f, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x62, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x65, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movq %rbx, %rdi
movl $0x64, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movl 0x50(%rbx), %eax
xorl %ecx, %ecx
cmpl $0x5, %eax
sete %cl
addl %ecx, %ecx
cmpl $0x3, %eax
movl $0x1, %esi
cmovnel %ecx, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x74115
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcmarker.c
// Function: write_frame_header
METHODDEF(void)
write_frame_header (j_compress_ptr cinfo)
{
  int ci, prec;
  jboolean is_baseline;
  jpeg_component_info *compptr;
  
  /* Emit DQT for each quantization table.
   * Note that emit_dqt() suppresses any duplicate tables.
   */
  prec = 0;
  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    prec += emit_dqt(cinfo, compptr->quant_tbl_no);
  }
  /* now prec is nonzero iff there are any 16-bit quant tables. */

  /* Check for a non-baseline specification.
   * Note we assume that Huffman table numbers won't be changed later.
   */
  if (cinfo->arith_code || cinfo->progressive_mode ||
      cinfo->data_precision != 8) {
    is_baseline = FALSE;
  } else {
    is_baseline = TRUE;
    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
	 ci++, compptr++) {
      if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1)
	is_baseline = FALSE;
    }
    if (prec && is_baseline) {
      is_baseline = FALSE;
      /* If it's baseline except for quantizer size, warn the user */
      TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);
    }
  }

  /* Emit the proper SOF marker */
  if (cinfo->arith_code) {
    emit_sof(cinfo, M_SOF9);	/* SOF code for arithmetic coding */
  } else {
    if (cinfo->progressive_mode)
      emit_sof(cinfo, M_SOF2);	/* SOF code for progressive Huffman */
    else if (is_baseline)
      emit_sof(cinfo, M_SOF0);	/* SOF code for baseline implementation */
    else
      emit_sof(cinfo, M_SOF1);	/* SOF code for non-baseline Huffman file */
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4c(%rdi), %eax
xorl %r14d, %r14d
testl %eax, %eax
jle 0x73d30
movq 0x58(%rbx), %r15
addq $0x10, %r15
xorl %ebp, %ebp
movl (%r15), %esi
movq %rbx, %rdi
callq 0x74149
addl %eax, %r14d
incl %ebp
movl 0x4c(%rbx), %eax
addq $0x60, %r15
cmpl %eax, %ebp
jl 0x73d0e
testl %r14d, %r14d
setne %r14b
movl $0xc9, %ebp
cmpl $0x0, 0x104(%rbx)
jne 0x73ddf
cmpl $0x0, 0x134(%rbx)
je 0x73d55
movl $0xc2, %ebp
jmp 0x73ddf
xorl %ecx, %ecx
cmpl $0x8, 0x48(%rbx)
jne 0x73dc3
testl %eax, %eax
jle 0x73d85
movq 0x58(%rbx), %rdx
addq $0x18, %rdx
movl $0x1, %ecx
cmpl $0x1, -0x4(%rdx)
jg 0x73d79
cmpl $0x2, (%rdx)
jl 0x73d7b
xorl %ecx, %ecx
addq $0x60, %rdx
decl %eax
jne 0x73d6e
jmp 0x73d8a
movl $0x1, %ecx
testl %ecx, %ecx
setne %al
andb %al, %r14b
cmpb $0x1, %r14b
jne 0x73dc3
movq (%rbx), %rax
movl $0x4b, 0x28(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq *0x8(%rax)
cmpl $0x0, 0x104(%rbx)
jne 0x73ddf
cmpl $0x0, 0x134(%rbx)
movl $0xc2, %ebp
jne 0x73ddf
jmp 0x73dda
cmpl $0x0, 0x134(%rbx)
movl $0xc2, %ebp
jne 0x73ddf
movl $0xc0, %ebp
testl %ecx, %ecx
jne 0x73ddf
movl $0xc1, %ebp
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x74286
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcmarker.c
// Function: write_tables_only
METHODDEF(void)
write_tables_only (j_compress_ptr cinfo)
{
  int i;

  emit_marker(cinfo, M_SOI);

  for (i = 0; i < NUM_QUANT_TBLS; i++) {
    if (cinfo->quant_tbl_ptrs[i] != NULL)
      (void) emit_dqt(cinfo, i);
  }

  if (! cinfo->arith_code) {
    for (i = 0; i < NUM_HUFF_TBLS; i++) {
      if (cinfo->dc_huff_tbl_ptrs[i] != NULL)
	emit_dht(cinfo, i, FALSE);
      if (cinfo->ac_huff_tbl_ptrs[i] != NULL)
	emit_dht(cinfo, i, TRUE);
    }
  }

  emit_marker(cinfo, M_EOI);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xff, %esi
callq 0x74115
movq %rbx, %rdi
movl $0xd8, %esi
callq 0x74115
xorl %r14d, %r14d
cmpq $0x0, 0x60(%rbx,%r14,8)
je 0x7403b
movq %rbx, %rdi
movl %r14d, %esi
callq 0x74149
incq %r14
cmpq $0x4, %r14
jne 0x74028
cmpl $0x0, 0x104(%rbx)
jne 0x7408c
xorl %r14d, %r14d
cmpq $0x0, 0x80(%rbx,%r14,8)
je 0x74068
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x7439c
cmpq $0x0, 0xa0(%rbx,%r14,8)
je 0x74083
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x7439c
incq %r14
cmpq $0x4, %r14
jne 0x74050
movq %rbx, %rdi
movl $0xff, %esi
callq 0x74115
movq %rbx, %rdi
movl $0xd9, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x74115
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcmarker.c
// Function: write_marker_header
METHODDEF(void)
write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
/* Emit an arbitrary marker header */
{
  if (datalen > (unsigned int) 65533)		/* safety check */
    ERREXIT(cinfo, JERR_BAD_LENGTH);

  emit_marker(cinfo, (JPEG_MARKER) marker);

  emit_2bytes(cinfo, (int) (datalen + 2));	/* total length */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
cmpl $0xfffe, %edx           # imm = 0xFFFE
jb 0x740cf
movq (%r14), %rax
movl $0xb, 0x28(%rax)
movq %r14, %rdi
callq *(%rax)
movl $0xff, %r15d
movq %r14, %rdi
movl $0xff, %esi
callq 0x74115
movq %r14, %rdi
movl %ebp, %esi
callq 0x74115
addl $0x2, %ebx
movl %ebx, %esi
shrl $0x8, %esi
andl %r15d, %esi
movq %r14, %rdi
callq 0x74115
andl %r15d, %ebx
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x74115
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcmarker.c
// Function: emit_byte
LOCAL(void)
emit_byte (j_compress_ptr cinfo, int val)
/* Emit a byte */
{
  struct jpeg_destination_mgr * dest = cinfo->dest;

  *(dest->next_output_byte)++ = (JOCTET) val;
  if (--dest->free_in_buffer == 0) {
    if (! (*dest->empty_output_buffer) (cinfo))
      ERREXIT(cinfo, JERR_CANT_SUSPEND);
  }
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rax
movq (%rax), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rax)
movb %sil, (%rcx)
decq 0x8(%rax)
jne 0x74137
movq %rdi, %rbx
callq *0x18(%rax)
testl %eax, %eax
je 0x74139
popq %rbx
retq
movq (%rbx), %rax
movl $0x18, 0x28(%rax)
movq %rbx, %rdi
popq %rbx
jmpq *(%rax)
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/jpeg/jcmarker.c
// Function: emit_dqt
LOCAL(int)
emit_dqt (j_compress_ptr cinfo, int index)
/* Emit a DQT marker */
/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */
{
  JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index];
  int prec;
  int i;

  if (qtbl == NULL)
    ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index);

  prec = 0;
  for (i = 0; i < DCTSIZE2; i++) {
    if (qtbl->quantval[i] > 255)
      prec = 1;
  }

  if (! qtbl->sent_table) {
    emit_marker(cinfo, M_DQT);

    emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2);

    emit_byte(cinfo, index + (prec<<4));

    for (i = 0; i < DCTSIZE2; i++) {
      /* The table entries must be emitted in zigzag order. */
      unsigned int qval = qtbl->quantval[jpeg_natural_order[i]];
      if (prec)
	emit_byte(cinfo, (int) (qval >> 8));
      emit_byte(cinfo, (int) (qval & 0xFF));
    }

    qtbl->sent_table = TRUE;
  }

  return prec;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %rax
movq 0x60(%rdi,%rax,8), %r12
testq %r12, %r12
jne 0x7417b
movq (%rbx), %rax
movl $0x34, 0x28(%rax)
movl %ebp, 0x2c(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
pxor %xmm0, %xmm0
xorl %eax, %eax
movdqa 0x36357(%rip), %xmm1    # 0xaa4e0
movdqa 0x3635f(%rip), %xmm2    # 0xaa4f0
punpcklwd %xmm2, %xmm2    # xmm2 = xmm2[0,0,1,1,2,2,3,3]
movq (%r12,%rax,2), %xmm3
punpcklwd %xmm3, %xmm3    # xmm3 = xmm3[0,0,1,1,2,2,3,3]
pxor %xmm1, %xmm3
pcmpgtw %xmm2, %xmm3
por %xmm3, %xmm0
addq $0x4, %rax
cmpq $0x40, %rax
jne 0x74195
pslld $0x1f, %xmm0
movmskps %xmm0, %r13d
cmpl $0x0, 0x80(%r12)
jne 0x7426f
xorl %r14d, %r14d
testb %r13b, %r13b
setne %r14b
movq %rbx, %rdi
movl $0xff, %esi
callq 0x74115
movq %rbx, %rdi
movl $0xdb, %esi
callq 0x74115
movl %r14d, %r15d
shll $0x6, %r15d
addl $0x43, %r15d
movl %ebp, 0x4(%rsp)
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x74115
movq %rbx, %rdi
movl %r15d, %esi
callq 0x74115
shll $0x4, %r14d
addl 0x4(%rsp), %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x74115
leaq 0x36a8e(%rip), %r14     # 0xaacc0
movslq (%r14,%rbp,4), %rax
movzwl (%r12,%rax,2), %r15d
testb %r13b, %r13b
je 0x7424e
movl %r15d, %esi
shrl $0x8, %esi
movq %rbx, %rdi
callq 0x74115
movzbl %r15b, %esi
movq %rbx, %rdi
callq 0x74115
incq %rbp
cmpq $0x40, %rbp
jne 0x74232
movl $0x1, 0x80(%r12)
xorl %eax, %eax
testb %r13b, %r13b
setne %al
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/jcmarker.c
// Function: emit_sof
LOCAL(void)
emit_sof (j_compress_ptr cinfo, JPEG_MARKER code)
/* Emit a SOF marker */
{
  int ci;
  jpeg_component_info *compptr;
  
  emit_marker(cinfo, code);
  
  emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */

  /* Make sure image isn't bigger than SOF field can handle */
  if ((long) cinfo->image_height > 65535L ||
      (long) cinfo->image_width > 65535L)
    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535);

  emit_byte(cinfo, cinfo->data_precision);
  emit_2bytes(cinfo, (int) cinfo->image_height);
  emit_2bytes(cinfo, (int) cinfo->image_width);

  emit_byte(cinfo, cinfo->num_components);

  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    emit_byte(cinfo, compptr->component_id);
    emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor);
    emit_byte(cinfo, compptr->quant_tbl_no);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl $0xff, %r14d
movl $0xff, %esi
callq 0x74115
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74115
movl 0x4c(%rbx), %eax
leal (%rax,%rax,2), %ebp
addl $0x8, %ebp
movl %ebp, %esi
shrl $0x8, %esi
andl %r14d, %esi
movq %rbx, %rdi
callq 0x74115
andl %r14d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74115
cmpl $0xffff, 0x34(%rbx)     # imm = 0xFFFF
ja 0x742e1
cmpl $0x10000, 0x30(%rbx)    # imm = 0x10000
jb 0x742fa
movq (%rbx), %rax
movabsq $0xffff00000029, %rcx   # imm = 0xFFFF00000029
movq %rcx, 0x28(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl 0x48(%rbx), %esi
movq %rbx, %rdi
callq 0x74115
movl 0x34(%rbx), %ebp
movl %ebp, %esi
shrl $0x8, %esi
movl $0xff, %r14d
andl %r14d, %esi
movq %rbx, %rdi
callq 0x74115
andl %r14d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74115
movl 0x30(%rbx), %ebp
movl %ebp, %esi
shrl $0x8, %esi
andl %r14d, %esi
movq %rbx, %rdi
callq 0x74115
andl %r14d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74115
movl 0x4c(%rbx), %esi
movq %rbx, %rdi
callq 0x74115
cmpl $0x0, 0x4c(%rbx)
jle 0x74397
movq 0x58(%rbx), %r14
xorl %ebp, %ebp
movl (%r14), %esi
movq %rbx, %rdi
callq 0x74115
movl 0x8(%r14), %esi
shll $0x4, %esi
addl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x74115
movl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0x74115
incl %ebp
addq $0x60, %r14
cmpl 0x4c(%rbx), %ebp
jl 0x74362
popq %rbx
popq %r14
popq %rbp
retq