// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/md5_encoder.c
// Function: gt_md5_encoder_finish
void gt_md5_encoder_finish(GtMD5Encoder *enc, unsigned char *output,
                           char *outstr)
{
  gt_assert(enc && output);
  if (enc->status != 2) {
    if (enc->len > 0) {
      digest(enc->wbuff, enc->d);
      enc->d[0]+=enc->d_old[0]; enc->d[1]+=enc->d_old[1];
      enc->d[2]+=enc->d_old[2]; enc->d[3]+=enc->d_old[3];
    }
    enc->d_old[0]=enc->d[0]; enc->d_old[1]=enc->d[1];
    enc->d_old[2]=enc->d[2]; enc->d_old[3]=enc->d[3];
    enc->status = converte(enc->wbuff, NULL, 0, enc->status);
    gt_assert(enc->status == 2);
  }
  put_length(enc->wbuff, enc->len);
  digest(enc->wbuff, enc->d);
  enc->d[0]+=enc->d_old[0]; enc->d[1]+=enc->d_old[1];
  enc->d[2]+=enc->d_old[2]; enc->d[3]+=enc->d_old[3];
  word32tobytes(enc->d, (char*) output);
  if (outstr) {
    snprintf(outstr, 33,
             "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
             output[0], output[1], output[2], output[3], output[4], output[5],
             output[6], output[7], output[8], output[9], output[10], output[11],
             output[12], output[13], output[14], output[15]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0xbeda7
movq %rsi, %r14
testq %rsi, %rsi
je 0xbeda7
movq %rdx, %rbx
movq %rdi, %r15
movl 0x68(%rdi), %ecx
cmpl $0x2, %ecx
je 0xbec96
cmpq $0x0, 0x60(%r15)
je 0xbec71
leaq 0x20(%r15), %rdi
movq %r15, %rsi
callq 0xbe8c2
movdqu (%r15), %xmm1
movdqu 0x10(%r15), %xmm0
paddd %xmm1, %xmm0
movdqu %xmm0, (%r15)
movl 0x68(%r15), %ecx
jmp 0xbec76
movdqu (%r15), %xmm0
movdqu %xmm0, 0x10(%r15)
leaq 0x20(%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xbeb9a
movl %eax, 0x68(%r15)
cmpl $0x2, %eax
jne 0xbedd5
leaq 0x20(%r15), %rdi
movl 0x60(%r15), %eax
leal (,%rax,8), %ecx
movl %ecx, 0x58(%r15)
shrl $0x1d, %eax
movl %eax, 0x5c(%r15)
movq %r15, %rsi
callq 0xbe8c2
movdqu (%r15), %xmm0
movdqu 0x10(%r15), %xmm1
paddd %xmm0, %xmm1
movdqu %xmm1, (%r15)
xorl %eax, %eax
cmpq $0xf, %rax
ja 0xbece2
movl (%r15,%rax), %ecx
movl %ecx, (%r14,%rax)
addq $0x4, %rax
jmp 0xbecce
testq %rbx, %rbx
je 0xbed98
movzbl (%r14), %ecx
movzbl 0x1(%r14), %r8d
movzbl 0x2(%r14), %r9d
movzbl 0x3(%r14), %eax
movq %rax, 0x20(%rsp)
movzbl 0x4(%r14), %eax
movq %rax, 0x18(%rsp)
movzbl 0x5(%r14), %eax
movq %rax, 0x10(%rsp)
movzbl 0x6(%r14), %eax
movq %rax, 0x8(%rsp)
movzbl 0x7(%r14), %eax
movq %rax, (%rsp)
movzbl 0x8(%r14), %ebp
movzbl 0x9(%r14), %r10d
movzbl 0xa(%r14), %r11d
movzbl 0xb(%r14), %r15d
movzbl 0xc(%r14), %r12d
movzbl 0xd(%r14), %r13d
movq %rbx, %rdi
movzbl 0xe(%r14), %ebx
movzbl 0xf(%r14), %r14d
subq $0x8, %rsp
leaq 0x33cc5(%rip), %rdx     # 0xf2a25
pushq $0x21
popq %rsi
xorl %eax, %eax
pushq %r14
pushq %rbx
pushq %r13
pushq %r12
pushq %r15
pushq %r11
pushq %r10
pushq %rbp
pushq 0x48(%rsp)
pushq 0x58(%rsp)
pushq 0x68(%rsp)
pushq 0x78(%rsp)
pushq 0x88(%rsp)
callq 0xba00
addq $0x98, %rsp
jmp 0xbed9c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6f20a(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0xb2ae(%rip), %rsi      # 0xca066
leaq 0x33c31(%rip), %rdx     # 0xf29f0
leaq 0x33c38(%rip), %rcx     # 0xf29fe
leaq 0x33bc3(%rip), %r8      # 0xf2990
movl $0xe9, %r9d
jmp 0xbee01
movq 0x6f1dc(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0xb280(%rip), %rsi      # 0xca066
leaq 0x33c27(%rip), %rdx     # 0xf2a14
leaq 0x33c0a(%rip), %rcx     # 0xf29fe
leaq 0x33b95(%rip), %r8      # 0xf2990
movl $0xf3, %r9d
xorl %eax, %eax
callq 0xb8c0
callq 0xb300