LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_gAMA_fixed
void /* PRIVATE */
png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma)
{
   PNG_gAMA;
   png_byte buf[4];

   png_debug(1, "in png_write_gAMA");

   /* file_gamma is saved in 1/100,000ths */
   png_save_uint_32(buf, (png_uint_32)file_gamma);
   png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4);
}

// Assembly:
subq $0x18, %rsp
leaq 0x10(%rsp), %rax
movb $0x0, 0x4(%rax)
movl $0x414d4167, (%rax)     # imm = 0x414D4167
bswapl %esi
leaq 0xc(%rsp), %rdx
movl %esi, (%rdx)
pushq $0x4
popq %rcx
movq %rax, %rsi
callq 0x8f1fc
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_sRGB
void /* PRIVATE */
png_write_sRGB(png_structp png_ptr, int srgb_intent)
{
   PNG_sRGB;
   png_byte buf[1];

   png_debug(1, "in png_write_sRGB");

   if (srgb_intent >= PNG_sRGB_INTENT_LAST)
         png_warning(png_ptr,
            "Invalid sRGB rendering intent specified");
   buf[0]=(png_byte)srgb_intent;
   png_write_chunk(png_ptr, (png_bytep)png_sRGB, buf, (png_size_t)1);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movb $0x0, 0x14(%rsp)
movl $0x42475273, 0x10(%rsp) # imm = 0x42475273
cmpl $0x4, %esi
jl 0x8f9bd
leaq 0x150f3(%rip), %rsi     # 0xa4aa8
movq %rbx, %rdi
callq 0x84a53
leaq 0xf(%rsp), %rdx
movb %bpl, (%rdx)
leaq 0x10(%rsp), %rsi
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0x8f1fc
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_compressed_data_out
static void /* PRIVATE */
png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
{
   int i;

   /* Handle the no-compression case */
   if (comp->input)
   {
      png_write_chunk_data(png_ptr, (png_bytep)comp->input,
                            (png_size_t)comp->input_len);
      return;
   }

   /* Write saved output buffers, if any */
   for (i = 0; i < comp->num_output_ptr; i++)
   {
      png_write_chunk_data(png_ptr, (png_bytep)comp->output_ptr[i],
         (png_size_t)png_ptr->zbuf_size);
      png_free(png_ptr, comp->output_ptr[i]);
   }
   if (comp->max_output_ptr != 0)
      png_free(png_ptr, comp->output_ptr);
   /* Write anything left in zbuf */
   if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size)
      png_write_chunk_data(png_ptr, png_ptr->zbuf,
         (png_size_t)(png_ptr->zbuf_size - png_ptr->zstream.avail_out));

   /* Reset zlib for another zTXt/iTXt or image data */
   deflateReset(&png_ptr->zstream);
   png_ptr->zstream.data_type = Z_BINARY;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x8fff6
movslq 0x8(%r14), %rdx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x8f2a4
xorl %r15d, %r15d
movslq 0xc(%r14), %rax
cmpq %rax, %r15
jge 0x9002e
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rsi
movq 0x1a0(%rbx), %rdx
movq %rbx, %rdi
callq 0x8f2a4
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x84923
incq %r15
jmp 0x8fff9
cmpl $0x0, 0x10(%r14)
je 0x90041
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x84923
leaq 0x128(%rbx), %r14
movl 0x148(%rbx), %eax
movq 0x1a0(%rbx), %rdx
cmpl %edx, %eax
jae 0x9006b
movq 0x198(%rbx), %rsi
subq %rax, %rdx
movq %rbx, %rdi
callq 0x8f2a4
movq %r14, %rdi
callq 0x85384
andl $0x0, 0x180(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_sBIT
void /* PRIVATE */
png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
{
   PNG_sBIT;
   png_byte buf[4];
   png_size_t size;

   png_debug(1, "in png_write_sBIT");

   /* Make sure we don't depend upon the order of PNG_COLOR_8 */
   if (color_type & PNG_COLOR_MASK_COLOR)
   {
      png_byte maxbits;

      maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 :
                png_ptr->usr_bit_depth);
      if (sbit->red == 0 || sbit->red > maxbits ||
          sbit->green == 0 || sbit->green > maxbits ||
          sbit->blue == 0 || sbit->blue > maxbits)
      {
         png_warning(png_ptr, "Invalid sBIT depth specified");
         return;
      }
      buf[0] = sbit->red;
      buf[1] = sbit->green;
      buf[2] = sbit->blue;
      size = 3;
   }
   else
   {
      if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth)
      {
         png_warning(png_ptr, "Invalid sBIT depth specified");
         return;
      }
      buf[0] = sbit->gray;
      size = 1;
   }

   if (color_type & PNG_COLOR_MASK_ALPHA)
   {
      if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth)
      {
         png_warning(png_ptr, "Invalid sBIT depth specified");
         return;
      }
      buf[size++] = sbit->alpha;
   }

   png_write_chunk(png_ptr, (png_bytep)png_sBIT, buf, size);
}

// Assembly:
subq $0x18, %rsp
movb $0x0, 0x14(%rsp)
movl $0x54494273, 0x10(%rsp) # imm = 0x54494273
testb $0x2, %dl
jne 0x90228
movb 0x3(%rsi), %al
testb %al, %al
je 0x902ae
cmpb 0x250(%rdi), %al
ja 0x902ae
movb %al, 0xc(%rsp)
pushq $0x1
jmp 0x90299
cmpl $0x3, %edx
jne 0x90232
pushq $0x8
popq %rcx
jmp 0x90239
movzbl 0x250(%rdi), %ecx
movb (%rsi), %al
testb %al, %al
sete %r8b
movzbl %al, %r9d
cmpl %r9d, %ecx
setb %r9b
orb %r8b, %r9b
jne 0x902ae
movb 0x1(%rsi), %r8b
testb %r8b, %r8b
sete %r9b
movzbl %r8b, %r10d
cmpl %r10d, %ecx
setb %r10b
orb %r9b, %r10b
jne 0x902ae
movb 0x2(%rsi), %r9b
testb %r9b, %r9b
sete %r10b
movzbl %r9b, %r11d
cmpl %r11d, %ecx
setb %cl
orb %r10b, %cl
cmpb $0x1, %cl
je 0x902ae
movb %al, 0xc(%rsp)
movb %r8b, 0xd(%rsp)
movb %r9b, 0xe(%rsp)
pushq $0x3
popq %rcx
testb $0x4, %dl
je 0x902c5
movb 0x4(%rsi), %al
testb %al, %al
je 0x902ae
cmpb 0x250(%rdi), %al
jbe 0x902be
leaq 0x148d6(%rip), %rsi     # 0xa4b8b
addq $0x18, %rsp
jmp 0x84a53
movb %al, 0xc(%rsp,%rcx)
incq %rcx
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x8f1fc
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_tRNS
void /* PRIVATE */
png_write_tRNS(png_structp png_ptr, png_bytep trans_alpha, png_color_16p tran,
   int num_trans, int color_type)
{
   PNG_tRNS;
   png_byte buf[6];

   png_debug(1, "in png_write_tRNS");

   if (color_type == PNG_COLOR_TYPE_PALETTE)
   {
      if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette)
      {
         png_warning(png_ptr, "Invalid number of transparent colors specified");
         return;
      }
      /* Write the chunk out as it is */
      png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans_alpha,
        (png_size_t)num_trans);
   }
   else if (color_type == PNG_COLOR_TYPE_GRAY)
   {
      /* One 16 bit value */
      if (tran->gray >= (1 << png_ptr->bit_depth))
      {
         png_warning(png_ptr,
           "Ignoring attempt to write tRNS chunk out-of-range for bit_depth");
         return;
      }
      png_save_uint_16(buf, tran->gray);
      png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2);
   }
   else if (color_type == PNG_COLOR_TYPE_RGB)
   {
      /* Three 16 bit values */
      png_save_uint_16(buf, tran->red);
      png_save_uint_16(buf + 2, tran->green);
      png_save_uint_16(buf + 4, tran->blue);
      if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
      {
         png_warning(png_ptr,
           "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8");
         return;
      }
      png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6);
   }
   else
   {
      png_warning(png_ptr, "Can't write tRNS with an alpha channel");
   }
}

// Assembly:
subq $0x18, %rsp
movb $0x0, 0x10(%rsp)
movl $0x534e5274, 0xc(%rsp)  # imm = 0x534E5274
testl %r8d, %r8d
je 0x90694
cmpl $0x2, %r8d
je 0x90646
cmpl $0x3, %r8d
jne 0x906bc
testl %ecx, %ecx
jle 0x9063a
movzwl 0x240(%rdi), %edx
cmpl %ecx, %edx
jae 0x906e4
leaq 0x14567(%rip), %rsi     # 0xa4ba8
jmp 0x906db
movzwl 0x2(%rdx), %eax
movl %eax, %ecx
rolw $0x8, %cx
movw %cx, 0x12(%rsp)
movzwl 0x4(%rdx), %ecx
movl %ecx, %esi
rolw $0x8, %si
movw %si, 0x14(%rsp)
movzwl 0x6(%rdx), %edx
movl %edx, %esi
rolw $0x8, %si
movw %si, 0x16(%rsp)
cmpb $0x8, 0x24f(%rdi)
jne 0x906c5
shrl $0x8, %eax
shrl $0x8, %ecx
shrl $0x8, %edx
orb %al, %cl
orb %dl, %cl
je 0x906c5
leaq 0x14585(%rip), %rsi     # 0xa4c17
jmp 0x906db
movzwl 0x8(%rdx), %eax
movb 0x24f(%rdi), %cl
pushq $0x1
popq %rdx
shll %cl, %edx
cmpl %eax, %edx
jle 0x906d4
rolw $0x8, %ax
leaq 0x12(%rsp), %rdx
movw %ax, (%rdx)
leaq 0xc(%rsp), %rsi
pushq $0x2
jmp 0x906d1
leaq 0x14594(%rip), %rsi     # 0xa4c57
jmp 0x906db
leaq 0xc(%rsp), %rsi
leaq 0x12(%rsp), %rdx
pushq $0x6
popq %rcx
jmp 0x906f1
leaq 0x144fc(%rip), %rsi     # 0xa4bd7
addq $0x18, %rsp
jmp 0x84a53
movq %rsi, %rax
movl %ecx, %ecx
leaq 0xc(%rsp), %rsi
movq %rax, %rdx
callq 0x8f1fc
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_bKGD
void /* PRIVATE */
png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
{
   PNG_bKGD;
   png_byte buf[6];

   png_debug(1, "in png_write_bKGD");

   if (color_type == PNG_COLOR_TYPE_PALETTE)
   {
      if (
#ifdef PNG_MNG_FEATURES_SUPPORTED
          (png_ptr->num_palette ||
          (!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) &&
#endif
         back->index >= png_ptr->num_palette)
      {
         png_warning(png_ptr, "Invalid background palette index");
         return;
      }
      buf[0] = back->index;
      png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)1);
   }
   else if (color_type & PNG_COLOR_MASK_COLOR)
   {
      png_save_uint_16(buf, back->red);
      png_save_uint_16(buf + 2, back->green);
      png_save_uint_16(buf + 4, back->blue);
      if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
      {
         png_warning(png_ptr,
           "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8");
         return;
      }
      png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6);
   }
   else
   {
      if (back->gray >= (1 << png_ptr->bit_depth))
      {
         png_warning(png_ptr,
           "Ignoring attempt to write bKGD chunk out-of-range for bit_depth");
         return;
      }
      png_save_uint_16(buf, back->gray);
      png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2);
   }
}

// Assembly:
subq $0x18, %rsp
movb $0x0, 0x10(%rsp)
movl $0x44474b62, 0xc(%rsp)  # imm = 0x44474B62
cmpl $0x3, %edx
jne 0x90742
movzwl 0x240(%rdi), %ecx
testw %cx, %cx
jne 0x9072a
testb $0x1, 0x408(%rdi)
jne 0x907db
movzbl (%rsi), %eax
cmpw %ax, %cx
ja 0x907dd
leaq 0x14541(%rip), %rsi     # 0xa4c7e
jmp 0x907d2
testb $0x2, %dl
jne 0x9076f
movzwl 0x8(%rsi), %eax
movb 0x24f(%rdi), %cl
pushq $0x1
popq %rdx
shll %cl, %edx
cmpl %eax, %edx
jle 0x907cb
rolw $0x8, %ax
leaq 0x12(%rsp), %rdx
movw %ax, (%rdx)
leaq 0xc(%rsp), %rsi
pushq $0x2
jmp 0x907eb
movzwl 0x2(%rsi), %eax
movl %eax, %ecx
rolw $0x8, %cx
movw %cx, 0x12(%rsp)
movzwl 0x4(%rsi), %ecx
movl %ecx, %edx
rolw $0x8, %dx
movw %dx, 0x14(%rsp)
movzwl 0x6(%rsi), %edx
movl %edx, %esi
rolw $0x8, %si
movw %si, 0x16(%rsp)
cmpb $0x8, 0x24f(%rdi)
jne 0x907bd
shrl $0x8, %eax
shrl $0x8, %ecx
shrl $0x8, %edx
orb %al, %cl
orb %dl, %cl
je 0x907bd
leaq 0x144e4(%rip), %rsi     # 0xa4c9f
jmp 0x907d2
leaq 0xc(%rsp), %rsi
leaq 0x12(%rsp), %rdx
pushq $0x6
jmp 0x907eb
leaq 0x1450d(%rip), %rsi     # 0xa4cdf
addq $0x18, %rsp
jmp 0x84a53
movb (%rsi), %al
leaq 0x12(%rsp), %rdx
movb %al, (%rdx)
leaq 0xc(%rsp), %rsi
pushq $0x1
popq %rcx
callq 0x8f1fc
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_hIST
void /* PRIVATE */
png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist)
{
   PNG_hIST;
   int i;
   png_byte buf[3];

   png_debug(1, "in png_write_hIST");

   if (num_hist > (int)png_ptr->num_palette)
   {
      png_debug2(3, "num_hist = %d, num_palette = %d", num_hist,
         png_ptr->num_palette);
      png_warning(png_ptr, "Invalid number of histogram entries specified");
      return;
   }

   png_write_chunk_start(png_ptr, (png_bytep)png_hIST,
     (png_uint_32)(num_hist * 2));
   for (i = 0; i < num_hist; i++)
   {
      png_save_uint_16(buf, hist[i]);
      png_write_chunk_data(png_ptr, buf, (png_size_t)2);
   }
   png_write_chunk_end(png_ptr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb $0x0, 0x14(%rsp)
movl $0x54534968, 0x10(%rsp) # imm = 0x54534968
movzwl 0x240(%rdi), %eax
cmpl %edx, %eax
jge 0x9083c
leaq 0x144f9(%rip), %rsi     # 0xa4d1f
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x84a53
movl %edx, %r14d
movq %rsi, %r15
leal (%r14,%r14), %edx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x8f233
xorl %ebp, %ebp
testl %r14d, %r14d
cmovlel %ebp, %r14d
leaq 0xd(%rsp), %r12
pushq $0x2
popq %r13
cmpq %rbp, %r14
je 0x9088b
movzwl (%r15,%rbp,2), %eax
rolw $0x8, %ax
movw %ax, 0xd(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x8f2a4
incq %rbp
jmp 0x90865
movq %rbx, %rdi
callq 0x8f2e3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_tEXt
void /* PRIVATE */
png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
   png_size_t text_len)
{
   PNG_tEXt;
   png_size_t key_len;
   png_charp new_key;

   png_debug(1, "in png_write_tEXt");

   if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0)
      return;

   if (text == NULL || *text == '\0')
      text_len = 0;
   else
      text_len = png_strlen(text);

   /* Make sure we include the 0 after the key */
   png_write_chunk_start(png_ptr, (png_bytep)png_tEXt,
      (png_uint_32)(key_len + text_len + 1));
   /*
    * We leave it to the application to meet PNG-1.0 requirements on the
    * contents of the text.  PNG-1.0 through PNG-1.2 discourage the use of
    * any non-Latin-1 characters except for NEWLINE.  ISO PNG will forbid them.
    * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.
    */
   png_write_chunk_data(png_ptr, (png_bytep)new_key,
     (png_size_t)(key_len + 1));
   if (text_len)
      png_write_chunk_data(png_ptr, (png_bytep)text, (png_size_t)text_len);

   png_write_chunk_end(png_ptr);
   png_free(png_ptr, new_key);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movb $0x0, 0x4(%rsp)
movl $0x74584574, (%rsp)     # imm = 0x74584574
leaq 0x8(%rsp), %rdx
callq 0x8fb3e
testq %rax, %rax
je 0x9093b
movq %rax, %r15
testq %r14, %r14
je 0x908eb
cmpb $0x0, (%r14)
je 0x908eb
movq %r14, %rdi
callq 0xe1e0
movq %rax, %r12
jmp 0x908ee
xorl %r12d, %r12d
leal (%r12,%r15), %edx
incl %edx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8f233
movq 0x8(%rsp), %r13
incq %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x8f2a4
testq %r12, %r12
je 0x90928
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x8f2a4
movq %rbx, %rdi
callq 0x8f2e3
movq %rbx, %rdi
movq %r13, %rsi
callq 0x84923
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_zTXt
void /* PRIVATE */
png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
   png_size_t text_len, int compression)
{
   PNG_zTXt;
   png_size_t key_len;
   char buf[1];
   png_charp new_key;
   compression_state comp;

   png_debug(1, "in png_write_zTXt");

   comp.num_output_ptr = 0;
   comp.max_output_ptr = 0;
   comp.output_ptr = NULL;
   comp.input = NULL;
   comp.input_len = 0;

   if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0)
   {
      png_free(png_ptr, new_key);
      return;
   }

   if (text == NULL || *text == '\0' || compression==PNG_TEXT_COMPRESSION_NONE)
   {
      png_write_tEXt(png_ptr, new_key, text, (png_size_t)0);
      png_free(png_ptr, new_key);
      return;
   }

   text_len = png_strlen(text);

   /* Compute the compressed data; do it now for the length */
   text_len = png_text_compress(png_ptr, text, text_len, compression,
       &comp);

   /* Write start of chunk */
   png_write_chunk_start(png_ptr, (png_bytep)png_zTXt,
     (png_uint_32)(key_len+text_len + 2));
   /* Write key */
   png_write_chunk_data(png_ptr, (png_bytep)new_key,
     (png_size_t)(key_len + 1));
   png_free(png_ptr, new_key);

   buf[0] = (png_byte)compression;
   /* Write compression */
   png_write_chunk_data(png_ptr, (png_bytep)buf, (png_size_t)1);
   /* Write the compressed data */
   png_write_compressed_data_out(png_ptr, &comp);

   /* Close the chunk */
   png_write_chunk_end(png_ptr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %r8d, %ebp
movq %rdx, %r15
movq %rdi, %rbx
movb $0x0, 0x14(%rsp)
movl $0x7458547a, 0x10(%rsp) # imm = 0x7458547A
andq $0x0, 0x38(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andl $0x0, 0x30(%rsp)
leaq 0x18(%rsp), %rdx
callq 0x8fb3e
testq %rax, %rax
je 0x90a53
testq %r15, %r15
je 0x90a38
cmpl $-0x1, %ebp
je 0x90a38
cmpb $0x0, (%r15)
je 0x90a38
movq %rax, %r14
movq %r15, %rdi
callq 0xe1e0
leaq 0x20(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
movl %ebp, %ecx
movq %r12, %r8
callq 0x8fd37
leal (%r14,%rax), %edx
addl $0x2, %edx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x8f233
movq 0x18(%rsp), %r15
incq %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x8f2a4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x84923
leaq 0xf(%rsp), %rsi
movb %bpl, (%rsi)
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x8f2a4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8ffd2
movq %rbx, %rdi
callq 0x8f2e3
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x908a2
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x90a5b
movq 0x18(%rsp), %rsi
movq %rbx, %rdi
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x84923
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_oFFs
void /* PRIVATE */
png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
   int unit_type)
{
   PNG_oFFs;
   png_byte buf[9];

   png_debug(1, "in png_write_oFFs");

   if (unit_type >= PNG_OFFSET_LAST)
      png_warning(png_ptr, "Unrecognized unit type for oFFs chunk");

   png_save_int_32(buf, x_offset);
   png_save_int_32(buf + 4, y_offset);
   buf[8] = (png_byte)unit_type;

   png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %ecx
movl %esi, %ebx
movq %rdi, %r14
movb $0x0, 0xc(%rsp)
movl $0x7346466f, 0x8(%rsp)  # imm = 0x7346466F
cmpl $0x2, %ebp
jl 0x90c44
leaq 0x14246(%rip), %rsi     # 0xa4e7c
movq %r14, %rdi
movl %ecx, %r15d
callq 0x84a53
movl %r15d, %ecx
movl %ebx, %eax
shrl $0x18, %eax
leaq 0xf(%rsp), %rdx
movb %al, (%rdx)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x1(%rdx)
movb %bh, 0x11(%rsp)
movb %bl, 0x3(%rdx)
movl %ecx, %eax
shrl $0x18, %eax
movb %al, 0x4(%rdx)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x5(%rdx)
movb %ch, 0x15(%rsp)
movb %cl, 0x7(%rdx)
movb %bpl, 0x8(%rdx)
leaq 0x8(%rsp), %rsi
pushq $0x9
popq %rcx
movq %r14, %rdi
callq 0x8f1fc
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_sCAL
void /* PRIVATE */
png_write_sCAL(png_structp png_ptr, int unit, double width, double height)
{
   PNG_sCAL;
   char buf[64];
   png_size_t total_len;

   png_debug(1, "in png_write_sCAL");

   buf[0] = (char)unit;
   png_snprintf(buf + 1, 63, "%12.12e", width);
   total_len = 1 + png_strlen(buf + 1) + 1;
   png_snprintf(buf + total_len, 64-total_len, "%12.12e", height);
   total_len += png_strlen(buf + total_len);

   png_debug1(3, "sCAL total length = %u", (unsigned int)total_len);
   png_write_chunk(png_ptr, (png_bytep)png_sCAL, (png_bytep)buf, total_len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movsd %xmm1, (%rsp)
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movb $0x0, 0x4(%r14)
movl $0x4c414373, (%r14)     # imm = 0x4C414373
leaq 0x11(%rsp), %r15
movb %sil, -0x1(%r15)
leaq 0x1400a(%rip), %r12     # 0xa4ea2
pushq $0x3f
popq %rsi
movq %r15, %rdi
movq %r12, %rdx
movb $0x1, %al
callq 0xe780
movq %r15, %rdi
callq 0xe1e0
movq %rax, %r15
leaq (%rsp,%rax), %r13
addq $0x12, %r13
pushq $0x3e
popq %rsi
subq %rax, %rsi
movq %r13, %rdi
movq %r12, %rdx
movsd (%rsp), %xmm0
movb $0x1, %al
callq 0xe780
movq %r13, %rdi
callq 0xe1e0
leaq (%rax,%r15), %rcx
addq $0x2, %rcx
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8f1fc
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_pHYs
void /* PRIVATE */
png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,
   png_uint_32 y_pixels_per_unit,
   int unit_type)
{
   PNG_pHYs;
   png_byte buf[9];

   png_debug(1, "in png_write_pHYs");

   if (unit_type >= PNG_RESOLUTION_LAST)
      png_warning(png_ptr, "Unrecognized unit type for pHYs chunk");

   png_save_uint_32(buf, x_pixels_per_unit);
   png_save_uint_32(buf + 4, y_pixels_per_unit);
   buf[8] = (png_byte)unit_type;

   png_write_chunk(png_ptr, (png_bytep)png_pHYs, buf, (png_size_t)9);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %ecx
movl %esi, %ebx
movq %rdi, %r14
movb $0x0, 0xc(%rsp)
movl $0x73594870, 0x8(%rsp)  # imm = 0x73594870
cmpl $0x2, %ebp
jl 0x90f3b
leaq 0x13f7d(%rip), %rsi     # 0xa4eaa
movq %r14, %rdi
movl %ecx, %r15d
callq 0x84a53
movl %r15d, %ecx
movl %ebx, %eax
shrl $0x18, %eax
leaq 0xf(%rsp), %rdx
movb %al, (%rdx)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x1(%rdx)
movb %bh, 0x11(%rsp)
movb %bl, 0x3(%rdx)
movl %ecx, %eax
shrl $0x18, %eax
movb %al, 0x4(%rdx)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x5(%rdx)
movb %ch, 0x15(%rsp)
movb %cl, 0x7(%rdx)
movb %bpl, 0x8(%rdx)
leaq 0x8(%rsp), %rsi
pushq $0x9
popq %rcx
movq %r14, %rdi
callq 0x8f1fc
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwutil.c
// Function: png_write_tIME
void /* PRIVATE */
png_write_tIME(png_structp png_ptr, png_timep mod_time)
{
   PNG_tIME;
   png_byte buf[7];

   png_debug(1, "in png_write_tIME");

   if (mod_time->month  > 12 || mod_time->month  < 1 ||
       mod_time->day    > 31 || mod_time->day    < 1 ||
       mod_time->hour   > 23 || mod_time->second > 60)
   {
      png_warning(png_ptr, "Invalid time specified for tIME chunk");
      return;
   }

   png_save_uint_16(buf, mod_time->year);
   buf[2] = mod_time->month;
   buf[3] = mod_time->day;
   buf[4] = mod_time->hour;
   buf[5] = mod_time->minute;
   buf[6] = mod_time->second;

   png_write_chunk(png_ptr, (png_bytep)png_tIME, buf, (png_size_t)7);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movb $0x0, 0x8(%rsp)
movl $0x454d4974, 0x4(%rsp)  # imm = 0x454D4974
movb 0x2(%rsi), %al
leal -0xd(%rax), %ecx
cmpb $-0xc, %cl
jb 0x90fc8
movb 0x3(%rsi), %cl
leal -0x20(%rcx), %edx
cmpb $-0x1f, %dl
jb 0x90fc8
movb 0x4(%rsi), %r8b
cmpb $0x17, %r8b
ja 0x90fc8
movb 0x6(%rsi), %r9b
cmpb $0x3d, %r9b
jb 0x90fd9
leaq 0x13f01(%rip), %rsi     # 0xa4ed0
addq $0x10, %rsp
popq %rbx
jmp 0x84a53
movzwl (%rsi), %ebx
movb %bh, 0x9(%rsp)
leaq 0x9(%rsp), %rdx
movb %bl, 0x1(%rdx)
movb %al, 0x2(%rdx)
movb %cl, 0x3(%rdx)
movb %r8b, 0x4(%rdx)
movb 0x5(%rsi), %al
movb %al, 0x5(%rdx)
movb %r9b, 0x6(%rdx)
leaq 0x4(%rsp), %rsi
pushq $0x7
popq %rcx
callq 0x8f1fc
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwio.c
// Function: png_default_write_data
void PNGAPI
png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
   png_uint_32 check;

   if (png_ptr == NULL)
      return;
   check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
   if (check != length)
      png_error(png_ptr, "Write Error");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x92211
movq %rdx, %r14
movq %rdi, %rbx
movq 0xf8(%rdi), %rcx
pushq $0x1
popq %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0xe8e0
movl %eax, %eax
cmpq %r14, %rax
jne 0x92219
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x12d0e(%rip), %rsi     # 0xa4f2e
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x849c0
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/adler32.c
// Function: adler32_combine_
local uLong adler32_combine_(adler1, adler2, len2)
    uLong adler1;
    uLong adler2;
    z_off64_t len2;
{
    unsigned long sum1;
    unsigned long sum2;
    unsigned rem;

    /* the derivation of this formula is left as an exercise for the reader */
    rem = (unsigned)(len2 % BASE);
    sum1 = adler1 & 0xffff;
    sum2 = rem * sum1;
    MOD(sum2);
    sum1 += (adler2 & 0xffff) + BASE - 1;
    sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
    if (sum1 >= BASE) sum1 -= BASE;
    if (sum1 >= BASE) sum1 -= BASE;
    if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1);
    if (sum2 >= BASE) sum2 -= BASE;
    return sum1 | (sum2 << 16);
}

// Assembly:
movq %rdx, %rax
movl $0xfff1, %r8d           # imm = 0xFFF1
xorl %edx, %edx
divq %r8
movq %rdx, %rcx
movl $0xffff, %edx           # imm = 0xFFFF
movq %rdi, %rax
andq %rdx, %rax
andq %rsi, %rdx
leaq (%rax,%rdx), %r9
leaq (%rax,%rdx), %r10
decq %r10
imull %ecx, %eax
movl $0xfff1, %r11d          # imm = 0xFFF1
xorl %edx, %edx
divl %r11d
addl $0xfff0, %r9d           # imm = 0xFFF0
shrl $0x10, %edi
shrl $0x10, %esi
addq %rdi, %rsi
subq %rcx, %rsi
addq %rdx, %rsi
leaq (%rsi,%r8), %rax
cmpl %r11d, %r9d
movl $0xfff0, %ecx           # imm = 0xFFF0
cmovaeq %r10, %rcx
movq $-0xfff1, %rdx          # imm = 0xFFFF000F
leaq (%rcx,%rdx), %rdi
cmpq %r8, %rcx
cmovbq %rcx, %rdi
addq %rdx, %rsi
cmpq $0x1ffe2, %rax          # imm = 0x1FFE2
cmovbq %rax, %rsi
movq %rsi, %rcx
shlq $0x10, %rcx
movabsq $-0xfff10000, %rax      # imm = 0xFFFFFFFF000F0000
addq %rcx, %rax
cmpq %r8, %rsi
cmovbq %rcx, %rax
orq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/media_number.cpp
// Function: media_number::print_num()
void media_number::print_num(){
    cout << "now num: ";
    for(int i = num.size() - 1; i >= 0; i--){
        cout << num[i] << " ";
    }
    cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x6ced(%rip), %r14      # 0x7fd8
leaq 0x3d12(%rip), %rsi      # 0x5004
movq %r14, %rdi
callq 0x10b0
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x2, %rax
movl %eax, %r12d
decq %r12
leaq 0x3cfa(%rip), %r15      # 0x500c
testl %r12d, %r12d
js 0x133d
movl %r12d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq (%rbx), %rcx
movl (%rcx,%rax,4), %esi
movq %r14, %rdi
callq 0x1110
movq %rax, %rdi
movq %r15, %rsi
callq 0x10b0
decq %r12
jmp 0x1312
movq 0x6c94(%rip), %rdi      # 0x7fd8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1050
nop
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/media_number.cpp
// Function: media_number::print_carry()
void media_number::print_carry(){
    cout << "now carry: ";
    for(int i = carry.size() - 1; i >= 0; i--){
        cout << carry[i] << " ";
    }
    cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x6c71(%rip), %r14      # 0x7fd8
leaq 0x3ca0(%rip), %rsi      # 0x500e
movq %r14, %rdi
callq 0x10b0
movq 0x20(%rbx), %rax
subq 0x18(%rbx), %rax
shrq $0x2, %rax
movl %eax, %r12d
decq %r12
leaq 0x3c7d(%rip), %r15      # 0x500c
testl %r12d, %r12d
js 0x13bb
movl %r12d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0x18(%rbx), %rcx
movl (%rcx,%rax,4), %esi
movq %r14, %rdi
callq 0x1110
movq %rax, %rdi
movq %r15, %rsi
callq 0x10b0
decq %r12
jmp 0x138f
movq 0x6c16(%rip), %rdi      # 0x7fd8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1050
nop
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/media_number.cpp
// Function: media_number::dec2media(int)
vector<int> media_number::dec2media(int dec){
    vector<int> res;
    int t = 0;
    while(dec > 0){
        if(t == carry.size()){
            res.push_back(dec);
            break;
        }
        res.push_back(dec % carry[t]);
        dec /= carry[t++];
    }
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, -0x2c(%rbp)
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r13d, %r13d
leaq -0x30(%rbp), %r12
testl %r15d, %r15d
jle 0x1472
movq 0x18(%r14), %rcx
movq 0x20(%r14), %rax
subq %rcx, %rax
sarq $0x2, %rax
cmpq %rax, %r13
je 0x1466
movl %r15d, %eax
cltd
idivl (%rcx,%r13,4)
movl %edx, -0x30(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1bfa
movq 0x18(%r14), %rcx
movl %r15d, %eax
cltd
idivl (%rcx,%r13,4)
incq %r13
movl %eax, %r15d
movl %eax, -0x2c(%rbp)
jmp 0x1420
leaq -0x2c(%rbp), %rsi
movq %rbx, %rdi
callq 0x1a28
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1486
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a6e
movq %r14, %rdi
callq 0x1120
nop
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/media_number.cpp
// Function: media_number::add_vector(std::vector<int, std::allocator<int>>)
bool media_number::add_vector(vector<int> v){
    if(!if_vector_legal(v)){
        return false;
    }

    for(int i = 0; i < num.size() - 1; i++){
        if(i < v.size()){  
            num[i] += v[i];
        }
        if(num[i] >= carry[i]){
            num[i] -= carry[i];
            num[i + 1] += 1;
        }
    }

    if(num[num.size() - 1] > 0){
        #ifdef DEBUG
            cout << "Overflow!" << endl;
            print_num();
        #endif
        sub_vector(v);
        #ifdef DEBUG
            cout << "After handle overflow." << endl;
            print_num();
        #endif
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x19d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x149a
movl %eax, %r12d
movq %r15, %rdi
callq 0x1a6e
testb %r12b, %r12b
je 0x1597
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
leaq -0x1(%rcx), %rdx
movq 0x18(%rbx), %rsi
xorl %edi, %edi
cmpq %rdi, %rdx
je 0x156d
movq (%r14), %r9
movq 0x8(%r14), %r8
subq %r9, %r8
sarq $0x2, %r8
cmpq %rdi, %r8
jbe 0x1556
movl (%rax,%rdi,4), %r8d
addl (%r9,%rdi,4), %r8d
movl %r8d, (%rax,%rdi,4)
jmp 0x155a
movl (%rax,%rdi,4), %r8d
subl (%rsi,%rdi,4), %r8d
jl 0x1568
movl %r8d, (%rax,%rdi,4)
incl 0x4(%rax,%rdi,4)
incq %rdi
jmp 0x1530
cmpl $0x0, -0x4(%rax,%rcx,4)
jle 0x15a6
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x19d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x15be
leaq -0x38(%rbp), %rdi
callq 0x1a6e
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x1599
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x1a6e
movq %rbx, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/media_number.cpp
// Function: media_number::sub_vector(std::vector<int, std::allocator<int>>)
bool media_number::sub_vector(vector<int> v){
    if(!if_vector_legal(v)){
        return false;
    }

    for(int i = 0; i < num.size() - 1; i++){
        if(i < v.size()){  
            num[i] -= v[i];
        }
        if(num[i] < 0){
            num[i] += carry[i];
            num[i + 1] -= 1;
        }
    }

    if(num[num.size() - 1] < 0){
        #ifdef DEBUG
            cout << "Underflow!" << endl;
            print_num();
        #endif
        add_vector(v);
        #ifdef DEBUG
            cout << "After handle unferflow." << endl;
            print_num();
        #endif
        return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x19d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x149a
movl %eax, %r12d
movq %r15, %rdi
callq 0x1a6e
testb %r12b, %r12b
je 0x1682
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
leaq -0x1(%rdx), %rax
movq 0x18(%rbx), %rsi
xorl %edi, %edi
cmpq %rdi, %rax
je 0x1656
movq (%r14), %r9
movq 0x8(%r14), %r8
subq %r9, %r8
sarq $0x2, %r8
cmpq %rdi, %r8
jbe 0x163c
movl (%rcx,%rdi,4), %r8d
subl (%r9,%rdi,4), %r8d
movl %r8d, (%rcx,%rdi,4)
jmp 0x1640
movl (%rcx,%rdi,4), %r8d
testl %r8d, %r8d
jns 0x1651
addl (%rsi,%rdi,4), %r8d
movl %r8d, (%rcx,%rdi,4)
decl 0x4(%rcx,%rdi,4)
incq %rdi
jmp 0x1616
movb $0x1, %al
cmpl $0x0, -0x4(%rcx,%rdx,4)
jns 0x1684
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x19d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x14dc
leaq -0x38(%rbp), %rdi
callq 0x1a6e
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x1a6e
movq %rbx, %rdi
callq 0x1120
nop
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/media_number.cpp
// Function: increase_carry::increase_carry(int)
increase_carry::increase_carry(int digit){
    for(int i = 0; i < digit; i++){
        num.push_back(0);
        carry.push_back(i + 2);
    }
    num.push_back(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq 0x18(%rdi), %r15
xorl %r12d, %r12d
testl %esi, %esi
cmovlel %r12d, %r14d
leaq -0x2c(%rbp), %r13
subl $0x1, %r14d
jb 0x17d2
andl $0x0, -0x30(%rbp)
movq %rbx, %rdi
leaq -0x30(%rbp), %rsi
callq 0x1bfa
leal 0x2(%r12), %eax
movl %eax, -0x2c(%rbp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x1bfa
incl %r12d
jmp 0x17a4
leaq -0x34(%rbp), %rsi
andl $0x0, (%rsi)
movq %rbx, %rdi
callq 0x1bfa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17f4
jmp 0x17f4
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a4e
movq %r14, %rdi
callq 0x1120
nop
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/media_number.cpp
// Function: increase_carry::increase_carry(std::vector<int, std::allocator<int>>)
increase_carry::increase_carry(vector<int> _num){
    num.assign(_num.begin(), _num.end());
    for(int i = 0; i < num.size(); i++){
        carry.push_back(i + 2);
    }
    num.push_back(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
movq %rax, %rsi
callq 0x1ce2
leaq 0x18(%rbx), %r14
xorl %r12d, %r12d
leaq -0x24(%rbp), %r15
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x2, %rax
cmpq %r12, %rax
jbe 0x186a
leal 0x2(%r12), %eax
movl %eax, -0x24(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1bfa
incq %r12
jmp 0x1842
leaq -0x28(%rbp), %rsi
andl $0x0, (%rsi)
movq %rbx, %rdi
callq 0x1bfa
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x188a
jmp 0x188a
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a4e
movq %r14, %rdi
callq 0x1120
nop
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/media_number.cpp
// Function: decrease_carry::decrease_carry(int)
decrease_carry::decrease_carry(int digit){
    for(int i = 0; i < digit; i++){
        num.push_back(0);
        carry.push_back(digit + 1 - i);
    }
    num.push_back(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq 0x18(%rdi), %r14
leal 0x1(%rsi), %r13d
xorl %r15d, %r15d
testl %esi, %esi
cmovgl %esi, %r15d
leaq -0x2c(%rbp), %r12
subl $0x1, %r15d
jb 0x18ff
andl $0x0, -0x30(%rbp)
movq %rbx, %rdi
leaq -0x30(%rbp), %rsi
callq 0x1bfa
movl %r13d, -0x2c(%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1bfa
decl %r13d
jmp 0x18d5
leaq -0x34(%rbp), %rsi
andl $0x0, (%rsi)
movq %rbx, %rdi
callq 0x1bfa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1921
jmp 0x1921
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a4e
movq %r14, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/media_number.cpp
// Function: decrease_carry::decrease_carry(std::vector<int, std::allocator<int>>)
decrease_carry::decrease_carry(vector<int> _num){
    num.assign(_num.begin(), _num.end());
    for(int i = 0; i < num.size(); i++){
        carry.push_back(num.size() - i + 1);
    }
    num.push_back(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
movq %rax, %rsi
callq 0x1ce2
leaq 0x18(%rbx), %r14
pushq $0x1
popq %r12
xorl %r13d, %r13d
leaq -0x2c(%rbp), %r15
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x2, %rax
cmpq %r13, %rax
jbe 0x199a
addl %r12d, %eax
movl %eax, -0x2c(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1bfa
incq %r13
decl %r12d
jmp 0x1971
leaq -0x30(%rbp), %rsi
andl $0x0, (%rsi)
movq %rbx, %rdi
callq 0x1bfa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x19bc
jmp 0x19bc
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a4e
movq %r14, %rdi
callq 0x1120
nop
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/./permutations.hpp
// Function: dic_order<int>::dic_order(std::vector<int, std::allocator<int>>)
dic_order(vector<T> init_per){
        this->ordered_element = init_per;
        sort(this->ordered_element.begin(), this->ordered_element.end());

        //permutation to media number
        vector<int> t;
        int temp;
        for(int i = 0; i < init_per.size() - 1; i++){
            temp = 0;
            for(int j = i + 1; j < init_per.size(); j++){
                if(init_per[i] > init_per[j]){
                    temp += 1;
                }
            }
            t.push_back(temp);
        }
        reverse(t.begin(), t.end());
        this->media_num = new increase_carry(t);

        #ifdef DEBUG
            this->media_num->print_num();
        #endif
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x10, %rdi
andq $0x0, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
leaq 0x5858(%rip), %rax      # 0x7cd8
movq %rax, (%rbx)
movq %rbx, -0x38(%rbp)
callq 0x3444
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0x353e
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %r15
andq $0x0, 0x10(%r15)
movaps %xmm0, (%r15)
pushq $0x1
popq %r13
xorl %ebx, %ebx
leaq -0x2c(%rbp), %r12
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
leaq -0x1(%rcx), %rdx
cmpq %rbx, %rdx
jbe 0x24fd
andl $0x0, -0x2c(%rbp)
xorl %edx, %edx
movq %r13, %rsi
cmpq %rsi, %rcx
jbe 0x24ea
movl (%rax,%rbx,4), %edi
cmpl (%rax,%rsi,4), %edi
jle 0x24e5
incl %edx
movl %edx, -0x2c(%rbp)
incq %rsi
jmp 0x24d3
incq %rbx
incq %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x1a28
jmp 0x24b3
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x398e
pushq $0x30
popq %rdi
callq 0x10c0
movq %rax, %r15
leaq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x19d0
leaq -0x68(%rbp), %rsi
movq %r15, %rdi
callq 0x1808
movq -0x38(%rbp), %rax
movq %r15, 0x8(%rax)
leaq -0x68(%rbp), %rdi
callq 0x1a6e
leaq -0x50(%rbp), %rdi
callq 0x1a6e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x1a6e
jmp 0x2568
movq %rax, %r14
movq %r15, %rdi
callq 0x10a0
jmp 0x257c
jmp 0x2579
movq %rax, %r14
jmp 0x2585
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x1a6e
movq -0x38(%rbp), %rdi
callq 0x33aa
movq %r14, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/./debug.h
// Function: void print_vector<int>(std::vector<int, std::allocator<int>>, bool)
void print_vector(vector<T> a, bool if_reverse=false){
    if(if_reverse){
        reverse(a.begin(), a.end());
    }
    for(auto x: a){
        cout << x << " ";
    }
    cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x25b4
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x398e
movq (%rbx), %r15
movq 0x8(%rbx), %r12
movq 0x5a16(%rip), %rbx      # 0x7fd8
leaq 0x2a43(%rip), %r14      # 0x500c
cmpq %r12, %r15
je 0x25ea
movl (%r15), %esi
movq %rbx, %rdi
callq 0x1110
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
addq $0x4, %r15
jmp 0x25c9
movq 0x59e7(%rip), %rdi      # 0x7fd8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1050
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/./permutations.hpp
// Function: dic_order<int>::get_permutation()
vector<T> get_permutation() override{
        int len = this->ordered_element.size();
        bool *can_use = new bool[len];
        for(int i = 0; i < this->ordered_element.size(); i++){
            can_use[i] = true;
        }

        vector<int> m_num = this->media_num->get_num();
        m_num.insert(m_num.begin(), 0);
        
        vector<T> res;
        int temp;
        for(int i = m_num.size() - 1; i >= 0; i--){
            temp = m_num[i];
            for(int j = 0; j < len; j++){
                if(can_use[j]){
                    if(temp == 0){
                        res.push_back(this->ordered_element[j]);
                        can_use[j] = false;
                        break; 
                    }else{
                        temp -= 1;
                    }
                }
            }
        }
        delete[] can_use;
        return res;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
movq 0x18(%rsi), %rax
subq 0x10(%rsi), %rax
movq %rax, %r13
sarq $0x2, %r13
shrq $0x2, %rax
cltq
testq %rax, %rax
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x1030
movq %rax, %rbx
xorl %eax, %eax
cmpq %rax, %r13
je 0x264d
movb $0x1, (%rbx,%rax)
incq %rax
jmp 0x263f
movq 0x8(%r14), %rsi
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x129c
movq (%r12), %rsi
leaq -0x4c(%rbp), %rdx
andl $0x0, (%rdx)
movq %r12, %rdi
callq 0x39b0
movq -0x30(%rbp), %rcx
andq $0x0, 0x10(%rcx)
xorps %xmm0, %xmm0
movq -0x40(%rbp), %rax
subq -0x48(%rbp), %rax
movups %xmm0, (%rcx)
shrq $0x2, %rax
xorl %ecx, %ecx
testl %r13d, %r13d
cmovlel %ecx, %r13d
movl %eax, %r12d
shlq $0x2, %r13
decq %r12
testl %r12d, %r12d
js 0x26ea
movl %r12d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x48(%rbp), %rcx
movl (%rcx,%rax,4), %ecx
xorl %eax, %eax
movq %rbx, %r15
movq %r13, %rdx
addq %rax, %rdx
je 0x269b
cmpb $0x1, (%r15)
jne 0x26cb
testl %ecx, %ecx
je 0x26d4
decl %ecx
incq %r15
addq $-0x4, %rax
jmp 0x26b7
movq 0x10(%r14), %rsi
subq %rax, %rsi
movq -0x30(%rbp), %rdi
callq 0x1a28
movb $0x0, (%r15)
jmp 0x269b
movq %rbx, %rdi
callq 0x10e0
leaq -0x48(%rbp), %rdi
callq 0x1a6e
movq -0x30(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x271f
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x1a6e
leaq -0x48(%rbp), %rdi
callq 0x1a6e
movq %r14, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/./permutations.hpp
// Function: increase_carry_order<int>::increase_carry_order(std::vector<int, std::allocator<int>>)
increase_carry_order(vector<T> init_per){
        this->ordered_element = init_per;
        sort(this->ordered_element.begin(), this->ordered_element.end());

        //permutation to media number
        vector<int> t;
        int temp;
        for(int i = 1; i < this->ordered_element.size(); i++){
            temp = 0;
            for(int j = init_per.size() - 1; j >= 0; j--){
                if(init_per[j] < this->ordered_element[i]){
                    temp += 1;
                }
                if(init_per[j] == this->ordered_element[i]){
                    break;
                }
            }
            t.push_back(temp);
        }
        this->media_num = new increase_carry(t);

        #ifdef DEBUG
            this->media_num->print_num();
        #endif
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x10, %rdi
andq $0x0, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
leaq 0x55aa(%rip), %rax      # 0x7d08
movq %rax, (%rbx)
callq 0x3444
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0x353e
leaq -0x50(%rbp), %r15
andq $0x0, 0x10(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
pushq $0x1
popq %r13
leaq -0x2c(%rbp), %r12
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
jbe 0x27f8
andl $0x0, -0x2c(%rbp)
movq (%r14), %rcx
movq 0x8(%r14), %rdx
subq %rcx, %rdx
shrq $0x2, %rdx
movl %edx, %edx
decq %rdx
xorl %esi, %esi
testl %edx, %edx
js 0x27e8
movl %edx, %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl (%rcx,%r9,4), %edi
movl (%rax,%r13,4), %r8d
cmpl %r8d, %edi
jge 0x27e0
incl %esi
movl %esi, -0x2c(%rbp)
movl (%rcx,%r9,4), %edi
movl (%rax,%r13,4), %r8d
decq %rdx
cmpl %r8d, %edi
jne 0x27b8
movq %r15, %rdi
movq %r12, %rsi
callq 0x1a28
incq %r13
jmp 0x278b
pushq $0x30
popq %rdi
callq 0x10c0
movq %rax, %r15
leaq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x19d0
leaq -0x68(%rbp), %rsi
movq %r15, %rdi
callq 0x1808
movq %r15, 0x8(%rbx)
leaq -0x68(%rbp), %rdi
callq 0x1a6e
leaq -0x50(%rbp), %rdi
callq 0x1a6e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x1a6e
jmp 0x2852
movq %rax, %r14
movq %r15, %rdi
callq 0x10a0
jmp 0x2866
jmp 0x2863
movq %rax, %r14
jmp 0x286f
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x1a6e
movq %rbx, %rdi
callq 0x33aa
movq %r14, %rdi
callq 0x1120
nop