user: Please show me the C implementation that matches the assembly code listed below:

```asm
<xrdp_sec_hash_48>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    %r8d,-0x74(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <ssl_sha1_info_create@plt>
  mov    %rax,-0x48(%rbp)
  mov    $0x0,%eax
  call   <ssl_md5_info_create@plt>
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L8
L15:
  mov    -0x74(%rbp),%edx
  mov    -0x4c(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  lea    -0x34(%rbp),%rax
  mov    $0x4,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <g_memset@plt>
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <ssl_sha1_clear@plt>
  mov    -0x4c(%rbp),%eax
  lea    0x1(%rax),%edx
  lea    -0x34(%rbp),%rcx
  mov    -0x48(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <ssl_sha1_transform@plt>
  mov    -0x60(%rbp),%rcx
  mov    -0x48(%rbp),%rax
  mov    $0x30,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <ssl_sha1_transform@plt>
  mov    -0x68(%rbp),%rcx
  mov    -0x48(%rbp),%rax
  mov    $0x20,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <ssl_sha1_transform@plt>
  mov    -0x70(%rbp),%rcx
  mov    -0x48(%rbp),%rax
  mov    $0x20,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <ssl_sha1_transform@plt>
  lea    -0x20(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <ssl_sha1_complete@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <ssl_md5_clear@plt>
  mov    -0x60(%rbp),%rcx
  mov    -0x40(%rbp),%rax
  mov    $0x30,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <ssl_md5_transform@plt>
  lea    -0x20(%rbp),%rcx
  mov    -0x40(%rbp),%rax
  mov    $0x14,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <ssl_md5_transform@plt>
  lea    -0x30(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <ssl_md5_complete@plt>
  mov    -0x4c(%rbp),%eax
  shl    $0x4,%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0x30(%rbp),%rax
  mov    $0x10,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <g_memcpy@plt>
  addl   $0x1,-0x4c(%rbp)
L8:
  cmpl   $0x2,-0x4c(%rbp)
  jle    L15
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <ssl_sha1_info_delete@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <ssl_md5_info_delete@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L23
  call   <__stack_chk_fail@plt>
L23:
  leave
  ret
```

assistant: ```c
void xrdp_sec_hash_48(char *out, char *in, char *salt1, char *salt2, int salt) {
  int i;
  void *sha1_info;
  void *md5_info;
  char pad[4];
  char sha1_sig[20];
  char md5_sig[16];
  sha1_info = ssl_sha1_info_create();
  md5_info = ssl_md5_info_create();
  for (i = 0; i < 3; i++) {
    g_memset(pad, salt + i, 4);
    ssl_sha1_clear(sha1_info);
    ssl_sha1_transform(sha1_info, pad, i + 1);
    ssl_sha1_transform(sha1_info, in, 48);
    ssl_sha1_transform(sha1_info, salt1, 32);
    ssl_sha1_transform(sha1_info, salt2, 32);
    ssl_sha1_complete(sha1_info, sha1_sig);
    ssl_md5_clear(md5_info);
    ssl_md5_transform(md5_info, in, 48);
    ssl_md5_transform(md5_info, sha1_sig, 20);
    ssl_md5_complete(md5_info, md5_sig);
    g_memcpy(out + i * 16, md5_sig, 16);
  }
  ssl_sha1_info_delete(sha1_info);
  ssl_md5_info_delete(md5_info);
}
```