ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Translate the below assembly code into C programming language:

```asm
<large_test_suite>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  lea    D4(%rip),%rdi
  call   <printf@plt>
  mov    %rsp,%rbp
  mov    $0x80,%ecx
  mov    %rbp,%rdx
  lea    D18(%rip),%rsi
  mov    %rbx,%rdi
  call   <build_full_file_path@plt>
  mov    %eax,%edi
  mov    $0x1,%esi
  call   <run_tests_with_file@plt>
  mov    $0x80,%ecx
  mov    %rbp,%rdx
  lea    D26(%rip),%rsi
  mov    %rbx,%rdi
  call   <build_full_file_path@plt>
  mov    %eax,%edi
  mov    $0x1,%esi
  call   <run_tests_with_file@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  ret
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D4
type: string
name: extract_symbolic_data
arguments: data_tag: D18
type: string
name: extract_symbolic_data
arguments: data_tag: D26
type: string

tool: D4: File Name,Propagation Type,Number of Nodes,Number of Edges,Diameter,Number of Iterations,BP Run Time(s)


tool: D18: hepar2.bif

tool: D26: win95pts.bif

assistant: ```c
void large_test_suite(const char *root_dir) {
  char file_name_buffer[128];
  printf("File Name,Propagation Type,Number of Nodes,Number of Edges,Diameter,Number of Iterations,BP Run Time(s)\n");
  run_tests_with_file(build_full_file_path(root_dir, "hepar2.bif", file_name_buffer, 128), 1);
  run_tests_with_file(build_full_file_path(root_dir, "win95pts.bif", file_name_buffer, 128), 1);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<large_test_suite>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  lea    D23(%rip),%rdi
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  call   <printf@plt>
  mov    $0x80,%ecx
  mov    %r12,%rdx
  mov    %rbp,%rdi
  lea    D7(%rip),%rsi
  call   <build_full_file_path@plt>
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <run_tests_with_file@plt>
  mov    %rbp,%rdi
  mov    $0x80,%ecx
  mov    %r12,%rdx
  lea    D26(%rip),%rsi
  call   <build_full_file_path@plt>
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <run_tests_with_file@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x98,%rsp
  pop    %rbp
  pop    %r12
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D23
type_infered: string
name: disassemble_data
arguments: data_label: D7
type_infered: string
name: disassemble_data
arguments: data_label: D26
type_infered: string

tool: D23: File Name,Propagation Type,Number of Nodes,Number of Edges,Diameter,Number of Iterations,BP Run Time(s)


tool: D7: hepar2.bif

tool: D26: win95pts.bif

assistant: ```c
void large_test_suite(const char *root_dir) {
  char file_name_buffer[128];
  printf("File Name,Propagation Type,Number of Nodes,Number of Edges,Diameter,Number of Iterations,BP Run Time(s)\n");
  run_tests_with_file(build_full_file_path(root_dir, "hepar2.bif", file_name_buffer, 128), 1);
  run_tests_with_file(build_full_file_path(root_dir, "win95pts.bif", file_name_buffer, 128), 1);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<large_test_suite>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  lea    D1(%rip),%rdi
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  call   <printf@plt>
  mov    $0x80,%ecx
  mov    %r12,%rdx
  mov    %rbp,%rdi
  lea    D14(%rip),%rsi
  call   <build_full_file_path@plt>
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <run_tests_with_file@plt>
  mov    %rbp,%rdi
  mov    $0x80,%ecx
  mov    %r12,%rdx
  lea    D3(%rip),%rsi
  call   <build_full_file_path@plt>
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <run_tests_with_file@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x98,%rsp
  pop    %rbp
  pop    %r12
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D1
data_type: string
name: disassemble_data
arguments: data_tag: D14
data_type: string
name: disassemble_data
arguments: data_tag: D3
data_type: string

tool: D1: File Name,Propagation Type,Number of Nodes,Number of Edges,Diameter,Number of Iterations,BP Run Time(s)


tool: D14: hepar2.bif

tool: D3: win95pts.bif

assistant: ```c
void large_test_suite(const char *root_dir) {
  char file_name_buffer[128];
  printf("File Name,Propagation Type,Number of Nodes,Number of Edges,Diameter,Number of Iterations,BP Run Time(s)\n");
  run_tests_with_file(build_full_file_path(root_dir, "hepar2.bif", file_name_buffer, 128), 1);
  run_tests_with_file(build_full_file_path(root_dir, "win95pts.bif", file_name_buffer, 128), 1);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<NoDepE_func>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    D15(%rip),%eax
  test   %eax,%eax
  je     L5
  movl   $0x0,D15(%rip)
  mov    $0x0,%eax
  call   <NoDepF_func@plt>
L5:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void NoDepE_func() {
  static int firstcall = 1;
  if (firstcall) {
    firstcall = 0;
    NoDepF_func();
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<NoDepE_func>:
  endbr64
  cmpl   $0x0,D4(%rip)
  jne    L3
  ret
L3:
  sub    $0x8,%rsp
  movl   $0x0,D4(%rip)
  mov    $0x0,%eax
  call   <NoDepF_func@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void NoDepE_func() {
  static int firstcall = 1;
  if (firstcall) {
    firstcall = 0;
    NoDepF_func();
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<NoDepE_func>:
  endbr64
  mov    D9(%rip),%eax
  test   %eax,%eax
  jne    L6
  ret
  nop
L6:
  movl   $0x0,D9(%rip)
  xor    %eax,%eax
  jmp    1050 <NoDepF_func@plt>
```

assistant: ```c
void NoDepE_func() {
  static int firstcall = 1;
  if (firstcall) {
    firstcall = 0;
    NoDepF_func();
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<NoDepE_func>:
  endbr64
  mov    D6(%rip),%eax
  test   %eax,%eax
  jne    L7
  ret
  nop
L7:
  movl   $0x0,D6(%rip)
  xor    %eax,%eax
  jmp    1050 <NoDepF_func@plt>
```

assistant: ```c
void NoDepE_func() {
  static int firstcall = 1;
  if (firstcall) {
    firstcall = 0;
    NoDepF_func();
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<dirmult>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <intsum@plt>
  mov    %eax,-0x2c(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jg     L36
  pxor   %xmm0,%xmm0
  jmp    L7
L36:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x30(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <asum@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L6
L21:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <lgamma@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <lgamma@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  addl   $0x1,-0x34(%rbp)
L6:
  mov    -0x34(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L21
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <lgamma@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x2c(%rbp),%xmm0
  addsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <lgamma@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x8(%rbp),%xmm0
L7:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double dirmult(double *pp, int *aa, int len) {
  int t, i, m;
  double y1, y2, ysum;
  double top, bot;
  m = len;
  t = intsum(aa, m);
  if (t < 1)
    return 0.0;
  top = bot = 0.0;
  ysum = asum(pp, m);
  for (i = 0; i < m; i++) {
    top += lgamma(pp[i] + (double)aa[i]);
    bot += lgamma(pp[i]);
  }
  top += lgamma(ysum);
  bot += lgamma(ysum + (double)t);
  y1 = top - bot;
  return y1 - y2;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<dirmult>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r14
  mov    %rsi,%rbp
  mov    %edx,%r12d
  mov    %edx,%esi
  mov    %rbp,%rdi
  call   <intsum@plt>
  test   %eax,%eax
  jle    L14
  mov    %eax,%r13d
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <asum@plt>
  movq   %xmm0,%r15
  test   %r12d,%r12d
  jle    L2
  mov    %r14,%rbx
  lea    -0x1(%r12),%eax
  lea    0x8(%r14,%rax,8),%r12
L19:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x0(%rbp),%xmm0
  addsd  (%rbx),%xmm0
  call   <lgamma@plt>
  movsd  (%rbx),%xmm0
  call   <lgamma@plt>
  add    $0x8,%rbx
  add    $0x4,%rbp
  cmp    %r12,%rbx
  jne    L19
L2:
  movq   %r15,%xmm0
  call   <lgamma@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  movq   %r15,%xmm1
  addsd  %xmm1,%xmm0
  call   <lgamma@plt>
L14:
  pxor   %xmm0,%xmm0
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
double dirmult(double *pp, int *aa, int len) {
  int t, i, m;
  double y1, y2, ysum;
  double top, bot;
  m = len;
  t = intsum(aa, m);
  if (t < 1)
    return 0.0;
  top = bot = 0.0;
  ysum = asum(pp, m);
  for (i = 0; i < m; i++) {
    top += lgamma(pp[i] + (double)aa[i]);
    bot += lgamma(pp[i]);
  }
  top += lgamma(ysum);
  bot += lgamma(ysum + (double)t);
  y1 = top - bot;
  return y1 - y2;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<dirmult>:
  endbr64
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  mov    %edx,%esi
  push   %rbx
  mov    %rdi,%rbx
  mov    %rbp,%rdi
  sub    $0x18,%rsp
  call   <intsum@plt>
  test   %eax,%eax
  jle    L23
  mov    %r13d,%esi
  mov    %rbx,%rdi
  mov    %eax,%r12d
  call   <asum@plt>
  movsd  %xmm0,0x8(%rsp)
  test   %r13d,%r13d
  jle    L21
  lea    -0x1(%r13),%eax
  lea    0x8(%rbx,%rax,8),%r13
  nopw   0x0(%rax,%rax,1)
L29:
  pxor   %xmm0,%xmm0
  add    $0x8,%rbx
  add    $0x4,%rbp
  cvtsi2sdl -0x4(%rbp),%xmm0
  addsd  -0x8(%rbx),%xmm0
  call   <lgamma@plt>
  movsd  -0x8(%rbx),%xmm0
  call   <lgamma@plt>
  cmp    %r13,%rbx
  jne    L29
L21:
  movsd  0x8(%rsp),%xmm0
  call   <lgamma@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  addsd  0x8(%rsp),%xmm0
  call   <lgamma@plt>
L23:
  add    $0x18,%rsp
  pxor   %xmm0,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
double dirmult(double *pp, int *aa, int len) {
  int t, i, m;
  double y1, y2, ysum;
  double top, bot;
  m = len;
  t = intsum(aa, m);
  if (t < 1)
    return 0.0;
  top = bot = 0.0;
  ysum = asum(pp, m);
  for (i = 0; i < m; i++) {
    top += lgamma(pp[i] + (double)aa[i]);
    bot += lgamma(pp[i]);
  }
  top += lgamma(ysum);
  bot += lgamma(ysum + (double)t);
  y1 = top - bot;
  return y1 - y2;
}
```
user: What is the c source code of the assembly code below:

```asm
<dirmult>:
  endbr64
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  mov    %edx,%esi
  push   %rbx
  mov    %rdi,%rbx
  mov    %rbp,%rdi
  sub    $0x18,%rsp
  call   <intsum@plt>
  test   %eax,%eax
  jle    L16
  mov    %r13d,%esi
  mov    %rbx,%rdi
  mov    %eax,%r12d
  call   <asum@plt>
  movsd  %xmm0,0x8(%rsp)
  test   %r13d,%r13d
  jle    L13
  lea    -0x1(%r13),%eax
  lea    0x8(%rbx,%rax,8),%r13
  nopw   0x0(%rax,%rax,1)
L15:
  pxor   %xmm0,%xmm0
  add    $0x8,%rbx
  add    $0x4,%rbp
  cvtsi2sdl -0x4(%rbp),%xmm0
  addsd  -0x8(%rbx),%xmm0
  call   <lgamma@plt>
  movsd  -0x8(%rbx),%xmm0
  call   <lgamma@plt>
  cmp    %rbx,%r13
  jne    L15
L13:
  movsd  0x8(%rsp),%xmm0
  call   <lgamma@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  addsd  0x8(%rsp),%xmm0
  call   <lgamma@plt>
L16:
  add    $0x18,%rsp
  pxor   %xmm0,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
double dirmult(double *pp, int *aa, int len) {
  int t, i, m;
  double y1, y2, ysum;
  double top, bot;
  m = len;
  t = intsum(aa, m);
  if (t < 1)
    return 0.0;
  top = bot = 0.0;
  ysum = asum(pp, m);
  for (i = 0; i < m; i++) {
    top += lgamma(pp[i] + (double)aa[i]);
    bot += lgamma(pp[i]);
  }
  top += lgamma(ysum);
  bot += lgamma(ysum + (double)t);
  y1 = top - bot;
  return y1 - y2;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  movb   $0x61,-0x15(%rbp)
  lea    D2(%rip),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  lea    D5(%rip),%rax
  mov    %rax,-0x8(%rbp)
  movsbl -0x15(%rbp),%eax
  mov    -0x8(%rbp),%rcx
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rsi
  mov    %eax,%edi
  call   <CunitTestFramework@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D2
type_infered: string
name: parse_data
arguments: data_tag: D5
type_infered: string

tool: 

tool: D5: ./Fosslogy_C_Test-Results.xml

assistant: ```c
int main(int argc, char *argv[]) {
  char RunMode = 'a';
  char *ProductList = "";
  int NeedCoverage = 0;
  char *ResultDestination = "./Fosslogy_C_Test-Results.xml";
  CunitTestFramework(RunMode, ProductList, NeedCoverage, ResultDestination);
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  lea    D0(%rip),%rcx
  mov    $0x0,%edx
  lea    D6(%rip),%rsi
  mov    $0x61,%edi
  call   <CunitTestFramework@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: retrieve_data
arguments: label: D0
type_guessed: string
name: retrieve_data
arguments: label: D6
type_guessed: string

tool: D0: ./Fosslogy_C_Test-Results.xml

tool: 

assistant: ```c
int main(int argc, char *argv[]) {
  char RunMode = 'a';
  char *ProductList = "";
  int NeedCoverage = 0;
  char *ResultDestination = "./Fosslogy_C_Test-Results.xml";
  CunitTestFramework(RunMode, ProductList, NeedCoverage, ResultDestination);
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  lea    D14(%rip),%rcx
  xor    %edx,%edx
  mov    $0x61,%edi
  lea    D6(%rip),%rsi
  call   <CunitTestFramework@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D14
type_guessed: string
name: disassemble_data
arguments: data_label: D6
type_guessed: string

tool: D14: ./Fosslogy_C_Test-Results.xml

tool: 

assistant: ```c
int main(int argc, char *argv[]) {
  char RunMode = 'a';
  char *ProductList = "";
  int NeedCoverage = 0;
  char *ResultDestination = "./Fosslogy_C_Test-Results.xml";
  CunitTestFramework(RunMode, ProductList, NeedCoverage, ResultDestination);
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  lea    D4(%rip),%rcx
  xor    %edx,%edx
  mov    $0x61,%edi
  lea    D5(%rip),%rsi
  call   <CunitTestFramework@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: retrieve_data
arguments: label: D4
type: string
name: retrieve_data
arguments: label: D5
type: string

tool: D4: ./Fosslogy_C_Test-Results.xml

tool: 

assistant: ```c
int main(int argc, char *argv[]) {
  char RunMode = 'a';
  char *ProductList = "";
  int NeedCoverage = 0;
  char *ResultDestination = "./Fosslogy_C_Test-Results.xml";
  CunitTestFramework(RunMode, ProductList, NeedCoverage, ResultDestination);
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<fts_padjust>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L4
L21:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  mov    0x8(%rax),%rax
  cmp    %rax,%rdx
  je     L61
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  mov    0x10(%rax),%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,(%rax)
L61:
  mov    -0x10(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,0x10(%rax)
  mov    -0x10(%rbp),%rax
  mov    0x28(%rax),%rax
  mov    %rax,-0x10(%rbp)
L4:
  cmpq   $0x0,-0x10(%rbp)
  jne    L21
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L65
L79:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  mov    0x8(%rax),%rax
  cmp    %rax,%rdx
  je     L70
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  mov    0x10(%rax),%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,(%rax)
L70:
  mov    -0x10(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,0x10(%rax)
  mov    -0x10(%rbp),%rax
  mov    0x28(%rax),%rax
  test   %rax,%rax
  je     L78
  mov    -0x10(%rbp),%rax
  mov    0x28(%rax),%rax
  jmp    L59
L78:
  mov    -0x10(%rbp),%rax
  mov    0x20(%rax),%rax
L59:
  mov    %rax,-0x10(%rbp)
L65:
  mov    -0x10(%rbp),%rax
  mov    0x18(%rax),%rdx
  mov    D0(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jge    L79
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void fts_padjust(FTS *sp, FTSENT *head) {
  FTSENT *p;
  char *addr = sp->fts_path;
  for (p = sp->fts_child; p; p = p->fts_link) {
    if ((p)->fts_accpath != (p)->fts_name) {
      (p)->fts_accpath = (char *)addr + ((p)->fts_accpath - (p)->fts_path);
    }
    (p)->fts_path = addr;
  };
  for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
    {
      if ((p)->fts_accpath != (p)->fts_name) {
        (p)->fts_accpath = (char *)addr + ((p)->fts_accpath - (p)->fts_path);
      }
      (p)->fts_path = addr;
    };
    p = p->fts_link ? p->fts_link : p->fts_parent;
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<fts_padjust>:
  endbr64
  mov    (%rdi),%rcx
  mov    0x8(%rdi),%rax
  test   %rax,%rax
  jne    L64
L9:
  mov    D13(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,0x18(%rsi)
  jl     L83
  mov    D13(%rip),%rdx
  jmp    L37
L44:
  sub    0x10(%rax),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
L49:
  mov    %rcx,0x10(%rax)
  mov    0x28(%rax),%rax
  test   %rax,%rax
  je     L9
L64:
  mov    (%rax),%rdx
  cmp    0x8(%rax),%rdx
  jne    L44
  jmp    L49
L88:
  mov    0x20(%rsi),%rsi
L74:
  mov    (%rdx),%rax
  cmp    %rax,0x18(%rsi)
  jl     L83
L37:
  mov    (%rsi),%rax
  cmp    0x8(%rsi),%rax
  je     L18
  sub    0x10(%rsi),%rax
  add    %rcx,%rax
  mov    %rax,(%rsi)
L18:
  mov    %rcx,0x10(%rsi)
  mov    0x28(%rsi),%rax
  test   %rax,%rax
  je     L88
  mov    %rax,%rsi
  jmp    L74
L83:
  ret
```

assistant: ```c
void fts_padjust(FTS *sp, FTSENT *head) {
  FTSENT *p;
  char *addr = sp->fts_path;
  for (p = sp->fts_child; p; p = p->fts_link) {
    if ((p)->fts_accpath != (p)->fts_name) {
      (p)->fts_accpath = (char *)addr + ((p)->fts_accpath - (p)->fts_path);
    }
    (p)->fts_path = addr;
  };
  for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
    {
      if ((p)->fts_accpath != (p)->fts_name) {
        (p)->fts_accpath = (char *)addr + ((p)->fts_accpath - (p)->fts_path);
      }
      (p)->fts_path = addr;
    };
    p = p->fts_link ? p->fts_link : p->fts_parent;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<fts_padjust>:
  endbr64
  mov    0x8(%rdi),%rax
  mov    (%rdi),%rcx
  test   %rax,%rax
  je     L39
L0:
  mov    (%rax),%rdx
  cmp    0x8(%rax),%rdx
  je     L29
  sub    0x10(%rax),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
L29:
  mov    %rcx,0x10(%rax)
  mov    0x28(%rax),%rax
  test   %rax,%rax
  jne    L0
L39:
  mov    D4(%rip),%rax
  mov    (%rax),%rdx
L50:
  cmp    %rdx,0x18(%rsi)
  jl     L75
L47:
  mov    (%rsi),%rax
  cmp    0x8(%rsi),%rax
  je     L15
  sub    0x10(%rsi),%rax
  add    %rcx,%rax
  mov    %rax,(%rsi)
L15:
  mov    0x28(%rsi),%rax
  mov    %rcx,0x10(%rsi)
  test   %rax,%rax
  je     L66
  mov    %rax,%rsi
  cmp    %rdx,0x18(%rsi)
  jge    L47
L75:
  ret
  nopw   0x0(%rax,%rax,1)
L66:
  mov    0x20(%rsi),%rsi
  jmp    L50
```

assistant: ```c
void fts_padjust(FTS *sp, FTSENT *head) {
  FTSENT *p;
  char *addr = sp->fts_path;
  for (p = sp->fts_child; p; p = p->fts_link) {
    if ((p)->fts_accpath != (p)->fts_name) {
      (p)->fts_accpath = (char *)addr + ((p)->fts_accpath - (p)->fts_path);
    }
    (p)->fts_path = addr;
  };
  for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
    {
      if ((p)->fts_accpath != (p)->fts_name) {
        (p)->fts_accpath = (char *)addr + ((p)->fts_accpath - (p)->fts_path);
      }
      (p)->fts_path = addr;
    };
    p = p->fts_link ? p->fts_link : p->fts_parent;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<fts_padjust>:
  endbr64
  mov    0x8(%rdi),%rax
  mov    (%rdi),%rcx
  test   %rax,%rax
  je     L25
L44:
  mov    (%rax),%rdx
  cmp    0x8(%rax),%rdx
  je     L21
  sub    0x10(%rax),%rdx
  mov    %rcx,0x10(%rax)
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    0x28(%rax),%rax
  test   %rax,%rax
  jne    L44
L25:
  mov    D4(%rip),%rax
  mov    (%rax),%rdx
  cmp    %rdx,0x18(%rsi)
  jge    L55
  jmp    L52
  nopw   0x0(%rax,%rax,1)
L15:
  cmp    0x18(%rax),%rdx
  jg     L52
L106:
  mov    %rax,%rsi
L55:
  mov    (%rsi),%rax
  cmp    %rax,0x8(%rsi)
  je     L97
  sub    0x10(%rsi),%rax
  add    %rcx,%rax
  mov    %rax,(%rsi)
L97:
  mov    0x28(%rsi),%rax
  mov    %rcx,0x10(%rsi)
  test   %rax,%rax
  jne    L15
  mov    0x20(%rsi),%rax
  cmp    0x18(%rax),%rdx
  jle    L106
  ret
  nopl   0x0(%rax)
L21:
  mov    %rcx,0x10(%rax)
  mov    0x28(%rax),%rax
  test   %rax,%rax
  jne    L44
  mov    D4(%rip),%rax
  mov    (%rax),%rdx
  cmp    %rdx,0x18(%rsi)
  jge    L55
L52:
  ret
```

assistant: ```c
void fts_padjust(FTS *sp, FTSENT *head) {
  FTSENT *p;
  char *addr = sp->fts_path;
  for (p = sp->fts_child; p; p = p->fts_link) {
    if ((p)->fts_accpath != (p)->fts_name) {
      (p)->fts_accpath = (char *)addr + ((p)->fts_accpath - (p)->fts_path);
    }
    (p)->fts_path = addr;
  };
  for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
    {
      if ((p)->fts_accpath != (p)->fts_name) {
        (p)->fts_accpath = (char *)addr + ((p)->fts_accpath - (p)->fts_path);
      }
      (p)->fts_path = addr;
    };
    p = p->fts_link ? p->fts_link : p->fts_parent;
  }
}
```