// File: /workspace/github_c_makefile_star2_O3/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, 0xb0c9(%rip)      # 0xf0f0
jne 0x4073
xorl %ecx, %ecx
leaq -0x12477cdf(%rax), %r11
leaq 0xb0c7(%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 0x4041
movq %r8, (%rsi,%rcx,8)
incq %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x4039
movb $0x1, 0xb07d(%rip)      # 0xf0f0
testl %edx, %edx
movq %rdx, %rbp
je 0x40b2
movslq %edx, %rcx
movl $0x1, %edx
xorl %edi, %edi
leaq 0xb075(%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 0x4090
xorq %rax, %rbx
jmp 0x40b4
xorl %ebx, %ebx
movb $0x0, 0x7(%rsp)
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x40db
testq %rsi, %rsi
je 0x40e1
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x40ed
movq (%r12), %rax
jmp 0x40f1
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x1f, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x410a
movq (%r12), %rax
jmp 0x4130
testq %rsi, %rsi
je 0x4120
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x412c
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $-0x75, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x4149
movq (%r12), %rax
jmp 0x416f
testq %rsi, %rsi
je 0x415f
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x416b
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x8, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x4188
movq (%r12), %rax
jmp 0x41ae
testq %rsi, %rsi
je 0x419e
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x41aa
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x41c7
movq (%r12), %rax
jmp 0x41ed
testq %rsi, %rsi
je 0x41dd
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x41e9
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x4206
movq (%r12), %rax
jmp 0x422c
testq %rsi, %rsi
je 0x421c
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x4228
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x4245
movq (%r12), %rax
jmp 0x426b
testq %rsi, %rsi
je 0x425b
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x4267
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x4284
movq (%r12), %rax
jmp 0x42aa
testq %rsi, %rsi
je 0x429a
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x42a6
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x0, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x42c3
movq (%r12), %rax
jmp 0x42e9
testq %rsi, %rsi
je 0x42d9
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x42e5
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x2, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x4302
movq (%r12), %rax
jmp 0x4328
testq %rsi, %rsi
je 0x4318
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x4324
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb $0x3, (%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 0x4376
testq %rsi, %rsi
je 0x437c
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x4388
movq (%r12), %rax
jmp 0x438c
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movb %bl, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x43a4
movq (%r12), %rax
jmp 0x43ca
testq %rsi, %rsi
je 0x43ba
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x43c6
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 0x43e2
movq (%r12), %rax
jmp 0x4408
testq %rsi, %rsi
je 0x43f8
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x4404
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 0x4425
movq (%r12), %rax
jmp 0x444b
testq %rsi, %rsi
je 0x443b
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x4447
movl $0x1, %edi
callq 0x1130
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 0x4469
movq (%r12), %rax
movq %rbp, %rbx
jmp 0x4492
testq %rsi, %rsi
je 0x447f
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x448b
movl $0x1, %edi
callq 0x1130
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 0x44aa
movq (%r12), %rax
jmp 0x44d0
testq %rsi, %rsi
je 0x44c0
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x44cc
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 0x44e8
movq (%r12), %rax
jmp 0x450e
testq %rsi, %rsi
je 0x44fe
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x450a
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 0x452b
movq (%r12), %rax
jmp 0x4551
testq %rsi, %rsi
je 0x4541
movq (%r12), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r14), %rsi
jmp 0x454d
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r12)
movl %ebx, %ecx
shrl $0x18, %ecx
movb %cl, (%rax,%rsi)
movq (%r14), %rdi
incq %rdi
movq %rdi, (%r14)
cmpl $0x0, (%r15)
jne 0x4577
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rsi
movl %ebx, %edx
callq 0x1288
jmp 0x4568
nop