// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/md5-1.2/src/md5.c
// Function: md5
void md5 (const char *message, long len, char *output) {
  WORD32 d[4];
  int status = 0;
  long i = 0;
  inic_digest(d);
  while (status != 2) {
    WORD32 d_old[4];
    WORD32 wbuff[16];
    int numbytes = (len-i >= 64) ? 64 : len-i;
    /*salva os valores do vetor digest*/
    d_old[0]=d[0]; d_old[1]=d[1]; d_old[2]=d[2]; d_old[3]=d[3];
    status = converte(wbuff, message+i, numbytes, status);
    if (status == 2) put_length(wbuff, len);
    digest(wbuff, d);
    d[0]+=d_old[0]; d[1]+=d_old[1]; d[2]+=d_old[2]; d[3]+=d_old[3];
    i += numbytes;
  }
  word32tobytes(d, output);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, 0x70(%rsp)
movq %rdi, 0x78(%rsp)
movaps 0x130d46(%rip), %xmm0   # 0x375200
movaps %xmm0, 0x20(%rsp)
leal (,%rsi,8), %eax
movl %eax, 0x1c(%rsp)
movq %rsi, 0x80(%rsp)
movl %esi, %eax
shrl $0x1d, %eax
movl %eax, 0x18(%rsp)
movl $0x10325476, %r8d       # imm = 0x10325476
movl $0x98badcfe, %r15d      # imm = 0x98BADCFE
movl $0xefcdab89, %r12d      # imm = 0xEFCDAB89
movl $0x67452301, %r9d       # imm = 0x67452301
xorl %edx, %edx
leaq 0x90(%rsp), %rbp
leaq 0x18e12c(%rip), %r14    # 0x3d2630
xorl %ecx, %ecx
movq 0x80(%rsp), %rbx
subq %rcx, %rbx
cmpq $0x40, %rbx
movl $0x40, %eax
cmovgeq %rax, %rbx
movq 0x78(%rsp), %rax
movq %rcx, 0x88(%rsp)
leaq (%rax,%rcx), %rsi
cmpl $0x3f, %ebx
movl %r9d, 0xc(%rsp)
jg 0x24459b
movl %r12d, 0x8(%rsp)
movl %r15d, 0x10(%rsp)
movl %r8d, %r15d
movslq %ebx, %r13
movq %rbp, %rdi
movq %rdx, %r12
movq %r13, %rdx
callq 0x17660
leaq (%rsp,%r13), %rdi
addq $0x90, %rdi
movl $0x40, %edx
subl %r13d, %edx
xorl %esi, %esi
callq 0x173a0
testl %r12d, %r12d
jne 0x24457f
movb $-0x80, 0x90(%rsp,%r13)
movq %rbp, %rsi
movl $0x1, %edx
movl %r15d, %r8d
movl 0x10(%rsp), %r15d
movl 0x8(%rsp), %r12d
movl 0xc(%rsp), %r9d
jmp 0x24459d
xorl %edx, %edx
xorl %eax, %eax
movl (%rsi,%rax,4), %ecx
movl %ecx, 0x30(%rsp,%rax,4)
incq %rax
cmpq $0x10, %rax
jne 0x24459f
cmpl $0x38, %ebx
movl $0x2, %eax
cmovll %eax, %edx
movq %rdx, 0x10(%rsp)
jge 0x2445d1
movl 0x1c(%rsp), %eax
movl %eax, 0x68(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x6c(%rsp)
movq $-0x4, %rdi
movl %r9d, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %r8d, 0x8(%rsp)
movl %r8d, %eax
movl %ecx, %r8d
xorl %eax, %r8d
andl %edx, %r8d
xorl %eax, %r8d
addl 0x40(%rsp,%rdi,4), %esi
addl %r8d, %esi
addl 0x10(%r14,%rdi,4), %esi
roll $0x7, %esi
addl %edx, %esi
movl %edx, %r8d
xorl %ecx, %r8d
andl %esi, %r8d
addl 0x44(%rsp,%rdi,4), %eax
addl 0x14(%r14,%rdi,4), %eax
xorl %ecx, %r8d
addl %r8d, %eax
roll $0xc, %eax
addl %esi, %eax
movl %esi, %r8d
xorl %edx, %r8d
andl %eax, %r8d
addl 0x48(%rsp,%rdi,4), %ecx
addl 0x18(%r14,%rdi,4), %ecx
xorl %edx, %r8d
addl %r8d, %ecx
roll $0x11, %ecx
addl %eax, %ecx
movl %eax, %r8d
xorl %esi, %r8d
andl %ecx, %r8d
addl 0x4c(%rsp,%rdi,4), %edx
addl 0x1c(%r14,%rdi,4), %edx
xorl %esi, %r8d
addl %r8d, %edx
roll $0x16, %edx
addl %ecx, %edx
addq $0x4, %rdi
cmpq $0xc, %rdi
jb 0x2445e9
movq $-0x4, %rdi
movl $0xa, %r8d
movl %edx, %r9d
xorl %ecx, %r9d
andl %eax, %r9d
xorl %ecx, %r9d
addl 0x44(%rsp,%rdi,4), %esi
addl %r9d, %esi
addl 0x50(%r14,%rdi,4), %esi
roll $0x5, %esi
addl %edx, %esi
movl %esi, %r9d
xorl %edx, %r9d
andl %ecx, %r9d
leal -0x4(%r8), %r10d
andl $0xe, %r10d
addl 0x30(%rsp,%r10,4), %eax
xorl %edx, %r9d
addl 0x54(%r14,%rdi,4), %eax
addl %r9d, %eax
roll $0x9, %eax
addl %esi, %eax
movl %eax, %r9d
xorl %esi, %r9d
andl %edx, %r9d
movl %r8d, %r10d
andl $0xe, %r10d
addl 0x34(%rsp,%r10,4), %ecx
addl 0x58(%r14,%rdi,4), %ecx
xorl %esi, %r9d
addl %r9d, %ecx
roll $0xe, %ecx
addl %eax, %ecx
movl %ecx, %r9d
xorl %eax, %r9d
andl %esi, %r9d
addl 0x40(%rsp,%rdi,4), %edx
addl 0x5c(%r14,%rdi,4), %edx
xorl %eax, %r9d
addl %r9d, %edx
roll $0x14, %edx
addl %ecx, %edx
addq $0x4, %rdi
addq $0x14, %r8
cmpq $0xc, %rdi
jb 0x244674
movq $-0x4, %rdi
movl $0xb, %r8d
leaq 0x68(%rsp), %r9
movl %ecx, %r10d
xorl %edx, %r10d
movl %r10d, %r11d
xorl %eax, %r11d
addl %esi, %r11d
leal -0xb(%r8), %r13d
leal -0x6(%r8), %esi
andl $0xd, %esi
addl 0x30(%rsp,%rsi,4), %r11d
addl 0x90(%r14,%rdi,4), %r11d
roll $0x4, %r11d
movl %r11d, %esi
addl %edx, %esi
andl $0xc, %r13d
xorl $0x8, %r13d
addl 0x30(%rsp,%r13,4), %eax
addl 0x94(%r14,%rdi,4), %eax
xorl %esi, %r10d
addl %r10d, %eax
roll $0xb, %eax
addl %esi, %eax
movl %eax, %r10d
xorl %esi, %r10d
movl %r10d, %r11d
movl %r8d, %r13d
andl $0xf, %r13d
addl 0x30(%rsp,%r13,4), %ecx
xorl %edx, %r11d
addl 0x98(%r14,%rdi,4), %ecx
addl %r11d, %ecx
roll $0x10, %ecx
addl %eax, %ecx
xorl %ecx, %r10d
addl (%r9), %edx
addl 0x9c(%r14,%rdi,4), %edx
addl %r10d, %edx
roll $0x17, %edx
addl %ecx, %edx
addq $0x4, %rdi
addq $-0x10, %r9
addq $0xc, %r8
cmpq $0xc, %rdi
jb 0x24471d
movq $-0x4, %rdi
movl $0x5, %r8d
leaq 0x68(%rsp), %r9
movl %eax, %r10d
notl %r10d
orl %edx, %r10d
leal -0x5(%r8), %r11d
andl $0xc, %r11d
addl 0x30(%rsp,%r11,4), %esi
xorl %ecx, %r10d
addl %r10d, %esi
addl 0xd0(%r14,%rdi,4), %esi
roll $0x6, %esi
addl %edx, %esi
movl %ecx, %r10d
notl %r10d
orl %esi, %r10d
leal 0x2(%r8), %r11d
andl $0xf, %r11d
addl 0x30(%rsp,%r11,4), %eax
addl 0xd4(%r14,%rdi,4), %eax
xorl %edx, %r10d
addl %r10d, %eax
roll $0xa, %eax
addl %esi, %eax
movl %edx, %r10d
notl %r10d
orl %eax, %r10d
addl (%r9), %ecx
addl 0xd8(%r14,%rdi,4), %ecx
xorl %esi, %r10d
addl %r10d, %ecx
roll $0xf, %ecx
addl %eax, %ecx
movl %esi, %r10d
notl %r10d
orl %ecx, %r10d
xorl %eax, %r10d
movl %r8d, %r11d
andl $0xd, %r11d
addl 0x30(%rsp,%r11,4), %edx
addl 0xdc(%r14,%rdi,4), %edx
addl %r10d, %edx
roll $0x15, %edx
addl %ecx, %edx
addq $0x4, %rdi
addq $0x1c, %r8
addq $-0x10, %r9
cmpq $0xc, %rdi
jb 0x2447d3
movl 0xc(%rsp), %r9d
addl %esi, %r9d
addl %edx, %r12d
addl %ecx, %r15d
movl 0x8(%rsp), %r8d
addl %eax, %r8d
movslq %ebx, %rax
movq 0x88(%rsp), %rcx
addq %rax, %rcx
cmpl $0x38, %ebx
movq 0x10(%rsp), %rdx
jge 0x244506
movl %r9d, 0x20(%rsp)
movl %r12d, 0x24(%rsp)
movl %r15d, 0x28(%rsp)
movl %r8d, 0x2c(%rsp)
movq $-0x4, %rax
movq 0x70(%rsp), %rdx
movl 0x24(%rsp,%rax), %ecx
movl %ecx, 0x4(%rdx,%rax)
addq $0x4, %rax
cmpq $0xc, %rax
jb 0x2448d4
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq