// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movq %r8, %r12
movq %rcx, %r13
movq %rdi, %rbp
movq 0xb0(%rsp), %r14
movq 0xa0(%rsp), %r15
cmpl $0x2, %esi
je 0x2c2a
cmpl $0x1, %esi
je 0x2b7f
testl %esi, %esi
jne 0x2ee6
movq %rbx, %rcx
subq %r12, %rcx
movq %rcx, (%rsp)
cmpq $0x10000, %rcx          # imm = 0x10000
movq 0xa8(%rsp), %rbp
jae 0x2f05
movl %edx, %edi
movq %r15, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x3e81
xorl %edi, %edi
movq %r15, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x3e81
xorl %edi, %edi
movq %r15, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x3e81
movb $0x0, (%r15)
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x2dba
testq %rsi, %rsi
je 0x2dac
movq (%rbp), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x2db6
movq %rbx, %r15
subq %r12, %r15
leaq 0x10(%rsp), %rdi
movl %edx, (%rsp)
callq 0x6684
leaq 0x30(%rsp), %rax
movq %rbp, (%rax)
movq %r12, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq %rax, %rbp
movl $0x18, %edi
callq 0x1120
movq %rax, 0x8(%rbp)
movq %r15, %rdi
movq %rax, %rsi
callq 0x1c9c
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
leaq 0x10(%rsp), %rbx
movq %rbx, %r8
callq 0x85e0
movq (%rbp), %rdi
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq $0x8, %rsp
movl $0x1, %esi
movl 0x8(%rsp), %edx
xorl %r9d, %r9d
pushq %r14
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %r15
pushq 0x10(%rbx)
callq 0x3947
addq $0x30, %rsp
movq 0x8(%rbp), %rdi
callq 0x1fd8
movq 0x8(%rbp), %rdi
callq 0x1030
movq %rbx, %rdi
jmp 0x2d98
movl %edx, (%rsp)
movq %rbx, %r15
subq %r12, %r15
leaq 0x10(%rsp), %rdi
callq 0x6684
movq %r13, 0x8(%rsp)
leaq 0x30(%rsp), %r13
movq %rbp, (%r13)
movq %r12, 0x10(%r13)
movq %rbx, 0x18(%r13)
movl $0x18, %edi
callq 0x1120
movq %rax, 0x8(%r13)
movq %r15, 0x28(%rsp)
movq %r15, %rdi
movq %rax, %rsi
callq 0x1c9c
movq %r13, %rdi
movq 0x8(%rsp), %r13
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
leaq 0x10(%rsp), %r15
movq %r15, %r8
callq 0x7470
movl $0x2, %esi
cmpq $0x3e7, 0x10(%r15)      # imm = 0x3E7
movq 0xa8(%rsp), %rbp
ja 0x2d4a
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x6684
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movq %r15, %r8
callq 0x85e0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
xorl %edx, %edx
movl $0x2, %r8d
callq 0x2458
movsd %xmm0, 0x8(%rsp)
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rcx
xorl %edx, %edx
movl $0x1, %r8d
callq 0x2458
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x2d3b
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x6693
movq 0x60(%rsp), %rax
movq %rax, 0x10(%r15)
movupd 0x50(%rsp), %xmm0
movapd %xmm0, (%r15)
movl $0x1, %esi
jmp 0x2d4a
leaq 0x50(%rsp), %rdi
callq 0x6693
movl $0x2, %esi
movq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r15
movq (%r15), %rcx
movq 0x8(%r15), %r8
subq $0x8, %rsp
movl 0x8(%rsp), %edx
xorl %r9d, %r9d
pushq %r14
pushq %rbp
pushq 0xb8(%rsp)
pushq 0x48(%rsp)
pushq 0x10(%r15)
callq 0x3947
addq $0x30, %rsp
movq 0x38(%rsp), %rdi
callq 0x1fd8
movq 0x38(%rsp), %rdi
callq 0x1030
movq %r15, %rdi
callq 0x6693
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x1120
movq %rax, (%rbp)
movq (%rbp), %rax
movq (%r14), %rcx
movq (%rsp), %rdx
movb %dl, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x2dfc
testq %rsi, %rsi
je 0x2dea
movq (%rbp), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x2df4
movl $0x1, %edi
callq 0x1120
movq %rax, (%rbp)
movq (%rsp), %rdx
movl %edx, %r15d
xorl $0xffff, %r15d          # imm = 0xFFFF
movq (%rbp), %rax
movq (%r14), %rcx
movb %dh, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
jne 0x2e40
testq %rsi, %rsi
je 0x2e32
movq (%rbp), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x2e3c
movl $0x1, %edi
callq 0x1120
movq %rax, (%rbp)
movq (%rbp), %rax
movq (%r14), %rcx
movb %r15b, (%rax,%rcx)
movq (%r14), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r14)
testq %rax, %rsi
movl %r15d, %edx
jne 0x2e84
movl %edx, %r15d
testq %rsi, %rsi
je 0x2e73
movq (%rbp), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x2e7d
movl $0x1, %edi
callq 0x1120
movq %rax, (%rbp)
movl %r15d, %edx
movq (%rbp), %rax
movq (%r14), %rcx
movb %dh, (%rax,%rcx)
incq (%r14)
cmpq %r12, %rbx
jbe 0x2d9d
movq (%r14), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x2ec7
testq %rsi, %rsi
je 0x2eb9
movq (%rbp), %rdi
addq %rsi, %rsi
callq 0x1140
jmp 0x2ec3
movl $0x1, %edi
callq 0x1120
movq %rax, (%rbp)
movb (%r13,%r12), %al
movq (%rbp), %rcx
movq (%r14), %rdx
movb %al, (%rcx,%rdx)
incq (%r14)
incq %r12
cmpq %r12, %rbx
jne 0x2e9a
jmp 0x2d9d
leaq 0x74a9(%rip), %rdi      # 0xa396
leaq 0x74ad(%rip), %rsi      # 0xa3a1
leaq 0x78f6(%rip), %rcx      # 0xa7f1
movl $0x225, %edx            # imm = 0x225
callq 0x10b0
leaq 0x796c(%rip), %rdi      # 0xa878
leaq 0x748e(%rip), %rsi      # 0xa3a1
leaq 0x7970(%rip), %rcx      # 0xa88a
movl $0x206, %edx            # imm = 0x206
callq 0x10b0