// File: /workspace/github_c_makefile_star2_O0/imaya[P]zopfli-for-emscripten/zlib_container.c
// Function: ZopfliZlibCompress
void ZopfliZlibCompress(const ZopfliOptions* options,
                        const unsigned char* in, size_t insize,
                        unsigned char** out, size_t* outsize) {
  unsigned char bitpointer = 0;
  unsigned checksum = adler32(in, (unsigned)insize);
  unsigned cmf = 120;  /* CM 8, CINFO 7. See zlib spec.*/
  unsigned flevel = 0;
  unsigned fdict = 0;
  unsigned cmfflg = 256 * cmf + fdict * 32 + flevel * 64;
  unsigned fcheck = 31 - cmfflg % 31;
  cmfflg += fcheck;

  ZOPFLI_APPEND_DATA(cmfflg / 256, out, outsize);
  ZOPFLI_APPEND_DATA(cmfflg % 256, out, outsize);

  ZopfliDeflate(options, 2 /* dynamic block */, 1 /* final */,
                in, insize, &bitpointer, out, outsize);

  ZOPFLI_APPEND_DATA((checksum >> 24) % 256, out, outsize);
  ZOPFLI_APPEND_DATA((checksum >> 16) % 256, out, outsize);
  ZOPFLI_APPEND_DATA((checksum >> 8) % 256, out, outsize);
  ZOPFLI_APPEND_DATA(checksum % 256, out, outsize);

  if (options->verbose) {
    fprintf(stderr,
            "Original Size: %d, Compressed: %d, Compression: %f%% Removed\n",
            (int)insize, (int)*outsize,
            100.0f * (float)(insize - *outsize) / (float)insize);
  }
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movb $0x0, 0x8f(%rsp)
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rax
movl %eax, %eax
movl %eax, %esi
callq 0xbb00
movl %eax, 0x88(%rsp)
movl $0x78, 0x84(%rsp)
movl $0x0, 0x80(%rsp)
movl $0x0, 0x7c(%rsp)
movl 0x84(%rsp), %eax
shll $0x8, %eax
movl 0x7c(%rsp), %ecx
shll $0x5, %ecx
addl %ecx, %eax
movl 0x80(%rsp), %ecx
shll $0x6, %ecx
addl %ecx, %eax
movl %eax, 0x78(%rsp)
movl 0x78(%rsp), %eax
movl $0x1f, %ecx
xorl %edx, %edx
divl %ecx
movl $0x1f, %eax
subl %edx, %eax
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
addl 0x78(%rsp), %eax
movl %eax, 0x78(%rsp)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0xb5f5
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xb5be
movl $0x1, %edi
callq 0x1120
movq %rax, 0x68(%rsp)
jmp 0xb5e5
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x1140
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, (%rax)
movl 0x78(%rsp), %eax
shrl $0x8, %eax
movb %al, %dl
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x90(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0xb6a2
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xb66b
movl $0x1, %edi
callq 0x1120
movq %rax, 0x60(%rsp)
jmp 0xb692
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x1140
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, (%rax)
movl 0x78(%rsp), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x90(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rcx
movq 0xa0(%rsp), %r8
movq 0x98(%rsp), %r10
movq 0x90(%rsp), %rax
movl $0x2, %esi
movl $0x1, %edx
leaq 0x8f(%rsp), %r9
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x34d0
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0xb799
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xb762
movl $0x1, %edi
callq 0x1120
movq %rax, 0x58(%rsp)
jmp 0xb789
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x1140
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, (%rax)
movl 0x88(%rsp), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, %dl
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x90(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0xb84e
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xb817
movl $0x1, %edi
callq 0x1120
movq %rax, 0x50(%rsp)
jmp 0xb83e
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x1140
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, (%rax)
movl 0x88(%rsp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, %dl
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x90(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0xb903
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xb8cc
movl $0x1, %edi
callq 0x1120
movq %rax, 0x48(%rsp)
jmp 0xb8f3
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x1140
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, (%rax)
movl 0x88(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, %dl
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x90(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0xb9b8
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xb981
movl $0x1, %edi
callq 0x1120
movq %rax, 0x40(%rsp)
jmp 0xb9a8
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x1140
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, (%rax)
movl 0x88(%rsp), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x90(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xb0(%rsp), %rax
cmpl $0x0, (%rax)
je 0xbaf8
movq 0x65ef(%rip), %rax      # 0x11ff8
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movl %eax, %ecx
movl %ecx, 0x30(%rsp)
movq 0x90(%rsp), %rcx
movq (%rcx), %rcx
movl %ecx, %edx
movl %edx, 0x34(%rsp)
subq %rcx, %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x38(%rsp)
testq %rax, %rax
movss %xmm0, 0x3c(%rsp)
js 0xba71
movss 0x38(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
movq 0x28(%rsp), %rax
movl 0x30(%rsp), %ecx
movss 0x3c(%rsp), %xmm0
movss 0x1e44(%rip), %xmm1     # 0xd8cc
mulss %xmm1, %xmm0
movss %xmm0, 0x14(%rsp)
movq %rax, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x18(%rsp)
testq %rax, %rax
movss %xmm0, 0x1c(%rsp)
js 0xbac9
movss 0x18(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
movl 0x34(%rsp), %ecx
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rdi
movss 0x14(%rsp), %xmm0
movss 0x1c(%rsp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1ddf(%rip), %rsi      # 0xd8d0
movb $0x1, %al
callq 0x10f0
addq $0xb8, %rsp
retq