user: 下面的汇编指令对应的C源代码是什么：

```asm
<_gettemp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edx,0x4(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  setne  %r13b
  test   %edx,%edx
  setne  0x3(%rsp)
  movzbl 0x3(%rsp),%eax
  test   %r13b,%r13b
  je     L241
  test   %al,%al
  je     L241
L263:
  mov    D109(%rip),%rax
  mov    (%rax),%rdx
  mov    D11(%rip),%rax
  mov    %rdx,(%rax)
  xor    %eax,%eax
L378:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L261
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L241:
  cmpb   $0x0,(%r12)
  mov    %r12,%rbx
  je     L89
  nopw   0x0(%rax,%rax,1)
L14:
  add    $0x1,%rbx
  cmpb   $0x0,(%rbx)
  jne    L14
L89:
  movslq %ecx,%rcx
  sub    %rcx,%rbx
  lea    -0x1(%rbx),%r15
  cmp    %r15,%r12
  ja     L263
  xor    %eax,%eax
  call   <getpid@plt>
  lea    -0x1(%r12),%rsi
  mov    %eax,%edx
  jmp    L26
L81:
  mov    %rdi,%r15
L26:
  movzbl (%r15),%eax
  cmp    $0x58,%al
  jne    L357
  test   %edx,%edx
  je     L357
  movslq %edx,%rax
  mov    %edx,%r9d
  lea    -0x1(%r15),%rdi
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%r9d
  sar    $0x22,%rax
  sub    %r9d,%eax
  lea    (%rax,%rax,4),%r9d
  add    %r9d,%r9d
  sub    %r9d,%edx
  add    $0x30,%edx
  mov    %dl,(%r15)
  mov    %eax,%edx
  cmp    %rsi,%rdi
  jne    L81
L146:
  mov    %r15,0x8(%rsp)
L149:
  lea    0x14(%rsp),%r13
L56:
  test   %rbp,%rbp
  je     L306
  mov    D34(%rip),%rax
  mov    $0x180,%edx
  mov    %r12,%rdi
  mov    (%rax),%esi
  mov    D4(%rip),%rax
  or     (%rax),%esi
  mov    D85(%rip),%rax
  or     (%rax),%esi
  call   <open@plt>
  mov    %eax,0x0(%rbp)
  test   %eax,%eax
  jns    L174
L43:
  mov    D84(%rip),%rax
  mov    D11(%rip),%rdx
  mov    (%rax),%rax
  cmp    %rax,(%rdx)
  jne    L375
L199:
  mov    0x8(%rsp),%r14
  movsbl (%r14),%edi
  test   %dil,%dil
  jne    L352
  jmp    L375
  nopl   (%rax)
L374:
  cmp    %r14,%rbx
  je     L375
  movsbl 0x1(%r14),%edi
  add    $0x1,%r14
  movb   $0x61,-0x1(%r14)
  test   %dil,%dil
  je     L375
L352:
  cmp    $0x5a,%dil
  je     L374
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L144
  movzbl (%r14),%eax
  cmp    $0x7a,%al
  je     L135
  cmp    %r14,%rbx
  je     L375
  add    $0x1,%eax
  jmp    L75
  nopl   0x0(%rax)
L357:
  cmp    %r15,%r12
  ja     L236
  mov    %r15,%r14
  jmp    L154
  cs nopw 0x0(%rax,%rax,1)
L419:
  xor    %eax,%eax
  call   <random@plt>
  movzwl %ax,%edx
  mov    %rdx,%rax
  imul   $0x4ec4ec4f,%rdx,%rdx
  shr    $0x24,%rdx
  imul   $0x34,%edx,%edi
  sub    %edi,%eax
  mov    %eax,%edx
  lea    0x41(%rax),%edi
  lea    0x47(%rax),%eax
  cmp    $0x19,%edx
  cmovle %edi,%eax
  mov    %al,(%r14)
  cmp    %r14,%r12
  je     L146
  movzbl -0x1(%r14),%eax
  sub    $0x1,%r14
L154:
  mov    %r14,%r15
  cmp    $0x58,%al
  je     L419
  lea    0x1(%r14),%rcx
  mov    %rcx,0x8(%rsp)
  test   %r13b,%r13b
  jne    L288
  cmpb   $0x0,0x3(%rsp)
  je     L149
L288:
  cmp    %r14,%r12
  jb     L407
  jmp    L149
  nopw   0x0(%rax,%rax,1)
L429:
  sub    $0x1,%r15
  cmp    %r15,%r12
  je     L149
  movzbl (%r15),%eax
L407:
  cmp    $0x2f,%al
  jne    L429
  movb   $0x0,(%r15)
  lea    0x14(%rsp),%rsi
  mov    %r12,%rdi
  call   <stat@plt>
  movb   $0x2f,(%r15)
  test   %eax,%eax
  je     L310
  nopw   0x0(%rax,%rax,1)
L375:
  xor    %eax,%eax
  jmp    L378
  nop
L306:
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  je     L58
  mov    $0x1c0,%esi
  mov    %r12,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  jne    L43
L174:
  mov    $0x1,%eax
  jmp    L378
  nopl   0x0(%rax,%rax,1)
L58:
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <lstat@plt>
  test   %rax,%rax
  je     L199
  mov    D11(%rip),%rdx
  mov    D99(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,(%rdx)
  sete   %al
  movzbl %al,%eax
  jmp    L378
  nopl   0x0(%rax,%rax,1)
L144:
  mov    $0x61,%eax
L75:
  mov    %al,(%r14)
  jmp    L56
L310:
  mov    0x14(%rsp),%edi
  call   <S_ISDIR@plt>
  test   %eax,%eax
  jne    L149
  mov    D14(%rip),%rdx
  mov    (%rdx),%rcx
  mov    D11(%rip),%rdx
  mov    %rcx,(%rdx)
  jmp    L378
L135:
  mov    $0x41,%eax
  jmp    L75
L261:
  call   <__stack_chk_fail@plt>
L236:
  add    $0x1,%r15
  jmp    L146
```

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;
      }
    }
  }
}
```