ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<mm>:
  endbr64
  test   %r8d,%r8d
  jle    L48
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r13
  mov    %rsi,%r10
  mov    %rdx,%rax
  mov    %ecx,%ebx
  mov    %r9d,%ebp
  mov    %rdx,%rdi
  lea    -0x1(%r8),%edx
  lea    0x8(%rax,%rdx,8),%r12
  lea    -0x1(%r9),%edx
  lea    0x4(,%rdx,4),%r11
  mov    %rax,%rcx
  jmp    L106
L48:
  ret
L92:
  mov    (%rcx),%rdx
  movl   $0x0,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %r11,%rax
  jne    L92
L117:
  add    $0x8,%rcx
  cmp    %r12,%rcx
  je     L55
L106:
  mov    $0x0,%eax
  test   %ebp,%ebp
  jg     L92
  jmp    L117
L55:
  mov    %r13,%r8
  lea    -0x1(%rbx),%eax
  lea    0x4(,%rax,4),%r9
  jmp    L25
L87:
  mov    %rcx,%rdx
  add    (%rdi),%rdx
  mov    (%r10,%rax,2),%rsi
  mov    (%r8),%r13
  movss  0x0(%r13,%rax,1),%xmm0
  mulss  (%rsi,%rcx,1),%xmm0
  addss  (%rdx),%xmm0
  movss  %xmm0,(%rdx)
  add    $0x4,%rax
  cmp    %rax,%r9
  jne    L87
L94:
  add    $0x4,%rcx
  cmp    %r11,%rcx
  je     L111
L72:
  mov    $0x0,%eax
  test   %ebx,%ebx
  jg     L87
  jmp    L94
L111:
  add    $0x8,%rdi
  add    $0x8,%r8
  cmp    %r12,%rdi
  je     L81
L25:
  mov    $0x0,%ecx
  test   %ebp,%ebp
  jg     L72
  jmp    L111
L81:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void mm(float **A, float **B, float **C, int ambn, int an, int bm) {
  int n;
  int j;
  int i;
  for (i = 0; i < an; i += 1)
    for (j = 0; j < bm; j += 1)
      C[i][j] = 0.0f;
  for (i = 0; i < an; i += 1)
    for (j = 0; j < bm; j += 1)
      for (n = 0; n < ambn; n += 1)
        C[i][j] += (A[i][n] * B[n][j]);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<mm>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %r8d,0x1c(%rsp)
  test   %r8d,%r8d
  jle    L44
  mov    0x1c(%rsp),%eax
  mov    %ecx,%ebp
  mov    %rdi,%r13
  mov    %rsi,%rbx
  mov    %rdx,%r12
  mov    %r9d,%r14d
  mov    %rdx,%rcx
  sub    $0x1,%eax
  lea    0x8(%rdx,%rax,8),%rax
  mov    %rax,0x10(%rsp)
  lea    -0x1(%r9),%eax
  lea    0x4(,%rax,4),%r15
  xchg   %ax,%ax
L71:
  test   %r14d,%r14d
  jle    L9
  mov    (%rcx),%rdi
  mov    %r15,%rdx
  xor    %esi,%esi
  mov    %rcx,0x8(%rsp)
  call   <memset@plt>
  mov    0x8(%rsp),%rcx
L9:
  add    $0x8,%rcx
  cmp    0x10(%rsp),%rcx
  jne    L71
  mov    0x1c(%rsp),%edx
  xor    %r11d,%r11d
  movslq %ebp,%r10
  nopl   0x0(%rax)
L25:
  xor    %ecx,%ecx
  test   %r14d,%r14d
  jle    L70
  nop
L60:
  test   %ebp,%ebp
  jle    L4
  mov    (%r12,%r11,8),%rsi
  mov    0x0(%r13,%r11,8),%rdi
  xor    %eax,%eax
  add    %rcx,%rsi
  movss  (%rsi),%xmm1
  cs nopw 0x0(%rax,%rax,1)
L74:
  mov    (%rbx,%rax,8),%r8
  movss  (%r8,%rcx,1),%xmm0
  mulss  (%rdi,%rax,4),%xmm0
  add    $0x1,%rax
  addss  %xmm0,%xmm1
  movss  %xmm1,(%rsi)
  cmp    %rax,%r10
  jne    L74
L4:
  add    $0x4,%rcx
  cmp    %r15,%rcx
  jne    L60
L70:
  add    $0x1,%r11
  cmp    %r11,%rdx
  jne    L25
L44:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void mm(float **A, float **B, float **C, int ambn, int an, int bm) {
  int n;
  int j;
  int i;
  for (i = 0; i < an; i += 1)
    for (j = 0; j < bm; j += 1)
      C[i][j] = 0.0f;
  for (i = 0; i < an; i += 1)
    for (j = 0; j < bm; j += 1)
      for (n = 0; n < ambn; n += 1)
        C[i][j] += (A[i][n] * B[n][j]);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<mm>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,(%rsp)
  mov    %ecx,0x8(%rsp)
  mov    %r8d,0xc(%rsp)
  test   %r8d,%r8d
  jle    L68
  movslq %r9d,%rbx
  test   %ebx,%ebx
  jle    L68
  mov    %r8d,%eax
  mov    %rsi,%r13
  mov    %rdx,%r12
  mov    %rdx,%rbp
  sub    $0x1,%eax
  lea    0x0(,%rbx,4),%r14
  lea    0x8(%rdx,%rax,8),%r15
  nop
L4:
  mov    0x0(%rbp),%rdi
  mov    %r14,%rdx
  xor    %esi,%esi
  add    $0x8,%rbp
  call   <memset@plt>
  cmp    %rbp,%r15
  jne    L4
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L68
  movslq 0xc(%rsp),%rbp
  movslq 0x8(%rsp),%r8
  shl    $0x2,%rbx
  xor    %r11d,%r11d
L27:
  mov    (%rsp),%rax
  mov    (%r12,%r11,8),%r9
  xor    %ecx,%ecx
  mov    (%rax,%r11,8),%rdi
  xchg   %ax,%ax
L36:
  lea    (%r9,%rcx,1),%rsi
  xor    %eax,%eax
  movss  (%rsi),%xmm1
  nopw   0x0(%rax,%rax,1)
L61:
  mov    0x0(%r13,%rax,8),%rdx
  movss  (%rdx,%rcx,1),%xmm0
  mulss  (%rdi,%rax,4),%xmm0
  add    $0x1,%rax
  addss  %xmm0,%xmm1
  movss  %xmm1,(%rsi)
  cmp    %r8,%rax
  jne    L61
  add    $0x4,%rcx
  cmp    %rcx,%rbx
  jne    L36
  add    $0x1,%r11
  cmp    %r11,%rbp
  jne    L27
L68:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void mm(float **A, float **B, float **C, int ambn, int an, int bm) {
  int n;
  int j;
  int i;
  for (i = 0; i < an; i += 1)
    for (j = 0; j < bm; j += 1)
      C[i][j] = 0.0f;
  for (i = 0; i < an; i += 1)
    for (j = 0; j < bm; j += 1)
      for (n = 0; n < ambn; n += 1)
        C[i][j] += (A[i][n] * B[n][j]);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<usage>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D23(%rip),%rax
  mov    %rax,%rdx
  lea    D1(%rip),%rax
  mov    %rax,%rsi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D1(%rip),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D1(%rip),%rax
  mov    %rax,%rsi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D1(%rip),%rax
  mov    %rax,%rsi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D23
type_guessed: string
name: parse_data
arguments: data_tag: D1
type_guessed: string
name: parse_data
arguments: data_tag: D47
type_guessed: string
name: parse_data
arguments: data_tag: D12
type_guessed: string
name: parse_data
arguments: data_tag: D4
type_guessed: string
name: parse_data
arguments: data_tag: D17
type_guessed: string
name: parse_data
arguments: data_tag: D56
type_guessed: string
name: parse_data
arguments: data_tag: D19
type_guessed: string

tool: D23: Mar 17 2022

tool: D1: ysort

tool: D47: %s 0.0 (built %s): yepos input pre-sort program


tool: D12: Copyright (C) 2009 Ineiev<ineiev@users.berlios.de>, super V 93

tool: D4: %s comes with NO WARRANTY, to the extent permitted by law.


tool: D17: You may redistribute copies of %s


tool: D56: under the terms of the GNU GPL v3+

tool: D19: Usage: %s unsorted.txt sorted.txt


assistant: ```c
void usage() {
  static const char THYNAME[] = "ysort";
  printf("%s 0.0 (built %s): yepos input pre-sort program\n", THYNAME, "Mar 17 2022");
  printf("Copyright (C) 2009 Ineiev<ineiev@users.berlios.de>, super V 93\n");
  printf("%s comes with NO WARRANTY, to the extent permitted by law.\n", THYNAME);
  printf("You may redistribute copies of %s\n", THYNAME);
  printf("under the terms of the GNU GPL v3+\n");
  printf("Usage: %s unsorted.txt sorted.txt\n", THYNAME);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<usage>:
  endbr64
  push   %rbx
  lea    D22(%rip),%rdx
  lea    D1(%rip),%rbx
  mov    %rbx,%rsi
  lea    D42(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D13(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rsi
  lea    D51(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  lea    D31(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D38(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rsi
  lea    D56(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  pop    %rbx
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D22
datatype: string
name: disassemble_data
arguments: tag: D1
datatype: string
name: disassemble_data
arguments: tag: D42
datatype: string
name: disassemble_data
arguments: tag: D13
datatype: string
name: disassemble_data
arguments: tag: D51
datatype: string
name: disassemble_data
arguments: tag: D31
datatype: string
name: disassemble_data
arguments: tag: D38
datatype: string
name: disassemble_data
arguments: tag: D56
datatype: string

tool: D22: Mar 17 2022

tool: D1: ysort

tool: D42: %s 0.0 (built %s): yepos input pre-sort program


tool: D13: Copyright (C) 2009 Ineiev<ineiev@users.berlios.de>, super V 93

tool: D51: %s comes with NO WARRANTY, to the extent permitted by law.


tool: D31: You may redistribute copies of %s


tool: D38: under the terms of the GNU GPL v3+

tool: D56: Usage: %s unsorted.txt sorted.txt


assistant: ```c
void usage() {
  static const char THYNAME[] = "ysort";
  printf("%s 0.0 (built %s): yepos input pre-sort program\n", THYNAME, "Mar 17 2022");
  printf("Copyright (C) 2009 Ineiev<ineiev@users.berlios.de>, super V 93\n");
  printf("%s comes with NO WARRANTY, to the extent permitted by law.\n", THYNAME);
  printf("You may redistribute copies of %s\n", THYNAME);
  printf("under the terms of the GNU GPL v3+\n");
  printf("Usage: %s unsorted.txt sorted.txt\n", THYNAME);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<usage>:
  endbr64
  push   %rbp
  lea    D45(%rip),%rbp
  lea    D52(%rip),%rdx
  xor    %eax,%eax
  mov    %rbp,%rsi
  lea    D19(%rip),%rdi
  call   <printf@plt>
  lea    D57(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rsi
  lea    D43(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  lea    D1(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D56(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rsi
  lea    D51(%rip),%rdi
  xor    %eax,%eax
  pop    %rbp
  jmp    1070 <printf@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D45
type: string
name: extract_symbolic_data
arguments: data_tag: D52
type: string
name: extract_symbolic_data
arguments: data_tag: D19
type: string
name: extract_symbolic_data
arguments: data_tag: D57
type: string
name: extract_symbolic_data
arguments: data_tag: D43
type: string
name: extract_symbolic_data
arguments: data_tag: D1
type: string
name: extract_symbolic_data
arguments: data_tag: D56
type: string
name: extract_symbolic_data
arguments: data_tag: D51
type: string

tool: D45: ysort

tool: D52: Mar 17 2022

tool: D19: %s 0.0 (built %s): yepos input pre-sort program


tool: D57: Copyright (C) 2009 Ineiev<ineiev@users.berlios.de>, super V 93

tool: D43: %s comes with NO WARRANTY, to the extent permitted by law.


tool: D1: You may redistribute copies of %s


tool: D56: under the terms of the GNU GPL v3+

tool: D51: Usage: %s unsorted.txt sorted.txt


assistant: ```c
void usage() {
  static const char THYNAME[] = "ysort";
  printf("%s 0.0 (built %s): yepos input pre-sort program\n", THYNAME, "Mar 17 2022");
  printf("Copyright (C) 2009 Ineiev<ineiev@users.berlios.de>, super V 93\n");
  printf("%s comes with NO WARRANTY, to the extent permitted by law.\n", THYNAME);
  printf("You may redistribute copies of %s\n", THYNAME);
  printf("under the terms of the GNU GPL v3+\n");
  printf("Usage: %s unsorted.txt sorted.txt\n", THYNAME);
}
```
user: Translate the below assembly code into C programming language:

```asm
<usage>:
  endbr64
  push   %rbp
  lea    D69(%rip),%rbp
  lea    D74(%rip),%rdx
  xor    %eax,%eax
  mov    %rbp,%rsi
  lea    D13(%rip),%rdi
  call   <printf@plt>
  lea    D78(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rsi
  lea    D52(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  lea    D67(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D63(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rsi
  lea    D45(%rip),%rdi
  xor    %eax,%eax
  pop    %rbp
  jmp    1070 <printf@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D69
type_guessed: string
name: retrieve_data
arguments: data_tag: D74
type_guessed: string
name: retrieve_data
arguments: data_tag: D13
type_guessed: string
name: retrieve_data
arguments: data_tag: D78
type_guessed: string
name: retrieve_data
arguments: data_tag: D52
type_guessed: string
name: retrieve_data
arguments: data_tag: D67
type_guessed: string
name: retrieve_data
arguments: data_tag: D63
type_guessed: string
name: retrieve_data
arguments: data_tag: D45
type_guessed: string

tool: D69: ysort

tool: D74: Mar 17 2022

tool: D13: %s 0.0 (built %s): yepos input pre-sort program


tool: D78: Copyright (C) 2009 Ineiev<ineiev@users.berlios.de>, super V 93

tool: D52: %s comes with NO WARRANTY, to the extent permitted by law.


tool: D67: You may redistribute copies of %s


tool: D63: under the terms of the GNU GPL v3+

tool: D45: Usage: %s unsorted.txt sorted.txt


assistant: ```c
void usage() {
  static const char THYNAME[] = "ysort";
  printf("%s 0.0 (built %s): yepos input pre-sort program\n", THYNAME, "Mar 17 2022");
  printf("Copyright (C) 2009 Ineiev<ineiev@users.berlios.de>, super V 93\n");
  printf("%s comes with NO WARRANTY, to the extent permitted by law.\n", THYNAME);
  printf("You may redistribute copies of %s\n", THYNAME);
  printf("under the terms of the GNU GPL v3+\n");
  printf("Usage: %s unsorted.txt sorted.txt\n", THYNAME);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<partial_quickersort_short>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %esi,%eax
  mov    %edx,%r15d
  mov    %r15d,%edx
  sub    %eax,%edx
  cmp    $0xf,%edx
  jle    L29
  movslq %eax,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  movzwl (%rdx),%r14d
  lea    (%r15,%rax,1),%edx
  mov    %edx,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%edx
  sar    %edx
  movslq %edx,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  movslq %eax,%rcx
  add    %rcx,%rcx
  add    %r12,%rcx
  movzwl (%rdx),%edx
  mov    %dx,(%rcx)
  lea    (%r15,%rax,1),%edx
  mov    %edx,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%edx
  sar    %edx
  movslq %edx,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  mov    %r14w,(%rdx)
  mov    %eax,%r13d
  lea    0x1(%r15),%ebx
  movslq %eax,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  movzwl (%rdx),%esi
  mov    %esi,%edi
L15:
  add    $0x1,%r13d
  movslq %r13d,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  movzwl (%rdx),%edx
  cmp    %dx,%di
  jg     L15
L13:
  sub    $0x1,%ebx
  movslq %ebx,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  movzwl (%rdx),%edx
  mov    %edi,%esi
  cmp    %dx,%si
  jl     L13
  cmp    %r13d,%ebx
  jl     L22
  movslq %r13d,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  movzwl (%rdx),%r14d
  movslq %ebx,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  movslq %r13d,%rcx
  add    %rcx,%rcx
  add    %r12,%rcx
  movzwl (%rdx),%edx
  mov    %dx,(%rcx)
  movslq %ebx,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  mov    %r14w,(%rdx)
  jmp    L15
L22:
  nop
  movslq %eax,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  movzwl (%rdx),%r14d
  movslq %ebx,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  movslq %eax,%rcx
  add    %rcx,%rcx
  add    %r12,%rcx
  movzwl (%rdx),%edx
  mov    %dx,(%rcx)
  movslq %ebx,%rdx
  add    %rdx,%rdx
  add    %r12,%rdx
  mov    %r14w,(%rdx)
  lea    -0x1(%rbx),%edx
  mov    %eax,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <partial_quickersort_short>
  mov    %r15d,%edx
  mov    %r13d,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <partial_quickersort_short>
L29:
  nop
  add    $0x8,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void partial_quickersort_short(array, lower, upper) register short array[];
register int lower, upper;
{
  register int i, j;
  register short temp, pivot;
  if (upper - lower > 15) {
    temp = (array[lower]);
    (array[lower]) = (array[(upper + lower) / 2]);
    (array[(upper + lower) / 2]) = temp;
    i = lower;
    j = upper + 1;
    pivot = array[lower];
    while (1) {
      do
        i++;
      while (((array[i]) < (pivot)));
      do
        j--;
      while (((array[j]) > (pivot)));
      if (j < i)
        break;
      temp = (array[i]);
      (array[i]) = (array[j]);
      (array[j]) = temp;
    }
    temp = (array[lower]);
    (array[lower]) = (array[j]);
    (array[j]) = temp;
    partial_quickersort_short(array, lower, j - 1);
    partial_quickersort_short(array, i, upper);
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<partial_quickersort_short>:
  endbr64
  mov    %edx,%eax
  sub    %esi,%eax
  cmp    $0xf,%eax
  jle    L22
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r11d
  mov    %edx,%r12d
  movslq %esi,%rax
  lea    (%rdi,%rax,2),%r13
  movzwl 0x0(%r13),%ecx
  lea    (%rdx,%rsi,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  lea    (%rdi,%rax,2),%rax
  movzwl (%rax),%edx
  mov    %dx,0x0(%r13)
  mov    %cx,(%rax)
  lea    0x1(%r12),%edx
  movzwl 0x0(%r13),%esi
  lea    0x1(%r11),%r8d
  movslq %r8d,%r8
  jmp    L6
L20:
  add    $0x1,%r8
L6:
  mov    %r8d,%ebp
  movzwl (%rbx,%r8,2),%r10d
  cmp    %si,%r10w
  jl     L20
  movslq %edx,%rax
  lea    -0x2(%rbx,%rax,2),%rax
L4:
  mov    %edx,%r9d
  sub    $0x1,%edx
  mov    %rax,%rdi
  sub    $0x2,%rax
  movzwl 0x2(%rax),%ecx
  cmp    %si,%cx
  jg     L4
  cmp    %r8d,%edx
  jl     L44
  mov    %cx,(%rbx,%r8,2)
  mov    %r10w,(%rdi)
  jmp    L20
L44:
  movzwl 0x0(%r13),%eax
  mov    %cx,0x0(%r13)
  mov    %ax,(%rdi)
  lea    -0x2(%r9),%edx
  mov    %r11d,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <partial_quickersort_short>
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <partial_quickersort_short>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L22:
  ret
```

assistant: ```c
void partial_quickersort_short(array, lower, upper) register short array[];
register int lower, upper;
{
  register int i, j;
  register short temp, pivot;
  if (upper - lower > 15) {
    temp = (array[lower]);
    (array[lower]) = (array[(upper + lower) / 2]);
    (array[(upper + lower) / 2]) = temp;
    i = lower;
    j = upper + 1;
    pivot = array[lower];
    while (1) {
      do
        i++;
      while (((array[i]) < (pivot)));
      do
        j--;
      while (((array[j]) > (pivot)));
      if (j < i)
        break;
      temp = (array[i]);
      (array[i]) = (array[j]);
      (array[j]) = temp;
    }
    temp = (array[lower]);
    (array[lower]) = (array[j]);
    (array[j]) = temp;
    partial_quickersort_short(array, lower, j - 1);
    partial_quickersort_short(array, i, upper);
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<partial_quickersort_short>:
  endbr64
  mov    %edx,%eax
  sub    %esi,%eax
  cmp    $0xf,%eax
  jle    L9
  push   %r14
  mov    %esi,%r10d
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  lea    0x1(%rdx),%ebx
L20:
  lea    (%r10,%r12,1),%edx
  movslq %r10d,%rax
  lea    0x1(%r10),%r8d
  lea    0x0(%rbp,%rax,2),%r14
  mov    %edx,%eax
  movslq %r8d,%r8
  shr    $0x1f,%eax
  movzwl (%r14),%ecx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x0(%rbp,%rax,2),%rax
  movzwl (%rax),%edx
  mov    %dx,(%r14)
  mov    %ebx,%edx
  mov    %cx,(%rax)
  movzwl (%r14),%esi
  nopl   0x0(%rax)
L69:
  movzwl 0x0(%rbp,%r8,2),%r11d
  mov    %r8d,%r13d
  cmp    %si,%r11w
  jl     L43
  movslq %edx,%rax
  lea    -0x2(%rbp,%rax,2),%rax
  nopw   0x0(%rax,%rax,1)
L57:
  mov    %rax,%rdi
  movzwl (%rax),%ecx
  mov    %edx,%r9d
  sub    $0x2,%rax
  sub    $0x1,%edx
  cmp    %si,%cx
  jg     L57
  cmp    %r8d,%edx
  jl     L35
  mov    %cx,0x0(%rbp,%r8,2)
  mov    %r11w,(%rdi)
L43:
  add    $0x1,%r8
  jmp    L69
  nopw   0x0(%rax,%rax,1)
L35:
  movzwl (%r14),%eax
  mov    %cx,(%r14)
  lea    -0x2(%r9),%edx
  mov    %r10d,%esi
  mov    %ax,(%rdi)
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <partial_quickersort_short>
  mov    %r12d,%eax
  sub    %r13d,%eax
  cmp    $0xf,%eax
  jle    L65
  mov    %r13d,%r10d
  jmp    L20
L65:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L9:
  ret
```

assistant: ```c
void partial_quickersort_short(array, lower, upper) register short array[];
register int lower, upper;
{
  register int i, j;
  register short temp, pivot;
  if (upper - lower > 15) {
    temp = (array[lower]);
    (array[lower]) = (array[(upper + lower) / 2]);
    (array[(upper + lower) / 2]) = temp;
    i = lower;
    j = upper + 1;
    pivot = array[lower];
    while (1) {
      do
        i++;
      while (((array[i]) < (pivot)));
      do
        j--;
      while (((array[j]) > (pivot)));
      if (j < i)
        break;
      temp = (array[i]);
      (array[i]) = (array[j]);
      (array[j]) = temp;
    }
    temp = (array[lower]);
    (array[lower]) = (array[j]);
    (array[j]) = temp;
    partial_quickersort_short(array, lower, j - 1);
    partial_quickersort_short(array, i, upper);
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<partial_quickersort_short>:
  endbr64
  mov    %edx,%eax
  sub    %esi,%eax
  cmp    $0xf,%eax
  jle    L46
  push   %r14
  mov    %esi,%r10d
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  lea    0x1(%rdx),%ebx
L66:
  lea    (%r10,%r12,1),%edx
  movslq %r10d,%rax
  lea    0x1(%r10),%r8d
  lea    0x0(%rbp,%rax,2),%r14
  mov    %edx,%eax
  movslq %r8d,%r8
  shr    $0x1f,%eax
  movzwl (%r14),%ecx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x0(%rbp,%rax,2),%rax
  movzwl (%rax),%edx
  mov    %dx,(%r14)
  mov    %ebx,%edx
  mov    %cx,(%rax)
  movzwl (%r14),%esi
  nopl   0x0(%rax)
L26:
  movzwl 0x0(%rbp,%r8,2),%r11d
  mov    %r8d,%r13d
  cmp    %si,%r11w
  jl     L56
  movslq %edx,%rax
  lea    -0x2(%rbp,%rax,2),%rax
  nopw   0x0(%rax,%rax,1)
L4:
  mov    %rax,%rdi
  movzwl (%rax),%ecx
  mov    %edx,%r9d
  sub    $0x2,%rax
  sub    $0x1,%edx
  cmp    %si,%cx
  jg     L4
  cmp    %r8d,%edx
  jl     L14
  mov    %cx,0x0(%rbp,%r8,2)
  mov    %r11w,(%rdi)
L56:
  add    $0x1,%r8
  jmp    L26
  nopw   0x0(%rax,%rax,1)
L14:
  movzwl (%r14),%eax
  mov    %cx,(%r14)
  lea    -0x2(%r9),%edx
  mov    %r10d,%esi
  mov    %ax,(%rdi)
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <partial_quickersort_short>
  mov    %r12d,%eax
  sub    %r13d,%eax
  cmp    $0xf,%eax
  jle    L15
  mov    %r13d,%r10d
  jmp    L66
L15:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L46:
  ret
```

assistant: ```c
void partial_quickersort_short(array, lower, upper) register short array[];
register int lower, upper;
{
  register int i, j;
  register short temp, pivot;
  if (upper - lower > 15) {
    temp = (array[lower]);
    (array[lower]) = (array[(upper + lower) / 2]);
    (array[(upper + lower) / 2]) = temp;
    i = lower;
    j = upper + 1;
    pivot = array[lower];
    while (1) {
      do
        i++;
      while (((array[i]) < (pivot)));
      do
        j--;
      while (((array[j]) > (pivot)));
      if (j < i)
        break;
      temp = (array[i]);
      (array[i]) = (array[j]);
      (array[j]) = temp;
    }
    temp = (array[lower]);
    (array[lower]) = (array[j]);
    (array[j]) = temp;
    partial_quickersort_short(array, lower, j - 1);
    partial_quickersort_short(array, i, upper);
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<f>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x4,-0xc(%rbp)
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <foo@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

assistant: ```c
int f(void) {
  const int dev = 4;
  return !foo(&dev);
}
```