// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: mg_md5
char *mg_md5(char buf[33], ...) {
  unsigned char hash[16];
  const char *p;
  va_list ap;
  MD5_CTX ctx;

  MD5Init(&ctx);

  va_start(ap, buf);
  while ((p = va_arg(ap, const char *)) != NULL) {
    MD5Update(&ctx, (const unsigned char *) p, (unsigned) strlen(p));
  }
  va_end(ap);

  MD5Final(hash, &ctx);
  bin2str(buf, hash, sizeof(hash));
  return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdi, -0x40(%rbp)
leaq -0x180(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x59e25
movaps %xmm0, -0x150(%rbp)
movaps %xmm1, -0x140(%rbp)
movaps %xmm2, -0x130(%rbp)
movaps %xmm3, -0x120(%rbp)
movaps %xmm4, -0x110(%rbp)
movaps %xmm5, -0x100(%rbp)
movaps %xmm6, -0xf0(%rbp)
movaps %xmm7, -0xe0(%rbp)
movaps 0xe3e4(%rip), %xmm0     # 0x68210
leaq -0xb0(%rbp), %r14
movups %xmm0, -0x18(%r14)
andq $0x0, -0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, -0x60(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x50(%rbp)
pushq $0x8
popq %r13
leaq -0xc8(%rbp), %r15
cmpl $0x28, %r13d
ja 0x59e82
movq %rax, %rdx
movl %r13d, %eax
leaq -0x180(%rbp), %rcx
addq %rcx, %rax
addl $0x8, %r13d
movl %r13d, -0x60(%rbp)
jmp 0x59e8a
leaq 0x8(%rax), %rdx
movq %rdx, -0x58(%rbp)
movq (%rax), %r12
testq %r12, %r12
je 0x59f77
movq %rdx, -0x38(%rbp)
movq %r12, %rdi
callq 0xc470
movl -0xb8(%rbp), %ecx
leal (,%rax,8), %edx
movl %eax, %esi
shrl $0x1d, %esi
addl %ecx, %edx
movl %edx, -0xb8(%rbp)
adcl %esi, -0xb4(%rbp)
shrl $0x3, %ecx
andl $0x3f, %ecx
je 0x59eec
leaq (%r14,%rcx), %rdi
pushq $0x40
popq %rdx
subl %ecx, %edx
movl %eax, %ebx
subl %edx, %ebx
jae 0x59ef4
movl %eax, %edx
movq %r12, %rsi
callq 0xc0f0
movq -0x38(%rbp), %rax
jmp 0x59e62
movl %r13d, -0x2c(%rbp)
movl %eax, %ebx
jmp 0x59f14
movl %r13d, -0x2c(%rbp)
movl %edx, %r13d
movq %r12, %rsi
movq %r13, %rdx
callq 0xc0f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x5cbce
addq %r13, %r12
movl %ebx, %r13d
cmpl $0x40, %r13d
jb 0x59f5c
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups 0x30(%r12), %xmm3
movups %xmm3, 0x30(%r14)
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x5cbce
addq $0x40, %r12
addq $-0x40, %r13
jmp 0x59f17
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xc0f0
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %r13d
jmp 0x59e62
movl -0xb8(%rbp), %eax
shrl $0x3, %eax
andl $0x3f, %eax
leaq (%r14,%rax), %rdi
incq %rdi
movb $-0x80, -0xb0(%rbp,%rax)
movl %eax, %ecx
xorl $0x3f, %ecx
cmpl $0x7, %ecx
ja 0x59fcc
movl %ecx, %edx
xorl %esi, %esi
callq 0xc370
leaq -0xc8(%rbp), %rdi
movq %r14, %rsi
callq 0x5cbce
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
andq $0x0, 0x30(%r14)
jmp 0x59fd8
pushq $0x37
popq %rdx
subl %eax, %edx
xorl %esi, %esi
callq 0xc370
leaq -0xc8(%rbp), %r15
movq 0x10(%r15), %rax
movq %rax, 0x50(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x5cbce
movups (%r15), %xmm0
movaps %xmm0, -0x70(%rbp)
xorl %edi, %edi
leaq 0xe2ea(%rip), %rcx      # 0x682ed
movq -0x40(%rbp), %rax
cmpq $0x10, %rdi
je 0x5a02e
movzbl -0x70(%rbp,%rdi), %edx
movl %edx, %esi
shrl $0x4, %esi
movb (%rsi,%rcx), %sil
movb %sil, (%rax,%rdi,2)
andl $0xf, %edx
movb (%rdx,%rcx), %dl
movb %dl, 0x1(%rax,%rdi,2)
incq %rdi
jmp 0x5a007
movb $0x0, (%rax,%rdi,2)
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq