// File: /workspace/github_c_makefile_star2_O1/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, %eax       # imm = 0xFFFFFFFF
cmpb $0x0, 0xb1dd(%rip)      # 0xf0f0
jne 0x3f5f
xorl %ecx, %ecx
leaq -0x12477cdf(%rax), %r11
leaq 0xb1db(%rip), %rsi      # 0xf100
movl $0x8, %edi
movq %rcx, %r8
movq %r8, %r9
shrq %r9
movq %r9, %r10
xorq %r11, %r10
testb $0x1, %r8b
movq %r10, %r8
cmoveq %r9, %r8
decl %edi
jne 0x3f2d
movq %r8, (%rsi,%rcx,8)
incq %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x3f25
movb $0x1, 0xb191(%rip)      # 0xf0f0
testl %edx, %edx
movq %rdx, %rbp
je 0x3f9e
movslq %edx, %rcx
movl $0x1, %edx
xorl %edi, %edi
leaq 0xb189(%rip), %rsi      # 0xf100
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movb (%r13,%rdi), %dil
xorb %bl, %dil
movzbl %dil, %edi
shrq $0x8, %rbx
xorq (%rsi,%rdi,8), %rbx
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x3f7c
xorq %rax, %rbx
jmp 0x3fa0
xorl %ebx, %ebx
movb $0x0, 0x7(%rsp)
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x3fd2
testq %rsi, %rsi
je 0x3fc4
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x3fce
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $0x1f, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x400d
testq %rsi, %rsi
je 0x3fff
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x4009
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $-0x75, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x4048
testq %rsi, %rsi
je 0x403a
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x4044
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $0x8, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x4083
testq %rsi, %rsi
je 0x4075
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x407f
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $0x0, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x40be
testq %rsi, %rsi
je 0x40b0
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x40ba
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $0x0, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x40f9
testq %rsi, %rsi
je 0x40eb
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x40f5
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $0x0, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x4134
testq %rsi, %rsi
je 0x4126
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x4130
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $0x0, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x416f
testq %rsi, %rsi
je 0x4161
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x416b
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $0x0, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x41aa
testq %rsi, %rsi
je 0x419c
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x41a6
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $0x2, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x41e5
testq %rsi, %rsi
je 0x41d7
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x41e1
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb $0x3, (%rax,%rcx)
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 0x2f24
addq $0x10, %rsp
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x4245
testq %rsi, %rsi
je 0x4237
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x4241
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb %bl, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x427f
testq %rsi, %rsi
je 0x4271
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x427b
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb %bh, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x42b9
testq %rsi, %rsi
je 0x42ab
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x42b5
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movl %ebx, %eax
shrl $0x10, %eax
movq (%r12), %rcx
movq (%r14), %rdx
movb %al, (%rcx,%rdx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x42f8
testq %rsi, %rsi
je 0x42ea
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x42f4
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
shrl $0x18, %ebx
movq (%r12), %rax
movq (%r14), %rcx
movb %bl, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
movq %rbp, %rbx
jne 0x4338
testq %rsi, %rsi
je 0x432a
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x4334
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb %bl, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x4372
testq %rsi, %rsi
je 0x4364
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x436e
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movq (%r12), %rax
movq (%r14), %rcx
movb %bh, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x43ac
testq %rsi, %rsi
je 0x439e
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x43a8
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movl %ebx, %eax
shrl $0x10, %eax
movq (%r12), %rcx
movq (%r14), %rdx
movb %al, (%rcx,%rdx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x43eb
testq %rsi, %rsi
je 0x43dd
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x43e7
movl $0x1, %edi
callq 0x1120
movq %rax, (%r12)
movl %ebx, %eax
shrl $0x18, %eax
movq (%r12), %rcx
movq (%r14), %rdx
movb %al, (%rcx,%rdx)
movq (%r14), %rdi
incq %rdi
movq %rdi, (%r14)
cmpl $0x0, (%r15)
jne 0x4418
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rsi
movl %ebx, %edx
callq 0x126e
jmp 0x4409