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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x1,-0x34(%rbp)
  jg     L127
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L73
L127:
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    -0x18(%rbp),%rcx
  mov    $0xa,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jg     L97
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xfffffffe,%eax
  jmp    L73
L97:
  cmpl   $0x2,-0x24(%rbp)
  jg     L111
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    $0x3,%edx
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xfffffffe,%eax
  jmp    L73
L111:
  cmpl   $0x80,-0x24(%rbp)
  jle    L124
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    $0x80,%edx
  mov    %rax,%rsi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xfffffffe,%eax
  jmp    L73
L124:
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  movl   $0x59,-0x20(%rbp)
  cmpl   $0x2,-0x24(%rbp)
  jle    L94
  cmpl   $0x80,-0x24(%rbp)
  jg     L94
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L105
L4:
  movl   $0x0,-0x2c(%rbp)
  jmp    L27
L1:
  mov    $0x0,%eax
  call   <rand@plt>
  mov    -0x20(%rbp),%edx
  lea    -0x1(%rdx),%ecx
  cltd
  idiv   %ecx
  mov    %edx,-0x1c(%rbp)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    D33(%rip),%rcx
  movzbl (%rax,%rcx,1),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x2c(%rbp)
L27:
  mov    -0x2c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L1
  addl   $0x1,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x28(%rbp)
L105:
  cmpl   $0x6,-0x28(%rbp)
  jle    L4
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L94:
  mov    $0x0,%eax
L73:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L7
  call   <__stack_chk_fail@plt>
L7:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D43
type: string
name: read_data
arguments: data_label: D22
type: string
name: read_data
arguments: data_label: D7
type: string
name: read_data
arguments: data_label: D6
type: string
name: read_data
arguments: data_label: D33
type: string
name: read_data
arguments: data_label: D1
type: string

tool: D43: usage: %s [length]


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


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


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

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

tool: D1: password: %s 


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