// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %r8, %r12
movq %rcx, 0x8(%rsp)
movq %rdi, %r13
movq 0xa8(%rsp), %r15
movq 0xa0(%rsp), %rbx
cmpl $0x2, %esi
je 0x2c0d
cmpl $0x1, %esi
je 0x2b60
testl %esi, %esi
jne 0x2ee7
movq %r14, %rax
subq %r12, %rax
movq %rax, (%rsp)
cmpq $0x10000, %rax          # imm = 0x10000
movq 0x8(%rsp), %rbp
movq 0xb0(%rsp), %r13
jae 0x2f06
movl %edx, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x3f8d
xorl %edi, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x3f8d
xorl %edi, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x3f8d
movb $0x0, (%rbx)
movq (%r13), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x2d19
testq %rsi, %rsi
movq (%rsp), %rbx
je 0x2da4
movq (%r15), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r13), %rsi
jmp 0x2db0
movq %r14, %r15
subq %r12, %r15
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movl %edx, (%rsp)
callq 0x6824
leaq 0x30(%rsp), %rbx
movq %r13, (%rbx)
movq %r12, 0x10(%rbx)
movq %r14, 0x18(%rbx)
movl $0x18, %edi
callq 0x1130
movq %rax, 0x8(%rbx)
movq %r15, %rdi
movq %rax, %rsi
callq 0x1cb0
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x873b
movq (%rbx), %rdi
movq (%rbp), %rcx
movq 0x8(%rbp), %r8
subq $0x8, %rsp
movl $0x1, %esi
movl 0x8(%rsp), %edx
xorl %r9d, %r9d
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %r15
pushq 0x10(%rbp)
callq 0x39d8
addq $0x30, %rsp
movq 0x8(%rbx), %rdi
callq 0x1fec
movq 0x8(%rbx), %rdi
callq 0x1030
movq %rbp, %rdi
jmp 0x2d90
movl %edx, (%rsp)
movq %r14, %rbp
subq %r12, %rbp
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x6824
leaq 0x30(%rsp), %rbx
movq %r13, (%rbx)
movq %r12, 0x10(%rbx)
movq %r14, 0x18(%rbx)
movl $0x18, %edi
callq 0x1130
movq %rax, 0x8(%rbx)
movq %rbp, 0x28(%rsp)
movq %rbp, %rdi
movq %rax, %rsi
callq 0x1cb0
movq %rbx, %rdi
movq 0x8(%rsp), %rbp
movq %rbp, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r15, %r8
callq 0x75bc
movq 0x10(%r15), %rax
movl $0x2, %r15d
cmpq $0x3e7, %rax            # imm = 0x3E7
movq 0xb0(%rsp), %r13
ja 0x2d3a
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x6824
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x873b
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
xorl %edx, %edx
movl $0x2, %r8d
callq 0x2468
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rcx
movl $0x1, %r15d
xorl %edx, %edx
movl $0x1, %r8d
callq 0x2468
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x2d25
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x6833
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rbx)
movupd 0x50(%rsp), %xmm0
movapd %xmm0, (%rbx)
jmp 0x2d35
movq (%r15), %rax
movq (%rsp), %rbx
jmp 0x2db3
leaq 0x50(%rsp), %rdi
callq 0x6833
movl $0x2, %r15d
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r12
movq (%r12), %rcx
movq 0x8(%r12), %r8
subq $0x8, %rsp
movl %r15d, %esi
movl 0x8(%rsp), %edx
xorl %r9d, %r9d
pushq %r13
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0x48(%rsp)
pushq %rax
callq 0x39d8
addq $0x30, %rsp
movq 0x38(%rsp), %rdi
callq 0x1fec
movq 0x38(%rsp), %rdi
callq 0x1030
movq %r12, %rdi
callq 0x6833
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r15)
movb %bl, (%rax,%rsi)
movq (%r13), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r13)
testq %rax, %rsi
je 0x2dcc
movq (%r15), %rax
jmp 0x2df1
testq %rsi, %rsi
je 0x2de2
movq (%r15), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r13), %rsi
jmp 0x2dee
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r15)
movl %ebx, %ecx
xorl $0xffff, %ecx           # imm = 0xFFFF
movb %bh, (%rax,%rsi)
movq (%r13), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r13)
testq %rax, %rsi
je 0x2e12
movq (%r15), %rax
jmp 0x2e3b
movl %ecx, %ebx
testq %rsi, %rsi
je 0x2e2a
movq (%r15), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r13), %rsi
jmp 0x2e36
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r15)
movl %ebx, %ecx
movb %cl, (%rax,%rsi)
movq (%r13), %rax
leaq 0x1(%rax), %rsi
movq %rsi, (%r13)
testq %rax, %rsi
je 0x2e54
movq (%r15), %rax
jmp 0x2e7d
movl %ecx, %ebx
testq %rsi, %rsi
je 0x2e6c
movq (%r15), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r13), %rsi
jmp 0x2e78
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r15)
movl %ebx, %ecx
movb %ch, (%rax,%rsi)
movq (%r13), %rsi
incq %rsi
movq %rsi, (%r13)
cmpq %r12, %r14
jbe 0x2d95
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x2eb3
testq %rsi, %rsi
je 0x2eb8
movq (%r15), %rdi
addq %rsi, %rsi
callq 0x1150
movq (%r13), %rsi
jmp 0x2ec4
movq (%r15), %rax
jmp 0x2ec7
movl $0x1, %edi
callq 0x1130
xorl %esi, %esi
movq %rax, (%r15)
movb (%rbp,%r12), %cl
movb %cl, (%rax,%rsi)
movq (%r13), %rsi
incq %rsi
movq %rsi, (%r13)
incq %r12
cmpq %r12, %r14
jne 0x2e94
jmp 0x2d95
leaq 0x74a8(%rip), %rdi      # 0xa396
leaq 0x74ac(%rip), %rsi      # 0xa3a1
leaq 0x78ea(%rip), %rcx      # 0xa7e6
movl $0x225, %edx            # imm = 0x225
callq 0x10b0
leaq 0x7960(%rip), %rdi      # 0xa86d
leaq 0x748d(%rip), %rsi      # 0xa3a1
leaq 0x7964(%rip), %rcx      # 0xa87f
movl $0x206, %edx            # imm = 0x206
callq 0x10b0