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

```asm
<get_profile_vertex_type>:
  endbr64
  mov    (%rsi),%eax
  lea    D27(%rip),%r8
  cmp    $0xfffffc19,%eax
  jne    L9
  jmp    L33
  cs nopw 0x0(%rax,%rax,1)
L30:
  mov    0x4(%rsi),%eax
  add    $0x4,%rsi
  cmp    $0xfffffc19,%eax
  je     L4
L9:
  cmp    %eax,%edi
  jne    L30
  lea    D1(%rip),%r8
L33:
  mov    %r8,%rax
  ret
  nopl   (%rax)
L4:
  lea    D27(%rip),%r8
  mov    %r8,%rax
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D27
type_guessed: string
name: retrieve_data
arguments: data_label: D1
type_guessed: string

tool: D27: standard


tool: D1: silent


assistant: ```c
char *get_profile_vertex_type(int v, int *silent_vertices) {
  while (*silent_vertices != -999) {
    if (v == *silent_vertices) {
      return "silent\n";
    }
    silent_vertices++;
  }
  return "standard\n";
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<geohashGetYMercator>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  comisd D6(%rip),%xmm0
  ja     L19
  movsd  D18(%rip),%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L10
L19:
  mov    -0x8(%rbp),%rax
  jmp    L13
L10:
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <mercator_y@plt>
  movq   %xmm0,%rax
L13:
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D6
type_guessed: byte[16]
name: disassemble_data
arguments: tag: D18
type_guessed: byte[8]

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x80,0x56,0x40,0x00,0x00,0x00,0x00,0x00,0x80,0x56,0xc0]}

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0x80,0x56,0xc0]}

assistant: ```c
double geohashGetYMercator(double latitude) {
  if (latitude > 90 || latitude < -90) {
    return latitude;
  }
  return mercator_y(latitude);
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<geohashGetYMercator>:
  endbr64
  comisd D9(%rip),%xmm0
  ja     L0
  movsd  D4(%rip),%xmm1
  comisd %xmm0,%xmm1
  jbe    L18
L0:
  ret
L18:
  sub    $0x8,%rsp
  call   <mercator_y@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: disassemble_data
arguments: label: D9
datatype: byte[16]
name: disassemble_data
arguments: label: D4
datatype: byte[8]

tool: {"D9": [0x00,0x00,0x00,0x00,0x00,0x80,0x56,0x40,0x00,0x00,0x00,0x00,0x00,0x80,0x56,0xc0]}

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

assistant: ```c
double geohashGetYMercator(double latitude) {
  if (latitude > 90 || latitude < -90) {
    return latitude;
  }
  return mercator_y(latitude);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<geohashGetYMercator>:
  endbr64
  comisd D16(%rip),%xmm0
  ja     L11
  movsd  D9(%rip),%xmm1
  comisd %xmm0,%xmm1
  jbe    L0
L11:
  ret
  nopl   (%rax)
L0:
  jmp    1050 <mercator_y@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D16
data_type: byte[16]
name: disassemble_data
arguments: tag: D9
data_type: byte[8]

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

tool: {"D9": [0x00,0x00,0x00,0x00,0x00,0x80,0x56,0xc0]}

assistant: ```c
double geohashGetYMercator(double latitude) {
  if (latitude > 90 || latitude < -90) {
    return latitude;
  }
  return mercator_y(latitude);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<geohashGetYMercator>:
  endbr64
  comisd D15(%rip),%xmm0
  ja     L15
  movsd  D3(%rip),%xmm1
  comisd %xmm0,%xmm1
  jbe    L14
L15:
  ret
  nopl   (%rax)
L14:
  jmp    1050 <mercator_y@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D15
type_infered: byte[16]
name: disassemble_data
arguments: tag: D3
type_infered: byte[8]

tool: {"D15": [0x00,0x00,0x00,0x00,0x00,0x80,0x56,0x40,0x00,0x00,0x00,0x00,0x00,0x80,0x56,0xc0]}

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

assistant: ```c
double geohashGetYMercator(double latitude) {
  if (latitude > 90 || latitude < -90) {
    return latitude;
  }
  return mercator_y(latitude);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<cos>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %rdi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  andl   $0x7fffffff,-0x30(%rbp)
  cmpl   $0x3fe921fb,-0x30(%rbp)
  jg     L123
  mov    -0x38(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  movsd  -0x28(%rbp),%xmm0
  mov    %rdx,%rdi
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <__kernel_cos@plt>
  jmp    L100
L123:
  cmpl   $0x7fefffff,-0x30(%rbp)
  jle    L35
  movsd  -0x38(%rbp),%xmm0
  movsd  -0x38(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L100
L35:
  mov    -0x38(%rbp),%rax
  lea    -0x20(%rbp),%rdx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   <__ieee754_rem_pio2@plt>
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  and    $0x3,%eax
  cmp    $0x2,%eax
  je     L17
  cmp    $0x2,%eax
  jg     L127
  test   %eax,%eax
  je     L84
  cmp    $0x1,%eax
  je     L113
  jmp    L127
L84:
  movsd  -0x18(%rbp),%xmm0
  mov    -0x20(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    %rdx,%rdi
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <__kernel_cos@plt>
  jmp    L100
L113:
  movsd  -0x18(%rbp),%xmm0
  mov    -0x20(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    %rdx,%rsi
  mov    $0x1,%edi
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <__kernel_sin@plt>
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D2(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L100
L17:
  movsd  -0x18(%rbp),%xmm0
  mov    -0x20(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    %rdx,%rdi
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <__kernel_cos@plt>
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D2(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L100
L127:
  movsd  -0x18(%rbp),%xmm0
  mov    -0x20(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    %rdx,%rsi
  mov    $0x1,%edi
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <__kernel_sin@plt>
  nop
L100:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L94
  call   <__stack_chk_fail@plt>
L94:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D2
type: f32[2]

tool: {"D2": [0.0,-0.0]}

assistant: ```c
void cos(double x, double *result) {
  double y[2], z = 0.0;
  int n, ix;
  ix = *(1 + (int *)&x);
  ix &= 0x7fffffff;
  if (ix <= 0x3fe921fb) {
    __kernel_cos(x, z, result);
    return;
  } else if (ix >= 0x7ff00000) {
    *result = x - x;
    return;
  } else {
    n = __ieee754_rem_pio2(x, y);
    switch (n & 3) {
    case 0:
      __kernel_cos(y[0], y[1], result);
      return;
    case 1:
      __kernel_sin(y[0], y[1], 1, result);
      *result = -*result;
      return;
    case 2:
      __kernel_cos(y[0], y[1], result);
      *result = -*result;
      return;
    default:
      __kernel_sin(y[0], y[1], 1, result);
      return;
    }
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<cos>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movq   %xmm0,%rax
  sar    $0x20,%rax
  and    $0x7fffffff,%eax
  cmp    $0x3fe921fb,%eax
  jle    L104
  cmp    $0x7fefffff,%eax
  jle    L98
  subsd  %xmm0,%xmm0
  movsd  %xmm0,(%rdi)
L65:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0x20,%rsp
  pop    %rbx
  ret
L104:
  pxor   %xmm1,%xmm1
  call   <__kernel_cos@plt>
  jmp    L65
L98:
  mov    %rsp,%rdi
  call   <__ieee754_rem_pio2@plt>
  and    $0x3,%eax
  cmp    $0x1,%eax
  je     L59
  cmp    $0x2,%eax
  je     L69
  test   %eax,%eax
  je     L9
  mov    %rbx,%rsi
  mov    $0x1,%edi
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm0
  call   <__kernel_sin@plt>
  jmp    L65
L9:
  mov    %rbx,%rdi
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm0
  call   <__kernel_cos@plt>
  jmp    L65
L59:
  mov    %rbx,%rsi
  mov    $0x1,%edi
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm0
  call   <__kernel_sin@plt>
  movsd  (%rbx),%xmm0
  xorpd  D9(%rip),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L65
L69:
  mov    %rbx,%rdi
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm0
  call   <__kernel_cos@plt>
  movsd  (%rbx),%xmm0
  xorpd  D9(%rip),%xmm0
  movsd  %xmm0,(%rbx)
  jmp    L65
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D9
type: f32[4]

tool: {"D9": [0.0,-0.0,0.0,0.0]}

assistant: ```c
void cos(double x, double *result) {
  double y[2], z = 0.0;
  int n, ix;
  ix = *(1 + (int *)&x);
  ix &= 0x7fffffff;
  if (ix <= 0x3fe921fb) {
    __kernel_cos(x, z, result);
    return;
  } else if (ix >= 0x7ff00000) {
    *result = x - x;
    return;
  } else {
    n = __ieee754_rem_pio2(x, y);
    switch (n & 3) {
    case 0:
      __kernel_cos(y[0], y[1], result);
      return;
    case 1:
      __kernel_sin(y[0], y[1], 1, result);
      *result = -*result;
      return;
    case 2:
      __kernel_cos(y[0], y[1], result);
      *result = -*result;
      return;
    default:
      __kernel_sin(y[0], y[1], 1, result);
      return;
    }
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<cos>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movq   %xmm0,%rax
  sar    $0x20,%rax
  and    $0x7fffffff,%eax
  cmp    $0x3fe921fb,%eax
  jle    L41
  cmp    $0x7fefffff,%eax
  jle    L25
  subsd  %xmm0,%xmm0
  movsd  %xmm0,(%rdi)
L36:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0x20,%rsp
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L25:
  mov    %rsp,%rdi
  call   <__ieee754_rem_pio2@plt>
  and    $0x3,%eax
  cmp    $0x1,%eax
  je     L2
  cmp    $0x2,%eax
  je     L65
  test   %eax,%eax
  je     L105
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm0
  mov    %rbp,%rsi
  mov    $0x1,%edi
  call   <__kernel_sin@plt>
  jmp    L36
  nopl   0x0(%rax,%rax,1)
L41:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0x20,%rsp
  pxor   %xmm1,%xmm1
  pop    %rbp
  jmp    10b0 <__kernel_cos@plt>
  nopw   0x0(%rax,%rax,1)
L2:
  movsd  (%rsp),%xmm0
  movsd  0x8(%rsp),%xmm1
  mov    %rbp,%rsi
  mov    $0x1,%edi
  call   <__kernel_sin@plt>
  movsd  0x0(%rbp),%xmm0
  xorpd  D7(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp)
  jmp    L36
  nopw   0x0(%rax,%rax,1)
L105:
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm0
  mov    %rbp,%rdi
  call   <__kernel_cos@plt>
  jmp    L36
  nopl   0x0(%rax,%rax,1)
L65:
  movsd  (%rsp),%xmm0
  movsd  0x8(%rsp),%xmm1
  mov    %rbp,%rdi
  call   <__kernel_cos@plt>
  movsd  0x0(%rbp),%xmm0
  xorpd  D7(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp)
  jmp    L36
L10:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D7
type: f32[4]

tool: {"D7": [0.0,-0.0,0.0,0.0]}

assistant: ```c
void cos(double x, double *result) {
  double y[2], z = 0.0;
  int n, ix;
  ix = *(1 + (int *)&x);
  ix &= 0x7fffffff;
  if (ix <= 0x3fe921fb) {
    __kernel_cos(x, z, result);
    return;
  } else if (ix >= 0x7ff00000) {
    *result = x - x;
    return;
  } else {
    n = __ieee754_rem_pio2(x, y);
    switch (n & 3) {
    case 0:
      __kernel_cos(y[0], y[1], result);
      return;
    case 1:
      __kernel_sin(y[0], y[1], 1, result);
      *result = -*result;
      return;
    case 2:
      __kernel_cos(y[0], y[1], result);
      *result = -*result;
      return;
    default:
      __kernel_sin(y[0], y[1], 1, result);
      return;
    }
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<cos>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movq   %xmm0,%rax
  sar    $0x20,%rax
  and    $0x7fffffff,%eax
  cmp    $0x3fe921fb,%eax
  jle    L8
  cmp    $0x7fefffff,%eax
  jle    L35
  subsd  %xmm0,%xmm0
  movsd  %xmm0,(%rdi)
L104:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L49
  add    $0x20,%rsp
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L35:
  mov    %rsp,%rdi
  call   <__ieee754_rem_pio2@plt>
  and    $0x3,%eax
  cmp    $0x1,%eax
  je     L41
  cmp    $0x2,%eax
  je     L19
  test   %eax,%eax
  je     L58
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm0
  mov    %rbp,%rsi
  mov    $0x1,%edi
  call   <__kernel_sin@plt>
  jmp    L104
  nopl   0x0(%rax,%rax,1)
L8:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L49
  add    $0x20,%rsp
  pxor   %xmm1,%xmm1
  pop    %rbp
  jmp    10b0 <__kernel_cos@plt>
  nopw   0x0(%rax,%rax,1)
L41:
  movsd  (%rsp),%xmm0
  movsd  0x8(%rsp),%xmm1
  mov    %rbp,%rsi
  mov    $0x1,%edi
  call   <__kernel_sin@plt>
  movsd  0x0(%rbp),%xmm0
  xorpd  D2(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp)
  jmp    L104
  nopw   0x0(%rax,%rax,1)
L58:
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm0
  mov    %rbp,%rdi
  call   <__kernel_cos@plt>
  jmp    L104
  nopl   0x0(%rax,%rax,1)
L19:
  movsd  (%rsp),%xmm0
  movsd  0x8(%rsp),%xmm1
  mov    %rbp,%rdi
  call   <__kernel_cos@plt>
  movsd  0x0(%rbp),%xmm0
  xorpd  D2(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp)
  jmp    L104
L49:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D2
type: f32[4]

tool: {"D2": [0.0,-0.0,0.0,0.0]}

assistant: ```c
void cos(double x, double *result) {
  double y[2], z = 0.0;
  int n, ix;
  ix = *(1 + (int *)&x);
  ix &= 0x7fffffff;
  if (ix <= 0x3fe921fb) {
    __kernel_cos(x, z, result);
    return;
  } else if (ix >= 0x7ff00000) {
    *result = x - x;
    return;
  } else {
    n = __ieee754_rem_pio2(x, y);
    switch (n & 3) {
    case 0:
      __kernel_cos(y[0], y[1], result);
      return;
    case 1:
      __kernel_sin(y[0], y[1], 1, result);
      *result = -*result;
      return;
    case 2:
      __kernel_cos(y[0], y[1], result);
      *result = -*result;
      return;
    default:
      __kernel_sin(y[0], y[1], 1, result);
      return;
    }
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<pruefe_siegesbedingung_horizontal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %rdx,-0x30(%rbp)
  mov    %ecx,-0x34(%rbp)
  mov    %r8d,-0x38(%rbp)
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movb   $0x0,-0x19(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L30
L43:
  movl   $0x0,-0x14(%rbp)
  jmp    L76
L14:
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L15
L51:
  mov    -0x18(%rbp),%edx
  movslq %edx,%rcx
  movslq %eax,%rdx
  imul   %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x14(%rbp),%esi
  mov    -0x10(%rbp),%edx
  add    %esi,%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,4),%edx
  cmp    %edx,-0x38(%rbp)
  jne    L20
  addl   $0x1,-0xc(%rbp)
L20:
  addl   $0x1,-0x10(%rbp)
L15:
  mov    -0x10(%rbp),%edx
  cmp    -0x34(%rbp),%edx
  jl     L51
  mov    -0xc(%rbp),%edx
  cmp    -0x34(%rbp),%edx
  jne    L1
  movb   $0x1,-0x19(%rbp)
L1:
  addl   $0x1,-0x14(%rbp)
L76:
  mov    -0x28(%rbp),%edx
  sub    -0x34(%rbp),%edx
  cmp    %edx,-0x14(%rbp)
  jle    L14
  addl   $0x1,-0x18(%rbp)
L30:
  mov    -0x18(%rbp),%edx
  cmp    -0x24(%rbp),%edx
  jl     L43
  movzbl -0x19(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
_Bool pruefe_siegesbedingung_horizontal(int zeilen, int spalten, int spielfeld[zeilen][spalten], int laenge_linie, int spielstein) {
  int i;
  int j;
  int k;
  int zaehlen;
  _Bool gewonnen = 0;
  for (i = 0; i < zeilen; i++) {
    for (j = 0; j < spalten - laenge_linie + 1; j++) {
      zaehlen = 0;
      for (k = 0; k < laenge_linie; k++)
        if (spielfeld[i][j + k] == spielstein)
          zaehlen = zaehlen + 1;
      if (zaehlen == laenge_linie)
        gewonnen = 1;
    }
  }
  return gewonnen;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<pruefe_siegesbedingung_horizontal>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebp
  test   %edi,%edi
  jle    L6
  mov    %esi,%r15d
  mov    %rdx,%r13
  mov    %ecx,%r9d
  mov    %r8d,%edi
  movslq %esi,%rax
  shl    $0x2,%rax
  mov    %rax,-0x10(%rsp)
  lea    -0x1(%rcx),%eax
  mov    $0x0,%r10d
  mov    $0x0,%r14d
  sub    %ecx,%r15d
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rbx
  mov    %rbx,-0x8(%rsp)
  lea    0x1(%r15),%r12d
  neg    %rax
  lea    0x0(,%rax,4),%r11
  mov    $0x1,%ebx
  jmp    L45
L46:
  cmp    %edi,(%rax)
  sete   %cl
  movzbl %cl,%ecx
  add    %ecx,%edx
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L46
L41:
  cmp    %edx,%r9d
  cmove  %ebx,%r10d
  add    $0x1,%r8d
  add    $0x4,%rsi
  cmp    %r12d,%r8d
  je     L48
L77:
  lea    (%r11,%rsi,1),%rax
  mov    $0x0,%edx
  test   %r9d,%r9d
  jg     L46
  jmp    L41
L48:
  add    $0x1,%r14d
  add    -0x10(%rsp),%r13
  cmp    %r14d,%ebp
  je     L78
L45:
  test   %r15d,%r15d
  js     L48
  mov    -0x8(%rsp),%rax
  lea    (%rax,%r13,1),%rsi
  mov    $0x0,%r8d
  jmp    L77
L6:
  mov    $0x0,%r10d
L78:
  mov    %r10d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
_Bool pruefe_siegesbedingung_horizontal(int zeilen, int spalten, int spielfeld[zeilen][spalten], int laenge_linie, int spielstein) {
  int i;
  int j;
  int k;
  int zaehlen;
  _Bool gewonnen = 0;
  for (i = 0; i < zeilen; i++) {
    for (j = 0; j < spalten - laenge_linie + 1; j++) {
      zaehlen = 0;
      for (k = 0; k < laenge_linie; k++)
        if (spielfeld[i][j + k] == spielstein)
          zaehlen = zaehlen + 1;
      if (zaehlen == laenge_linie)
        gewonnen = 1;
    }
  }
  return gewonnen;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<pruefe_siegesbedingung_horizontal>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,-0xc(%rsp)
  test   %edi,%edi
  jle    L34
  movslq %esi,%r15
  lea    -0x1(%rcx),%eax
  mov    $0xfffffffffffffffc,%r11
  mov    %rdx,%r12
  mov    %r15,%r14
  shl    $0x2,%rax
  mov    %ecx,%r9d
  mov    %r8d,%edi
  lea    0x4(%rax),%rbx
  sub    %ecx,%r14d
  shl    $0x2,%r15
  xor    %r10d,%r10d
  mov    %rbx,-0x8(%rsp)
  xor    %r13d,%r13d
  lea    0x1(%r14),%ebp
  sub    %rax,%r11
  mov    $0x1,%ebx
  nopl   0x0(%rax)
L22:
  test   %r14d,%r14d
  js     L46
  mov    -0x8(%rsp),%rax
  xor    %r8d,%r8d
  lea    (%rax,%r12,1),%rsi
  nopl   0x0(%rax)
L26:
  lea    (%r11,%rsi,1),%rax
  xor    %edx,%edx
  test   %r9d,%r9d
  jle    L1
  nopl   0x0(%rax,%rax,1)
L15:
  xor    %ecx,%ecx
  cmp    %edi,(%rax)
  sete   %cl
  add    $0x4,%rax
  add    %ecx,%edx
  cmp    %rsi,%rax
  jne    L15
L1:
  cmp    %edx,%r9d
  cmove  %ebx,%r10d
  add    $0x1,%r8d
  add    $0x4,%rsi
  cmp    %ebp,%r8d
  jne    L26
L46:
  add    $0x1,%r13d
  add    %r15,%r12
  cmp    %r13d,-0xc(%rsp)
  jne    L22
  pop    %rbx
  mov    %r10d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L34:
  xor    %r10d,%r10d
  pop    %rbx
  pop    %rbp
  mov    %r10d,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
_Bool pruefe_siegesbedingung_horizontal(int zeilen, int spalten, int spielfeld[zeilen][spalten], int laenge_linie, int spielstein) {
  int i;
  int j;
  int k;
  int zaehlen;
  _Bool gewonnen = 0;
  for (i = 0; i < zeilen; i++) {
    for (j = 0; j < spalten - laenge_linie + 1; j++) {
      zaehlen = 0;
      for (k = 0; k < laenge_linie; k++)
        if (spielfeld[i][j + k] == spielstein)
          zaehlen = zaehlen + 1;
      if (zaehlen == laenge_linie)
        gewonnen = 1;
    }
  }
  return gewonnen;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<pruefe_siegesbedingung_horizontal>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,-0xc(%rsp)
  test   %edi,%edi
  jle    L80
  mov    %esi,%eax
  mov    %rdx,%r9
  movslq %esi,%rdx
  mov    %ecx,%ebx
  sub    %ecx,%eax
  movd   %r8d,%xmm3
  mov    %ecx,%edi
  mov    %r8d,%r11d
  mov    %eax,%esi
  mov    %eax,-0x10(%rsp)
  lea    -0x1(%rcx),%r13d
  and    $0xfffffffc,%ebx
  xor    %r10d,%r10d
  lea    0x1(%rsi),%r12d
  pshufd $0x0,%xmm3,%xmm2
  xor    %r15d,%r15d
  lea    0x0(,%rdx,4),%rax
  mov    %rax,-0x18(%rsp)
  mov    %ecx,%eax
  shr    $0x2,%eax
  lea    -0x1(%rax),%r14d
  add    $0x1,%r14
  shl    $0x4,%r14
  nopw   0x0(%rax,%rax,1)
L75:
  mov    -0x10(%rsp),%eax
  test   %eax,%eax
  js     L94
  mov    %r9,%r8
  xor    %ecx,%ecx
  mov    $0x1,%ebp
  cs nopw 0x0(%rax,%rax,1)
L17:
  xor    %edx,%edx
  test   %edi,%edi
  jle    L135
  cmp    $0x2,%r13d
  jbe    L74
  lea    (%r14,%r8,1),%rdx
  mov    %r8,%rax
  pxor   %xmm1,%xmm1
  nop
L96:
  movdqu (%rax),%xmm0
  add    $0x10,%rax
  pcmpeqd %xmm2,%xmm0
  psubd  %xmm0,%xmm1
  cmp    %rax,%rdx
  jne    L96
  movdqa %xmm1,%xmm0
  mov    %ebx,%eax
  psrldq $0x8,%xmm0
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movd   %xmm1,%edx
  cmp    %ebx,%edi
  je     L135
L108:
  lea    (%rcx,%rax,1),%esi
  movslq %esi,%rsi
  cmp    %r11d,(%r9,%rsi,4)
  jne    L82
  add    $0x1,%edx
L82:
  lea    0x1(%rax),%esi
  cmp    %edi,%esi
  jge    L135
  add    %ecx,%esi
  movslq %esi,%rsi
  cmp    (%r9,%rsi,4),%r11d
  jne    L123
  add    $0x1,%edx
L123:
  add    $0x2,%eax
  cmp    %edi,%eax
  jge    L135
  add    %ecx,%eax
  cltq
  cmp    (%r9,%rax,4),%r11d
  jne    L135
  add    $0x1,%edx
  nopl   0x0(%rax)
L135:
  cmp    %edx,%edi
  cmove  %ebp,%r10d
  add    $0x1,%ecx
  add    $0x4,%r8
  cmp    %r12d,%ecx
  jne    L17
L94:
  add    $0x1,%r15d
  add    -0x18(%rsp),%r9
  cmp    %r15d,-0xc(%rsp)
  jne    L75
  pop    %rbx
  mov    %r10d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L74:
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L108
L80:
  xor    %r10d,%r10d
  pop    %rbx
  pop    %rbp
  mov    %r10d,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
_Bool pruefe_siegesbedingung_horizontal(int zeilen, int spalten, int spielfeld[zeilen][spalten], int laenge_linie, int spielstein) {
  int i;
  int j;
  int k;
  int zaehlen;
  _Bool gewonnen = 0;
  for (i = 0; i < zeilen; i++) {
    for (j = 0; j < spalten - laenge_linie + 1; j++) {
      zaehlen = 0;
      for (k = 0; k < laenge_linie; k++)
        if (spielfeld[i][j + k] == spielstein)
          zaehlen = zaehlen + 1;
      if (zaehlen == laenge_linie)
        gewonnen = 1;
    }
  }
  return gewonnen;
}
```