// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %r15
movb $0x0, 0x7(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
andq %rdx, %rax
je 0x8c7c
movl $0x1, %ecx
xorl %ebx, %ebx
movl $0x15ae, %edx           # imm = 0x15AE
movl $0x80078071, %esi       # imm = 0x80078071
movq %r13, %rdi
cmpq %rdx, %rax
movl $0x15ae, %r8d           # imm = 0x15AE
cmovbq %rax, %r8
xorl %r9d, %r9d
movzbl (%rdi,%r9), %r10d
addl %r10d, %ecx
addl %ecx, %ebx
incq %r9
cmpq %r9, %r8
jne 0x8c31
addq %r8, %rdi
movl %ecx, %r9d
imulq %rsi, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d     # imm = 0xFFF1
subl %r9d, %ecx
movl %ebx, %r9d
imulq %rsi, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d     # imm = 0xFFF1
subl %r9d, %ebx
subq %r8, %rax
jne 0x8c21
shll $0x10, %ebx
orl %ecx, %ebx
jmp 0x8c81
movl $0x1, %ebx
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x8ca3
testq %rsi, %rsi
je 0x8ca9
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x8cb5
movq (%r12), %rax
jmp 0x8cb9
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x78, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x8cd2
movq (%r12), %rax
jmp 0x8cf8
testq %rsi, %rsi
je 0x8ce8
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x8cf4
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x1, (%rax,%rsi)
incq (%r14)
leaq 0x7(%rsp), %r9
movq %r15, %rdi
movl $0x2, %esi
movl $0x1, %edx
movq %r13, %rcx
movq %rbp, %r8
pushq %r14
pushq %r12
callq 0x2f25
addq $0x10, %rsp
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x8d46
testq %rsi, %rsi
je 0x8d4c
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x8d58
movq (%r12), %rax
jmp 0x8d5c
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movl %ebx, %ecx
shrl $0x18, %ecx
movb %cl, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x8d79
movq (%r12), %rax
jmp 0x8d9f
testq %rsi, %rsi
je 0x8d8f
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x8d9b
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movl %ebx, %ecx
shrl $0x10, %ecx
movb %cl, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x8dbc
movq (%r12), %rax
jmp 0x8de2
testq %rsi, %rsi
je 0x8dd2
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x8dde
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb %bh, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x8dfa
movq (%r12), %rax
jmp 0x8e20
testq %rsi, %rsi
je 0x8e10
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x8e1c
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb %bl, (%rax,%rsi)
movq (%r14), %rdi
incq %rdi
movq %rdi, (%r14)
cmpl $0x0, (%r15)
jne 0x8e41
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %rsi
movl %ebp, %edx
callq 0x12fe
jmp 0x8e32
nopl (%rax)