// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/zopfli/src/zopfli/deflate.c
// Function: AddNonCompressedBlock
static void AddNonCompressedBlock(const ZopfliOptions* options, int final,
                                  const unsigned char* in, size_t instart,
                                  size_t inend,
                                  unsigned char* bp,
                                  unsigned char** out, size_t* outsize) {
  size_t pos = instart;
  (void)options;
  for (;;) {
    size_t i;
    unsigned short blocksize = 65535;
    unsigned short nlen;
    int currentfinal;

    if (pos + blocksize > inend) blocksize = inend - pos;
    currentfinal = pos + blocksize >= inend;

    nlen = ~blocksize;

    AddBit(final && currentfinal, bp, out, outsize);
    /* BTYPE 00 */
    AddBit(0, bp, out, outsize);
    AddBit(0, bp, out, outsize);

    /* Any bits of input up to the next byte boundary are ignored. */
    *bp = 0;

    ZOPFLI_APPEND_DATA(blocksize % 256, out, outsize);
    ZOPFLI_APPEND_DATA((blocksize / 256) % 256, out, outsize);
    ZOPFLI_APPEND_DATA(nlen % 256, out, outsize);
    ZOPFLI_APPEND_DATA((nlen / 256) % 256, out, outsize);

    for (i = 0; i < blocksize; i++) {
      ZOPFLI_APPEND_DATA(in[pos + i], out, outsize);
    }

    if (currentfinal) break;
    pos += blocksize;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movw $0xffff, -0x42(%rbp)    # imm = 0xFFFF
movq -0x38(%rbp), %rax
movzwl -0x42(%rbp), %ecx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
jbe 0x13385
movq -0x28(%rbp), %rax
subq -0x38(%rbp), %rax
movw %ax, -0x42(%rbp)
movq -0x38(%rbp), %rax
movzwl -0x42(%rbp), %ecx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x48(%rbp)
movzwl -0x42(%rbp), %eax
xorl $-0x1, %eax
movw %ax, -0x44(%rbp)
xorl %eax, %eax
cmpl $0x0, -0xc(%rbp)
movb %al, -0x49(%rbp)
je 0x133bf
cmpl $0x0, -0x48(%rbp)
setne %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
movq -0x30(%rbp), %rsi
movq 0x10(%rbp), %rdx
movq 0x18(%rbp), %rcx
callq 0x15520
movq -0x30(%rbp), %rsi
movq 0x10(%rbp), %rdx
movq 0x18(%rbp), %rcx
xorl %edi, %edi
callq 0x15520
movq -0x30(%rbp), %rsi
movq 0x10(%rbp), %rdx
movq 0x18(%rbp), %rcx
xorl %edi, %edi
callq 0x15520
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x13463
movq 0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1343a
movl $0x1, %edi
callq 0x33d0
movq %rax, -0x58(%rbp)
jmp 0x13458
movq 0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x18(%rbp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x3430
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movzwl -0x42(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x134ec
movq 0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x134c3
movl $0x1, %edi
callq 0x33d0
movq %rax, -0x60(%rbp)
jmp 0x134e1
movq 0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x18(%rbp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x3430
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movzwl -0x42(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x1357d
movq 0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x13554
movl $0x1, %edi
callq 0x33d0
movq %rax, -0x68(%rbp)
jmp 0x13572
movq 0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x18(%rbp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x3430
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movzwl -0x44(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x13606
movq 0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x135dd
movl $0x1, %edi
callq 0x33d0
movq %rax, -0x70(%rbp)
jmp 0x135fb
movq 0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x18(%rbp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x3430
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movzwl -0x44(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movzwl -0x42(%rbp), %ecx
cmpq %rcx, %rax
jae 0x136ef
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x136b0
movq 0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x13687
movl $0x1, %edi
callq 0x33d0
movq %rax, -0x78(%rbp)
jmp 0x136a5
movq 0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x18(%rbp), %rax
movq (%rax), %rsi
shlq %rsi
shlq $0x0, %rsi
callq 0x3430
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
addq -0x40(%rbp), %rcx
movb (%rax,%rcx), %dl
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x13641
cmpl $0x0, -0x48(%rbp)
je 0x136f7
jmp 0x13708
movzwl -0x42(%rbp), %eax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x13362
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)