ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What is the c source code of the assembly code below?

```asm
<incrementXbyY>:
  endbr64
  push   %r15
  lea    D11(%rip),%r15
  push   %r14
  lea    D25(%rip),%r14
  push   %r13
  mov    %edi,%r13d
  mov    $0x1,%edi
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  call   <pushCells@plt>
  mov    %eax,%edi
  mov    %eax,%ebp
  call   <codeGoTo@plt>
  lea    D31(%rip),%rdi
  call   <codeStr@plt>
  mov    %r12d,%edi
  call   <codeGoTo@plt>
  mov    %r15,%rdi
  call   <codeStr@plt>
  mov    %r13d,%edi
  lea    D20(%rip),%r13
  call   <codeGoTo@plt>
  mov    %r13,%rdi
  call   <codeStr@plt>
  mov    %ebp,%edi
  call   <codeGoTo@plt>
  mov    %r13,%rdi
  call   <codeStr@plt>
  mov    %r12d,%edi
  call   <codeGoTo@plt>
  mov    %r14,%rdi
  call   <codeStr@plt>
  mov    %ebp,%edi
  call   <codeGoTo@plt>
  mov    %r15,%rdi
  call   <codeStr@plt>
  mov    %r12d,%edi
  call   <codeGoTo@plt>
  mov    %r13,%rdi
  call   <codeStr@plt>
  mov    %ebp,%edi
  call   <codeGoTo@plt>
  mov    %r14,%rdi
  call   <codeStr@plt>
  pop    %rbp
  mov    $0x1,%edi
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <popCells@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D11
type: string
name: unpack_data
arguments: data_tag: D25
type: string
name: unpack_data
arguments: data_tag: D31
type: string
name: unpack_data
arguments: data_tag: D20
type: string

tool: D11: [

tool: D25: -]

tool: D31: [-]

tool: D20: +

assistant: ```c
void incrementXbyY(int x, int y) {
  int temp0 = pushCells(1);
  codeGoTo(temp0);
  codeStr("[-]");
  codeGoTo(y);
  codeStr("[");
  codeGoTo(x);
  codeStr("+");
  codeGoTo(temp0);
  codeStr("+");
  codeGoTo(y);
  codeStr("-]");
  codeGoTo(temp0);
  codeStr("[");
  codeGoTo(y);
  codeStr("+");
  codeGoTo(temp0);
  codeStr("-]");
  popCells(1);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<incrementXbyY>:
  endbr64
  push   %r15
  lea    D8(%rip),%r15
  push   %r14
  lea    D9(%rip),%r14
  push   %r13
  mov    %edi,%r13d
  mov    $0x1,%edi
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  call   <pushCells@plt>
  mov    %eax,%edi
  mov    %eax,%ebp
  call   <codeGoTo@plt>
  lea    D31(%rip),%rdi
  call   <codeStr@plt>
  mov    %r12d,%edi
  call   <codeGoTo@plt>
  mov    %r15,%rdi
  call   <codeStr@plt>
  mov    %r13d,%edi
  lea    D39(%rip),%r13
  call   <codeGoTo@plt>
  mov    %r13,%rdi
  call   <codeStr@plt>
  mov    %ebp,%edi
  call   <codeGoTo@plt>
  mov    %r13,%rdi
  call   <codeStr@plt>
  mov    %r12d,%edi
  call   <codeGoTo@plt>
  mov    %r14,%rdi
  call   <codeStr@plt>
  mov    %ebp,%edi
  call   <codeGoTo@plt>
  mov    %r15,%rdi
  call   <codeStr@plt>
  mov    %r12d,%edi
  call   <codeGoTo@plt>
  mov    %r13,%rdi
  call   <codeStr@plt>
  mov    %ebp,%edi
  call   <codeGoTo@plt>
  mov    %r14,%rdi
  call   <codeStr@plt>
  pop    %rbp
  mov    $0x1,%edi
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <popCells@plt>
```

tool_calls: name: read_data
arguments: data_tag: D8
type_guessed: string
name: read_data
arguments: data_tag: D9
type_guessed: string
name: read_data
arguments: data_tag: D31
type_guessed: string
name: read_data
arguments: data_tag: D39
type_guessed: string

tool: D8: [

tool: D9: -]

tool: D31: [-]

tool: D39: +

assistant: ```c
void incrementXbyY(int x, int y) {
  int temp0 = pushCells(1);
  codeGoTo(temp0);
  codeStr("[-]");
  codeGoTo(y);
  codeStr("[");
  codeGoTo(x);
  codeStr("+");
  codeGoTo(temp0);
  codeStr("+");
  codeGoTo(y);
  codeStr("-]");
  codeGoTo(temp0);
  codeStr("[");
  codeGoTo(y);
  codeStr("+");
  codeGoTo(temp0);
  codeStr("-]");
  popCells(1);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<Privsep_GetGroup>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0xffffffff,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <getgrnam@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L18
  mov    $0xffffffff,%eax
  jmp    L5
L18:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  mov    %eax,-0xc(%rbp)
  mov    $0x0,%eax
  call   <endgrent@plt>
  mov    -0xc(%rbp),%eax
L5:
  leave
  ret
```

assistant: ```c
int Privsep_GetGroup(char *name) {
  int os_gid = -1;
  struct group *grp;
  grp = getgrnam(name);
  if (grp == NULL)
    return (-1);
  os_gid = (int)grp->gr_gid;
  endgrent();
  return (os_gid);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<Privsep_GetGroup>:
  endbr64
  push   %rbx
  call   <getgrnam@plt>
  test   %rax,%rax
  je     L17
  mov    (%rax),%ebx
  mov    $0x0,%eax
  call   <endgrent@plt>
L3:
  mov    %ebx,%eax
  pop    %rbx
  ret
L17:
  mov    $0xffffffff,%ebx
  jmp    L3
```

assistant: ```c
int Privsep_GetGroup(char *name) {
  int os_gid = -1;
  struct group *grp;
  grp = getgrnam(name);
  if (grp == NULL)
    return (-1);
  os_gid = (int)grp->gr_gid;
  endgrent();
  return (os_gid);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<Privsep_GetGroup>:
  endbr64
  push   %r12
  call   <getgrnam@plt>
  test   %rax,%rax
  je     L3
  mov    (%rax),%r12d
  xor    %eax,%eax
  call   <endgrent@plt>
L4:
  mov    %r12d,%eax
  pop    %r12
  ret
L3:
  mov    $0xffffffff,%r12d
  jmp    L4
```

assistant: ```c
int Privsep_GetGroup(char *name) {
  int os_gid = -1;
  struct group *grp;
  grp = getgrnam(name);
  if (grp == NULL)
    return (-1);
  os_gid = (int)grp->gr_gid;
  endgrent();
  return (os_gid);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<Privsep_GetGroup>:
  endbr64
  push   %r12
  call   <getgrnam@plt>
  test   %rax,%rax
  je     L15
  mov    (%rax),%r12d
  xor    %eax,%eax
  call   <endgrent@plt>
L12:
  mov    %r12d,%eax
  pop    %r12
  ret
L15:
  mov    $0xffffffff,%r12d
  jmp    L12
```

assistant: ```c
int Privsep_GetGroup(char *name) {
  int os_gid = -1;
  struct group *grp;
  grp = getgrnam(name);
  if (grp == NULL)
    return (-1);
  os_gid = (int)grp->gr_gid;
  endgrent();
  return (os_gid);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<semanage_split>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L46
  mov    $0x0,%eax
  jmp    L6
L46:
  cmpq   $0x0,-0x20(%rbp)
  je     L24
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L48
L24:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <semanage_split_on_space@plt>
  jmp    L6
L48:
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L19
  mov    $0x0,%eax
  jmp    L6
L19:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <strdup@plt>
L6:
  leave
  ret
```

assistant: ```c
char *semanage_split(const char *str, const char *delim) {
  char *retval;
  if (!str)
    return NULL;
  if (!delim || !(*delim))
    return semanage_split_on_space(str);
  retval = strstr(str, delim);
  if (retval == NULL)
    return NULL;
  return strdup(retval + strlen(delim));
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<semanage_split>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rdi,%rdi
  je     L25
  mov    %rsi,%rbp
  test   %rsi,%rsi
  je     L27
  cmpb   $0x0,(%rsi)
  je     L27
  call   <strstr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L7
  mov    %rbp,%rdi
  call   <strlen@plt>
  cltq
  lea    (%rbx,%rax,1),%rdi
  call   <strdup@plt>
  mov    %rax,%rbx
L7:
  mov    %rbx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L27:
  call   <semanage_split_on_space@plt>
  mov    %rax,%rbx
  jmp    L7
L25:
  mov    %rdi,%rbx
  jmp    L7
```

assistant: ```c
char *semanage_split(const char *str, const char *delim) {
  char *retval;
  if (!str)
    return NULL;
  if (!delim || !(*delim))
    return semanage_split_on_space(str);
  retval = strstr(str, delim);
  if (retval == NULL)
    return NULL;
  return strdup(retval + strlen(delim));
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<semanage_split>:
  endbr64
  test   %rdi,%rdi
  je     L14
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L17
  cmpb   $0x0,(%rsi)
  je     L17
  call   <strstr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L11
  mov    %rbp,%rdi
  call   <strlen@plt>
  add    $0x8,%rsp
  cltq
  lea    (%rbx,%rax,1),%rdi
  pop    %rbx
  pop    %rbp
  jmp    10a0 <strdup@plt>
  nopw   0x0(%rax,%rax,1)
L17:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  jmp    1090 <semanage_split_on_space@plt>
  nopl   0x0(%rax,%rax,1)
L11:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L14:
  xor    %eax,%eax
  ret
```

assistant: ```c
char *semanage_split(const char *str, const char *delim) {
  char *retval;
  if (!str)
    return NULL;
  if (!delim || !(*delim))
    return semanage_split_on_space(str);
  retval = strstr(str, delim);
  if (retval == NULL)
    return NULL;
  return strdup(retval + strlen(delim));
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<semanage_split>:
  endbr64
  test   %rdi,%rdi
  je     L38
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L31
  cmpb   $0x0,(%rsi)
  je     L31
  call   <strstr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L32
  mov    %rbp,%rdi
  call   <strlen@plt>
  add    $0x8,%rsp
  cltq
  lea    (%rbx,%rax,1),%rdi
  pop    %rbx
  pop    %rbp
  jmp    10a0 <strdup@plt>
  nopw   0x0(%rax,%rax,1)
L31:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  jmp    1090 <semanage_split_on_space@plt>
  nopl   0x0(%rax,%rax,1)
L32:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L38:
  xor    %eax,%eax
  ret
```

assistant: ```c
char *semanage_split(const char *str, const char *delim) {
  char *retval;
  if (!str)
    return NULL;
  if (!delim || !(*delim))
    return semanage_split_on_space(str);
  retval = strstr(str, delim);
  if (retval == NULL)
    return NULL;
  return strdup(retval + strlen(delim));
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<Arcseno>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movsd  %xmm0,-0x8(%rbp)
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <gettext@plt>
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <asin@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D16
datatype: string
name: parse_data
arguments: label: D8
datatype: string

tool: D16: Enter a number: 

tool: D8: %lf

assistant: ```c
double Arcseno(double a) {
  printf(gettext("Enter a number: "));
  scanf("%lf", &a);
  return (asin(a));
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<Arcseno>:
  endbr64
  sub    $0x18,%rsp
  movsd  %xmm0,0x8(%rsp)
  lea    D19(%rip),%rdi
  call   <gettext@plt>
  mov    %rax,%rdi
  call   <printf@plt>
  lea    0x8(%rsp),%rsi
  lea    D0(%rip),%rdi
  call   <scanf@plt>
  movsd  0x8(%rsp),%xmm0
  call   <asin@plt>
  add    $0x18,%rsp
  ret
```

tool_calls: name: read_data
arguments: data_tag: D19
data_type: string
name: read_data
arguments: data_tag: D0
data_type: string

tool: D19: Enter a number: 

tool: D0: %lf

assistant: ```c
double Arcseno(double a) {
  printf(gettext("Enter a number: "));
  scanf("%lf", &a);
  return (asin(a));
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<Arcseno>:
  endbr64
  sub    $0x18,%rsp
  lea    D8(%rip),%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <gettext@plt>
  mov    %rax,%rdi
  call   <printf@plt>
  lea    0x8(%rsp),%rsi
  lea    D17(%rip),%rdi
  call   <scanf@plt>
  movsd  0x8(%rsp),%xmm0
  call   <asin@plt>
  add    $0x18,%rsp
  ret
```

tool_calls: name: read_data
arguments: data_tag: D8
type_guessed: string
name: read_data
arguments: data_tag: D17
type_guessed: string

tool: D8: Enter a number: 

tool: D17: %lf

assistant: ```c
double Arcseno(double a) {
  printf(gettext("Enter a number: "));
  scanf("%lf", &a);
  return (asin(a));
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<Arcseno>:
  endbr64
  sub    $0x18,%rsp
  lea    D13(%rip),%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <gettext@plt>
  mov    %rax,%rdi
  call   <printf@plt>
  lea    0x8(%rsp),%rsi
  lea    D11(%rip),%rdi
  call   <scanf@plt>
  movsd  0x8(%rsp),%xmm0
  call   <asin@plt>
  add    $0x18,%rsp
  ret
```

tool_calls: name: disassemble_data
arguments: label: D13
type_guessed: string
name: disassemble_data
arguments: label: D11
type_guessed: string

tool: D13: Enter a number: 

tool: D11: %lf

assistant: ```c
double Arcseno(double a) {
  printf(gettext("Enter a number: "));
  scanf("%lf", &a);
  return (asin(a));
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<get_map_info>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movl   $0x0,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  movl   $0x0,(%rax)
  jmp    L69
L22:
  cmpl   $0xa,-0x4(%rbp)
  jne    L52
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jbe    L13
  mov    -0x20(%rbp),%rax
  mov    -0x8(%rbp),%edx
  mov    %edx,(%rax)
L13:
  cmpl   $0x0,-0x8(%rbp)
  jne    L62
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <rewind@plt>
  jmp    L64
L62:
  movl   $0x0,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L69
L52:
  addl   $0x1,-0x8(%rbp)
L69:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <getc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D2(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L22
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <rewind@plt>
L64:
  leave
  ret
```

assistant: ```c
void get_map_info(FILE *f, unsigned int *w, unsigned int *h) {
  unsigned int curw = 0;
  int ch;
  *w = 0;
  *h = 0;
  while ((ch = getc(f)) != EOF) {
    switch (ch) {
    case '\n':
      if (*w < curw)
        *w = curw;
      if (curw == 0) {
        rewind(f);
        return;
      }
      curw = 0;
      (*h)++;
      break;
    default:
      curw++;
    }
  }
  rewind(f);
}
```
user: Translate the below assembly code into C programming language:

```asm
<get_map_info>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r13
  mov    %rdx,%r12
  movl   $0x0,(%rsi)
  movl   $0x0,(%rdx)
  mov    $0x0,%ebx
  jmp    L43
L28:
  mov    %rbp,%rdi
  call   <rewind@plt>
  jmp    L33
L42:
  add    $0x1,%ebx
L43:
  mov    %rbp,%rdi
  call   <getc@plt>
  mov    D2(%rip),%rdx
  cmp    %eax,(%rdx)
  je     L25
  cmp    $0xa,%eax
  jne    L42
  cmp    %ebx,0x0(%r13)
  jae    L41
  mov    %ebx,0x0(%r13)
L41:
  test   %ebx,%ebx
  je     L28
  addl   $0x1,(%r12)
  mov    $0x0,%ebx
  jmp    L43
L25:
  mov    %rbp,%rdi
  call   <rewind@plt>
L33:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void get_map_info(FILE *f, unsigned int *w, unsigned int *h) {
  unsigned int curw = 0;
  int ch;
  *w = 0;
  *h = 0;
  while ((ch = getc(f)) != EOF) {
    switch (ch) {
    case '\n':
      if (*w < curw)
        *w = curw;
      if (curw == 0) {
        rewind(f);
        return;
      }
      curw = 0;
      (*h)++;
      break;
    default:
      curw++;
    }
  }
  rewind(f);
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<get_map_info>:
  endbr64
  movl   $0x0,(%rsi)
  movl   $0x0,(%rdx)
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    D0(%rip),%rbp
  push   %rbx
  xor    %ebx,%ebx
  nopw   0x0(%rax,%rax,1)
L2:
  mov    %r14,%rdi
  call   <getc@plt>
  cmp    %eax,0x0(%rbp)
  je     L10
L19:
  cmp    $0xa,%eax
  je     L28
  mov    %r14,%rdi
  add    $0x1,%ebx
  call   <getc@plt>
  cmp    %eax,0x0(%rbp)
  jne    L19
L10:
  pop    %rbx
  mov    %r14,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <rewind@plt>
  nopw   0x0(%rax,%rax,1)
L28:
  cmp    %ebx,0x0(%r13)
  jae    L40
  mov    %ebx,0x0(%r13)
L40:
  test   %ebx,%ebx
  je     L10
  addl   $0x1,(%r12)
  xor    %ebx,%ebx
  jmp    L2
```

assistant: ```c
void get_map_info(FILE *f, unsigned int *w, unsigned int *h) {
  unsigned int curw = 0;
  int ch;
  *w = 0;
  *h = 0;
  while ((ch = getc(f)) != EOF) {
    switch (ch) {
    case '\n':
      if (*w < curw)
        *w = curw;
      if (curw == 0) {
        rewind(f);
        return;
      }
      curw = 0;
      (*h)++;
      break;
    default:
      curw++;
    }
  }
  rewind(f);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<get_map_info>:
  endbr64
  movl   $0x0,(%rsi)
  movl   $0x0,(%rdx)
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    D1(%rip),%rbp
  push   %rbx
  xor    %ebx,%ebx
  nopw   0x0(%rax,%rax,1)
L39:
  mov    %r14,%rdi
  call   <getc@plt>
  cmp    %eax,0x0(%rbp)
  je     L42
L15:
  cmp    $0xa,%eax
  je     L11
  mov    %r14,%rdi
  add    $0x1,%ebx
  call   <getc@plt>
  cmp    %eax,0x0(%rbp)
  jne    L15
L42:
  pop    %rbx
  mov    %r14,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <rewind@plt>
  nopw   0x0(%rax,%rax,1)
L11:
  cmp    %ebx,0x0(%r13)
  jae    L55
  mov    %ebx,0x0(%r13)
L55:
  test   %ebx,%ebx
  je     L42
  addl   $0x1,(%r12)
  xor    %ebx,%ebx
  jmp    L39
```

assistant: ```c
void get_map_info(FILE *f, unsigned int *w, unsigned int *h) {
  unsigned int curw = 0;
  int ch;
  *w = 0;
  *h = 0;
  while ((ch = getc(f)) != EOF) {
    switch (ch) {
    case '\n':
      if (*w < curw)
        *w = curw;
      if (curw == 0) {
        rewind(f);
        return;
      }
      curw = 0;
      (*h)++;
      break;
    default:
      curw++;
    }
  }
  rewind(f);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<ata>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  mov    %rdi,-0x20(%rbp)
  mov    %rsi,-0x28(%rbp)
  mov    %edx,-0x2c(%rbp)
  mov    %ecx,-0x30(%rbp)
  mov    %r8d,-0x34(%rbp)
  mov    $0x0,%ebx
  jmp    L57
L53:
  mov    $0x0,%r12d
  jmp    L49
L46:
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    $0x0,%r13d
  jmp    L9
L10:
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    %r13d,%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  movslq %ebx,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    %r13d,%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%r13d
L9:
  cmp    -0x2c(%rbp),%r13d
  jl     L10
  add    $0x1,%r12d
L49:
  cmp    -0x30(%rbp),%r12d
  jl     L46
  add    $0x1,%ebx
L57:
  cmp    -0x30(%rbp),%ebx
  jl     L53
  nop
  nop
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
void ata(double *a, double *ata, int m, int n, int n_large) {
  register int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      *(ata + i * n_large + j) = 0.0;
      for (k = 0; k < m; k++)
        *(ata + i * n_large + j) += *(a + k * n_large + i) * *(a + k * n_large + j);
    }
  }
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<ata>:
  endbr64
  test   %ecx,%ecx
  jle    L29
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r11
  mov    %rsi,%rbp
  mov    %edx,%edi
  mov    %ecx,%r13d
  movslq %r8d,%r14
  lea    0x0(,%r14,8),%r8
  mov    %r13,%r10
  mov    $0x0,%r12d
  mov    $0x0,%ebx
L6:
  lea    0x0(%rbp,%r12,8),%r9
  mov    %rbx,%rsi
  neg    %rsi
L39:
  mov    %r9,%rcx
  movq   $0x0,(%r9)
  test   %edi,%edi
  jle    L7
  mov    %r11,%rax
  mov    $0x0,%edx
L35:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%rsi,8),%xmm0
  addsd  (%rcx),%xmm0
  movsd  %xmm0,(%rcx)
  add    $0x1,%edx
  add    %r8,%rax
  cmp    %edx,%edi
  jne    L35
L7:
  add    $0x8,%r9
  add    $0x1,%rsi
  cmp    %r10,%rsi
  jne    L39
  add    $0x1,%rbx
  sub    $0x1,%r10
  add    %r14,%r12
  add    $0x8,%r11
  cmp    %r13,%rbx
  jne    L6
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L29:
  ret
```

assistant: ```c
void ata(double *a, double *ata, int m, int n, int n_large) {
  register int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      *(ata + i * n_large + j) = 0.0;
      for (k = 0; k < m; k++)
        *(ata + i * n_large + j) += *(a + k * n_large + i) * *(a + k * n_large + j);
    }
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<ata>:
  endbr64
  push   %r13
  push   %r12
  movslq %ecx,%r12
  push   %rbp
  push   %rbx
  test   %r12d,%r12d
  jle    L10
  movslq %r8d,%r13
  mov    %rdi,%r9
  mov    %rsi,%rbp
  mov    %edx,%edi
  lea    0x0(,%r13,8),%r8
  mov    %r12,%r10
  xor    %ebx,%ebx
  xor    %r11d,%r11d
  pxor   %xmm2,%xmm2
  nopl   (%rax)
L41:
  mov    %r11,%rcx
  lea    0x0(%rbp,%rbx,8),%rsi
  neg    %rcx
  nopl   0x0(%rax,%rax,1)
L43:
  movq   $0x0,(%rsi)
  mov    %r9,%rax
  movapd %xmm2,%xmm1
  xor    %edx,%edx
  test   %edi,%edi
  jle    L25
  nopl   0x0(%rax)
L24:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%rcx,8),%xmm0
  add    $0x1,%edx
  add    %r8,%rax
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %edx,%edi
  jne    L24
L25:
  add    $0x1,%rcx
  add    $0x8,%rsi
  cmp    %r10,%rcx
  jne    L43
  add    $0x1,%r11
  sub    $0x1,%r10
  add    $0x8,%r9
  add    %r13,%rbx
  cmp    %r12,%r11
  jne    L41
L10:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void ata(double *a, double *ata, int m, int n, int n_large) {
  register int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      *(ata + i * n_large + j) = 0.0;
      for (k = 0; k < m; k++)
        *(ata + i * n_large + j) += *(a + k * n_large + i) * *(a + k * n_large + j);
    }
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ata>:
  endbr64
  push   %r13
  push   %r12
  movslq %ecx,%r12
  push   %rbp
  push   %rbx
  test   %r12d,%r12d
  jle    L24
  movslq %r8d,%r13
  mov    %rdi,%r9
  mov    %rsi,%rbp
  mov    %edx,%edi
  lea    0x0(,%r13,8),%r8
  mov    %r12,%r10
  xor    %ebx,%ebx
  xor    %r11d,%r11d
  pxor   %xmm2,%xmm2
  nopl   (%rax)
L20:
  mov    %r11,%rcx
  lea    0x0(%rbp,%rbx,8),%rsi
  neg    %rcx
  nopl   0x0(%rax,%rax,1)
L32:
  movq   $0x0,(%rsi)
  mov    %r9,%rax
  movapd %xmm2,%xmm1
  xor    %edx,%edx
  test   %edi,%edi
  jle    L19
  nopl   0x0(%rax)
L23:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%rcx,8),%xmm0
  add    $0x1,%edx
  add    %r8,%rax
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %edx,%edi
  jne    L23
L19:
  add    $0x1,%rcx
  add    $0x8,%rsi
  cmp    %r10,%rcx
  jne    L32
  add    $0x1,%r11
  sub    $0x1,%r10
  add    $0x8,%r9
  add    %r13,%rbx
  cmp    %r12,%r11
  jne    L20
L24:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void ata(double *a, double *ata, int m, int n, int n_large) {
  register int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      *(ata + i * n_large + j) = 0.0;
      for (k = 0; k < m; k++)
        *(ata + i * n_large + j) += *(a + k * n_large + i) * *(a + k * n_large + j);
    }
  }
}
```