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

```asm
<_gettemp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %edx,0x4(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  setne  %r14b
  test   %edx,%edx
  setne  %r15b
  test   %r14b,%r14b
  je     L263
  test   %r15b,%r15b
  je     L263
  mov    D53(%rip),%rax
  mov    (%rax),%rdx
  mov    D103(%rip),%rax
  mov    %rdx,(%rax)
  mov    $0x0,%eax
L101:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L185
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L263:
  mov    $0x0,%eax
  call   <getpid@plt>
  cmpb   $0x0,(%r12)
  je     L354
  mov    %r12,%rbp
L41:
  add    $0x1,%rbp
  cmpb   $0x0,0x0(%rbp)
  jne    L41
L338:
  lea    -0x1(%rbp),%rbx
  cmpb   $0x58,-0x1(%rbp)
  jne    L217
L313:
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%eax
  add    $0x30,%eax
  mov    %al,(%rbx)
  mov    %edx,%eax
  mov    %rbx,%rbp
  sub    $0x1,%rbx
  cmpb   $0x58,(%rbx)
  je     L313
L217:
  test   %r14b,%r14b
  jne    L357
  test   %r15b,%r15b
  jne    L357
L98:
  lea    0x14(%rsp),%rbp
L192:
  test   %r13,%r13
  je     L120
  mov    D101(%rip),%rax
  mov    (%rax),%esi
  mov    D86(%rip),%rax
  or     (%rax),%esi
  mov    D24(%rip),%rax
  or     (%rax),%esi
  mov    $0x180,%edx
  mov    %r12,%rdi
  call   <open@plt>
  mov    %eax,0x0(%r13)
  test   %eax,%eax
  jns    L319
  mov    D103(%rip),%rdx
  mov    D96(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,(%rdx)
  jne    L280
L300:
  mov    0x8(%rsp),%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L369
L51:
  cmp    $0x7a,%dil
  jne    L345
  add    $0x1,%rbx
  movb   $0x61,-0x1(%rbx)
  movzbl (%rbx),%edi
  test   %dil,%dil
  jne    L51
  mov    $0x0,%eax
  jmp    L101
L354:
  mov    %r12,%rbp
  jmp    L338
L357:
  cmp    %rbx,%r12
  jae    L191
L77:
  cmpb   $0x2f,(%rbx)
  je     L342
  sub    $0x1,%rbx
  cmp    %rbx,%r12
  jne    L77
  mov    %rbp,0x8(%rsp)
  jmp    L98
L342:
  movb   $0x0,(%rbx)
  lea    0x14(%rsp),%rsi
  mov    %r12,%rdi
  call   <stat@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  jne    L101
  mov    0x14(%rsp),%edi
  call   <S_ISDIR@plt>
  test   %eax,%eax
  je     L174
  movb   $0x2f,(%rbx)
  mov    %rbp,0x8(%rsp)
  jmp    L98
L174:
  mov    D54(%rip),%rdx
  mov    (%rdx),%rcx
  mov    D103(%rip),%rdx
  mov    %rcx,(%rdx)
  jmp    L101
L191:
  mov    %rbp,0x8(%rsp)
  jmp    L98
L120:
  cmpl   $0x0,0x4(%rsp)
  je     L66
  mov    $0x1c0,%esi
  mov    %r12,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  je     L23
  mov    D103(%rip),%rdx
  mov    D96(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,(%rdx)
  je     L300
  mov    $0x0,%eax
  jmp    L101
L66:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <lstat@plt>
  test   %rax,%rax
  je     L300
  mov    D103(%rip),%rdx
  mov    D104(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,(%rdx)
  sete   %al
  movzbl %al,%eax
  jmp    L101
L345:
  movsbl %dil,%edi
  call   <isdigit@plt>
  mov    %rax,%rdx
  mov    $0x61,%eax
  test   %rdx,%rdx
  jne    L211
  movzbl (%rbx),%eax
  add    $0x1,%eax
L211:
  mov    %al,(%rbx)
  jmp    L192
L319:
  mov    $0x1,%eax
  jmp    L101
L280:
  mov    $0x0,%eax
  jmp    L101
L369:
  mov    $0x0,%eax
  jmp    L101
L23:
  mov    $0x1,%eax
  jmp    L101
L185:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int _gettemp(char *path, int *doopen, int domkdir) {
  char *start, *trv;
  struct stat sbuf;
  pid_t pid;
  if (doopen && domkdir) {
    errno = EINVAL;
    return (0);
  }
  pid = getpid();
  for (trv = path; *trv; ++trv)
    ;
  while (*--trv == 'X') {
    *trv = (pid % 10) + '0';
    pid /= 10;
  }
  if (doopen || domkdir) {
    for (start = trv + 1;; --trv) {
      if (trv <= path)
        break;
      if (*trv == '/') {
        *trv = '\0';
        if (stat(path, &sbuf))
          return (0);
        if (!S_ISDIR(sbuf.st_mode)) {
          errno = ENOTDIR;
          return (0);
        }
        *trv = '/';
        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')
        *trv++ = 'a';
      else {
        if (isdigit(*trv))
          *trv = 'a';
        else
          ++*trv;
        break;
      }
    }
  }
}
```