ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ex_int_iisort64>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  movq   $0x0,-0x18(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  movq   $0x1,-0x28(%rbp)
  jmp    L52
L4:
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,-0x10(%rbp)
  jbe    L58
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L58:
  addq   $0x1,-0x28(%rbp)
L52:
  mov    -0x28(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jb     L4
  mov    -0x18(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <ex_swap64@plt>
  movq   $0x1,-0x28(%rbp)
  jmp    L47
L1:
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L57
L22:
  mov    -0x20(%rbp),%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x40(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  subq   $0x1,-0x20(%rbp)
L57:
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jb     L22
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  addq   $0x1,-0x28(%rbp)
L47:
  mov    -0x28(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jb     L1
  nop
  nop
  leave
  ret
```

assistant: ```c
void ex_int_iisort64(int64_t v[], int64_t iv[], int64_t N) {
  int64_t i, j;
  int64_t ndx = 0;
  int64_t small;
  int64_t tmp;
  small = v[iv[0]];
  for (i = 1; i < N; i++) {
    if (v[iv[i]] < small) {
      small = v[iv[i]];
      ndx = i;
    }
  }
  ex_swap64(iv, 0, ndx);
  for (i = 1; i < N; i++) {
    tmp = iv[i];
    for (j = i; v[tmp] < v[iv[j - 1]]; j--) {
      iv[j] = iv[j - 1];
    }
    iv[j] = tmp;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<ex_int_iisort64>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    (%rsi),%rax
  mov    (%rdi,%rax,8),%rcx
  cmp    $0x1,%rdx
  jbe    L49
  mov    %rdi,%rbp
  mov    $0x0,%esi
  mov    $0x1,%r12d
  jmp    L73
L47:
  lea    0x1(%r12),%rax
  cmp    %rax,%rdx
  je     L21
  mov    %rax,%r12
L73:
  mov    (%rbx,%r12,8),%rax
  mov    0x0(%rbp,%rax,8),%rax
  cmp    %rcx,%rax
  jae    L47
  mov    %rax,%rcx
  mov    %r12,%rsi
  jmp    L47
L108:
  mov    %rax,%r8
L35:
  mov    (%rbx,%rsi,1),%rdi
  lea    0x0(%rbp,%rdi,8),%rcx
  mov    -0x8(%rbx,%rsi,1),%rdx
  mov    0x0(%rbp,%rdx,8),%rax
  cmp    %rax,(%rcx)
  jae    L101
  mov    %rsi,%rax
L102:
  mov    %rdx,(%rbx,%rax,1)
  sub    $0x8,%rax
  mov    -0x8(%rbx,%rax,1),%rdx
  mov    0x0(%rbp,%rdx,8),%r9
  cmp    %r9,(%rcx)
  jb     L102
L93:
  mov    %rdi,(%rbx,%rax,1)
  lea    0x1(%r8),%rax
  add    $0x8,%rsi
  cmp    %r8,%r12
  jne    L108
L72:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L101:
  mov    %rsi,%rax
  jmp    L93
L21:
  mov    %rsi,%rdx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <ex_swap64@plt>
  mov    $0x8,%esi
  mov    $0x1,%r8d
  jmp    L35
L49:
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <ex_swap64@plt>
  jmp    L72
```

assistant: ```c
void ex_int_iisort64(int64_t v[], int64_t iv[], int64_t N) {
  int64_t i, j;
  int64_t ndx = 0;
  int64_t small;
  int64_t tmp;
  small = v[iv[0]];
  for (i = 1; i < N; i++) {
    if (v[iv[i]] < small) {
      small = v[iv[i]];
      ndx = i;
    }
  }
  ex_swap64(iv, 0, ndx);
  for (i = 1; i < N; i++) {
    tmp = iv[i];
    for (j = i; v[tmp] < v[iv[j - 1]]; j--) {
      iv[j] = iv[j - 1];
    }
    iv[j] = tmp;
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ex_int_iisort64>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    (%rsi),%rax
  mov    (%rdi,%rax,8),%rcx
  cmp    $0x1,%rdx
  jbe    L13
  mov    %rdi,%rbx
  xor    %r8d,%r8d
  mov    $0x1,%r12d
  jmp    L7
  nopw   0x0(%rax,%rax,1)
L11:
  mov    %rax,%r12
L7:
  mov    0x0(%rbp,%r12,8),%rax
  mov    (%rbx,%rax,8),%rax
  cmp    %rcx,%rax
  jae    L33
  mov    %rax,%rcx
  mov    %r12,%r8
L33:
  lea    0x1(%r12),%rax
  cmp    %rax,%rdx
  jne    L11
  mov    %r8,%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <ex_swap64@plt>
  mov    $0x8,%esi
  mov    $0x1,%r8d
  nopl   0x0(%rax)
L56:
  mov    0x0(%rbp,%rsi,1),%rdi
  mov    -0x8(%rbp,%rsi,1),%rdx
  lea    0x0(%rbp,%rsi,1),%rax
  lea    (%rbx,%rdi,8),%rcx
  mov    (%rbx,%rdx,8),%r10
  cmp    %r10,(%rcx)
  jae    L1
  mov    %rsi,%rax
  nop
L25:
  mov    %rdx,0x0(%rbp,%rax,1)
  sub    $0x8,%rax
  mov    -0x8(%rbp,%rax,1),%rdx
  mov    (%rbx,%rdx,8),%r9
  cmp    %r9,(%rcx)
  jb     L25
  add    %rbp,%rax
L1:
  mov    %rdi,(%rax)
  add    $0x8,%rsi
  lea    0x1(%r8),%rax
  cmp    %r8,%r12
  je     L28
  mov    %rax,%r8
  jmp    L56
  nop
L28:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L13:
  pop    %rbx
  mov    %rbp,%rdi
  xor    %edx,%edx
  pop    %rbp
  xor    %esi,%esi
  pop    %r12
  jmp    1050 <ex_swap64@plt>
```

assistant: ```c
void ex_int_iisort64(int64_t v[], int64_t iv[], int64_t N) {
  int64_t i, j;
  int64_t ndx = 0;
  int64_t small;
  int64_t tmp;
  small = v[iv[0]];
  for (i = 1; i < N; i++) {
    if (v[iv[i]] < small) {
      small = v[iv[i]];
      ndx = i;
    }
  }
  ex_swap64(iv, 0, ndx);
  for (i = 1; i < N; i++) {
    tmp = iv[i];
    for (j = i; v[tmp] < v[iv[j - 1]]; j--) {
      iv[j] = iv[j - 1];
    }
    iv[j] = tmp;
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<ex_int_iisort64>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    (%rsi),%rax
  mov    (%rdi,%rax,8),%rcx
  cmp    $0x1,%rdx
  jbe    L11
  mov    %rdi,%rbx
  xor    %r8d,%r8d
  mov    $0x1,%r12d
  jmp    L57
  nopw   0x0(%rax,%rax,1)
L39:
  mov    %rax,%r12
L57:
  mov    0x0(%rbp,%r12,8),%rax
  mov    (%rbx,%rax,8),%rax
  cmp    %rcx,%rax
  jae    L49
  mov    %rax,%rcx
  mov    %r12,%r8
L49:
  lea    0x1(%r12),%rax
  cmp    %rax,%rdx
  jne    L39
  mov    %r8,%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <ex_swap64@plt>
  mov    $0x8,%esi
  mov    $0x1,%r8d
  nopl   0x0(%rax)
L36:
  mov    0x0(%rbp,%rsi,1),%rdi
  mov    -0x8(%rbp,%rsi,1),%rdx
  lea    0x0(%rbp,%rsi,1),%rax
  lea    (%rbx,%rdi,8),%rcx
  mov    (%rbx,%rdx,8),%r10
  cmp    %r10,(%rcx)
  jae    L59
  mov    %rsi,%rax
  nop
L71:
  mov    %rdx,0x0(%rbp,%rax,1)
  sub    $0x8,%rax
  mov    -0x8(%rbp,%rax,1),%rdx
  mov    (%rbx,%rdx,8),%r9
  cmp    %r9,(%rcx)
  jb     L71
  add    %rbp,%rax
L59:
  mov    %rdi,(%rax)
  add    $0x8,%rsi
  lea    0x1(%r8),%rax
  cmp    %r12,%r8
  je     L26
  mov    %rax,%r8
  jmp    L36
  nop
L26:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L11:
  pop    %rbx
  mov    %rbp,%rdi
  xor    %edx,%edx
  pop    %rbp
  xor    %esi,%esi
  pop    %r12
  jmp    1050 <ex_swap64@plt>
```

assistant: ```c
void ex_int_iisort64(int64_t v[], int64_t iv[], int64_t N) {
  int64_t i, j;
  int64_t ndx = 0;
  int64_t small;
  int64_t tmp;
  small = v[iv[0]];
  for (i = 1; i < N; i++) {
    if (v[iv[i]] < small) {
      small = v[iv[i]];
      ndx = i;
    }
  }
  ex_swap64(iv, 0, ndx);
  for (i = 1; i < N; i++) {
    tmp = iv[i];
    for (j = i; v[tmp] < v[iv[j - 1]]; j--) {
      iv[j] = iv[j - 1];
    }
    iv[j] = tmp;
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<normalize_hex_string_01c>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movabs $0x3635303033427830,%rax
  movabs $0x3639413946384632,%rdx
  mov    %rax,-0x50(%rbp)
  mov    %rdx,-0x48(%rbp)
  movabs $0x4544423835314531,%rax
  movabs $0x4132444343344432,%rdx
  mov    %rax,-0x40(%rbp)
  mov    %rdx,-0x38(%rbp)
  movabs $0x3239443142423436,%rax
  movabs $0x3739333938303233,%rdx
  mov    %rax,-0x30(%rbp)
  mov    %rdx,-0x28(%rbp)
  movabs $0x4646423537363431,%rax
  movabs $0x3246414242373142,%rdx
  mov    %rax,-0x20(%rbp)
  mov    %rdx,-0x18(%rbp)
  movw   $0x41,-0x10(%rbp)
  movabs $0x3236353030334230,%rax
  movabs $0x3136394139463846,%rdx
  mov    %rax,-0xa0(%rbp)
  mov    %rdx,-0x98(%rbp)
  movabs $0x3245444238353145,%rax
  movabs $0x3641324443433444,%rdx
  mov    %rax,-0x90(%rbp)
  mov    %rdx,-0x88(%rbp)
  movabs $0x3332394431424234,%rax
  movabs $0x3137393339383032,%rdx
  mov    %rax,-0x80(%rbp)
  mov    %rdx,-0x78(%rbp)
  movabs $0x4246464235373634,%rax
  movabs $0x4132464142423731,%rdx
  mov    %rax,-0x70(%rbp)
  mov    %rdx,-0x68(%rbp)
  movb   $0x0,-0x60(%rbp)
  lea    -0x50(%rbp),%rdi
  call   <normalized_hex_string_length@plt>
  add    $0x1,%eax
  cltq
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L26:
  cmp    %rdx,%rsp
  je     L32
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L26
L32:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L0
  orq    $0x0,-0x8(%rsp,%rax,1)
L0:
  lea    -0x50(%rbp),%rsi
  mov    %rsp,%rdi
  call   <normalize_hex_string@plt>
  lea    -0xa0(%rbp),%rsi
  mov    %rsp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  lea    D5(%rip),%rax
  mov    $0x0,%edx
  cmove  %rdx,%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L28
  leave
  ret
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D5
type_infered: string

tool: D5: normalize strings with leading '0x's and an odd number of characters

assistant: ```c
char *normalize_hex_string_01c() {
  char hex[] = "0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A";
  char expected[] = "0B300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A";
  char buffer[normalized_hex_string_length(hex) + 1];
  normalize_hex_string(buffer, hex);
  do {
    if (!(strcmp(buffer, expected) == 0))
      return "normalize strings with leading '0x's and an odd number of characters";
  } while (0);
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<radix_tree_tag_set>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x18(%rbp),%rdx
  lea    -0x20(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <radix_tree_load_root@plt>
  mov    -0x18(%rbp),%rax
  cmp    %rax,-0x40(%rbp)
  seta   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <BUG_ON@plt>
  jmp    L39
L26:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <entry_to_node@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x40(%rbp),%rdx
  lea    -0x20(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <radix_tree_descend@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x20(%rbp),%rax
  test   %rax,%rax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <BUG_ON@plt>
  mov    -0x24(%rbp),%edx
  mov    -0x44(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <tag_get@plt>
  test   %eax,%eax
  jne    L39
  mov    -0x24(%rbp),%edx
  mov    -0x44(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <tag_set@plt>
L39:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <radix_tree_is_internal_node@plt>
  test   %rax,%rax
  jne    L26
  mov    -0x44(%rbp),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <root_tag_get@plt>
  test   %eax,%eax
  jne    L4
  mov    -0x44(%rbp),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <root_tag_set@plt>
L4:
  mov    -0x20(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L28
  call   <__stack_chk_fail@plt>
L28:
  leave
  ret
```

assistant: ```c
void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag) {
  struct radix_tree_node *node, *parent;
  unsigned long maxindex;
  radix_tree_load_root(root, &node, &maxindex);
  BUG_ON(index > maxindex);
  while (radix_tree_is_internal_node(node)) {
    unsigned offset;
    parent = entry_to_node(node);
    offset = radix_tree_descend(parent, &node, index);
    BUG_ON(!node);
    if (!tag_get(parent, tag, offset))
      tag_set(parent, tag, offset);
  }
  if (!root_tag_get(root, tag))
    root_tag_set(root, tag);
  return node;
}
```
user: What is the c source code of the assembly code below:

```asm
<radix_tree_tag_set>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r15
  mov    %rsi,%r13
  mov    %edx,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  call   <radix_tree_load_root@plt>
  cmp    %r13,0x10(%rsp)
  setb   %dil
  movzbl %dil,%edi
  call   <BUG_ON@plt>
  lea    0x8(%rsp),%r14
L11:
  mov    0x8(%rsp),%rdi
  call   <radix_tree_is_internal_node@plt>
  test   %rax,%rax
  je     L21
  mov    0x8(%rsp),%rdi
  call   <entry_to_node@plt>
  mov    %rax,%rbx
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %rax,%rdi
  call   <radix_tree_descend@plt>
  mov    %eax,%ebp
  cmpq   $0x0,0x8(%rsp)
  sete   %dil
  movzbl %dil,%edi
  call   <BUG_ON@plt>
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %rbx,%rdi
  call   <tag_get@plt>
  test   %eax,%eax
  jne    L11
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %rbx,%rdi
  call   <tag_set@plt>
  jmp    L11
L21:
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <root_tag_get@plt>
  test   %eax,%eax
  je     L22
L36:
  mov    0x8(%rsp),%rax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L32
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <root_tag_set@plt>
  jmp    L36
L32:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag) {
  struct radix_tree_node *node, *parent;
  unsigned long maxindex;
  radix_tree_load_root(root, &node, &maxindex);
  BUG_ON(index > maxindex);
  while (radix_tree_is_internal_node(node)) {
    unsigned offset;
    parent = entry_to_node(node);
    offset = radix_tree_descend(parent, &node, index);
    BUG_ON(!node);
    if (!tag_get(parent, tag, offset))
      tag_set(parent, tag, offset);
  }
  if (!root_tag_get(root, tag))
    root_tag_set(root, tag);
  return node;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<radix_tree_tag_set>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%r13
  lea    0x10(%rsp),%rdx
  mov    %r13,%rsi
  call   <radix_tree_load_root@plt>
  xor    %edi,%edi
  cmp    %rbx,0x10(%rsp)
  setb   %dil
  call   <BUG_ON@plt>
  jmp    L69
  nop
L67:
  mov    0x8(%rsp),%rdi
  call   <entry_to_node@plt>
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <radix_tree_descend@plt>
  xor    %edi,%edi
  cmpq   $0x0,0x8(%rsp)
  sete   %dil
  mov    %eax,%r15d
  call   <BUG_ON@plt>
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <tag_get@plt>
  test   %eax,%eax
  je     L44
L69:
  mov    0x8(%rsp),%rdi
  call   <radix_tree_is_internal_node@plt>
  test   %rax,%rax
  jne    L67
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <root_tag_get@plt>
  test   %eax,%eax
  je     L59
L33:
  mov    0x8(%rsp),%rax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L62
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L44:
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <tag_set@plt>
  jmp    L69
  nopl   0x0(%rax,%rax,1)
L59:
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <root_tag_set@plt>
  jmp    L33
L62:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag) {
  struct radix_tree_node *node, *parent;
  unsigned long maxindex;
  radix_tree_load_root(root, &node, &maxindex);
  BUG_ON(index > maxindex);
  while (radix_tree_is_internal_node(node)) {
    unsigned offset;
    parent = entry_to_node(node);
    offset = radix_tree_descend(parent, &node, index);
    BUG_ON(!node);
    if (!tag_get(parent, tag, offset))
      tag_set(parent, tag, offset);
  }
  if (!root_tag_get(root, tag))
    root_tag_set(root, tag);
  return node;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<radix_tree_tag_set>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%r13
  lea    0x10(%rsp),%rdx
  mov    %r13,%rsi
  call   <radix_tree_load_root@plt>
  xor    %edi,%edi
  cmp    %rbx,0x10(%rsp)
  setb   %dil
  call   <BUG_ON@plt>
  jmp    L32
  nop
L11:
  mov    0x8(%rsp),%rdi
  call   <entry_to_node@plt>
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <radix_tree_descend@plt>
  xor    %edi,%edi
  cmpq   $0x0,0x8(%rsp)
  sete   %dil
  mov    %eax,%r15d
  call   <BUG_ON@plt>
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <tag_get@plt>
  test   %eax,%eax
  je     L10
L32:
  mov    0x8(%rsp),%rdi
  call   <radix_tree_is_internal_node@plt>
  test   %rax,%rax
  jne    L11
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <root_tag_get@plt>
  test   %eax,%eax
  je     L2
L60:
  mov    0x8(%rsp),%rax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L20
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L10:
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <tag_set@plt>
  jmp    L32
  nopl   0x0(%rax,%rax,1)
L2:
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <root_tag_set@plt>
  jmp    L60
L20:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag) {
  struct radix_tree_node *node, *parent;
  unsigned long maxindex;
  radix_tree_load_root(root, &node, &maxindex);
  BUG_ON(index > maxindex);
  while (radix_tree_is_internal_node(node)) {
    unsigned offset;
    parent = entry_to_node(node);
    offset = radix_tree_descend(parent, &node, index);
    BUG_ON(!node);
    if (!tag_get(parent, tag, offset))
      tag_set(parent, tag, offset);
  }
  if (!root_tag_get(root, tag))
    root_tag_set(root, tag);
  return node;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<lin_reg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x20(%rbp)
  mov    -0x20(%rbp),%ecx
  mov    -0x28(%rbp),%rdx
  mov    -0x1c(%rbp),%esi
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <square_sum_dev@plt>
  movd   %xmm0,%ebx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rdx
  mov    -0x1c(%rbp),%esi
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <square_sum_dev@plt>
  movaps %xmm0,%xmm1
  movd   %ebx,%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,D27(%rip)
  mov    -0x20(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mean@plt>
  movd   %xmm0,%ebx
  movss  D27(%rip),%xmm2
  movss  %xmm2,-0x2c(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mean@plt>
  movss  -0x2c(%rbp),%xmm1
  mulss  %xmm0,%xmm1
  movd   %ebx,%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,D11(%rip)
  lea    D27(%rip),%rax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
float *lin_reg(int x_vals[], int x_vals_size, int y_vals[], int y_vals_size) {
  static float coeffs[2];
  coeffs[0] = square_sum_dev(x_vals, x_vals_size, y_vals, y_vals_size) / square_sum_dev(x_vals, x_vals_size, x_vals, x_vals_size);
  coeffs[1] = mean(y_vals, y_vals_size) - coeffs[0] * mean(x_vals, x_vals_size);
  return coeffs;
}
```
user: What is the c source code of the assembly code below:

```asm
<lin_reg>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %esi,%ebp
  mov    %rdx,%r12
  mov    %ecx,%r13d
  call   <square_sum_dev@plt>
  movss  %xmm0,0xc(%rsp)
  mov    %ebp,%ecx
  mov    %rbx,%rdx
  mov    %ebp,%esi
  mov    %rbx,%rdi
  call   <square_sum_dev@plt>
  movaps %xmm0,%xmm1
  movss  0xc(%rsp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,D16(%rip)
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <mean@plt>
  movss  %xmm0,0xc(%rsp)
  mov    D16(%rip),%r12d
  mov    %ebp,%esi
  mov    %rbx,%rdi
  call   <mean@plt>
  movd   %r12d,%xmm1
  mulss  %xmm0,%xmm1
  movss  0xc(%rsp),%xmm0
  subss  %xmm1,%xmm0
  movss  %xmm0,D7(%rip)
  lea    D16(%rip),%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
float *lin_reg(int x_vals[], int x_vals_size, int y_vals[], int y_vals_size) {
  static float coeffs[2];
  coeffs[0] = square_sum_dev(x_vals, x_vals_size, y_vals, y_vals_size) / square_sum_dev(x_vals, x_vals_size, x_vals, x_vals_size);
  coeffs[1] = mean(y_vals, y_vals_size) - coeffs[0] * mean(x_vals, x_vals_size);
  return coeffs;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<lin_reg>:
  endbr64
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x18,%rsp
  call   <square_sum_dev@plt>
  mov    %r12d,%ecx
  mov    %rbp,%rdx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movss  %xmm0,0x8(%rsp)
  call   <square_sum_dev@plt>
  movss  0x8(%rsp),%xmm1
  mov    %r14d,%esi
  mov    %r13,%rdi
  divss  %xmm0,%xmm1
  movss  %xmm1,D0(%rip)
  call   <mean@plt>
  movss  D0(%rip),%xmm2
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movss  %xmm0,0xc(%rsp)
  movss  %xmm2,0x8(%rsp)
  call   <mean@plt>
  mulss  0x8(%rsp),%xmm0
  movss  0xc(%rsp),%xmm1
  lea    D0(%rip),%rax
  subss  %xmm0,%xmm1
  movss  %xmm1,D13(%rip)
  add    $0x18,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
float *lin_reg(int x_vals[], int x_vals_size, int y_vals[], int y_vals_size) {
  static float coeffs[2];
  coeffs[0] = square_sum_dev(x_vals, x_vals_size, y_vals, y_vals_size) / square_sum_dev(x_vals, x_vals_size, x_vals, x_vals_size);
  coeffs[1] = mean(y_vals, y_vals_size) - coeffs[0] * mean(x_vals, x_vals_size);
  return coeffs;
}
```