ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 这段汇编代码用C语言表示是什么样的？

```asm
<main>:
  endbr64
  push   %r14
  lea    D78(%rip),%r14
  lea    D74(%rip),%rsi
  push   %r13
  mov    %r14,%rdx
  push   %r12
  lea    D77(%rip),%r12
  push   %rbp
  mov    %r12,%rdi
  lea    D5(%rip),%rbp
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%r13
  mov    %r13,%rcx
  call   <GetProfileString@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %r14,%rdx
  mov    %r13,%rcx
  mov    %r12,%rdi
  lea    D70(%rip),%r14
  mov    %r14,%rsi
  call   <GetProfileString@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  lea    0x30(%rsp),%r13
  call   <printf@plt>
  mov    %r13,%rcx
  mov    %r14,%rsi
  mov    %r12,%rdi
  lea    D65(%rip),%rdx
  lea    D58(%rip),%r14
  call   <GetProfileString@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  lea    0xc(%rsp),%r13
  call   <printf@plt>
  mov    %r13,%rcx
  mov    %r14,%rsi
  mov    %r12,%rdi
  lea    D86(%rip),%rdx
  call   <GetProfileString@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  lea    0x16(%rsp),%r13
  call   <printf@plt>
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    %r13,%rcx
  lea    D71(%rip),%rdx
  call   <GetProfileString@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x68,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D78
type: string
name: retrieve_data
arguments: data_tag: D74
type: string
name: retrieve_data
arguments: data_tag: D77
type: string
name: retrieve_data
arguments: data_tag: D5
type: string
name: retrieve_data
arguments: data_tag: D70
type: string
name: retrieve_data
arguments: data_tag: D65
type: string
name: retrieve_data
arguments: data_tag: D58
type: string
name: retrieve_data
arguments: data_tag: D86
type: string
name: retrieve_data
arguments: data_tag: D71
type: string

tool: D78: ip

tool: D74: cls_server

tool: D77: ./cls.conf

tool: D5: %s


tool: D70: server

tool: D65: mac

tool: D58: port

tool: D86: id

tool: D71: num

assistant: ```c
void main() {
  char ip[16];
  char mac[32];
  char id[10], num[10];
  GetProfileString("./cls.conf", "cls_server", "ip", ip);
  printf("%s\n", ip);
  GetProfileString("./cls.conf", "server", "ip", ip);
  printf("%s\n", ip);
  GetProfileString("./cls.conf", "server", "mac", mac);
  printf("%s\n", mac);
  GetProfileString("./cls.conf", "port", "id", id);
  printf("%s\n", id);
  GetProfileString("./cls.conf", "port", "num", num);
  printf("%s\n", num);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<highbd_transpose8x8_sse2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,-0x20(%rbp)
  mov    %r8,-0x28(%rbp)
  mov    %r9,-0x30(%rbp)
  mov    -0x30(%rbp),%r8
  mov    -0x28(%rbp),%rdi
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rsi
  mov    -0x8(%rbp),%rax
  push   0x38(%rbp)
  push   0x30(%rbp)
  push   0x28(%rbp)
  push   0x20(%rbp)
  push   0x18(%rbp)
  push   0x10(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <highbd_transpose8x8_low_sse2@plt>
  add    $0x30,%rsp
  mov    -0x30(%rbp),%r8
  mov    -0x28(%rbp),%rdi
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rsi
  mov    -0x8(%rbp),%rax
  push   0x58(%rbp)
  push   0x50(%rbp)
  push   0x48(%rbp)
  push   0x40(%rbp)
  push   0x18(%rbp)
  push   0x10(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <highbd_transpose8x8_high_sse2@plt>
  add    $0x30,%rsp
  nop
  leave
  ret
```

assistant: ```c
void highbd_transpose8x8_sse2(__m128i *x0, __m128i *x1, __m128i *x2, __m128i *x3, __m128i *x4, __m128i *x5, __m128i *x6, __m128i *x7, __m128i *d0, __m128i *d1, __m128i *d2, __m128i *d3, __m128i *d4, __m128i *d5, __m128i *d6, __m128i *d7) {
  highbd_transpose8x8_low_sse2(x0, x1, x2, x3, x4, x5, x6, x7, d0, d1, d2, d3);
  highbd_transpose8x8_high_sse2(x0, x1, x2, x3, x4, x5, x6, x7, d4, d5, d6, d7);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<highbd_transpose8x8_sse2>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r14
  mov    %rsi,%r15
  mov    %rdx,%rbx
  mov    %rcx,%rbp
  mov    %r8,%r12
  mov    %r9,%r13
  push   0x68(%rsp)
  push   0x68(%rsp)
  push   0x68(%rsp)
  push   0x68(%rsp)
  push   0x68(%rsp)
  push   0x68(%rsp)
  call   <highbd_transpose8x8_low_sse2@plt>
  add    $0x30,%rsp
  push   0x88(%rsp)
  push   0x88(%rsp)
  push   0x88(%rsp)
  push   0x88(%rsp)
  push   0x68(%rsp)
  push   0x68(%rsp)
  mov    %r13,%r9
  mov    %r12,%r8
  mov    %rbp,%rcx
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <highbd_transpose8x8_high_sse2@plt>
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void highbd_transpose8x8_sse2(__m128i *x0, __m128i *x1, __m128i *x2, __m128i *x3, __m128i *x4, __m128i *x5, __m128i *x6, __m128i *x7, __m128i *d0, __m128i *d1, __m128i *d2, __m128i *d3, __m128i *d4, __m128i *d5, __m128i *d6, __m128i *d7) {
  highbd_transpose8x8_low_sse2(x0, x1, x2, x3, x4, x5, x6, x7, d0, d1, d2, d3);
  highbd_transpose8x8_high_sse2(x0, x1, x2, x3, x4, x5, x6, x7, d4, d5, d6, d7);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<highbd_transpose8x8_sse2>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    0x70(%rsp),%rbx
  mov    0x78(%rsp),%r13
  mov    0xb0(%rsp),%r10
  mov    0xb8(%rsp),%r11
  mov    0xa0(%rsp),%r14
  mov    0xa8(%rsp),%r15
  mov    %r10,0x28(%rsp)
  mov    %r11,0x20(%rsp)
  push   0x98(%rsp)
  push   0x98(%rsp)
  push   0x98(%rsp)
  push   0x98(%rsp)
  push   %r13
  push   %rbx
  mov    %r9,0x48(%rsp)
  mov    %r8,0x40(%rsp)
  mov    %rcx,0x38(%rsp)
  mov    %rdx,0x30(%rsp)
  call   <highbd_transpose8x8_low_sse2@plt>
  mov    0x50(%rsp),%r11
  mov    %r12,%rsi
  mov    0x58(%rsp),%r10
  mov    %r15,0xb8(%rsp)
  mov    0x48(%rsp),%r9
  mov    %rbp,%rdi
  mov    %r14,0xb0(%rsp)
  mov    0x40(%rsp),%r8
  mov    %r13,0xa8(%rsp)
  mov    0x38(%rsp),%rcx
  mov    %rbx,0xa0(%rsp)
  mov    0x30(%rsp),%rdx
  mov    %r11,0xc8(%rsp)
  mov    %r10,0xc0(%rsp)
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <highbd_transpose8x8_high_sse2@plt>
```

assistant: ```c
void highbd_transpose8x8_sse2(__m128i *x0, __m128i *x1, __m128i *x2, __m128i *x3, __m128i *x4, __m128i *x5, __m128i *x6, __m128i *x7, __m128i *d0, __m128i *d1, __m128i *d2, __m128i *d3, __m128i *d4, __m128i *d5, __m128i *d6, __m128i *d7) {
  highbd_transpose8x8_low_sse2(x0, x1, x2, x3, x4, x5, x6, x7, d0, d1, d2, d3);
  highbd_transpose8x8_high_sse2(x0, x1, x2, x3, x4, x5, x6, x7, d4, d5, d6, d7);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<highbd_transpose8x8_sse2>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    0x70(%rsp),%rbx
  mov    0x78(%rsp),%r13
  mov    0xb0(%rsp),%r10
  mov    0xb8(%rsp),%r11
  mov    0xa0(%rsp),%r14
  mov    0xa8(%rsp),%r15
  mov    %r10,0x28(%rsp)
  mov    %r11,0x20(%rsp)
  push   0x98(%rsp)
  push   0x98(%rsp)
  push   0x98(%rsp)
  push   0x98(%rsp)
  push   %r13
  push   %rbx
  mov    %r9,0x48(%rsp)
  mov    %r8,0x40(%rsp)
  mov    %rcx,0x38(%rsp)
  mov    %rdx,0x30(%rsp)
  call   <highbd_transpose8x8_low_sse2@plt>
  mov    0x50(%rsp),%r11
  mov    %r12,%rsi
  mov    0x58(%rsp),%r10
  mov    %r15,0xb8(%rsp)
  mov    0x48(%rsp),%r9
  mov    %rbp,%rdi
  mov    %r14,0xb0(%rsp)
  mov    0x40(%rsp),%r8
  mov    %r13,0xa8(%rsp)
  mov    0x38(%rsp),%rcx
  mov    %rbx,0xa0(%rsp)
  mov    0x30(%rsp),%rdx
  mov    %r11,0xc8(%rsp)
  mov    %r10,0xc0(%rsp)
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <highbd_transpose8x8_high_sse2@plt>
```

assistant: ```c
void highbd_transpose8x8_sse2(__m128i *x0, __m128i *x1, __m128i *x2, __m128i *x3, __m128i *x4, __m128i *x5, __m128i *x6, __m128i *x7, __m128i *d0, __m128i *d1, __m128i *d2, __m128i *d3, __m128i *d4, __m128i *d5, __m128i *d6, __m128i *d7) {
  highbd_transpose8x8_low_sse2(x0, x1, x2, x3, x4, x5, x6, x7, d0, d1, d2, d3);
  highbd_transpose8x8_high_sse2(x0, x1, x2, x3, x4, x5, x6, x7, d4, d5, d6, d7);
}
```
user: Translate the below assembly code into C programming language:

```asm
<BubbleSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L49
L28:
  movl   $0x0,-0x8(%rbp)
  jmp    L14
L44:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L45
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
L45:
  addl   $0x1,-0x8(%rbp)
L14:
  mov    -0x1c(%rbp),%eax
  sub    -0xc(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L44
  addl   $0x1,-0xc(%rbp)
L49:
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  jl     L28
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void BubbleSort(int arr[], int n) {
  int i, j;
  int temp;
  for (i = 0; i < n - 1; i++) {
    for (j = 0; j < (n - i) - 1; j++) {
      if (arr[j] > arr[j + 1]) {
        temp = arr[j];
        arr[j] = arr[j + 1];
        arr[j + 1] = temp;
      }
    }
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<BubbleSort>:
  endbr64
  lea    -0x1(%rsi),%r8d
  test   %r8d,%r8d
  jle    L65
  lea    0x4(%rdi),%r9
  jmp    L12
L24:
  add    $0x4,%rax
  cmp    %rsi,%rax
  je     L32
L53:
  mov    (%rax),%edx
  mov    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L24
  mov    %ecx,(%rax)
  mov    %edx,0x4(%rax)
  jmp    L24
L32:
  sub    $0x1,%r8d
  je     L65
L12:
  test   %r8d,%r8d
  jle    L32
  mov    %rdi,%rax
  lea    -0x1(%r8),%edx
  lea    (%r9,%rdx,4),%rsi
  jmp    L53
L65:
  ret
```

assistant: ```c
void BubbleSort(int arr[], int n) {
  int i, j;
  int temp;
  for (i = 0; i < n - 1; i++) {
    for (j = 0; j < (n - i) - 1; j++) {
      if (arr[j] > arr[j + 1]) {
        temp = arr[j];
        arr[j] = arr[j + 1];
        arr[j + 1] = temp;
      }
    }
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<BubbleSort>:
  endbr64
  lea    -0x1(%rsi),%edx
  test   %edx,%edx
  jle    L14
  lea    0x4(%rdi),%r9
  nop
L3:
  sub    $0x1,%edx
  mov    %rdi,%rax
  mov    %rdx,%r8
  lea    (%r9,%rdx,4),%rsi
  nopl   (%rax)
L13:
  mov    (%rax),%edx
  mov    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L16
  mov    %ecx,(%rax)
  mov    %edx,0x4(%rax)
L16:
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L13
  mov    %r8d,%edx
  test   %r8d,%r8d
  jne    L3
L14:
  ret
```

assistant: ```c
void BubbleSort(int arr[], int n) {
  int i, j;
  int temp;
  for (i = 0; i < n - 1; i++) {
    for (j = 0; j < (n - i) - 1; j++) {
      if (arr[j] > arr[j + 1]) {
        temp = arr[j];
        arr[j] = arr[j + 1];
        arr[j + 1] = temp;
      }
    }
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<BubbleSort>:
  endbr64
  lea    -0x1(%rsi),%eax
  test   %eax,%eax
  jle    L24
  lea    0x4(%rdi),%r9
  nop
L8:
  sub    $0x1,%eax
  mov    %rdi,%rdx
  mov    %rax,%r8
  lea    (%r9,%rax,4),%rsi
  nopl   (%rax)
L14:
  movq   (%rdx),%xmm0
  pshufd $0xe5,%xmm0,%xmm2
  movd   %xmm0,%ecx
  movd   %xmm2,%eax
  pshufd $0xe1,%xmm0,%xmm1
  cmp    %eax,%ecx
  jle    L9
  movq   %xmm1,(%rdx)
L9:
  add    $0x4,%rdx
  cmp    %rsi,%rdx
  jne    L14
  mov    %r8d,%eax
  test   %r8d,%r8d
  jne    L8
L24:
  ret
```

assistant: ```c
void BubbleSort(int arr[], int n) {
  int i, j;
  int temp;
  for (i = 0; i < n - 1; i++) {
    for (j = 0; j < (n - i) - 1; j++) {
      if (arr[j] > arr[j + 1]) {
        temp = arr[j];
        arr[j] = arr[j + 1];
        arr[j + 1] = temp;
      }
    }
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<fgetLine>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  movl   $0x0,-0xc(%rbp)
  subl   $0x1,-0x24(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L54
L71:
  cmpl   $0xa,-0x4(%rbp)
  jne    L106
  movl   $0x0,-0x8(%rbp)
  jmp    L112
L106:
  cmpl   $0x5c,-0x4(%rbp)
  jne    L5
  mov    D89(%rip),%eax
  test   %eax,%eax
  jne    L5
  movl   $0x1,D89(%rip)
  jmp    L54
L5:
  cmpl   $0x23,-0x4(%rbp)
  jne    L14
  mov    D89(%rip),%eax
  test   %eax,%eax
  jne    L14
  movl   $0x1,-0x8(%rbp)
L14:
  mov    -0xc(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jge    L124
  cmpl   $0x0,-0x8(%rbp)
  jne    L124
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0xc(%rbp)
L124:
  mov    D89(%rip),%eax
  test   %eax,%eax
  je     L54
  movl   $0x0,D89(%rip)
L54:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <getc@plt>
  mov    %eax,-0x4(%rbp)
  mov    D49(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L71
L112:
  mov    D49(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L103
  cmpl   $0x0,-0xc(%rbp)
  jne    L103
  movl   $0x0,D89(%rip)
  mov    D49(%rip),%rax
  mov    (%rax),%eax
  jmp    L8
L103:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  movl   $0x0,D89(%rip)
  mov    -0xc(%rbp),%eax
L8:
  leave
  ret
```

assistant: ```c
int fgetLine(FILE *fp, char line[], int max) {
  int nch = 0;
  int c;
  max = max - 1;
  int ignoreLine = 0;
  static int ignoreSpecial = 0;
  while ((c = getc(fp)) != EOF) {
    if (c == '\n') {
      ignoreLine = 0;
      break;
    }
    if (c == '\\' && !ignoreSpecial) {
      ignoreSpecial = 1;
      continue;
    }
    if (c == '#' && !ignoreSpecial) {
      ignoreLine = 1;
    }
    if (nch < max) {
      if (!ignoreLine) {
        line[nch] = c;
        nch = nch + 1;
      }
    }
    if (ignoreSpecial) {
      ignoreSpecial = 0;
    }
  }
  if (c == EOF && nch == 0) {
    ignoreSpecial = 0;
    return EOF;
  }
  line[nch] = '\0';
  ignoreSpecial = 0;
  return nch;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<fgetLine>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r14
  lea    -0x1(%rdx),%r13d
  mov    $0x0,%r12d
  mov    $0x0,%ebx
  mov    $0x1,%r15d
  jmp    L160
L131:
  cmpl   $0x0,D25(%rip)
  je     L140
  cmp    %r13d,%ebx
  jge    L165
  test   %r12d,%r12d
  jne    L165
L193:
  movslq %ebx,%rdx
  mov    %al,(%r14,%rdx,1)
  add    $0x1,%ebx
L207:
  cmpl   $0x0,D25(%rip)
  je     L160
L165:
  movl   $0x0,D25(%rip)
L160:
  mov    %rbp,%rdi
  call   <getc@plt>
  mov    D11(%rip),%rdx
  mov    (%rdx),%edx
  cmp    %eax,%edx
  sete   %cl
  cmp    $0xa,%eax
  je     L32
  test   %cl,%cl
  jne    L32
  cmp    $0x5c,%eax
  je     L131
  cmp    $0x23,%eax
  je     L203
  test   %r12d,%r12d
  jne    L207
  cmp    %r13d,%ebx
  jge    L207
  jmp    L193
L140:
  mov    %r15d,D9(%rip)
  jmp    L160
L203:
  cmpl   $0x0,D9(%rip)
  je     L22
  test   %r12d,%r12d
  jne    L165
  cmp    %r13d,%ebx
  jge    L165
  jmp    L193
L22:
  mov    %r15d,%r12d
  jmp    L160
L32:
  test   %ebx,%ebx
  jne    L47
  test   %cl,%cl
  jne    L63
L47:
  movslq %ebx,%rax
  movb   $0x0,(%r14,%rax,1)
L0:
  movl   $0x0,D9(%rip)
  mov    %ebx,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L63:
  mov    %edx,%ebx
  jmp    L0
```

assistant: ```c
int fgetLine(FILE *fp, char line[], int max) {
  int nch = 0;
  int c;
  max = max - 1;
  int ignoreLine = 0;
  static int ignoreSpecial = 0;
  while ((c = getc(fp)) != EOF) {
    if (c == '\n') {
      ignoreLine = 0;
      break;
    }
    if (c == '\\' && !ignoreSpecial) {
      ignoreSpecial = 1;
      continue;
    }
    if (c == '#' && !ignoreSpecial) {
      ignoreLine = 1;
    }
    if (nch < max) {
      if (!ignoreLine) {
        line[nch] = c;
        nch = nch + 1;
      }
    }
    if (ignoreSpecial) {
      ignoreSpecial = 0;
    }
  }
  if (c == EOF && nch == 0) {
    ignoreSpecial = 0;
    return EOF;
  }
  line[nch] = '\0';
  ignoreSpecial = 0;
  return nch;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<fgetLine>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  lea    -0x1(%rdx),%r13d
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    D48(%rip),%rbp
  nopl   0x0(%rax)
L4:
  mov    %rbx,%rdi
  call   <getc@plt>
  mov    0x0(%rbp),%edx
  cmp    %eax,%edx
  je     L132
L31:
  cmp    $0xa,%eax
  je     L169
  mov    D26(%rip),%edx
  cmp    $0x5c,%eax
  je     L65
  cmp    $0x23,%eax
  je     L123
  cmp    %r13d,%r12d
  jge    L136
L83:
  test   %r14d,%r14d
  jne    L136
L94:
  movslq %r12d,%rcx
  xor    %r14d,%r14d
  add    $0x1,%r12d
  mov    %al,(%r15,%rcx,1)
L136:
  test   %edx,%edx
  je     L4
L0:
  movl   $0x0,D26(%rip)
L167:
  mov    %rbx,%rdi
  call   <getc@plt>
  mov    0x0(%rbp),%edx
  cmp    %eax,%edx
  jne    L31
L132:
  test   %r12d,%r12d
  jne    L6
  mov    %edx,%r12d
  jmp    L116
  nopw   0x0(%rax,%rax,1)
L65:
  test   %edx,%edx
  je     L19
  cmp    %r13d,%r12d
  jl     L83
  movl   $0x0,D26(%rip)
  jmp    L167
  nopl   (%rax)
L123:
  test   %edx,%edx
  jne    L110
  mov    $0x1,%r14d
  jmp    L4
  nopw   0x0(%rax,%rax,1)
L110:
  cmp    %r13d,%r12d
  jge    L0
  test   %r14d,%r14d
  je     L94
  movl   $0x0,D26(%rip)
  jmp    L167
  cs nopw 0x0(%rax,%rax,1)
L19:
  movl   $0x1,D26(%rip)
  jmp    L4
  nop
L169:
  cmp    $0xa,%edx
  je     L132
L6:
  movslq %r12d,%rax
  movb   $0x0,(%r15,%rax,1)
L116:
  movl   $0x0,D26(%rip)
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int fgetLine(FILE *fp, char line[], int max) {
  int nch = 0;
  int c;
  max = max - 1;
  int ignoreLine = 0;
  static int ignoreSpecial = 0;
  while ((c = getc(fp)) != EOF) {
    if (c == '\n') {
      ignoreLine = 0;
      break;
    }
    if (c == '\\' && !ignoreSpecial) {
      ignoreSpecial = 1;
      continue;
    }
    if (c == '#' && !ignoreSpecial) {
      ignoreLine = 1;
    }
    if (nch < max) {
      if (!ignoreLine) {
        line[nch] = c;
        nch = nch + 1;
      }
    }
    if (ignoreSpecial) {
      ignoreSpecial = 0;
    }
  }
  if (c == EOF && nch == 0) {
    ignoreSpecial = 0;
    return EOF;
  }
  line[nch] = '\0';
  ignoreSpecial = 0;
  return nch;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<fgetLine>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  lea    -0x1(%rdx),%r13d
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    D15(%rip),%rbp
  nopl   0x0(%rax)
L121:
  mov    %rbx,%rdi
  call   <getc@plt>
  mov    0x0(%rbp),%edx
  cmp    %eax,%edx
  je     L155
L70:
  cmp    $0xa,%eax
  je     L104
  mov    D28(%rip),%edx
  cmp    $0x5c,%eax
  je     L23
  cmp    $0x23,%eax
  je     L24
  cmp    %r13d,%r12d
  jge    L118
L16:
  test   %r14d,%r14d
  jne    L118
L13:
  movslq %r12d,%rcx
  xor    %r14d,%r14d
  add    $0x1,%r12d
  mov    %al,(%r15,%rcx,1)
L118:
  test   %edx,%edx
  je     L121
L139:
  movl   $0x0,D28(%rip)
L86:
  mov    %rbx,%rdi
  call   <getc@plt>
  mov    0x0(%rbp),%edx
  cmp    %eax,%edx
  jne    L70
L155:
  test   %r12d,%r12d
  jne    L108
  mov    %edx,%r12d
  jmp    L42
  nopw   0x0(%rax,%rax,1)
L23:
  test   %edx,%edx
  je     L56
  cmp    %r13d,%r12d
  jl     L16
  movl   $0x0,D28(%rip)
  jmp    L86
  nopl   (%rax)
L24:
  test   %edx,%edx
  jne    L48
  mov    $0x1,%r14d
  jmp    L121
  nopw   0x0(%rax,%rax,1)
L48:
  cmp    %r13d,%r12d
  jge    L139
  test   %r14d,%r14d
  je     L13
  movl   $0x0,D28(%rip)
  jmp    L86
  cs nopw 0x0(%rax,%rax,1)
L56:
  movl   $0x1,D28(%rip)
  jmp    L121
  nop
L104:
  cmp    $0xa,%edx
  je     L155
L108:
  movslq %r12d,%rax
  movb   $0x0,(%r15,%rax,1)
L42:
  movl   $0x0,D28(%rip)
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int fgetLine(FILE *fp, char line[], int max) {
  int nch = 0;
  int c;
  max = max - 1;
  int ignoreLine = 0;
  static int ignoreSpecial = 0;
  while ((c = getc(fp)) != EOF) {
    if (c == '\n') {
      ignoreLine = 0;
      break;
    }
    if (c == '\\' && !ignoreSpecial) {
      ignoreSpecial = 1;
      continue;
    }
    if (c == '#' && !ignoreSpecial) {
      ignoreLine = 1;
    }
    if (nch < max) {
      if (!ignoreLine) {
        line[nch] = c;
        nch = nch + 1;
      }
    }
    if (ignoreSpecial) {
      ignoreSpecial = 0;
    }
  }
  if (c == EOF && nch == 0) {
    ignoreSpecial = 0;
    return EOF;
  }
  line[nch] = '\0';
  ignoreSpecial = 0;
  return nch;
}
```