ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Converte this assembly snippet into its equivalent C code:

```asm
<next_arg>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r14
  mov    %rsi,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  movl   $0x0,0xc(%rsp)
  cmpb   $0x22,(%rdi)
  je     L112
L149:
  movzbl (%r14),%edi
  test   %dil,%dil
  je     L104
  mov    0xc(%rsp),%r12d
  mov    %r14,%rbx
  mov    $0x0,%r15d
  mov    $0x0,%ebp
  mov    $0x0,%r13d
  jmp    L62
L112:
  add    $0x1,%r14
  movl   $0x1,0xc(%rsp)
  jmp    L149
L48:
  movzbl %al,%eax
  cmpb   $0x22,(%rbx)
  cmove  %eax,%r12d
L58:
  add    $0x1,%ebp
  mov    %ebp,%r13d
  lea    (%r14,%r13,1),%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L82
L62:
  movsbl %dil,%edi
  call   <isspace@plt>
  mov    %rax,%rdx
  test   %r12d,%r12d
  sete   %al
  test   %rdx,%rdx
  je     L94
  test   %al,%al
  jne    L82
L94:
  test   %r15d,%r15d
  jne    L48
  cmpb   $0x3d,(%rbx)
  jne    L48
  mov    %ebp,%r15d
  jmp    L58
L82:
  mov    0x18(%rsp),%rax
  mov    %r14,(%rax)
  test   %r15d,%r15d
  je     L83
  mov    %r15d,%r15d
  movb   $0x0,(%r14,%r15,1)
  lea    0x1(%r14,%r15,1),%rax
  mov    0x10(%rsp),%rcx
  mov    %rax,(%rcx)
  cmpb   $0x22,(%rax)
  je     L150
  cmpl   $0x0,0xc(%rsp)
  je     L171
  lea    -0x1(%rbp),%eax
  add    %r14,%rax
  cmpb   $0x22,(%rax)
  jne    L171
  movb   $0x0,(%rax)
  jmp    L171
L150:
  add    $0x1,%rax
  mov    %rax,(%rcx)
  lea    -0x1(%rbp),%eax
  add    %r14,%rax
  cmpb   $0x22,(%rax)
  jne    L171
  movb   $0x0,(%rax)
  jmp    L171
L104:
  mov    0x18(%rsp),%rax
  mov    %r14,(%rax)
  mov    %r14,%rbx
  mov    $0x0,%r13d
L83:
  mov    0x10(%rsp),%rax
  movq   $0x0,(%rax)
L171:
  cmpb   $0x0,(%rbx)
  je     L145
  movb   $0x0,(%rbx)
  lea    0x1(%r14,%r13,1),%rbx
L145:
  mov    %rbx,%rdi
  call   <skip_spaces@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
char *next_arg(char *args, char **param, char **val) {
  unsigned int i, equals = 0;
  int in_quote = 0, quoted = 0;
  char *next;
  if (*args == '"') {
    args++;
    in_quote = 1;
    quoted = 1;
  }
  for (i = 0; args[i]; i++) {
    if (isspace(args[i]) && !in_quote)
      break;
    if (equals == 0) {
      if (args[i] == '=')
        equals = i;
    }
    if (args[i] == '"')
      in_quote = !in_quote;
  }
  *param = args;
  if (!equals)
    *val = NULL;
  else {
    args[equals] = '\0';
    *val = args + equals + 1;
    if (**val == '"') {
      (*val)++;
      if (args[i - 1] == '"')
        args[i - 1] = '\0';
    }
    if (quoted && args[i - 1] == '"')
      args[i - 1] = '\0';
  }
  if (args[i]) {
    args[i] = '\0';
    next = args + i + 1;
  } else
    next = args + i;
  return skip_spaces(next);
}
```
user: Translate the below assembly code into C programming language:

```asm
<next_arg>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  movsbl (%rdi),%edi
  mov    %rsi,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  movl   $0x0,0xc(%rsp)
  cmp    $0x22,%dil
  jne    L50
  movl   $0x1,0xc(%rsp)
  movsbl 0x1(%rbx),%edi
  add    $0x1,%rbx
L50:
  test   %dil,%dil
  je     L98
  mov    0xc(%rsp),%r14d
  mov    %rbx,%r15
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %r13d,%r13d
  jmp    L88
  nopl   0x0(%rax,%rax,1)
L104:
  mov    %r14d,%esi
  xor    $0x1,%esi
  cmp    $0x22,%al
  cmove  %esi,%r14d
L8:
  lea    0x1(%r12),%r13d
  lea    (%rbx,%r13,1),%r15
  mov    %r13,%r12
  movsbl (%r15),%edi
  test   %dil,%dil
  je     L169
L88:
  call   <isspace@plt>
  test   %rax,%rax
  je     L84
  test   $0x1,%r14b
  je     L169
L84:
  movzbl (%r15),%eax
  test   %ebp,%ebp
  jne    L104
  cmp    $0x3d,%al
  jne    L104
  mov    %r12d,%ebp
  jmp    L8
  nopw   0x0(%rax,%rax,1)
L169:
  mov    0x18(%rsp),%rax
  mov    %rbx,(%rax)
  test   %ebp,%ebp
  je     L32
  mov    0x10(%rsp),%rcx
  lea    0x1(%rbx,%rbp,1),%rax
  movb   $0x0,(%rbx,%rbp,1)
  mov    %rax,(%rcx)
  cmpb   $0x22,(%rax)
  je     L92
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  je     L70
  lea    -0x1(%r12),%eax
  add    %rbx,%rax
  cmpb   $0x22,(%rax)
  je     L86
  jmp    L70
L98:
  mov    0x18(%rsp),%rax
  mov    %rbx,%r15
  xor    %r13d,%r13d
  mov    %rbx,(%rax)
  nop
L32:
  mov    0x10(%rsp),%rax
  movq   $0x0,(%rax)
L70:
  cmpb   $0x0,(%r15)
  je     L68
  movb   $0x0,(%r15)
  lea    0x1(%rbx,%r13,1),%r15
L68:
  add    $0x28,%rsp
  mov    %r15,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <skip_spaces@plt>
  nopl   0x0(%rax)
L92:
  add    $0x1,%rax
  mov    %rax,(%rcx)
  lea    -0x1(%r12),%eax
  add    %rbx,%rax
  cmpb   $0x22,(%rax)
  jne    L70
L86:
  movb   $0x0,(%rax)
  jmp    L70
```

assistant: ```c
char *next_arg(char *args, char **param, char **val) {
  unsigned int i, equals = 0;
  int in_quote = 0, quoted = 0;
  char *next;
  if (*args == '"') {
    args++;
    in_quote = 1;
    quoted = 1;
  }
  for (i = 0; args[i]; i++) {
    if (isspace(args[i]) && !in_quote)
      break;
    if (equals == 0) {
      if (args[i] == '=')
        equals = i;
    }
    if (args[i] == '"')
      in_quote = !in_quote;
  }
  *param = args;
  if (!equals)
    *val = NULL;
  else {
    args[equals] = '\0';
    *val = args + equals + 1;
    if (**val == '"') {
      (*val)++;
      if (args[i - 1] == '"')
        args[i - 1] = '\0';
    }
    if (quoted && args[i - 1] == '"')
      args[i - 1] = '\0';
  }
  if (args[i]) {
    args[i] = '\0';
    next = args + i + 1;
  } else
    next = args + i;
  return skip_spaces(next);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<next_arg>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  movsbl (%rdi),%edi
  mov    %rsi,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  movl   $0x0,0xc(%rsp)
  cmp    $0x22,%dil
  jne    L22
  movl   $0x1,0xc(%rsp)
  movsbl 0x1(%rbx),%edi
  add    $0x1,%rbx
L22:
  test   %dil,%dil
  je     L86
  mov    0xc(%rsp),%r14d
  mov    %rbx,%r15
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %r13d,%r13d
  jmp    L97
  nopl   0x0(%rax,%rax,1)
L128:
  mov    %r14d,%esi
  xor    $0x1,%esi
  cmp    $0x22,%al
  cmove  %esi,%r14d
L62:
  lea    0x1(%r12),%r13d
  lea    (%rbx,%r13,1),%r15
  mov    %r13,%r12
  movsbl (%r15),%edi
  test   %dil,%dil
  je     L31
L97:
  call   <isspace@plt>
  test   %rax,%rax
  je     L132
  test   $0x1,%r14b
  je     L31
L132:
  movzbl (%r15),%eax
  test   %ebp,%ebp
  jne    L128
  cmp    $0x3d,%al
  jne    L128
  mov    %r12d,%ebp
  jmp    L62
  nopw   0x0(%rax,%rax,1)
L31:
  mov    0x18(%rsp),%rax
  mov    %rbx,(%rax)
  test   %ebp,%ebp
  je     L15
  mov    0x10(%rsp),%rcx
  lea    0x1(%rbx,%rbp,1),%rax
  movb   $0x0,(%rbx,%rbp,1)
  mov    %rax,(%rcx)
  cmpb   $0x22,(%rax)
  je     L49
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  je     L26
  lea    -0x1(%r12),%eax
  add    %rbx,%rax
  cmpb   $0x22,(%rax)
  je     L11
  jmp    L26
L86:
  mov    0x18(%rsp),%rax
  mov    %rbx,%r15
  xor    %r13d,%r13d
  mov    %rbx,(%rax)
  nop
L15:
  mov    0x10(%rsp),%rax
  movq   $0x0,(%rax)
L26:
  cmpb   $0x0,(%r15)
  je     L46
  movb   $0x0,(%r15)
  lea    0x1(%rbx,%r13,1),%r15
L46:
  add    $0x28,%rsp
  mov    %r15,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <skip_spaces@plt>
  nopl   0x0(%rax)
L49:
  add    $0x1,%rax
  mov    %rax,(%rcx)
  lea    -0x1(%r12),%eax
  add    %rbx,%rax
  cmpb   $0x22,(%rax)
  jne    L26
L11:
  movb   $0x0,(%rax)
  jmp    L26
```

assistant: ```c
char *next_arg(char *args, char **param, char **val) {
  unsigned int i, equals = 0;
  int in_quote = 0, quoted = 0;
  char *next;
  if (*args == '"') {
    args++;
    in_quote = 1;
    quoted = 1;
  }
  for (i = 0; args[i]; i++) {
    if (isspace(args[i]) && !in_quote)
      break;
    if (equals == 0) {
      if (args[i] == '=')
        equals = i;
    }
    if (args[i] == '"')
      in_quote = !in_quote;
  }
  *param = args;
  if (!equals)
    *val = NULL;
  else {
    args[equals] = '\0';
    *val = args + equals + 1;
    if (**val == '"') {
      (*val)++;
      if (args[i - 1] == '"')
        args[i - 1] = '\0';
    }
    if (quoted && args[i - 1] == '"')
      args[i - 1] = '\0';
  }
  if (args[i]) {
    args[i] = '\0';
    next = args + i + 1;
  } else
    next = args + i;
  return skip_spaces(next);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<tml_sr_DownSample>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8d,-0x20(%rbp)
  mov    %r9,-0x38(%rbp)
  mov    -0x1c(%rbp),%eax
  cltd
  idivl  -0x20(%rbp)
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  movl   $0x0,-0x4(%rbp)
  jmp    L14
L15:
  mov    -0x4(%rbp),%eax
  imul   -0x20(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L14:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jl     L15
  mov    -0x38(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void tml_sr_DownSample(const float *src, int srcLen, float *dst, int *dstLen, int factor, int *phase) {
  int k;
  *dstLen = (int)(srcLen / factor);
  for (k = 0; k < *dstLen; k++)
    dst[k] = src[k * factor + *phase];
  *phase += *dstLen * factor - srcLen;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<tml_sr_DownSample>:
  endbr64
  push   %rbx
  mov    %rdi,%r10
  mov    %esi,%edi
  mov    %rdx,%r11
  mov    %rcx,%rbx
  mov    %esi,%eax
  cltd
  idiv   %r8d
  mov    %eax,%ecx
  mov    %eax,(%rbx)
  test   %eax,%eax
  jle    L17
  mov    $0x0,%esi
  mov    $0x0,%edx
L8:
  mov    %esi,%ecx
  add    (%r9),%ecx
  movslq %ecx,%rcx
  movss  (%r10,%rcx,4),%xmm0
  movss  %xmm0,(%r11,%rdx,4)
  mov    (%rbx),%ecx
  add    $0x1,%rdx
  add    %r8d,%esi
  cmp    %edx,%ecx
  jg     L8
L17:
  imul   %ecx,%r8d
  sub    %edi,%r8d
  add    %r8d,(%r9)
  pop    %rbx
  ret
```

assistant: ```c
void tml_sr_DownSample(const float *src, int srcLen, float *dst, int *dstLen, int factor, int *phase) {
  int k;
  *dstLen = (int)(srcLen / factor);
  for (k = 0; k < *dstLen; k++)
    dst[k] = src[k * factor + *phase];
  *phase += *dstLen * factor - srcLen;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<tml_sr_DownSample>:
  endbr64
  mov    %esi,%r10d
  mov    %rdx,%rsi
  push   %rbx
  mov    %r10d,%eax
  cltd
  idiv   %r8d
  mov    %eax,(%rcx)
  test   %eax,%eax
  jle    L4
  movslq (%r9),%rdx
  mov    %rdi,%r11
  movslq %r8d,%rdi
  shl    $0x2,%rdi
  mov    %rdx,%rbx
  lea    (%r11,%rdx,4),%rcx
  mov    %rsi,%rdx
  lea    -0x1(%rax),%esi
  lea    0x4(%rdx,%rsi,4),%rsi
  nopw   0x0(%rax,%rax,1)
L10:
  movss  (%rcx),%xmm0
  add    $0x4,%rdx
  add    %rdi,%rcx
  movss  %xmm0,-0x4(%rdx)
  cmp    %rsi,%rdx
  jne    L10
  imul   %r8d,%eax
  sub    %r10d,%eax
  add    %ebx,%eax
  pop    %rbx
  mov    %eax,(%r9)
  ret
  nopl   0x0(%rax,%rax,1)
L4:
  imul   %r8d,%eax
  mov    (%r9),%ebx
  sub    %r10d,%eax
  add    %ebx,%eax
  pop    %rbx
  mov    %eax,(%r9)
  ret
```

assistant: ```c
void tml_sr_DownSample(const float *src, int srcLen, float *dst, int *dstLen, int factor, int *phase) {
  int k;
  *dstLen = (int)(srcLen / factor);
  for (k = 0; k < *dstLen; k++)
    dst[k] = src[k * factor + *phase];
  *phase += *dstLen * factor - srcLen;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<tml_sr_DownSample>:
  endbr64
  mov    %rdi,%r10
  mov    %esi,%edi
  mov    %rdx,%rsi
  mov    %edi,%eax
  cltd
  idiv   %r8d
  mov    %eax,(%rcx)
  mov    (%r9),%r11d
  test   %eax,%eax
  jle    L67
  cmp    $0x1,%r8d
  jne    L0
  movslq %r11d,%rdx
  push   %rbp
  mov    %rsi,%rcx
  lea    0x4(,%rdx,4),%rdx
  push   %rbx
  lea    (%r10,%rdx,1),%rbx
  sub    %rbx,%rcx
  cmp    $0x8,%rcx
  jbe    L28
  lea    -0x1(%rdi),%ecx
  cmp    $0x2,%ecx
  jbe    L28
  mov    %edi,%ecx
  lea    -0x4(%r10,%rdx,1),%rbx
  xor    %edx,%edx
  shr    $0x2,%ecx
  shl    $0x4,%rcx
  cs nopw 0x0(%rax,%rax,1)
L8:
  movups (%rbx,%rdx,1),%xmm1
  movups %xmm1,(%rsi,%rdx,1)
  add    $0x10,%rdx
  cmp    %rcx,%rdx
  jne    L8
  mov    %edi,%edx
  and    $0xfffffffc,%edx
  test   $0x3,%dil
  je     L72
  lea    (%r11,%rdx,1),%ecx
  mov    %edx,%ebp
  movslq %ecx,%rcx
  lea    0x0(,%rbp,4),%rbx
  movss  (%r10,%rcx,4),%xmm0
  lea    0x1(%rdx),%ecx
  movss  %xmm0,(%rsi,%rbp,4)
  cmp    %ecx,%edi
  jle    L72
  add    %r11d,%ecx
  add    $0x2,%edx
  movslq %ecx,%rcx
  movss  (%r10,%rcx,4),%xmm0
  movss  %xmm0,0x4(%rsi,%rbx,1)
  cmp    %edx,%edi
  jle    L72
  add    %r11d,%edx
  movslq %edx,%rdx
  movss  (%r10,%rdx,4),%xmm0
  movss  %xmm0,0x8(%rsi,%rbx,1)
L72:
  imul   %r8d,%eax
  pop    %rbx
  pop    %rbp
  sub    %edi,%eax
  add    %r11d,%eax
  mov    %eax,(%r9)
  ret
  nopl   0x0(%rax)
L0:
  movslq %r11d,%rdx
  movslq %r8d,%rcx
  lea    (%r10,%rdx,4),%rdx
  lea    -0x1(%rax),%r10d
  shl    $0x2,%rcx
  lea    0x4(%rsi,%r10,4),%r10
  nopw   0x0(%rax,%rax,1)
L4:
  movss  (%rdx),%xmm0
  add    $0x4,%rsi
  add    %rcx,%rdx
  movss  %xmm0,-0x4(%rsi)
  cmp    %r10,%rsi
  jne    L4
L67:
  imul   %r8d,%eax
  sub    %edi,%eax
  add    %r11d,%eax
  mov    %eax,(%r9)
  ret
  nopw   0x0(%rax,%rax,1)
L28:
  lea    -0x4(%r10,%rdx,1),%rcx
  mov    %edi,%ebx
  xor    %edx,%edx
  nopl   0x0(%rax)
L65:
  movss  (%rcx,%rdx,4),%xmm0
  movss  %xmm0,(%rsi,%rdx,4)
  add    $0x1,%rdx
  cmp    %rbx,%rdx
  jne    L65
  imul   %r8d,%eax
  pop    %rbx
  pop    %rbp
  sub    %edi,%eax
  add    %r11d,%eax
  mov    %eax,(%r9)
  ret
```

assistant: ```c
void tml_sr_DownSample(const float *src, int srcLen, float *dst, int *dstLen, int factor, int *phase) {
  int k;
  *dstLen = (int)(srcLen / factor);
  for (k = 0; k < *dstLen; k++)
    dst[k] = src[k * factor + *phase];
  *phase += *dstLen * factor - srcLen;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<getname>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %edi,-0x94(%rbp)
  mov    %esi,-0x98(%rbp)
  mov    %rdx,-0xa0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D11(%rip),%rax
  mov    %rax,-0x90(%rbp)
  lea    D52(%rip),%rax
  mov    %rax,-0x88(%rbp)
  lea    D16(%rip),%rax
  mov    %rax,-0x80(%rbp)
  lea    D148(%rip),%rax
  mov    %rax,-0x78(%rbp)
  lea    D73(%rip),%rax
  mov    %rax,-0x70(%rbp)
  lea    D11(%rip),%rax
  mov    %rax,-0x60(%rbp)
  lea    D2(%rip),%rax
  mov    %rax,-0x58(%rbp)
  lea    D111(%rip),%rax
  mov    %rax,-0x50(%rbp)
  lea    D77(%rip),%rax
  mov    %rax,-0x48(%rbp)
  lea    D73(%rip),%rax
  mov    %rax,-0x40(%rbp)
  lea    D46(%rip),%rax
  mov    %rax,-0x30(%rbp)
  lea    D2(%rip),%rax
  mov    %rax,-0x28(%rbp)
  lea    D111(%rip),%rax
  mov    %rax,-0x20(%rbp)
  lea    D77(%rip),%rax
  mov    %rax,-0x18(%rbp)
  lea    D73(%rip),%rax
  mov    %rax,-0x10(%rbp)
  cmpl   $0x7d3,-0x94(%rbp)
  jg     L32
  mov    -0x98(%rbp),%eax
  cltq
  mov    -0x90(%rbp,%rax,8),%rdx
  mov    -0xa0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L20
L32:
  cmpl   $0x7d6,-0x94(%rbp)
  jg     L42
  mov    -0x98(%rbp),%eax
  cltq
  mov    -0x60(%rbp,%rax,8),%rdx
  mov    -0xa0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L20
L42:
  mov    -0x98(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,8),%rdx
  mov    -0xa0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L20:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L1
  call   <__stack_chk_fail@plt>
L1:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D11
datatype: string
name: retrieve_data
arguments: data_tag: D52
datatype: string
name: retrieve_data
arguments: data_tag: D16
datatype: string
name: retrieve_data
arguments: data_tag: D148
datatype: string
name: retrieve_data
arguments: data_tag: D73
datatype: string
name: retrieve_data
arguments: data_tag: D2
datatype: string
name: retrieve_data
arguments: data_tag: D111
datatype: string
name: retrieve_data
arguments: data_tag: D77
datatype: string
name: retrieve_data
arguments: data_tag: D46
datatype: string

tool: D11: Premiership

tool: D52: Division 1

tool: D16: Division 2

tool: D148: Division 3

tool: D73: Conference

tool: D2: Championship

tool: D111: League 1

tool: D77: League 2

tool: D46: Premier League

assistant: ```c
void getname(int year, int div, char *divname) {
  char *(dn0[5]) = {"Premiership", "Division 1", "Division 2", "Division 3", "Conference"};
  char *(dn1[5]) = {"Premiership", "Championship", "League 1", "League 2", "Conference"};
  char *(dn2[5]) = {"Premier League", "Championship", "League 1", "League 2", "Conference"};
  if (year < 2004)
    strcpy(divname, dn0[div]);
  else if (year < 2007)
    strcpy(divname, dn1[div]);
  else
    strcpy(divname, dn2[div]);
}
```
user: What is the c source code of the assembly code below:

```asm
<getname>:
  endbr64
  sub    $0x98,%rsp
  mov    %rdx,%rax
  mov    %fs:0x28,%rdx
  mov    %rdx,0x88(%rsp)
  xor    %edx,%edx
  lea    D19(%rip),%rcx
  mov    %rcx,(%rsp)
  lea    D81(%rip),%rdx
  mov    %rdx,0x8(%rsp)
  lea    D84(%rip),%rdx
  mov    %rdx,0x10(%rsp)
  lea    D62(%rip),%rdx
  mov    %rdx,0x18(%rsp)
  lea    D51(%rip),%rdx
  mov    %rdx,0x20(%rsp)
  mov    %rcx,0x30(%rsp)
  lea    D43(%rip),%r9
  mov    %r9,0x38(%rsp)
  lea    D61(%rip),%r8
  mov    %r8,0x40(%rsp)
  lea    D7(%rip),%rcx
  mov    %rcx,0x48(%rsp)
  mov    %rdx,0x50(%rsp)
  lea    D57(%rip),%r10
  mov    %r10,0x60(%rsp)
  mov    %r9,0x68(%rsp)
  mov    %r8,0x70(%rsp)
  mov    %rcx,0x78(%rsp)
  mov    %rdx,0x80(%rsp)
  cmp    $0x7d3,%edi
  jle    L10
  cmp    $0x7d6,%edi
  jg     L41
  movslq %esi,%rsi
  mov    0x30(%rsp,%rsi,8),%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L0:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0x98,%rsp
  ret
L10:
  movslq %esi,%rsi
  mov    (%rsp,%rsi,8),%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L0
L41:
  movslq %esi,%rsi
  mov    0x60(%rsp,%rsi,8),%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L0
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D19
type: string
name: extract_symbolic_data
arguments: tag: D81
type: string
name: extract_symbolic_data
arguments: tag: D84
type: string
name: extract_symbolic_data
arguments: tag: D62
type: string
name: extract_symbolic_data
arguments: tag: D51
type: string
name: extract_symbolic_data
arguments: tag: D43
type: string
name: extract_symbolic_data
arguments: tag: D61
type: string
name: extract_symbolic_data
arguments: tag: D7
type: string
name: extract_symbolic_data
arguments: tag: D57
type: string

tool: D19: Premiership

tool: D81: Division 1

tool: D84: Division 2

tool: D62: Division 3

tool: D51: Conference

tool: D43: Championship

tool: D61: League 1

tool: D7: League 2

tool: D57: Premier League

assistant: ```c
void getname(int year, int div, char *divname) {
  char *(dn0[5]) = {"Premiership", "Division 1", "Division 2", "Division 3", "Conference"};
  char *(dn1[5]) = {"Premiership", "Championship", "League 1", "League 2", "Conference"};
  char *(dn2[5]) = {"Premier League", "Championship", "League 1", "League 2", "Conference"};
  if (year < 2004)
    strcpy(divname, dn0[div]);
  else if (year < 2007)
    strcpy(divname, dn1[div]);
  else
    strcpy(divname, dn2[div]);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<getname>:
  endbr64
  sub    $0x98,%rsp
  mov    %rdx,%r9
  lea    D65(%rip),%rdx
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  lea    D72(%rip),%rax
  lea    D29(%rip),%r8
  mov    %rdx,(%rsp)
  mov    %rax,0x8(%rsp)
  lea    D9(%rip),%rax
  lea    D28(%rip),%rcx
  mov    %rax,0x10(%rsp)
  lea    D76(%rip),%rax
  lea    D41(%rip),%r10
  mov    %rax,0x18(%rsp)
  lea    D15(%rip),%rax
  mov    %rdx,0x30(%rsp)
  lea    D53(%rip),%rdx
  mov    %rax,0x20(%rsp)
  mov    %r8,0x38(%rsp)
  mov    %rcx,0x40(%rsp)
  mov    %rdx,0x48(%rsp)
  mov    %rax,0x50(%rsp)
  mov    %r10,0x60(%rsp)
  mov    %r8,0x68(%rsp)
  mov    %rcx,0x70(%rsp)
  mov    %rdx,0x78(%rsp)
  mov    %rax,0x80(%rsp)
  cmp    $0x7d3,%edi
  jle    L44
  cmp    $0x7d6,%edi
  jg     L17
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  movslq %esi,%rsi
  mov    %r9,%rdi
  mov    0x30(%rsp,%rsi,8),%rsi
  add    $0x98,%rsp
  jmp    1060 <strcpy@plt>
  nopw   0x0(%rax,%rax,1)
L17:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  movslq %esi,%rsi
  mov    %r9,%rdi
  mov    0x60(%rsp,%rsi,8),%rsi
  add    $0x98,%rsp
  jmp    1060 <strcpy@plt>
  nopw   0x0(%rax,%rax,1)
L44:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  movslq %esi,%rsi
  mov    %r9,%rdi
  mov    (%rsp,%rsi,8),%rsi
  add    $0x98,%rsp
  jmp    1060 <strcpy@plt>
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D65
type_infered: string
name: retrieve_data
arguments: data_tag: D72
type_infered: string
name: retrieve_data
arguments: data_tag: D29
type_infered: string
name: retrieve_data
arguments: data_tag: D9
type_infered: string
name: retrieve_data
arguments: data_tag: D28
type_infered: string
name: retrieve_data
arguments: data_tag: D76
type_infered: string
name: retrieve_data
arguments: data_tag: D41
type_infered: string
name: retrieve_data
arguments: data_tag: D15
type_infered: string
name: retrieve_data
arguments: data_tag: D53
type_infered: string

tool: D65: Premiership

tool: D72: Division 1

tool: D29: Championship

tool: D9: Division 2

tool: D28: League 1

tool: D76: Division 3

tool: D41: Premier League

tool: D15: Conference

tool: D53: League 2

assistant: ```c
void getname(int year, int div, char *divname) {
  char *(dn0[5]) = {"Premiership", "Division 1", "Division 2", "Division 3", "Conference"};
  char *(dn1[5]) = {"Premiership", "Championship", "League 1", "League 2", "Conference"};
  char *(dn2[5]) = {"Premier League", "Championship", "League 1", "League 2", "Conference"};
  if (year < 2004)
    strcpy(divname, dn0[div]);
  else if (year < 2007)
    strcpy(divname, dn1[div]);
  else
    strcpy(divname, dn2[div]);
}
```