ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Demonstrate the C code that generates the assembly output below:

```asm
<Josephus>:
  endbr64
  mov    %edi,%r8d
  mov    %esi,%edi
  mov    %r8d,%eax
  cmp    $0x1,%esi
  je     L0
  cmp    $0x1,%r8d
  jle    L26
  mov    $0x2,%ecx
  mov    $0x0,%esi
  lea    0x1(%r8),%r10d
  jmp    L23
L15:
  cltd
  idiv   %ecx
  mov    %edx,%esi
  add    $0x1,%ecx
L3:
  cmp    %r8d,%ecx
  jg     L17
L23:
  lea    (%rdi,%rsi,1),%eax
  cmp    %ecx,%eax
  jge    L15
  mov    %ecx,%eax
  sub    %esi,%eax
  cltd
  idiv   %edi
  lea    (%rax,%rcx,1),%r9d
  mov    %r10d,%edx
  sub    %ecx,%edx
  cmp    %r8d,%r9d
  cmovg  %edx,%eax
  mov    %eax,%edx
  imul   %edi,%edx
  add    %edx,%esi
  add    %eax,%ecx
  jmp    L3
L26:
  mov    $0x0,%esi
L17:
  lea    0x1(%rsi),%eax
L0:
  ret
```

assistant: ```c
int Josephus(int n, int k) {
  int s = 0, t, i;
  if (k == 1)
    return n;
  for (i = 2; i <= n;) {
    if (s + k < i) {
      t = (i - s) / k;
      if (i + t > n)
        t = n + 1 - i;
      s += t * k;
      i += t;
    } else {
      s = (s + k) % i;
      i++;
    }
  }
  return s + 1;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<Josephus>:
  endbr64
  mov    %edi,%r8d
  mov    %edi,%eax
  cmp    $0x1,%esi
  je     L0
  cmp    $0x1,%edi
  jle    L15
  mov    $0x2,%ecx
  xor    %edi,%edi
  lea    0x1(%r8),%r9d
  jmp    L8
L22:
  mov    %ecx,%eax
  sub    %edi,%eax
  cltd
  idiv   %esi
  lea    (%rax,%rcx,1),%edx
  cmp    %r8d,%edx
  jle    L78
  mov    %r9d,%eax
  sub    %ecx,%eax
  mov    %r9d,%ecx
L25:
  imul   %esi,%eax
  add    %eax,%edi
  cmp    %r8d,%ecx
  jg     L55
L8:
  lea    (%rsi,%rdi,1),%eax
  cmp    %ecx,%eax
  jl     L22
  cltd
  idiv   %ecx
  add    $0x1,%ecx
  mov    %edx,%edi
  cmp    %r8d,%ecx
  jle    L8
L55:
  lea    0x1(%rdi),%eax
  ret
  nopl   0x0(%rax)
L78:
  mov    %edx,%ecx
  jmp    L25
  nopl   0x0(%rax)
L15:
  mov    $0x1,%eax
L0:
  ret
```

assistant: ```c
int Josephus(int n, int k) {
  int s = 0, t, i;
  if (k == 1)
    return n;
  for (i = 2; i <= n;) {
    if (s + k < i) {
      t = (i - s) / k;
      if (i + t > n)
        t = n + 1 - i;
      s += t * k;
      i += t;
    } else {
      s = (s + k) % i;
      i++;
    }
  }
  return s + 1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<Josephus>:
  endbr64
  mov    %edi,%r8d
  mov    %edi,%eax
  cmp    $0x1,%esi
  je     L77
  cmp    $0x1,%edi
  jle    L31
  mov    $0x2,%ecx
  xor    %edi,%edi
  lea    0x1(%r8),%r9d
  jmp    L19
L54:
  mov    %ecx,%eax
  sub    %edi,%eax
  cltd
  idiv   %esi
  lea    (%rax,%rcx,1),%edx
  cmp    %r8d,%edx
  jle    L34
  mov    %r9d,%eax
  sub    %ecx,%eax
  mov    %r9d,%ecx
L32:
  imul   %esi,%eax
  add    %eax,%edi
  cmp    %r8d,%ecx
  jg     L76
L19:
  lea    (%rsi,%rdi,1),%eax
  cmp    %ecx,%eax
  jl     L54
  cltd
  idiv   %ecx
  add    $0x1,%ecx
  mov    %edx,%edi
  cmp    %r8d,%ecx
  jle    L19
L76:
  lea    0x1(%rdi),%eax
  ret
  nopl   0x0(%rax)
L34:
  mov    %edx,%ecx
  jmp    L32
  nopl   0x0(%rax)
L31:
  mov    $0x1,%eax
L77:
  ret
```

assistant: ```c
int Josephus(int n, int k) {
  int s = 0, t, i;
  if (k == 1)
    return n;
  for (i = 2; i <= n;) {
    if (s + k < i) {
      t = (i - s) / k;
      if (i + t > n)
        t = n + 1 - i;
      s += t * k;
      i += t;
    } else {
      s = (s + k) % i;
      i++;
    }
  }
  return s + 1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<get_time>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x8(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  D6(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D6
type_infered: f64

tool: D6: 1000000

assistant: ```c
double get_time(struct timeval *tim) {
  gettimeofday(tim, NULL);
  return tim->tv_sec + (tim->tv_usec / 1000000.0);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_time>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  movsd  0x8(%rbx),%xmm0
  divsd  D7(%rip),%xmm0
  addsd  (%rbx),%xmm0
  pop    %rbx
  ret
```

tool_calls: name: parse_data
arguments: data_label: D7
type: f64

tool: D7: 1000000

assistant: ```c
double get_time(struct timeval *tim) {
  gettimeofday(tim, NULL);
  return tim->tv_sec + (tim->tv_usec / 1000000.0);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<get_time>:
  endbr64
  push   %rbx
  xor    %esi,%esi
  mov    %rdi,%rbx
  call   <gettimeofday@plt>
  movsd  0x8(%rbx),%xmm0
  divsd  D6(%rip),%xmm0
  addsd  (%rbx),%xmm0
  pop    %rbx
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D6
type_guessed: f64

tool: D6: 1000000

assistant: ```c
double get_time(struct timeval *tim) {
  gettimeofday(tim, NULL);
  return tim->tv_sec + (tim->tv_usec / 1000000.0);
}
```
user: What is the c source code of the assembly code below:

```asm
<get_time>:
  endbr64
  push   %rbx
  xor    %esi,%esi
  mov    %rdi,%rbx
  call   <gettimeofday@plt>
  movsd  0x8(%rbx),%xmm0
  divsd  D5(%rip),%xmm0
  addsd  (%rbx),%xmm0
  pop    %rbx
  ret
```

tool_calls: name: read_data
arguments: data_tag: D5
type: f64

tool: D5: 1000000

assistant: ```c
double get_time(struct timeval *tim) {
  gettimeofday(tim, NULL);
  return tim->tv_sec + (tim->tv_usec / 1000000.0);
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<cant>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x0,%edi
  call   <term@plt>
  nop
  leave
  ret
```

assistant: ```c
void cant(const char *f) {
  perror(f);
  term(0);
}
```
user: What is the c source code of the assembly code below?

```asm
<cant>:
  endbr64
  sub    $0x8,%rsp
  call   <perror@plt>
  mov    $0x0,%edi
  call   <term@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void cant(const char *f) {
  perror(f);
  term(0);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<cant>:
  endbr64
  sub    $0x8,%rsp
  call   <perror@plt>
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    1060 <term@plt>
```

assistant: ```c
void cant(const char *f) {
  perror(f);
  term(0);
}
```
user: Translate the below assembly code into C programming language:

```asm
<cant>:
  endbr64
  sub    $0x8,%rsp
  call   <perror@plt>
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    1060 <term@plt>
```

assistant: ```c
void cant(const char *f) {
  perror(f);
  term(0);
}
```
user: What is the c source code of the assembly code below:

```asm
<read_adc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0xfffe7960,-0x14(%rbp)
  lea    -0x10(%rbp),%rax
  mov    $0x8,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x10(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x8,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  test   %rax,%rax
  jns    L5
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  jmp    L28
L5:
  lea    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x14(%rbp)
L28:
  mov    -0x14(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D9
type: string

tool: D9: read()

assistant: ```c
int read_adc(int fd) {
  char buff[8];
  int val = -100000;
  memset(buff, 0, sizeof(buff));
  if (read(fd, buff, 8) < 0)
    perror("read()");
  else
    val = atoi(buff);
  return val;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<read_adc>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    $0x8,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    $0x8,%edx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <read@plt>
  test   %rax,%rax
  js     L10
  mov    %rsp,%rdi
  call   <atoi@plt>
L19:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  ret
L10:
  lea    D9(%rip),%rdi
  call   <perror@plt>
  mov    $0xfffe7960,%eax
  jmp    L19
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D9
datatype: string

tool: D9: read()

assistant: ```c
int read_adc(int fd) {
  char buff[8];
  int val = -100000;
  memset(buff, 0, sizeof(buff));
  if (read(fd, buff, 8) < 0)
    perror("read()");
  else
    val = atoi(buff);
  return val;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<read_adc>:
  endbr64
  push   %r12
  xor    %esi,%esi
  mov    $0x8,%edx
  push   %rbp
  mov    %edi,%ebp
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  mov    %r12,%rdi
  call   <memset@plt>
  mov    $0x8,%edx
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <read@plt>
  test   %rax,%rax
  js     L23
  mov    %r12,%rdi
  call   <atoi@plt>
L11:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L28
  add    $0x18,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L23:
  lea    D3(%rip),%rdi
  call   <perror@plt>
  mov    $0xfffe7960,%eax
  jmp    L11
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D3
data_type: string

tool: D3: read()

assistant: ```c
int read_adc(int fd) {
  char buff[8];
  int val = -100000;
  memset(buff, 0, sizeof(buff));
  if (read(fd, buff, 8) < 0)
    perror("read()");
  else
    val = atoi(buff);
  return val;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<read_adc>:
  endbr64
  push   %r12
  xor    %esi,%esi
  mov    $0x8,%edx
  push   %rbp
  mov    %edi,%ebp
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  mov    %r12,%rdi
  call   <memset@plt>
  mov    $0x8,%edx
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <read@plt>
  test   %rax,%rax
  js     L11
  mov    %r12,%rdi
  call   <atoi@plt>
L17:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L5
  add    $0x18,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L11:
  lea    D0(%rip),%rdi
  call   <perror@plt>
  mov    $0xfffe7960,%eax
  jmp    L17
L5:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D0
type_infered: string

tool: D0: read()

assistant: ```c
int read_adc(int fd) {
  char buff[8];
  int val = -100000;
  memset(buff, 0, sizeof(buff));
  if (read(fd, buff, 8) < 0)
    perror("read()");
  else
    val = atoi(buff);
  return val;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<mtxRotateY>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  call   <sinf@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  call   <cosf@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  mov    $0x40,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x18(%rbp),%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  movss  -0x8(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x14,%rax
  movss  D1(%rip),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x20,%rax
  movss  -0x8(%rbp),%xmm0
  movss  D3(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x28,%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x3c,%rax
  movss  D1(%rip),%xmm0
  movss  %xmm0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D1
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D3
type_infered: byte[4]

tool: {"D1": [0x00,0x00,0x80,0x3f]}

tool: {"D3": [0x00,0x00,0x00,0x80]}

assistant: ```c
void mtxRotateY(float *_result, float _ay) {
  const float sy = sinf(_ay);
  const float cy = cosf(_ay);
  memset(_result, 0, sizeof(float) * 16);
  _result[0] = cy;
  _result[2] = sy;
  _result[5] = 1.0f;
  _result[8] = -sy;
  _result[10] = cy;
  _result[15] = 1.0f;
}
```
user: What is the c source code of the assembly code below:

```asm
<mtxRotateY>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbx
  lea    0xc(%rsp),%rdi
  lea    0x8(%rsp),%rsi
  call   <sincosf@plt>
  mov    0x8(%rsp),%r12d
  mov    0xc(%rsp),%ebp
  mov    $0x40,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    %r12d,(%rbx)
  mov    %ebp,0x8(%rbx)
  movss  D4(%rip),%xmm0
  movss  %xmm0,0x14(%rbx)
  movd   %ebp,%xmm1
  xorps  D16(%rip),%xmm1
  movss  %xmm1,0x20(%rbx)
  mov    %r12d,0x28(%rbx)
  movss  %xmm0,0x3c(%rbx)
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: disassemble_data
arguments: label: D4
type_infered: byte[4]
name: disassemble_data
arguments: label: D16
type_infered: byte[16]

tool: {"D4": [0x00,0x00,0x80,0x3f]}

tool: {"D16": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void mtxRotateY(float *_result, float _ay) {
  const float sy = sinf(_ay);
  const float cy = cosf(_ay);
  memset(_result, 0, sizeof(float) * 16);
  _result[0] = cy;
  _result[2] = sy;
  _result[5] = 1.0f;
  _result[8] = -sy;
  _result[10] = cy;
  _result[15] = 1.0f;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<mtxRotateY>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  lea    0xc(%rsp),%rdi
  lea    0x8(%rsp),%rsi
  call   <sincosf@plt>
  movss  0x8(%rsp),%xmm2
  mov    %rbx,%rdi
  xor    %esi,%esi
  movss  0xc(%rsp),%xmm0
  mov    $0x40,%edx
  movss  %xmm2,0x4(%rsp)
  movss  %xmm0,(%rsp)
  call   <memset@plt>
  movss  (%rsp),%xmm0
  movss  0x4(%rsp),%xmm2
  movss  D2(%rip),%xmm1
  movss  %xmm0,0x8(%rbx)
  xorps  D0(%rip),%xmm0
  movss  %xmm2,(%rbx)
  movss  %xmm1,0x14(%rbx)
  movss  %xmm0,0x20(%rbx)
  movss  %xmm2,0x28(%rbx)
  movss  %xmm1,0x3c(%rbx)
  add    $0x10,%rsp
  pop    %rbx
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D2
type_guessed: byte[4]
name: unpack_data
arguments: data_label: D0
type_guessed: byte[16]

tool: {"D2": [0x00,0x00,0x80,0x3f]}

tool: {"D0": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void mtxRotateY(float *_result, float _ay) {
  const float sy = sinf(_ay);
  const float cy = cosf(_ay);
  memset(_result, 0, sizeof(float) * 16);
  _result[0] = cy;
  _result[2] = sy;
  _result[5] = 1.0f;
  _result[8] = -sy;
  _result[10] = cy;
  _result[15] = 1.0f;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<mtxRotateY>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  lea    0xc(%rsp),%rdi
  lea    0x8(%rsp),%rsi
  call   <sincosf@plt>
  movss  0x8(%rsp),%xmm2
  mov    %rbx,%rdi
  xor    %esi,%esi
  movss  0xc(%rsp),%xmm0
  mov    $0x40,%edx
  movss  %xmm2,0x4(%rsp)
  movss  %xmm0,(%rsp)
  call   <memset@plt>
  movss  (%rsp),%xmm0
  movss  0x4(%rsp),%xmm2
  movss  D8(%rip),%xmm1
  movss  %xmm0,0x8(%rbx)
  xorps  D10(%rip),%xmm0
  movss  %xmm2,(%rbx)
  movss  %xmm1,0x14(%rbx)
  movss  %xmm0,0x20(%rbx)
  movss  %xmm2,0x28(%rbx)
  movss  %xmm1,0x3c(%rbx)
  add    $0x10,%rsp
  pop    %rbx
  ret
```

tool_calls: name: parse_data
arguments: data_label: D8
datatype: byte[4]
name: parse_data
arguments: data_label: D10
datatype: byte[16]

tool: {"D8": [0x00,0x00,0x80,0x3f]}

tool: {"D10": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void mtxRotateY(float *_result, float _ay) {
  const float sy = sinf(_ay);
  const float cy = cosf(_ay);
  memset(_result, 0, sizeof(float) * 16);
  _result[0] = cy;
  _result[2] = sy;
  _result[5] = 1.0f;
  _result[8] = -sy;
  _result[10] = cy;
  _result[15] = 1.0f;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<parse_mc_store>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,%ebp
  mov    %rsi,%r12
  mov    %rdx,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmpb   $0x20,(%rdx)
  jne    L9
L107:
  add    $0x1,%rbx
  cmpb   $0x20,(%rbx)
  je     L107
L9:
  cmpb   $0x20,(%rbx)
  jle    L146
  mov    %rbx,%r13
L142:
  add    $0x1,%r13
  movzbl 0x0(%r13),%eax
  cmp    $0x20,%al
  jg     L142
  mov    %r13,%rdx
  sub    %rbx,%rdx
  mov    %edx,0x4(%rsp)
  cmp    $0x20,%al
  jne    L72
  test   %edx,%edx
  je     L72
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  mov    %r13,%rdi
  call   <strtol@plt>
  mov    %eax,0x8(%rsp)
  mov    0x10(%rsp),%r14
  cmp    %r13,%r14
  je     L138
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  mov    %r14,%rdi
  call   <strtol@plt>
  mov    %eax,0xc(%rsp)
  mov    0x10(%rsp),%r13
  cmp    %r13,%r14
  je     L88
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  mov    %r13,%rdi
  call   <strtol@plt>
  mov    %eax,%r15d
  mov    0x10(%rsp),%r14
  cmp    %r14,%r13
  je     L101
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  mov    %r14,%rdi
  call   <strtol@plt>
  mov    0x10(%rsp),%rdx
  cmp    %rdx,%r14
  mov    $0x0,%ecx
  cmove  %ecx,%eax
  movzbl (%rdx),%ecx
  cmp    $0x20,%cl
  jne    L5
L7:
  add    $0x1,%rdx
  movzbl (%rdx),%ecx
  cmp    $0x20,%cl
  je     L7
L5:
  test   %cl,%cl
  jne    L141
  push   %rax
  push   %r15
  mov    0x1c(%rsp),%r9d
  mov    0x18(%rsp),%r8d
  mov    0x14(%rsp),%ecx
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <exec_mc_store@plt>
  add    $0x10,%rsp
L159:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L29
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L146:
  mov    $0xffffffff,%eax
  jmp    L159
L72:
  mov    $0xffffffff,%eax
  jmp    L159
L138:
  mov    $0xffffffff,%eax
  jmp    L159
L88:
  mov    $0xffffffff,%eax
  jmp    L159
L101:
  mov    $0xffffffff,%eax
  jmp    L159
L141:
  mov    $0xffffffff,%eax
  jmp    L159
L29:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int parse_mc_store(int op, struct connection *c, char *str, int len) {
  char *key, *ptr;
  int key_len, flags, expire, bytes, noreply;
  while (*str == ' ')
    str++;
  key = str;
  while (*str > ' ')
    str++;
  key_len = str - key;
  if (!key_len || *str != ' ')
    return -1;
  flags = strtol(str, &ptr, 10);
  if (ptr == str)
    return -1;
  str = ptr;
  expire = strtol(str, &ptr, 10);
  if (ptr == str)
    return -1;
  str = ptr;
  bytes = strtol(str, &ptr, 10);
  if (ptr == str)
    return -1;
  str = ptr;
  noreply = strtol(str, &ptr, 10);
  if (ptr == str) {
    noreply = 0;
  } else {
    str = ptr;
  }
  while (*str == ' ')
    str++;
  if (*str)
    return -1;
  return exec_mc_store(op, c, key, key_len, flags, expire, bytes, noreply);
}
```
user: What is the c source code of the assembly code below?

```asm
<parse_mc_store>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movzbl (%rdx),%eax
  cmp    $0x20,%al
  jne    L28
  nopl   0x0(%rax,%rax,1)
L49:
  movzbl 0x1(%r15),%eax
  add    $0x1,%r15
  cmp    $0x20,%al
  je     L49
L28:
  mov    %r15,%r13
  cmp    $0x20,%al
  jle    L72
L9:
  movzbl 0x1(%r13),%eax
  add    $0x1,%r13
  cmp    $0x20,%al
  jg     L9
  mov    %r13,%rdx
  sub    %r15,%rdx
  mov    %edx,0x18(%rsp)
  cmp    $0x20,%al
  jne    L72
  test   %edx,%edx
  je     L72
  lea    0x20(%rsp),%rbp
  mov    $0xa,%edx
  mov    %r13,%rdi
  mov    %rbp,%rsi
  call   <strtol@plt>
  mov    0x20(%rsp),%r14
  mov    %eax,%ebx
  cmp    %r13,%r14
  je     L72
  mov    %r14,%rdi
  mov    $0xa,%edx
  mov    %rbp,%rsi
  call   <strtol@plt>
  mov    0x20(%rsp),%rdi
  mov    %eax,%r13d
  cmp    %rdi,%r14
  je     L72
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %rdi,0x10(%rsp)
  call   <strtol@plt>
  mov    0x20(%rsp),%r14
  mov    0x10(%rsp),%rdi
  mov    %eax,0x1c(%rsp)
  cmp    %r14,%rdi
  je     L72
  mov    $0xa,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <strtol@plt>
  mov    0x20(%rsp),%rdx
  xor    %ecx,%ecx
  cmp    %rdx,%r14
  cmove  %ecx,%eax
  movzbl (%rdx),%ecx
  cmp    $0x20,%cl
  jne    L40
  nopl   0x0(%rax,%rax,1)
L71:
  movzbl 0x1(%rdx),%ecx
  add    $0x1,%rdx
  cmp    $0x20,%cl
  je     L71
L40:
  test   %cl,%cl
  jne    L72
  push   %rax
  mov    0x24(%rsp),%eax
  mov    %r15,%rdx
  mov    %r13d,%r9d
  mov    %ebx,%r8d
  mov    %r12,%rsi
  push   %rax
  mov    0x28(%rsp),%ecx
  mov    0x1c(%rsp),%edi
  call   <exec_mc_store@plt>
  pop    %rdx
  pop    %rcx
L85:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L120
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L72:
  mov    $0xffffffff,%eax
  jmp    L85
L120:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int parse_mc_store(int op, struct connection *c, char *str, int len) {
  char *key, *ptr;
  int key_len, flags, expire, bytes, noreply;
  while (*str == ' ')
    str++;
  key = str;
  while (*str > ' ')
    str++;
  key_len = str - key;
  if (!key_len || *str != ' ')
    return -1;
  flags = strtol(str, &ptr, 10);
  if (ptr == str)
    return -1;
  str = ptr;
  expire = strtol(str, &ptr, 10);
  if (ptr == str)
    return -1;
  str = ptr;
  bytes = strtol(str, &ptr, 10);
  if (ptr == str)
    return -1;
  str = ptr;
  noreply = strtol(str, &ptr, 10);
  if (ptr == str) {
    noreply = 0;
  } else {
    str = ptr;
  }
  while (*str == ' ')
    str++;
  if (*str)
    return -1;
  return exec_mc_store(op, c, key, key_len, flags, expire, bytes, noreply);
}
```