// File: /workspace/github_c_makefile_star2_O2/imaya[P]zopfli-for-emscripten/deflate.c
// Function: DeflateBlock
static void DeflateBlock(const ZopfliOptions* options,
                         int btype, int final,
                         const unsigned char* in, size_t instart, size_t inend,
                         unsigned char* bp,
                         unsigned char** out, size_t* outsize) {
  if (btype == 0) {
    DeflateNonCompressedBlock(
        options, final, in, instart, inend, bp, out, outsize);
  } else if (btype == 1) {
     DeflateFixedBlock(options, final, in, instart, inend, bp, out, outsize);
  } else {
    assert (btype == 2);
    DeflateDynamicBlock(options, final, in, instart, inend, bp, out, outsize);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r13
movq %r8, %r12
movq %rcx, %r15
movq %rdi, %rbp
movq 0xb0(%rsp), %r14
movq 0xa0(%rsp), %rbx
cmpl $0x2, %esi
je 0x243e
cmpl $0x1, %esi
je 0x239f
testl %esi, %esi
jne 0x2721
movq %r13, %rax
subq %r12, %rax
movq %rax, (%rsp)
cmpq $0x10000, %rax          # imm = 0x10000
jae 0x2740
movl %edx, %edi
movq %rbx, %rsi
movq 0xa8(%rsp), %rbp
movq %rbp, %rdx
movq %r14, %rcx
callq 0x36b2
xorl %edi, %edi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x36b2
xorl %edi, %edi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x36b2
movb $0x0, (%rbx)
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x2540
testq %rsi, %rsi
je 0x25c5
movq 0xa8(%rsp), %rbp
movq (%rbp), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x25d7
movq %r13, %rbx
subq %r12, %rbx
leaq 0x10(%rsp), %rdi
movl %edx, (%rsp)
callq 0x439c
leaq 0x30(%rsp), %rax
movq %rbp, (%rax)
movq %r12, 0x10(%rax)
movq %r13, 0x18(%rax)
movq %rax, %rbp
pushq $0x18
popq %rdi
callq 0x1120
movq %rax, 0x8(%rbp)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1ab8
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
leaq 0x10(%rsp), %r15
movq %r15, %r8
callq 0x5fa7
movq (%rbp), %rdi
movq (%r15), %rcx
movq 0x8(%r15), %r8
subq $0x8, %rsp
pushq $0x1
popq %rsi
movl 0x8(%rsp), %edx
xorl %r9d, %r9d
pushq %r14
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %rbx
pushq 0x10(%r15)
callq 0x3175
addq $0x30, %rsp
movq 0x8(%rbp), %rdi
callq 0x1b3c
movq 0x8(%rbp), %rdi
jmp 0x25a9
movl %edx, (%rsp)
movq %r15, 0x8(%rsp)
movq %r13, %r15
subq %r12, %r15
leaq 0x10(%rsp), %rdi
callq 0x439c
leaq 0x30(%rsp), %rbx
movq %rbp, (%rbx)
movq %r15, %rbp
movq 0x8(%rsp), %r15
movq %r12, 0x10(%rbx)
movq %r13, 0x18(%rbx)
pushq $0x18
popq %rdi
callq 0x1120
movq %rax, 0x8(%rbx)
movq %rbp, %rdi
movq %rax, %rsi
callq 0x1ab8
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
leaq 0x10(%rsp), %rbx
movq %rbx, %r8
callq 0x50bc
movq 0x10(%rbx), %rax
cmpq $0x3e7, %rax            # imm = 0x3E7
ja 0x253b
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x439c
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x5fa7
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
pushq $0x2
popq %r15
xorl %edx, %edx
movl %r15d, %r8d
callq 0x1ccc
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rcx
pushq $0x1
popq %rbx
xorl %edx, %edx
movl %ebx, %r8d
callq 0x1ccc
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x254d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x43a8
movq 0x60(%rsp), %rax
movq %rax, 0x10(%r15)
movupd 0x50(%rsp), %xmm0
movapd %xmm0, (%r15)
jmp 0x255a
pushq $0x2
popq %rbx
jmp 0x255f
movq (%rbp), %rax
movq (%rsp), %rbx
jmp 0x25df
leaq 0x50(%rsp), %rdi
callq 0x43a8
movl %r15d, %ebx
movq 0x20(%rsp), %rax
movq 0xa0(%rsp), %r10
movl (%rsp), %edx
movq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r15
movq (%r15), %rcx
movq 0x8(%r15), %r8
subq $0x8, %rsp
movl %ebx, %esi
xorl %r9d, %r9d
pushq %r14
pushq 0xb8(%rsp)
pushq %r10
pushq %rbp
pushq %rax
callq 0x3175
addq $0x30, %rsp
movq 0x38(%rsp), %rdi
callq 0x1b3c
movq 0x38(%rsp), %rdi
callq 0x1030
movq %r15, %rdi
callq 0x43a8
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq 0xa8(%rsp), %rbp
movq (%rsp), %rbx
movq %rax, (%rbp)
movb %bl, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x25fe
movq 0xa8(%rsp), %rax
movq (%rax), %rax
jmp 0x2632
testq %rsi, %rsi
je 0x261c
movq 0xa8(%rsp), %rbp
movq (%rbp), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x262e
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq 0xa8(%rsp), %rbp
movq %rax, (%rbp)
movl %ebx, %ecx
xorl $0xffff, %ecx           # imm = 0xFFFF
movb %bh, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x2659
movq 0xa8(%rsp), %rbx
movq (%rbx), %rax
jmp 0x2687
movl %ecx, %ebp
testq %rsi, %rsi
movq 0xa8(%rsp), %rbx
je 0x2678
movq (%rbx), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x2682
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%rbx)
movl %ebp, %ecx
movb %cl, (%rax,%rsi)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
je 0x269e
movq (%rbx), %rax
jmp 0x26c4
movl %ecx, %ebp
testq %rsi, %rsi
je 0x26b5
movq (%rbx), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x26bf
pushq $0x1
popq %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%rbx)
movl %ebp, %ecx
movb %ch, (%rax,%rsi)
movq (%r14), %rsi
incq %rsi
movq %rsi, (%r14)
pushq $0x1
popq %rbp
cmpq %r13, %r12
jae 0x25b6
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x26fa
testq %rsi, %rsi
je 0x26ff
movq (%rbx), %rdi
addq %rsi, %rsi
callq 0x1140
movq (%r14), %rsi
jmp 0x2709
movq (%rbx), %rax
jmp 0x270c
movq %rbp, %rdi
callq 0x1120
xorl %esi, %esi
movq %rax, (%rbx)
movb (%r15,%r12), %cl
movb %cl, (%rax,%rsi)
movq (%r14), %rsi
incq %rsi
movq %rsi, (%r14)
incq %r12
jmp 0x26d3
leaq 0x4bbe(%rip), %rdi      # 0x72e6
leaq 0x4bc2(%rip), %rsi      # 0x72f1
leaq 0x5000(%rip), %rcx      # 0x7736
movl $0x225, %edx            # imm = 0x225
callq 0x10b0
leaq 0x5076(%rip), %rdi      # 0x77bd
leaq 0x4ba3(%rip), %rsi      # 0x72f1
leaq 0x507a(%rip), %rcx      # 0x77cf
movl $0x206, %edx            # imm = 0x206
callq 0x10b0