user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jle    L34
  mov    0x8(%rbp),%rdi
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtol@plt>
  mov    %eax,%ebx
  test   %ebx,%ebx
  jle    L43
  cmp    $0x2,%ebx
  jle    L24
  cmp    $0x80,%ebx
  jg     L33
  lea    D46(%rip),%rdi
  lea    0x1(%rbx),%r14d
  mov    $0x7,%r13d
  call   <puts@plt>
  xor    %edi,%edi
  lea    D38(%rip),%rbp
  lea    D42(%rip),%r15
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  mov    %r14d,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    %r14d,%eax
  mov    %rax,0x8(%rsp)
  add    %r12,%rbx
  nopl   0x0(%rax,%rax,1)
L31:
  mov    %r12,%r14
  nopl   0x0(%rax,%rax,1)
L12:
  xor    %eax,%eax
  add    $0x1,%r14
  call   <rand@plt>
  movslq %eax,%rdx
  mov    %eax,%esi
  imul   $0x2e8ba2e9,%rdx,%rdx
  sar    $0x1f,%esi
  sar    $0x24,%rdx
  sub    %esi,%edx
  imul   $0x58,%edx,%edx
  sub    %edx,%eax
  cltq
  movzbl 0x0(%rbp,%rax,1),%eax
  mov    %al,-0x1(%r14)
  cmp    %rbx,%r14
  jne    L12
  mov    0x8(%rsp),%rax
  mov    %r12,%rsi
  mov    %r15,%rdi
  movb   $0x0,(%r12,%rax,1)
  xor    %eax,%eax
  call   <printf@plt>
  sub    $0x1,%r13d
  jne    L31
  mov    %r12,%rdi
  call   <free@plt>
  xor    %eax,%eax
L109:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L67
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L33:
  mov    0x0(%rbp),%rsi
  mov    $0x80,%edx
  lea    D18(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xfffffffe,%eax
  jmp    L109
L24:
  mov    0x0(%rbp),%rsi
  mov    $0x3,%edx
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xfffffffe,%eax
  jmp    L109
L43:
  mov    0x0(%rbp),%rsi
  lea    D19(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xfffffffe,%eax
  jmp    L109
L34:
  mov    (%rsi),%rsi
  lea    D19(%rip),%rdi
  call   <printf@plt>
  or     $0xffffffff,%eax
  jmp    L109
L67:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D46
datatype: string
name: extract_symbolic_data
arguments: tag: D38
datatype: string
name: extract_symbolic_data
arguments: tag: D42
datatype: string
name: extract_symbolic_data
arguments: tag: D18
datatype: string
name: extract_symbolic_data
arguments: tag: D40
datatype: string
name: extract_symbolic_data
arguments: tag: D19
datatype: string

tool: D46: choose one password from the list below:

tool: D38: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!$%&/{}[]()=?+*#.:,;-_<>@~

tool: D42: password: %s 


tool: D18: usage: %s [length]. Password max length is %d.


tool: D40: usage: %s [length]. Password min length is %d.


tool: D19: usage: %s [length]


assistant: ```c
int main(int argc, char **argv) {
  if (argc < 2) {
    printf("usage: %s [length]\n", argv[0]);
    return -1;
  }
  char *pEnd;
  int length = strtol(argv[1], &pEnd, 10);
  if (length <= 0) {
    printf("usage: %s [length]\n", argv[0]);
    return -2;
  }
  if (length < 3) {
    printf("usage: %s [length]. Password min length is %d.\n", argv[0], 3);
    return -2;
  }
  if (length > 128) {
    printf("usage: %s [length]. Password max length is %d.\n", argv[0], 128);
    return -2;
  }
  printf("choose one password from the list below:\n");
  srand(time(NULL));
  int c_source_len = sizeof("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!$%&/{}[]()=?+*#.:,;-_<>@~") / sizeof("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!$%&/{}[]()=?+*#.:,;-_<>@~"[0]);
  if (length >= 3 && length <= 128) {
    int i, j, r;
    char *pw = (char *)malloc(length * sizeof(char) + 1);
    for (j = 0; j < 7; j++) {
      for (i = 0; i < length; i++) {
        r = rand() % (c_source_len - 1);
        pw[i] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!$%&/{}[]()=?+*#.:,;-_<>@~"[r];
      }
      pw[++i] = 0;
      printf("password: %s \n", pw);
    }
    free(pw);
  }
  return 0;
}
```