user: 这段汇编代码用C语言表示是什么样的？

```asm
<_gettemp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %ecx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x40(%rbp)
  je     L24
  cmpl   $0x0,-0x44(%rbp)
  je     L24
  mov    D89(%rip),%rax
  mov    (%rax),%rdx
  mov    D60(%rip),%rax
  mov    %rdx,(%rax)
  mov    $0x0,%eax
  jmp    L70
L24:
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L304
L103:
  addq   $0x1,-0x20(%rbp)
L304:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L103
  mov    -0x48(%rbp),%eax
  cltq
  neg    %rax
  add    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  subq   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jae    L313
  mov    D89(%rip),%rax
  mov    (%rax),%rdx
  mov    D60(%rip),%rax
  mov    %rdx,(%rax)
  mov    $0x0,%eax
  jmp    L70
L313:
  mov    $0x0,%eax
  call   <getpid@plt>
  mov    %eax,-0x28(%rbp)
  jmp    L398
L300:
  mov    -0x28(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    %ecx,%eax
  lea    0x30(%rax),%ecx
  mov    -0x20(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x28(%rbp)
L398:
  mov    -0x20(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jb     L233
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x58,%al
  jne    L233
  cmpl   $0x0,-0x28(%rbp)
  jne    L300
  jmp    L233
L442:
  mov    $0x0,%eax
  call   <random@plt>
  movzwl %ax,%eax
  movslq %eax,%rdx
  imul   $0x4ec4ec4f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x4,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0x28(%rbp)
  mov    -0x28(%rbp),%edx
  imul   $0x34,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x28(%rbp)
  cmpl   $0x19,-0x28(%rbp)
  jg     L459
  mov    -0x28(%rbp),%eax
  add    $0x41,%eax
  mov    %al,-0x2d(%rbp)
  jmp    L236
L459:
  mov    -0x28(%rbp),%eax
  add    $0x47,%eax
  mov    %al,-0x2d(%rbp)
L236:
  mov    -0x20(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl -0x2d(%rbp),%edx
  mov    %dl,(%rax)
L233:
  mov    -0x20(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jb     L40
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x58,%al
  je     L442
L40:
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x40(%rbp)
  jne    L115
  cmpl   $0x0,-0x44(%rbp)
  je     L31
L115:
  mov    -0x20(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jbe    L195
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L329
  mov    -0x20(%rbp),%rax
  movb   $0x0,(%rax)
  lea    -0x2c(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <stat@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x20(%rbp),%rax
  movb   $0x2f,(%rax)
  cmpl   $0x0,-0x24(%rbp)
  je     L271
  mov    $0x0,%eax
  jmp    L70
L271:
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISDIR@plt>
  test   %eax,%eax
  jne    L60
  mov    D14(%rip),%rax
  mov    (%rax),%rdx
  mov    D60(%rip),%rax
  mov    %rdx,(%rax)
  mov    $0x0,%eax
  jmp    L70
L329:
  subq   $0x1,-0x20(%rbp)
  jmp    L115
L195:
  nop
  jmp    L31
L60:
  nop
L31:
  cmpq   $0x0,-0x40(%rbp)
  je     L248
  mov    D79(%rip),%rax
  mov    (%rax),%edx
  mov    D13(%rip),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    D45(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    -0x38(%rbp),%rax
  mov    $0x180,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <open@plt>
  mov    -0x40(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L190
  mov    $0x1,%eax
  jmp    L70
L190:
  mov    D60(%rip),%rax
  mov    (%rax),%rdx
  mov    D119(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  je     L51
  mov    $0x0,%eax
  jmp    L70
L248:
  cmpl   $0x0,-0x44(%rbp)
  je     L432
  mov    -0x38(%rbp),%rax
  mov    $0x1c0,%esi
  mov    %rax,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  jne    L102
  mov    $0x1,%eax
  jmp    L70
L102:
  mov    D60(%rip),%rax
  mov    (%rax),%rdx
  mov    D119(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  je     L51
  mov    $0x0,%eax
  jmp    L70
L432:
  lea    -0x2c(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <lstat@plt>
  test   %rax,%rax
  je     L51
  mov    D60(%rip),%rax
  mov    (%rax),%rdx
  mov    D122(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  sete   %al
  movzbl %al,%eax
  jmp    L70
L51:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
L448:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L64
  mov    $0x0,%eax
  jmp    L70
L64:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jne    L130
  mov    -0x20(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jne    L155
  mov    $0x0,%eax
  jmp    L70
L155:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movb   $0x61,(%rax)
  jmp    L448
L130:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L294
  mov    -0x20(%rbp),%rax
  movb   $0x61,(%rax)
  jmp    L50
L294:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jne    L361
  mov    -0x20(%rbp),%rax
  movb   $0x41,(%rax)
  jmp    L50
L361:
  mov    -0x20(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jne    L59
  mov    $0x0,%eax
  jmp    L70
L59:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  mov    %dl,(%rax)
L50:
  jmp    L31
L70:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L138
  call   <__stack_chk_fail@plt>
L138:
  leave
  ret
```

assistant: ```c
int _gettemp(char *path, int *doopen, int domkdir, int slen) {
  char *start, *trv, *suffp;
  struct stat sbuf;
  int rval;
  pid_t pid;
  if (doopen && domkdir) {
    errno = EINVAL;
    return (0);
  }
  for (trv = path; *trv; ++trv)
    ;
  trv -= slen;
  suffp = trv;
  --trv;
  if (trv < path) {
    errno = EINVAL;
    return (0);
  }
  pid = getpid();
  while (trv >= path && *trv == 'X' && pid != 0) {
    *trv-- = (pid % 10) + '0';
    pid /= 10;
  }
  while (trv >= path && *trv == 'X') {
    char c;
    pid = (random() & 0xffff) % (26 + 26);
    if (pid < 26)
      c = pid + 'A';
    else
      c = (pid - 26) + 'a';
    *trv-- = c;
  }
  start = trv + 1;
  if (doopen || domkdir) {
    for (;; --trv) {
      if (trv <= path)
        break;
      if (*trv == '/') {
        *trv = '\0';
        rval = stat(path, &sbuf);
        *trv = '/';
        if (rval != 0)
          return (0);
        if (!S_ISDIR(sbuf.st_mode)) {
          errno = ENOTDIR;
          return (0);
        }
        break;
      }
    }
  }
  for (;;) {
    if (doopen) {
      if ((*doopen = open(path, O_CREAT | O_EXCL | O_RDWR, 0600)) >= 0)
        return (1);
      if (errno != EEXIST)
        return (0);
    } else if (domkdir) {
      if (mkdir(path, 0700) == 0)
        return (1);
      if (errno != EEXIST)
        return (0);
    } else if (lstat(path, &sbuf))
      return (errno == ENOENT ? 1 : 0);
    for (trv = start;;) {
      if (!*trv)
        return (0);
      if (*trv == 'Z') {
        if (trv == suffp)
          return (0);
        *trv++ = 'a';
      } else {
        if (isdigit(*trv))
          *trv = 'a';
        else if (*trv == 'z')
          *trv = 'A';
        else {
          if (trv == suffp)
            return (0);
          ++*trv;
        }
        break;
      }
    }
  }
}
```