// File: /workspace/github_c_makefile_star2_O2/imaya[P]zopfli-for-emscripten/gzip_container.c
// Function: ZopfliGzipCompress
void ZopfliGzipCompress(const ZopfliOptions* options,
                        const unsigned char* in, size_t insize,
                        unsigned char** out, size_t* outsize) {
  unsigned long crcvalue = CRC(in, insize);
  unsigned char bp = 0;

  ZOPFLI_APPEND_DATA(31, out, outsize);  /* ID1 */
  ZOPFLI_APPEND_DATA(139, out, outsize);  /* ID2 */
  ZOPFLI_APPEND_DATA(8, out, outsize);  /* CM */
  ZOPFLI_APPEND_DATA(0, out, outsize);  /* FLG */
  /* MTIME */
  ZOPFLI_APPEND_DATA(0, out, outsize);
  ZOPFLI_APPEND_DATA(0, out, outsize);
  ZOPFLI_APPEND_DATA(0, out, outsize);
  ZOPFLI_APPEND_DATA(0, out, outsize);

  ZOPFLI_APPEND_DATA(2, out, outsize);  /* XFL, 2 indicates best compression. */
  ZOPFLI_APPEND_DATA(3, out, outsize);  /* OS follows Unix conventions. */

  ZopfliDeflate(options, 2 /* Dynamic block */, 1,
                in, insize, &bp, out, outsize);

  /* CRC */
  ZOPFLI_APPEND_DATA(crcvalue % 256, out, outsize);
  ZOPFLI_APPEND_DATA((crcvalue >> 8) % 256, out, outsize);
  ZOPFLI_APPEND_DATA((crcvalue >> 16) % 256, out, outsize);
  ZOPFLI_APPEND_DATA((crcvalue >> 24) % 256, out, outsize);

  /* ISIZE */
  ZOPFLI_APPEND_DATA(insize % 256, out, outsize);
  ZOPFLI_APPEND_DATA((insize >> 8) % 256, out, outsize);
  ZOPFLI_APPEND_DATA((insize >> 16) % 256, out, outsize);
  ZOPFLI_APPEND_DATA((insize >> 24) % 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 %rsi, %r13
movq %rdi, %r15
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpb $0x0, 0x89a5(%rip)      # 0xc0f0
jne 0x379b
xorl %eax, %eax
pushq $0x8
popq %rcx
leaq 0x89a7(%rip), %r11      # 0xc100
addq $-0x12477cdf, %rsi      # imm = 0xEDB88321
cmpq $0x100, %rax            # imm = 0x100
je 0x3794
movl %ecx, %edi
movq %rax, %r8
subl $0x1, %edi
jb 0x378b
movq %r8, %r9
shrq %r9
movq %r9, %r10
xorq %rsi, %r10
testb $0x1, %r8b
cmoveq %r9, %r10
movq %r10, %r8
jmp 0x376d
movq %r8, (%r11,%rax,8)
incq %rax
jmp 0x3760
movb $0x1, 0x8955(%rip)      # 0xc0f0
movq %rdx, %rbp
movslq %edx, %rax
xorl %edx, %edx
leaq 0x8956(%rip), %rcx      # 0xc100
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %edx, %edx
cmpq %rdx, %rax
jbe 0x37ce
movb (%r13,%rdx), %sil
xorb %bl, %sil
movzbl %sil, %esi
shrq $0x8, %rbx
xorq (%rcx,%rsi,8), %rbx
incl %edx
jmp 0x37af
movb $0x0, 0x7(%rsp)
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x37f5
testq %rsi, %rsi
je 0x37fb
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3805
movq (%r12), %rax
jmp 0x3809
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb $0x1f, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3822
movq (%r12), %rax
jmp 0x3846
testq %rsi, %rsi
je 0x3838
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3842
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb $-0x75, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x385f
movq (%r12), %rax
jmp 0x3883
testq %rsi, %rsi
je 0x3875
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x387f
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb $0x8, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x389c
movq (%r12), %rax
jmp 0x38c0
testq %rsi, %rsi
je 0x38b2
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x38bc
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x38d9
movq (%r12), %rax
jmp 0x38fd
testq %rsi, %rsi
je 0x38ef
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x38f9
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3916
movq (%r12), %rax
jmp 0x393a
testq %rsi, %rsi
je 0x392c
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3936
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3953
movq (%r12), %rax
jmp 0x3977
testq %rsi, %rsi
je 0x3969
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3973
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3990
movq (%r12), %rax
jmp 0x39b4
testq %rsi, %rsi
je 0x39a6
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x39b0
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x39cd
movq (%r12), %rax
jmp 0x39f1
testq %rsi, %rsi
je 0x39e3
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x39ed
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb $0x2, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3a0a
movq (%r12), %rax
jmp 0x3a2e
testq %rsi, %rsi
je 0x3a20
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3a2a
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorq %rcx, %rbx
movb $0x3, (%rax,%rsi)
incq (%r14)
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
leaq 0x7(%rsp), %r9
movq %r15, %rdi
movq %r13, %rcx
movq %rbp, %r8
pushq %r14
pushq %r12
callq 0x275f
popq %rax
popq %rcx
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x3a7e
testq %rsi, %rsi
je 0x3a84
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3a8e
movq (%r12), %rax
jmp 0x3a92
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb %bl, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3aaa
movq (%r12), %rax
jmp 0x3ace
testq %rsi, %rsi
je 0x3ac0
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3aca
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb %bh, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3ae6
movq (%r12), %rax
jmp 0x3b0a
testq %rsi, %rsi
je 0x3afc
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3b06
pushq $0x1
popq %rdi
callq 0x1120
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 0x3b27
movq (%r12), %rax
jmp 0x3b4b
testq %rsi, %rsi
je 0x3b3d
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3b47
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
shrl $0x18, %ebx
movb %bl, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3b69
movq (%r12), %rax
movq %rbp, %rbx
jmp 0x3b90
testq %rsi, %rsi
je 0x3b7f
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3b89
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rbp, %rbx
movq %rax, (%r12)
movb %bl, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3ba8
movq (%r12), %rax
jmp 0x3bcc
testq %rsi, %rsi
je 0x3bbe
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3bc8
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movb %bh, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x3be4
movq (%r12), %rax
jmp 0x3c08
testq %rsi, %rsi
je 0x3bfa
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3c04
pushq $0x1
popq %rdi
callq 0x1120
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 0x3c25
movq (%r12), %rax
jmp 0x3c49
testq %rsi, %rsi
je 0x3c3b
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x3c45
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%r12)
movl %ebx, %ecx
shrl $0x18, %ecx
movb %cl, (%rax,%rsi)
movq (%r14), %rcx
incq %rcx
movq %rcx, (%r14)
cmpl $0x0, (%r15)
jne 0x3c6f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8382(%rip), %rax      # 0xbff8
movq %rbx, %rdx
subq %rcx, %rdx
js 0x3c85
cvtsi2ss %rdx, %xmm0
jmp 0x3c9a
movq %rdx, %rsi
shrq %rsi
andl $0x1, %edx
orq %rsi, %rdx
cvtsi2ss %rdx, %xmm0
addss %xmm0, %xmm0
movq (%rax), %rdi
mulss 0x3c13(%rip), %xmm0     # 0x78b8
testq %rbx, %rbx
js 0x3cb1
cvtsi2ss %rbx, %xmm1
jmp 0x3cc8
movq %rbx, %rax
shrq %rax
movl %ebx, %edx
andl $0x1, %edx
orq %rax, %rdx
cvtsi2ss %rdx, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x3be5(%rip), %rsi      # 0x78bc
movl %ebx, %edx
movb $0x1, %al
callq 0x10f0
jmp 0x3c60
nopl (%rax)