user: 请将以下的汇编代码转换成C语言代码:

```asm
<dporand>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x4c,%eax
  je     L56
  cmp    $0x55,%eax
  je     L53
  jmp    L5
L56:
  movl   $0x0,-0x4(%rbp)
  jmp    L13
L78:
  mov    $0x0,%eax
  call   <rand@plt>
  movq   %xmm0,%rax
  mov    D37(%rip),%rdx
  mov    (%rdx),%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  movq   %rax,%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L49
L59:
  mov    $0x0,%eax
  call   <rand@plt>
  movq   %xmm0,%rax
  mov    D37(%rip),%rdx
  mov    (%rdx),%rdx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
  mov    -0x30(%rbp),%rdx
  mov    (%rdx),%edx
  mov    %edx,%ecx
  imul   -0x4(%rbp),%ecx
  mov    -0x8(%rbp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  movq   %rax,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
  addl   $0x1,-0x8(%rbp)
L49:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jl     L59
  addl   $0x1,-0x4(%rbp)
L13:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jl     L78
  jmp    L5
L53:
  movl   $0x0,-0x4(%rbp)
  jmp    L99
L69:
  movl   $0x0,-0x8(%rbp)
  jmp    L8
L106:
  mov    $0x0,%eax
  call   <rand@plt>
  movq   %xmm0,%rax
  mov    D37(%rip),%rdx
  mov    (%rdx),%rdx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
  mov    -0x30(%rbp),%rdx
  mov    (%rdx),%edx
  mov    %edx,%ecx
  imul   -0x4(%rbp),%ecx
  mov    -0x8(%rbp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  movq   %rax,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
  addl   $0x1,-0x8(%rbp)
L8:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L106
  mov    $0x0,%eax
  call   <rand@plt>
  movq   %xmm0,%rax
  mov    D37(%rip),%rdx
  mov    (%rdx),%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  movq   %rax,%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L99:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jl     L69
  nop
L5:
  nop
  leave
  ret
```

assistant: ```c
void dporand(const char *uplo, const int *n, double *A, const int *ldA) {
  int i, j;
  switch (uplo[0]) {
  case 'L':
    for (j = 0; j < *n; j++) {
      A[j + j * *ldA] = rand() / (double)RAND_MAX + *n;
      for (i = j + 1; i < *n; i++)
        A[i + j * *ldA] = rand() / (double)RAND_MAX;
    }
    break;
  case 'U':
    for (j = 0; j < *n; j++) {
      for (i = 0; i < j; i++)
        A[i + j * *ldA] = rand() / (double)RAND_MAX;
      A[j + j * *ldA] = rand() / (double)RAND_MAX + *n;
    }
    break;
  }
}
```