ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<vprintl>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    $0x5b,%edi
  call   <putchar@plt>
  test   %rbp,%rbp
  je     L0
  mov    $0x0,%ebx
  lea    -0x1(%rbp),%r15
  lea    D27(%rip),%r14
  lea    D28(%rip),%r13
L14:
  cmp    %rbx,%r15
  mov    %r13,%rdx
  cmovne %r14,%rdx
  mov    (%r12,%rbx,4),%esi
  lea    D1(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  jne    L14
L21:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L0:
  mov    $0x5d,%edi
  call   <putchar@plt>
  jmp    L21
```

tool_calls: name: extract_symbolic_data
arguments: label: D27
datatype: string
name: extract_symbolic_data
arguments: label: D28
datatype: string
name: extract_symbolic_data
arguments: label: D1
datatype: string

tool: D27: , 

tool: D28: ]

tool: D1: %i%s

assistant: ```c
void vprintl(int *v, const size_t size) {
  printf("[");
  if (size != 0) {
    for (int i = 0; i < size; i++)
      printf("%i%s", v[i], (i != size - 1) ? ", " : "]");
  } else {
    printf("]");
  }
  printf("\n");
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<vprintl>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  mov    $0x5b,%edi
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  call   <putchar@plt>
  test   %rbx,%rbx
  je     L5
  lea    -0x1(%rbx),%r15
  xor    %r12d,%r12d
  lea    D4(%rip),%r14
  lea    D18(%rip),%r13
  nopl   0x0(%rax)
L3:
  cmp    %r12,%r15
  lea    D15(%rip),%rdx
  mov    0x0(%rbp,%r12,4),%esi
  mov    %r14,%rdi
  cmovne %r13,%rdx
  xor    %eax,%eax
  add    $0x1,%r12
  call   <printf@plt>
  cmp    %rbx,%r12
  jne    L3
L15:
  add    $0x8,%rsp
  mov    $0xa,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <putchar@plt>
  xchg   %ax,%ax
L5:
  mov    $0x5d,%edi
  call   <putchar@plt>
  jmp    L15
```

tool_calls: name: parse_data
arguments: data_tag: D4
type_guessed: string
name: parse_data
arguments: data_tag: D18
type_guessed: string
name: parse_data
arguments: data_tag: D15
type_guessed: string

tool: D4: %i%s

tool: D18: , 

tool: D15: ]

assistant: ```c
void vprintl(int *v, const size_t size) {
  printf("[");
  if (size != 0) {
    for (int i = 0; i < size; i++)
      printf("%i%s", v[i], (i != size - 1) ? ", " : "]");
  } else {
    printf("]");
  }
  printf("\n");
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<vprintl>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    $0x5b,%edi
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  call   <putchar@plt>
  test   %rbx,%rbx
  je     L58
  lea    -0x1(%rbx),%rbp
  xor    %r15d,%r15d
  lea    D16(%rip),%r13
  lea    D15(%rip),%r14
  nopl   0x0(%rax)
L37:
  cmp    %r15,%rbp
  je     L55
  mov    (%r12,%r15,4),%esi
  mov    %r14,%rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %rbx,%r15
  jne    L37
L51:
  add    $0x8,%rsp
  mov    $0xa,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <putchar@plt>
  nopw   0x0(%rax,%rax,1)
L55:
  mov    (%r12,%rbp,4),%esi
  lea    D7(%rip),%rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  lea    0x1(%rbp),%r15
  call   <printf@plt>
  cmp    %rbx,%r15
  jne    L37
  jmp    L51
L58:
  mov    $0x5d,%edi
  call   <putchar@plt>
  jmp    L51
```

tool_calls: name: unpack_data
arguments: data_label: D16
type: string
name: unpack_data
arguments: data_label: D15
type: string
name: unpack_data
arguments: data_label: D7
type: string

tool: D16: %i%s

tool: D15: , 

tool: D7: ]

assistant: ```c
void vprintl(int *v, const size_t size) {
  printf("[");
  if (size != 0) {
    for (int i = 0; i < size; i++)
      printf("%i%s", v[i], (i != size - 1) ? ", " : "]");
  } else {
    printf("]");
  }
  printf("\n");
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<swapRows>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L10
L13:
  mov    -0x1c(%rbp),%eax
  cltq
  imul   $0x328,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x20(%rbp),%eax
  cltq
  imul   $0x328,%rax,%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  imul   $0x328,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  cltq
  movsd  (%rcx,%rax,8),%xmm0
  mov    -0xc(%rbp),%eax
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
  mov    -0x20(%rbp),%eax
  cltq
  imul   $0x328,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  cltq
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0xc(%rbp)
L10:
  cmpl   $0x64,-0xc(%rbp)
  jle    L13
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void swapRows(double aug_matrix[][10 * 10 + 1], int row1, int row2) {
  int i;
  double temp;
  for (i = 0; i < 10 * 10 + 1; i++) {
    temp = aug_matrix[row1][i];
    aug_matrix[row1][i] = aug_matrix[row2][i];
    aug_matrix[row2][i] = temp;
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<swapRows>:
  endbr64
  mov    %edx,%eax
  movslq %esi,%rdx
  imul   $0x328,%rdx,%rdx
  add    %rdi,%rdx
  cltq
  imul   $0x328,%rax,%rax
  lea    (%rdi,%rax,1),%rcx
  mov    $0x0,%eax
L2:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  (%rcx,%rax,1),%xmm1
  movsd  %xmm1,(%rdx,%rax,1)
  movsd  %xmm0,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    $0x328,%rax
  jne    L2
  ret
```

assistant: ```c
void swapRows(double aug_matrix[][10 * 10 + 1], int row1, int row2) {
  int i;
  double temp;
  for (i = 0; i < 10 * 10 + 1; i++) {
    temp = aug_matrix[row1][i];
    aug_matrix[row1][i] = aug_matrix[row2][i];
    aug_matrix[row2][i] = temp;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<swapRows>:
  endbr64
  movslq %edx,%rax
  movslq %esi,%rdx
  imul   $0x328,%rax,%rax
  imul   $0x328,%rdx,%rdx
  lea    (%rdi,%rax,1),%rcx
  xor    %eax,%eax
  add    %rdi,%rdx
  nopl   0x0(%rax)
L5:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  (%rcx,%rax,1),%xmm1
  movsd  %xmm1,(%rdx,%rax,1)
  movsd  %xmm0,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    $0x328,%rax
  jne    L5
  ret
```

assistant: ```c
void swapRows(double aug_matrix[][10 * 10 + 1], int row1, int row2) {
  int i;
  double temp;
  for (i = 0; i < 10 * 10 + 1; i++) {
    temp = aug_matrix[row1][i];
    aug_matrix[row1][i] = aug_matrix[row2][i];
    aug_matrix[row2][i] = temp;
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<swapRows>:
  endbr64
  movslq %esi,%rsi
  movslq %edx,%rdx
  imul   $0x328,%rsi,%rsi
  imul   $0x328,%rdx,%rdx
  lea    (%rdi,%rsi,1),%rcx
  lea    (%rdi,%rdx,1),%rax
  lea    0x10(%rsi),%rdi
  cmp    %rdx,%rdi
  jle    L21
  add    $0x10,%rdx
  cmp    %rsi,%rdx
  jg     L31
L21:
  xor    %edx,%edx
  nopl   0x0(%rax)
L9:
  movupd (%rcx,%rdx,1),%xmm0
  movupd (%rax,%rdx,1),%xmm2
  movups %xmm2,(%rcx,%rdx,1)
  movups %xmm0,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    $0x320,%rdx
  jne    L9
  movsd  0x320(%rcx),%xmm0
  movsd  0x320(%rax),%xmm1
  movsd  %xmm1,0x320(%rcx)
  movsd  %xmm0,0x320(%rax)
  ret
L31:
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L13:
  movsd  (%rcx,%rdx,1),%xmm0
  movsd  (%rax,%rdx,1),%xmm1
  movsd  %xmm1,(%rcx,%rdx,1)
  movsd  %xmm0,(%rax,%rdx,1)
  add    $0x8,%rdx
  cmp    $0x328,%rdx
  jne    L13
  ret
```

assistant: ```c
void swapRows(double aug_matrix[][10 * 10 + 1], int row1, int row2) {
  int i;
  double temp;
  for (i = 0; i < 10 * 10 + 1; i++) {
    temp = aug_matrix[row1][i];
    aug_matrix[row1][i] = aug_matrix[row2][i];
    aug_matrix[row2][i] = temp;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<luaM_realloc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  je     L5
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <lua_error@plt>
L5:
  cmpq   $0x0,-0x20(%rbp)
  jne    L10
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L19
L10:
  mov    -0x8(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L14
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <lua_error@plt>
L14:
  mov    -0x18(%rbp),%rax
L19:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D7
type: string
name: disassemble_data
arguments: data_tag: D0
type: string

tool: D7: memory allocation error: block too big

tool: D0: not enough memory

assistant: ```c
void *luaM_realloc(void *block, unsigned long size) {
  size_t s = (size_t)size;
  if (s != size)
    lua_error("memory allocation error: block too big");
  if (size == 0) {
    free(block);
    return NULL;
  }
  block = realloc(block, s);
  if (block == NULL)
    lua_error("not enough memory");
  return block;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<luaM_realloc>:
  endbr64
  push   %rbx
  test   %rsi,%rsi
  je     L29
  call   <realloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L5
L18:
  mov    %rbx,%rax
  pop    %rbx
  ret
L29:
  call   <free@plt>
  mov    $0x0,%ebx
  jmp    L18
L5:
  lea    D1(%rip),%rdi
  call   <lua_error@plt>
  jmp    L18
```

tool_calls: name: disassemble_data
arguments: data_label: D1
type_infered: string

tool: D1: not enough memory

assistant: ```c
void *luaM_realloc(void *block, unsigned long size) {
  size_t s = (size_t)size;
  if (s != size)
    lua_error("memory allocation error: block too big");
  if (size == 0) {
    free(block);
    return NULL;
  }
  block = realloc(block, s);
  if (block == NULL)
    lua_error("not enough memory");
  return block;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<luaM_realloc>:
  endbr64
  push   %r12
  test   %rsi,%rsi
  je     L10
  call   <realloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L1
L24:
  mov    %r12,%rax
  pop    %r12
  ret
  xchg   %ax,%ax
L10:
  call   <free@plt>
  xor    %r12d,%r12d
  mov    %r12,%rax
  pop    %r12
  ret
L1:
  lea    D4(%rip),%rdi
  call   <lua_error@plt>
  jmp    L24
```

tool_calls: name: extract_symbolic_data
arguments: tag: D4
type: string

tool: D4: not enough memory

assistant: ```c
void *luaM_realloc(void *block, unsigned long size) {
  size_t s = (size_t)size;
  if (s != size)
    lua_error("memory allocation error: block too big");
  if (size == 0) {
    free(block);
    return NULL;
  }
  block = realloc(block, s);
  if (block == NULL)
    lua_error("not enough memory");
  return block;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<luaM_realloc>:
  endbr64
  push   %r12
  test   %rsi,%rsi
  je     L1
  call   <realloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L24
L8:
  mov    %r12,%rax
  pop    %r12
  ret
  xchg   %ax,%ax
L1:
  call   <free@plt>
  xor    %r12d,%r12d
  mov    %r12,%rax
  pop    %r12
  ret
L24:
  lea    D6(%rip),%rdi
  call   <lua_error@plt>
  jmp    L8
```

tool_calls: name: unpack_data
arguments: tag: D6
type_guessed: string

tool: D6: not enough memory

assistant: ```c
void *luaM_realloc(void *block, unsigned long size) {
  size_t s = (size_t)size;
  if (s != size)
    lua_error("memory allocation error: block too big");
  if (size == 0) {
    free(block);
    return NULL;
  }
  block = realloc(block, s);
  if (block == NULL)
    lua_error("not enough memory");
  return block;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<permutation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  je     L10
  movl   $0x1,-0x28(%rbp)
  movl   $0x1,-0x24(%rbp)
  jmp    L38
L21:
  movl   $0x0,-0xc(%rbp)
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0xc(%rbp),%rax
  mov    $0x3,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  lea    -0x20(%rbp),%rdx
  lea    -0xc(%rbp),%rax
  lea    D29(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    -0x20(%rbp),%eax
  mov    -0x24(%rbp),%edx
  sub    $0x1,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  lea    D12(%rip),%rdx
  mov    (%rcx,%rdx,1),%edx
  mov    %edx,%ecx
  mov    $0x0,%edx
  div    %ecx
  mov    %edx,%eax
  test   %eax,%eax
  je     L3
  movl   $0x0,-0x28(%rbp)
  jmp    L12
L3:
  addl   $0x1,-0x24(%rbp)
L38:
  cmpl   $0x7,-0x24(%rbp)
  jle    L21
L12:
  cmpl   $0x0,-0x28(%rbp)
  je     L10
  lea    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    D20(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
L10:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L56
  call   <__stack_chk_fail@plt>
L56:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D29
data_type: string
name: retrieve_data
arguments: data_tag: D20
data_type: string

tool: D29: %u

tool: D20: %llu

assistant: ```c
void permutation(char *p, void *data) {
  unsigned long long *sum = (unsigned long long *)data;
  if (p[0] != '0') {
    static int divs[] = {2, 3, 5, 7, 11, 13, 17};
    bool is_divisible = true;
    for (int j = 1; j <= 7; j++) {
      char temp[4] = {0};
      memcpy(temp, &p[j], 3);
      unsigned int d;
      sscanf(temp, "%u", &d);
      if (d % divs[j - 1] != 0) {
        is_divisible = false;
        break;
      }
    }
    if (is_divisible) {
      unsigned long long d;
      sscanf(p, "%llu", &d);
      (*sum) += d;
    }
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<permutation>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmpb   $0x30,(%rdi)
  je     L35
  mov    %rdi,%r13
  lea    0x1(%rdi),%rbp
  lea    D15(%rip),%rbx
  lea    0x1c(%rbx),%r15
  lea    D27(%rip),%r14
L30:
  movl   $0x0,0x24(%rsp)
  lea    0x24(%rsp),%r12
  mov    $0x3,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <memcpy@plt>
  lea    0x18(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    0x18(%rsp),%eax
  mov    $0x0,%edx
  divl   (%rbx)
  test   %edx,%edx
  jne    L35
  add    $0x1,%rbp
  add    $0x4,%rbx
  cmp    %r15,%rbx
  jne    L30
  lea    0x18(%rsp),%rdx
  lea    D24(%rip),%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  mov    0x18(%rsp),%rax
  mov    0x8(%rsp),%rcx
  add    %rax,(%rcx)
L35:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D15
type: string
name: extract_symbolic_data
arguments: data_label: D27
type: string
name: extract_symbolic_data
arguments: data_label: D24
type: string

tool: D15: 

tool: D27: %u

tool: D24: %llu

assistant: ```c
void permutation(char *p, void *data) {
  unsigned long long *sum = (unsigned long long *)data;
  if (p[0] != '0') {
    static int divs[] = {2, 3, 5, 7, 11, 13, 17};
    bool is_divisible = true;
    for (int j = 1; j <= 7; j++) {
      char temp[4] = {0};
      memcpy(temp, &p[j], 3);
      unsigned int d;
      sscanf(temp, "%u", &d);
      if (d % divs[j - 1] != 0) {
        is_divisible = false;
        break;
      }
    }
    if (is_divisible) {
      unsigned long long d;
      sscanf(p, "%llu", &d);
      (*sum) += d;
    }
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<permutation>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmpb   $0x30,(%rdi)
  je     L38
  mov    %rdi,%rbp
  lea    0x1(%rdi),%r15
  lea    0x24(%rsp),%rbx
  lea    D35(%rip),%r14
  lea    0x18(%rsp),%r12
  lea    D24(%rip),%r13
  nop
L24:
  mov    $0x3,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  movl   $0x0,0x24(%rsp)
  call   <memcpy@plt>
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <sscanf@plt>
  mov    0x18(%rsp),%eax
  xor    %edx,%edx
  divl   (%r14)
  test   %edx,%edx
  jne    L38
  add    $0x4,%r14
  lea    D8(%rip),%rax
  add    $0x1,%r15
  cmp    %rax,%r14
  jne    L24
  mov    %r12,%rdx
  lea    D25(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <sscanf@plt>
  mov    0x8(%rsp),%rcx
  mov    0x18(%rsp),%rax
  add    %rax,(%rcx)
L38:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D35
data_type: string
name: extract_symbolic_data
arguments: label: D24
data_type: string
name: extract_symbolic_data
arguments: label: D25
data_type: string

tool: D35: 

tool: D24: %u

tool: D25: %llu

assistant: ```c
void permutation(char *p, void *data) {
  unsigned long long *sum = (unsigned long long *)data;
  if (p[0] != '0') {
    static int divs[] = {2, 3, 5, 7, 11, 13, 17};
    bool is_divisible = true;
    for (int j = 1; j <= 7; j++) {
      char temp[4] = {0};
      memcpy(temp, &p[j], 3);
      unsigned int d;
      sscanf(temp, "%u", &d);
      if (d % divs[j - 1] != 0) {
        is_divisible = false;
        break;
      }
    }
    if (is_divisible) {
      unsigned long long d;
      sscanf(p, "%llu", &d);
      (*sum) += d;
    }
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<permutation>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmpb   $0x30,(%rdi)
  je     L25
  mov    %rdi,%rbp
  lea    0x1(%rdi),%r15
  lea    0x24(%rsp),%rbx
  lea    D30(%rip),%r14
  lea    0x18(%rsp),%r12
  lea    D10(%rip),%r13
  nop
L29:
  mov    $0x3,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  movl   $0x0,0x24(%rsp)
  call   <memcpy@plt>
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <sscanf@plt>
  mov    0x18(%rsp),%eax
  xor    %edx,%edx
  divl   (%r14)
  test   %edx,%edx
  jne    L25
  add    $0x4,%r14
  lea    D22(%rip),%rax
  add    $0x1,%r15
  cmp    %rax,%r14
  jne    L29
  mov    %r12,%rdx
  lea    D19(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <sscanf@plt>
  mov    0x8(%rsp),%rcx
  mov    0x18(%rsp),%rax
  add    %rax,(%rcx)
L25:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D30
type: string
name: retrieve_data
arguments: label: D10
type: string
name: retrieve_data
arguments: label: D19
type: string

tool: D30: 

tool: D10: %u

tool: D19: %llu

assistant: ```c
void permutation(char *p, void *data) {
  unsigned long long *sum = (unsigned long long *)data;
  if (p[0] != '0') {
    static int divs[] = {2, 3, 5, 7, 11, 13, 17};
    bool is_divisible = true;
    for (int j = 1; j <= 7; j++) {
      char temp[4] = {0};
      memcpy(temp, &p[j], 3);
      unsigned int d;
      sscanf(temp, "%u", &d);
      if (d % divs[j - 1] != 0) {
        is_divisible = false;
        break;
      }
    }
    if (is_divisible) {
      unsigned long long d;
      sscanf(p, "%llu", &d);
      (*sum) += d;
    }
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<zlmb_utils_asprintf>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r14
  mov    %rsi,%r13
  mov    $0x80,%edi
  call   <malloc@plt>
  test   %rax,%rax
  je     L35
  mov    %rax,%rbp
  mov    %r13,%rsi
  mov    $0x0,%r12d
  mov    %r12d,%edi
  call   <va_start@plt>
  mov    %r12d,%esi
  mov    $0x0,%edi
  call   <va_copy@plt>
  mov    %r12d,%ecx
  mov    %r13,%rdx
  mov    $0x80,%esi
  mov    %rbp,%rdi
  call   <vsnprintf@plt>
  mov    %eax,%ebx
  cmp    $0x7f,%eax
  jg     L1
  test   %eax,%eax
  js     L49
  mov    %rbp,(%r14)
L16:
  mov    $0x0,%r12d
  mov    %r12d,%edi
  call   <va_end@plt>
  mov    $0x0,%edi
  call   <va_end@plt>
L19:
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L1:
  add    $0x1,%ebx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <realloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L25
  mov    $0x0,%edi
  mov    %edi,%ecx
  mov    %r13,%rdx
  mov    %ebx,%esi
  mov    %rax,%rdi
  call   <vsnprintf@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  js     L39
  mov    %r12,(%r14)
  jmp    L16
L25:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r12d,%edi
  call   <va_end@plt>
  mov    $0x0,%edi
  call   <va_end@plt>
  mov    $0xffffffff,%ebx
  jmp    L19
L39:
  mov    %r12,%rdi
  call   <free@plt>
  jmp    L16
L49:
  mov    %rbp,%rdi
  call   <free@plt>
  jmp    L16
L35:
  mov    $0xffffffff,%ebx
  jmp    L19
```

assistant: ```c
int zlmb_utils_asprintf(char **str, const char *format, ...) {
  int ret, size = 128;
  char *string = NULL;
  va_list arg, ap;
  void *tmp = NULL;
  string = (char *)malloc(size);
  if (!string) {
    return -1;
  }
  va_start(arg, format);
  va_copy(ap, arg);
  ret = vsnprintf(string, size, format, arg);
  if (ret >= size) {
    size = ret + 1;
    tmp = realloc(string, size);
    if (!tmp) {
      free(string);
      va_end(arg);
      va_end(ap);
      return -1;
    }
    string = (char *)tmp;
    ret = vsnprintf(string, size, format, ap);
    if (ret >= 0) {
      *str = string;
    } else {
      free(string);
    }
  } else if (ret >= 0) {
    *str = string;
  } else {
    free(string);
  }
  va_end(arg);
  va_end(ap);
  return ret;
}
```