ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 下面的汇编指令对应的C源代码是什么：

```asm
<DIVIDER_32b_AUTOTEST>:
  endbr64
  push   %r15
  lea    D57(%rip),%rdi
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  call   <puts@plt>
  nopl   0x0(%rax)
L17:
  xor    %eax,%eax
  call   <rand@plt>
  cltd
  shr    $0x10,%edx
  lea    (%rax,%rdx,1),%r12d
  xor    %eax,%eax
  movzwl %r12w,%r12d
  sub    %edx,%r12d
  call   <rand@plt>
  mov    %r12d,%edi
  cltd
  shr    $0x10,%edx
  lea    (%rax,%rdx,1),%ebp
  movzwl %bp,%ebp
  sub    %edx,%ebp
  mov    %ebp,%esi
  call   <instr_fudiv@plt>
  mov    %ebp,%esi
  mov    %r12d,%edi
  mov    %eax,%r15d
  call   <instr_fudiv@plt>
  mov    %eax,%r14d
  cmp    %eax,%r15d
  jne    L19
  add    $0x1,%r13d
  cmp    $0xa,%r13d
  jne    L17
  lea    D27(%rip),%rdi
  call   <puts@plt>
  pop    %rbp
  mov    $0x1,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L19:
  lea    D3(%rip),%rdi
  call   <puts@plt>
  mov    %r13d,%esi
  lea    D44(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r15d,%ecx
  mov    %ebp,%edx
  mov    %r12d,%esi
  lea    D52(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  lea    D36(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: label: D57
type_infered: string
name: retrieve_data
arguments: label: D27
type_infered: string
name: retrieve_data
arguments: label: D3
type_infered: string
name: retrieve_data
arguments: label: D44
type_infered: string
name: retrieve_data
arguments: label: D52
type_infered: string
name: retrieve_data
arguments: label: D36
type_infered: string

tool: D57: LAUNCHING THE (DIVIDER) RESOURCE TEST...

tool: D27: - TEST OF THE (DIVIDER) RESOURCE => OK

tool: D3: - TEST OF THE (DIVIDER) RESOURCE => FAILED !

tool: D44:   + %d COMPUTATION BEFORE ERROR... !


tool: D52:   + INSTRUCTION RESULT (%d l %d) => %d


tool: D36:   + C CODE RESULT      (%d l %d) => %d


assistant: ```c
int DIVIDER_32b_AUTOTEST() {
  int i, j;
  printf("LAUNCHING THE (DIVIDER) RESOURCE TEST...\n");
  for (j = 0; j < 10; j++) {
    int op1 = rand() % 65536;
    int op2 = rand() % 65536;
    int res1 = instr_fudiv(op1, op2);
    int res3 = instr_fudiv(op1, op2);
    if (res1 != res3) {
      printf("- TEST OF THE (DIVIDER) RESOURCE => FAILED !\n");
      printf("  + %d COMPUTATION BEFORE ERROR... !\n", j);
      printf("  + INSTRUCTION RESULT (%d l %d) => %d\n", op1, op2, res1);
      printf("  + C CODE RESULT      (%d l %d) => %d\n", op2, op1, res3);
      return 0;
    }
  }
  printf("- TEST OF THE (DIVIDER) RESOURCE => OK\n");
  return 1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<direct_set16>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0xc(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
uint16_t direct_set16(volatile uint16_t *addr, uint16_t dat) {
  *addr |= dat;
  return dat;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<direct_set16>:
  endbr64
  mov    %esi,-0x4(%rsp)
  mov    -0x4(%rsp),%edx
  mov    (%rdi),%eax
  or     %edx,%eax
  mov    %eax,(%rdi)
  mov    -0x4(%rsp),%eax
  ret
```

assistant: ```c
uint16_t direct_set16(volatile uint16_t *addr, uint16_t dat) {
  *addr |= dat;
  return dat;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<direct_set16>:
  endbr64
  mov    %esi,-0x4(%rsp)
  mov    -0x4(%rsp),%edx
  mov    (%rdi),%eax
  or     %edx,%eax
  mov    %eax,(%rdi)
  mov    -0x4(%rsp),%eax
  ret
```

assistant: ```c
uint16_t direct_set16(volatile uint16_t *addr, uint16_t dat) {
  *addr |= dat;
  return dat;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<direct_set16>:
  endbr64
  mov    %esi,-0x4(%rsp)
  mov    -0x4(%rsp),%edx
  mov    (%rdi),%eax
  or     %edx,%eax
  mov    %eax,(%rdi)
  mov    -0x4(%rsp),%eax
  ret
```

assistant: ```c
uint16_t direct_set16(volatile uint16_t *addr, uint16_t dat) {
  *addr |= dat;
  return dat;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<string_val>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rdx
  mov    -0x24(%rbp),%ecx
  mov    -0x20(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <fwrite_repr@plt>
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int string_val(void *ctx, char *val, int vallen) {
  FILE *fp = ctx;
  fwrite_repr(val, vallen, fp);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<string_val>:
  endbr64
  sub    $0x8,%rsp
  mov    %rdi,%rax
  mov    %rsi,%rdi
  mov    %edx,%esi
  mov    %rax,%rdx
  call   <fwrite_repr@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int string_val(void *ctx, char *val, int vallen) {
  FILE *fp = ctx;
  fwrite_repr(val, vallen, fp);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<string_val>:
  endbr64
  mov    %rdi,%r8
  sub    $0x8,%rsp
  mov    %rsi,%rdi
  mov    %edx,%esi
  mov    %r8,%rdx
  call   <fwrite_repr@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int string_val(void *ctx, char *val, int vallen) {
  FILE *fp = ctx;
  fwrite_repr(val, vallen, fp);
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<string_val>:
  endbr64
  mov    %rdi,%r8
  sub    $0x8,%rsp
  mov    %rsi,%rdi
  mov    %edx,%esi
  mov    %r8,%rdx
  call   <fwrite_repr@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int string_val(void *ctx, char *val, int vallen) {
  FILE *fp = ctx;
  fwrite_repr(val, vallen, fp);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<fun2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int fun2(int x) {
  ;
  return x;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<fun2>:
  endbr64
  mov    %edi,%eax
  ret
```

assistant: ```c
int fun2(int x) {
  ;
  return x;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<fun2>:
  endbr64
  mov    %edi,%eax
  ret
```

assistant: ```c
int fun2(int x) {
  ;
  return x;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<fun2>:
  endbr64
  mov    %edi,%eax
  ret
```

assistant: ```c
int fun2(int x) {
  ;
  return x;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<Int1d>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  movsd  %xmm0,-0x18(%rbp)
  mov    %edi,-0x1c(%rbp)
  mov    %esi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  movsd  %xmm1,-0x30(%rbp)
  movsd  %xmm2,-0x38(%rbp)
  movsd  %xmm3,-0x40(%rbp)
  movsd  %xmm4,-0x48(%rbp)
  movsd  %xmm5,-0x50(%rbp)
  movsd  %xmm6,-0x58(%rbp)
  movsd  %xmm7,-0x60(%rbp)
  movsd  -0x60(%rbp),%xmm6
  movsd  -0x58(%rbp),%xmm5
  movsd  -0x50(%rbp),%xmm4
  movsd  -0x48(%rbp),%xmm3
  movsd  -0x40(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  mov    -0x28(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%esi
  mov    -0x1c(%rbp),%edi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  push   0x10(%rbp)
  movapd %xmm6,%xmm7
  movapd %xmm5,%xmm6
  movapd %xmm4,%xmm5
  movapd %xmm3,%xmm4
  movapd %xmm2,%xmm3
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <Recur@plt>
  add    $0x10,%rsp
  movsd  -0x40(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x48(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x38(%rbp),%xmm0
  movq   %xmm0,%rdi
  mov    -0x28(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%esi
  mov    -0x1c(%rbp),%eax
  movq   %rdi,%xmm0
  mov    %eax,%edi
  call   <Shift@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double Int1d(double t, int ix, int jx, int kx, int lx, double xi, double xj, double xk, double xl, double alphai, double alphaj, double alphak, double alphal) {
  double Ix;
  Recur(t, ix, jx, kx, lx, xi, xj, xk, xl, alphai, alphaj, alphak, alphal);
  Ix = Shift(ix, jx, kx, lx, xi - xj, xk - xl);
  return Ix;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<Int1d>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %edi,%r15d
  mov    %esi,%r14d
  mov    %edx,%ebp
  mov    %ecx,%r12d
  movq   %xmm1,%rbx
  movsd  %xmm2,0x8(%rsp)
  movq   %xmm3,%r13
  movsd  %xmm4,0x10(%rsp)
  push   0x58(%rsp)
  movsd  0x18(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm2
  call   <Recur@plt>
  movq   %rbx,%xmm0
  subsd  0x10(%rsp),%xmm0
  movq   %r13,%xmm1
  subsd  0x18(%rsp),%xmm1
  mov    %r12d,%ecx
  mov    %ebp,%edx
  mov    %r14d,%esi
  mov    %r15d,%edi
  call   <Shift@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
double Int1d(double t, int ix, int jx, int kx, int lx, double xi, double xj, double xk, double xl, double alphai, double alphaj, double alphak, double alphal) {
  double Ix;
  Recur(t, ix, jx, kx, lx, xi, xj, xk, xl, alphai, alphaj, alphak, alphal);
  Ix = Shift(ix, jx, kx, lx, xi - xj, xk - xl);
  return Ix;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<Int1d>:
  endbr64
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %edi,%ebp
  sub    $0x30,%rsp
  push   0x58(%rsp)
  movsd  %xmm4,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  call   <Recur@plt>
  movsd  0x10(%rsp),%xmm1
  mov    %r14d,%ecx
  mov    %ebp,%edi
  movsd  0x20(%rsp),%xmm3
  movsd  0x28(%rsp),%xmm4
  mov    %r13d,%edx
  mov    %r12d,%esi
  movsd  0x18(%rsp),%xmm2
  movapd %xmm1,%xmm0
  add    $0x38,%rsp
  subsd  %xmm4,%xmm3
  pop    %rbp
  pop    %r12
  subsd  %xmm2,%xmm0
  pop    %r13
  pop    %r14
  movapd %xmm3,%xmm1
  jmp    1060 <Shift@plt>
```

assistant: ```c
double Int1d(double t, int ix, int jx, int kx, int lx, double xi, double xj, double xk, double xl, double alphai, double alphaj, double alphak, double alphal) {
  double Ix;
  Recur(t, ix, jx, kx, lx, xi, xj, xk, xl, alphai, alphaj, alphak, alphal);
  Ix = Shift(ix, jx, kx, lx, xi - xj, xk - xl);
  return Ix;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<Int1d>:
  endbr64
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %edi,%ebp
  sub    $0x30,%rsp
  push   0x58(%rsp)
  movsd  %xmm4,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  call   <Recur@plt>
  movsd  0x10(%rsp),%xmm1
  mov    %r14d,%ecx
  mov    %ebp,%edi
  movsd  0x20(%rsp),%xmm3
  movsd  0x28(%rsp),%xmm4
  mov    %r13d,%edx
  mov    %r12d,%esi
  movsd  0x18(%rsp),%xmm2
  movapd %xmm1,%xmm0
  add    $0x38,%rsp
  subsd  %xmm4,%xmm3
  pop    %rbp
  pop    %r12
  subsd  %xmm2,%xmm0
  pop    %r13
  pop    %r14
  movapd %xmm3,%xmm1
  jmp    1060 <Shift@plt>
```

assistant: ```c
double Int1d(double t, int ix, int jx, int kx, int lx, double xi, double xj, double xk, double xl, double alphai, double alphaj, double alphak, double alphal) {
  double Ix;
  Recur(t, ix, jx, kx, lx, xi, xj, xk, xl, alphai, alphaj, alphak, alphal);
  Ix = Shift(ix, jx, kx, lx, xi - xj, xk - xl);
  return Ix;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<parse_ios>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  lea    D0(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L50
  mov    -0x10(%rbp),%rax
  sub    -0x28(%rbp),%rax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jle    L8
  mov    -0x10(%rbp),%rax
  lea    D11(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L42
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x14(%rbp),%eax
  mov    %eax,%edx
  mov    %rcx,%rdi
  call   <memmove@plt>
  mov    -0x28(%rbp),%rax
  mov    $0x2e,%edx
  mov    $0x5f,%esi
  mov    %rax,%rdi
  call   <char_replace@plt>
  jmp    L3
L50:
  nop
  jmp    L39
L8:
  nop
  jmp    L39
L42:
  nop
L39:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
L3:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D0
data_type: string
name: extract_symbolic_data
arguments: tag: D11
data_type: string

tool: D0:  OS 

tool: D11:  like Mac

assistant: ```c
char *parse_ios(char *agent, int tlen) {
  char *p = NULL, *q = NULL;
  ptrdiff_t offset;
  if ((p = strstr(agent, " OS ")) == NULL)
    goto out;
  if ((offset = p - agent) <= 0)
    goto out;
  if ((q = strstr(p, " like Mac")) == NULL)
    goto out;
  *q = 0;
  memmove(agent + tlen, agent + offset, offset);
  return char_replace(agent, '_', '.');
out:
  agent[tlen] = 0;
  return agent;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<parse_ios>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %esi,%ebp
  lea    D14(%rip),%rsi
  call   <strstr@plt>
  test   %rax,%rax
  je     L4
  mov    %rax,%r12
  sub    %rbx,%r12
  test   %r12d,%r12d
  jle    L4
  lea    D5(%rip),%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L4
  movb   $0x0,(%rax)
  movslq %r12d,%rsi
  add    %rbx,%rsi
  movslq %ebp,%rdi
  add    %rbx,%rdi
  mov    %r12d,%edx
  call   <memmove@plt>
  mov    $0x2e,%edx
  mov    $0x5f,%esi
  mov    %rbx,%rdi
  call   <char_replace@plt>
  jmp    L27
L4:
  movslq %ebp,%rbp
  movb   $0x0,(%rbx,%rbp,1)
  mov    %rbx,%rax
L27:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D14
type_guessed: string
name: unpack_data
arguments: data_label: D5
type_guessed: string

tool: D14:  OS 

tool: D5:  like Mac

assistant: ```c
char *parse_ios(char *agent, int tlen) {
  char *p = NULL, *q = NULL;
  ptrdiff_t offset;
  if ((p = strstr(agent, " OS ")) == NULL)
    goto out;
  if ((offset = p - agent) <= 0)
    goto out;
  if ((q = strstr(p, " like Mac")) == NULL)
    goto out;
  *q = 0;
  memmove(agent + tlen, agent + offset, offset);
  return char_replace(agent, '_', '.');
out:
  agent[tlen] = 0;
  return agent;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<parse_ios>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  movslq %esi,%rbx
  lea    D1(%rip),%rsi
  lea    (%r12,%rbx,1),%rbp
  sub    $0x8,%rsp
  call   <strstr@plt>
  test   %rax,%rax
  je     L22
  mov    %rax,%rbx
  mov    %rax,%rdi
  sub    %r12,%rbx
  test   %ebx,%ebx
  jle    L22
  lea    D19(%rip),%rsi
  call   <strstr@plt>
  test   %rax,%rax
  je     L22
  movb   $0x0,(%rax)
  movslq %ebx,%rsi
  mov    %ebx,%edx
  mov    %rbp,%rdi
  add    %r12,%rsi
  call   <memmove@plt>
  add    $0x8,%rsp
  mov    %r12,%rdi
  mov    $0x2e,%edx
  pop    %rbx
  mov    $0x5f,%esi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1070 <char_replace@plt>
  cs nopw 0x0(%rax,%rax,1)
L22:
  movb   $0x0,0x0(%rbp)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D1
datatype: string
name: extract_symbolic_data
arguments: data_label: D19
datatype: string

tool: D1:  OS 

tool: D19:  like Mac

assistant: ```c
char *parse_ios(char *agent, int tlen) {
  char *p = NULL, *q = NULL;
  ptrdiff_t offset;
  if ((p = strstr(agent, " OS ")) == NULL)
    goto out;
  if ((offset = p - agent) <= 0)
    goto out;
  if ((q = strstr(p, " like Mac")) == NULL)
    goto out;
  *q = 0;
  memmove(agent + tlen, agent + offset, offset);
  return char_replace(agent, '_', '.');
out:
  agent[tlen] = 0;
  return agent;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<parse_ios>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  movslq %esi,%rbx
  lea    D5(%rip),%rsi
  lea    (%r12,%rbx,1),%rbp
  sub    $0x8,%rsp
  call   <strstr@plt>
  test   %rax,%rax
  je     L29
  mov    %rax,%rbx
  mov    %rax,%rdi
  sub    %r12,%rbx
  test   %ebx,%ebx
  jle    L29
  lea    D6(%rip),%rsi
  call   <strstr@plt>
  test   %rax,%rax
  je     L29
  movb   $0x0,(%rax)
  movslq %ebx,%rsi
  mov    %ebx,%edx
  mov    %rbp,%rdi
  add    %r12,%rsi
  call   <memmove@plt>
  add    $0x8,%rsp
  mov    %r12,%rdi
  mov    $0x2e,%edx
  pop    %rbx
  mov    $0x5f,%esi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1070 <char_replace@plt>
  cs nopw 0x0(%rax,%rax,1)
L29:
  movb   $0x0,0x0(%rbp)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: parse_data
arguments: tag: D5
type_infered: string
name: parse_data
arguments: tag: D6
type_infered: string

tool: D5:  OS 

tool: D6:  like Mac

assistant: ```c
char *parse_ios(char *agent, int tlen) {
  char *p = NULL, *q = NULL;
  ptrdiff_t offset;
  if ((p = strstr(agent, " OS ")) == NULL)
    goto out;
  if ((offset = p - agent) <= 0)
    goto out;
  if ((q = strstr(p, " like Mac")) == NULL)
    goto out;
  *q = 0;
  memmove(agent + tlen, agent + offset, offset);
  return char_replace(agent, '_', '.');
out:
  agent[tlen] = 0;
  return agent;
}
```
user: What is the c source code of the assembly code below:

```asm
<phone_utils_gsm_sms_strlen>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x20(%rbp)
  lea    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <utf8_get_next@plt>
  mov    %eax,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L35
L8:
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <phone_utils_gsm_get_char_size@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  je     L29
  mov    -0xc(%rbp),%eax
  add    %eax,-0x18(%rbp)
  jmp    L24
L29:
  movl   $0x1,-0x14(%rbp)
L24:
  lea    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <utf8_get_next@plt>
  mov    %eax,-0x10(%rbp)
  addl   $0x1,-0x1c(%rbp)
L35:
  cmpl   $0x0,-0x10(%rbp)
  jne    L8
  cmpl   $0x0,-0x14(%rbp)
  je     L45
  mov    -0x1c(%rbp),%eax
  jmp    L26
L45:
  mov    -0x18(%rbp),%eax
L26:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L42
  call   <__stack_chk_fail@plt>
L42:
  leave
  ret
```

assistant: ```c
int phone_utils_gsm_sms_strlen(const char *string) {
  int i;
  int len, size;
  int ucs;
  int chr;
  i = 0;
  chr = utf8_get_next(string, &i);
  for (len = size = ucs = 0; chr; chr = utf8_get_next(string, &i), len++) {
    int char_size;
    char_size = phone_utils_gsm_get_char_size(chr);
    if (char_size) {
      size += char_size;
    } else {
      ucs = 1;
    }
  }
  return (ucs) ? len : size;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<phone_utils_gsm_sms_strlen>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x4(%rsp)
  lea    0x4(%rsp),%rsi
  call   <utf8_get_next@plt>
  mov    %eax,%edi
  test   %eax,%eax
  je     L21
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  mov    $0x0,%ebx
  mov    $0x1,%r14d
  jmp    L58
L32:
  mov    %r14d,%r13d
L41:
  lea    0x4(%rsp),%rsi
  mov    %rbp,%rdi
  call   <utf8_get_next@plt>
  mov    %eax,%edi
  add    $0x1,%ebx
  test   %eax,%eax
  je     L15
L58:
  call   <phone_utils_gsm_get_char_size@plt>
  test   %eax,%eax
  je     L32
  add    %eax,%r12d
  jmp    L41
L15:
  test   %r13d,%r13d
  cmove  %r12d,%ebx
L19:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  mov    %ebx,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L21:
  mov    %eax,%ebx
  jmp    L19
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int phone_utils_gsm_sms_strlen(const char *string) {
  int i;
  int len, size;
  int ucs;
  int chr;
  i = 0;
  chr = utf8_get_next(string, &i);
  for (len = size = ucs = 0; chr; chr = utf8_get_next(string, &i), len++) {
    int char_size;
    char_size = phone_utils_gsm_get_char_size(chr);
    if (char_size) {
      size += char_size;
    } else {
      ucs = 1;
    }
  }
  return (ucs) ? len : size;
}
```
user: What is the c source code of the assembly code below:

```asm
<phone_utils_gsm_sms_strlen>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rbp
  movl   $0x0,0x4(%rsp)
  mov    %rbp,%rsi
  call   <utf8_get_next@plt>
  test   %eax,%eax
  je     L8
  mov    %eax,%edi
  xor    %r14d,%r14d
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  jmp    L12
  nopl   0x0(%rax)
L68:
  add    %eax,%r13d
L51:
  mov    %rbx,%rdi
  mov    %rbp,%rsi
  add    $0x1,%r12d
  call   <utf8_get_next@plt>
  mov    %eax,%edi
  test   %eax,%eax
  je     L64
L12:
  call   <phone_utils_gsm_get_char_size@plt>
  test   %eax,%eax
  jne    L68
  mov    $0x1,%r14d
  jmp    L51
  nopl   0x0(%rax)
L64:
  test   %r14d,%r14d
  je     L34
L58:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L25
  add    $0x10,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L8:
  xor    %r13d,%r13d
L34:
  mov    %r13d,%r12d
  jmp    L58
L25:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int phone_utils_gsm_sms_strlen(const char *string) {
  int i;
  int len, size;
  int ucs;
  int chr;
  i = 0;
  chr = utf8_get_next(string, &i);
  for (len = size = ucs = 0; chr; chr = utf8_get_next(string, &i), len++) {
    int char_size;
    char_size = phone_utils_gsm_get_char_size(chr);
    if (char_size) {
      size += char_size;
    } else {
      ucs = 1;
    }
  }
  return (ucs) ? len : size;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<phone_utils_gsm_sms_strlen>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rbp
  movl   $0x0,0x4(%rsp)
  mov    %rbp,%rsi
  call   <utf8_get_next@plt>
  test   %eax,%eax
  je     L72
  mov    %eax,%edi
  xor    %r14d,%r14d
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  jmp    L61
  nopl   0x0(%rax)
L28:
  add    %eax,%r13d
L46:
  mov    %rbx,%rdi
  mov    %rbp,%rsi
  add    $0x1,%r12d
  call   <utf8_get_next@plt>
  mov    %eax,%edi
  test   %eax,%eax
  je     L48
L61:
  call   <phone_utils_gsm_get_char_size@plt>
  test   %eax,%eax
  jne    L28
  mov    $0x1,%r14d
  jmp    L46
  nopl   0x0(%rax)
L48:
  test   %r14d,%r14d
  je     L47
L76:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x10,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L72:
  xor    %r13d,%r13d
L47:
  mov    %r13d,%r12d
  jmp    L76
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int phone_utils_gsm_sms_strlen(const char *string) {
  int i;
  int len, size;
  int ucs;
  int chr;
  i = 0;
  chr = utf8_get_next(string, &i);
  for (len = size = ucs = 0; chr; chr = utf8_get_next(string, &i), len++) {
    int char_size;
    char_size = phone_utils_gsm_get_char_size(chr);
    if (char_size) {
      size += char_size;
    } else {
      ucs = 1;
    }
  }
  return (ucs) ? len : size;
}
```