ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Converte this assembly snippet into its equivalent C code:

```asm
<isArmstrong>:
  endbr64
  test   %edi,%edi
  je     L11
  mov    %edi,%edx
  mov    $0x0,%r8d
L10:
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%esi
  lea    (%rax,%rax,4),%ecx
  add    %ecx,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  imul   %eax,%edx
  imul   %edx,%eax
  add    %eax,%r8d
  mov    %esi,%edx
  test   %esi,%esi
  jne    L10
L5:
  cmp    %r8d,%edi
  sete   %al
  movzbl %al,%eax
  ret
L11:
  mov    %edi,%r8d
  jmp    L5
```

assistant: ```c
int isArmstrong(int num) {
  int temp = num, sum = 0, digit;
  while (temp != 0) {
    digit = temp % 10;
    sum = sum + (digit * digit * digit);
    temp = temp / 10;
  }
  if (num == sum)
    return 1;
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<isArmstrong>:
  endbr64
  test   %edi,%edi
  je     L18
  mov    %edi,%edx
  xor    %r8d,%r8d
  nopl   (%rax)
L9:
  movslq %edx,%rax
  mov    %edx,%ecx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x22,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%esi
  mov    %eax,%ecx
  mov    %edx,%eax
  add    %esi,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  imul   %eax,%edx
  imul   %edx,%eax
  mov    %ecx,%edx
  add    %eax,%r8d
  test   %ecx,%ecx
  jne    L9
  xor    %eax,%eax
  cmp    %r8d,%edi
  sete   %al
  ret
  nopw   0x0(%rax,%rax,1)
L18:
  xor    %r8d,%r8d
  xor    %eax,%eax
  cmp    %r8d,%edi
  sete   %al
  ret
```

assistant: ```c
int isArmstrong(int num) {
  int temp = num, sum = 0, digit;
  while (temp != 0) {
    digit = temp % 10;
    sum = sum + (digit * digit * digit);
    temp = temp / 10;
  }
  if (num == sum)
    return 1;
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<isArmstrong>:
  endbr64
  test   %edi,%edi
  je     L10
  mov    %edi,%edx
  xor    %r8d,%r8d
  nopl   (%rax)
L7:
  movslq %edx,%rax
  mov    %edx,%ecx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x22,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%esi
  mov    %eax,%ecx
  mov    %edx,%eax
  add    %esi,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  imul   %eax,%edx
  imul   %edx,%eax
  mov    %ecx,%edx
  add    %eax,%r8d
  test   %ecx,%ecx
  jne    L7
  xor    %eax,%eax
  cmp    %r8d,%edi
  sete   %al
  ret
  nopw   0x0(%rax,%rax,1)
L10:
  xor    %r8d,%r8d
  xor    %eax,%eax
  cmp    %r8d,%edi
  sete   %al
  ret
```

assistant: ```c
int isArmstrong(int num) {
  int temp = num, sum = 0, digit;
  while (temp != 0) {
    digit = temp % 10;
    sum = sum + (digit * digit * digit);
    temp = temp / 10;
  }
  if (num == sum)
    return 1;
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<get_dns_list>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <gethostbyname@plt>
  mov    %rax,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  je     L2
  movl   $0x0,-0x30(%rbp)
  jmp    L30
L37:
  addl   $0x1,-0x30(%rbp)
L30:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L37
  mov    -0x48(%rbp),%rax
  mov    -0x30(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L55
L22:
  mov    D3(%rip),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    0xc(%rax),%ecx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rsi
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rsi,%rax
  mov    (%rax),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <gethostbyaddr@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L49
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%edx
  mov    -0x2c(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x2c(%rbp)
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  lea    (%rcx,%rax,1),%rbx
  mov    %edx,%edi
  call   <strdup@plt>
  mov    %rax,(%rbx)
  jmp    L43
L49:
  nop
L43:
  addl   $0x1,-0x30(%rbp)
L55:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L22
  mov    -0x48(%rbp),%rax
  mov    -0x2c(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L5
L2:
  nop
L5:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void get_dns_list(char *str, char ***list, int *size) {
  struct hostent *he, *he2;
  char **final_list;
  int i, j;
  *size = 0;
  if (!(he = gethostbyname(str)))
    return;
  for (i = 0; he->h_addr_list[i] != 0; i++)
    ;
  *size = i;
  final_list = malloc(sizeof(char *) * (*size));
  for (i = 0, j = 0; he->h_addr_list[i] != 0; i++) {
    if (!(he2 = gethostbyaddr(he->h_addr_list[i], he->h_length, AF_INET)))
      continue;
    final_list[j++] = strdup(he2->h_name);
  }
  *size = j;
  *list = final_list;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<get_dns_list>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %rdx,(%rsp)
  movl   $0x0,(%rdx)
  call   <gethostbyname@plt>
  test   %rax,%rax
  je     L26
  mov    %rax,%r12
  mov    (%rax),%rdx
  cmpq   $0x0,(%rdx)
  je     L31
  mov    $0x1,%eax
L52:
  mov    %eax,%ecx
  mov    %rax,%rdi
  add    $0x1,%rax
  cmpq   $0x0,-0x8(%rdx,%rax,8)
  jne    L52
L44:
  mov    (%rsp),%rax
  mov    %ecx,(%rax)
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    %rax,%r14
  mov    (%r12),%rax
  mov    (%rax),%rdi
  test   %rdi,%rdi
  je     L54
  mov    $0x8,%ebp
  mov    $0x0,%ebx
  mov    D0(%rip),%r15
  jmp    L23
L31:
  mov    $0x0,%ecx
  mov    $0x0,%edi
  jmp    L44
L57:
  mov    (%r12),%rax
  mov    (%rax,%rbp,1),%rdi
  add    $0x8,%rbp
  test   %rdi,%rdi
  je     L48
L23:
  mov    0xc(%r12),%esi
  mov    (%r15),%edx
  call   <gethostbyaddr@plt>
  test   %rax,%rax
  je     L57
  lea    0x1(%rbx),%r13d
  movslq %ebx,%rbx
  lea    (%r14,%rbx,8),%rbx
  mov    0x8(%rax),%edi
  call   <strdup@plt>
  mov    %rax,(%rbx)
  mov    %r13d,%ebx
  jmp    L57
L54:
  mov    $0x0,%ebx
L48:
  mov    (%rsp),%rax
  mov    %ebx,(%rax)
  mov    0x8(%rsp),%rax
  mov    %r14,(%rax)
L26:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void get_dns_list(char *str, char ***list, int *size) {
  struct hostent *he, *he2;
  char **final_list;
  int i, j;
  *size = 0;
  if (!(he = gethostbyname(str)))
    return;
  for (i = 0; he->h_addr_list[i] != 0; i++)
    ;
  *size = i;
  final_list = malloc(sizeof(char *) * (*size));
  for (i = 0, j = 0; he->h_addr_list[i] != 0; i++) {
    if (!(he2 = gethostbyaddr(he->h_addr_list[i], he->h_length, AF_INET)))
      continue;
    final_list[j++] = strdup(he2->h_name);
  }
  *size = j;
  *list = final_list;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<get_dns_list>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  movl   $0x0,(%rdx)
  mov    %rsi,0x8(%rsp)
  mov    %rdx,(%rsp)
  call   <gethostbyname@plt>
  test   %rax,%rax
  je     L51
  mov    (%rax),%rdx
  mov    %rax,%r14
  cmpq   $0x0,(%rdx)
  je     L27
  mov    $0x1,%eax
  nopl   0x0(%rax)
L6:
  mov    %eax,%ecx
  add    $0x1,%rax
  cmpq   $0x0,-0x8(%rdx,%rax,8)
  jne    L6
  lea    0x0(,%rcx,8),%edi
L55:
  mov    (%rsp),%rax
  mov    %ecx,(%rax)
  call   <malloc@plt>
  mov    %rax,%r12
  mov    (%r14),%rax
  mov    (%rax),%rdi
  test   %rdi,%rdi
  je     L29
  mov    D5(%rip),%r13
  mov    $0x8,%ebx
  xor    %r15d,%r15d
  nopl   0x0(%rax)
L57:
  mov    0xc(%r14),%esi
  mov    0x0(%r13),%edx
  call   <gethostbyaddr@plt>
  test   %rax,%rax
  je     L28
  mov    0x8(%rax),%edi
  movslq %r15d,%rcx
  lea    0x1(%r15),%ebp
  lea    (%r12,%rcx,8),%r15
  call   <strdup@plt>
  mov    %rax,(%r15)
  mov    %ebp,%r15d
L28:
  mov    (%r14),%rax
  mov    (%rax,%rbx,1),%rdi
  add    $0x8,%rbx
  test   %rdi,%rdi
  jne    L57
L31:
  mov    (%rsp),%rax
  mov    %r15d,(%rax)
  mov    0x8(%rsp),%rax
  mov    %r12,(%rax)
L51:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L27:
  xor    %edi,%edi
  xor    %ecx,%ecx
  jmp    L55
  nopl   0x0(%rax)
L29:
  xor    %r15d,%r15d
  jmp    L31
```

assistant: ```c
void get_dns_list(char *str, char ***list, int *size) {
  struct hostent *he, *he2;
  char **final_list;
  int i, j;
  *size = 0;
  if (!(he = gethostbyname(str)))
    return;
  for (i = 0; he->h_addr_list[i] != 0; i++)
    ;
  *size = i;
  final_list = malloc(sizeof(char *) * (*size));
  for (i = 0, j = 0; he->h_addr_list[i] != 0; i++) {
    if (!(he2 = gethostbyaddr(he->h_addr_list[i], he->h_length, AF_INET)))
      continue;
    final_list[j++] = strdup(he2->h_name);
  }
  *size = j;
  *list = final_list;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<get_dns_list>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  movl   $0x0,(%rdx)
  mov    %rsi,0x8(%rsp)
  mov    %rdx,(%rsp)
  call   <gethostbyname@plt>
  test   %rax,%rax
  je     L34
  mov    (%rax),%rdx
  mov    %rax,%r14
  cmpq   $0x0,(%rdx)
  je     L93
  mov    $0x1,%eax
  nopl   0x0(%rax)
L44:
  mov    %eax,%ecx
  add    $0x1,%rax
  cmpq   $0x0,-0x8(%rdx,%rax,8)
  jne    L44
  lea    0x0(,%rcx,8),%edi
L99:
  mov    (%rsp),%rax
  mov    %ecx,(%rax)
  call   <malloc@plt>
  mov    %rax,%r12
  mov    (%r14),%rax
  mov    (%rax),%rdi
  test   %rdi,%rdi
  je     L7
  mov    D2(%rip),%r13
  mov    $0x8,%ebx
  xor    %r15d,%r15d
  nopl   0x0(%rax)
L77:
  mov    0xc(%r14),%esi
  mov    0x0(%r13),%edx
  call   <gethostbyaddr@plt>
  test   %rax,%rax
  je     L97
  mov    0x8(%rax),%edi
  movslq %r15d,%rcx
  lea    0x1(%r15),%ebp
  lea    (%r12,%rcx,8),%r15
  call   <strdup@plt>
  mov    %rax,(%r15)
  mov    (%r14),%rax
  mov    (%rax,%rbx,1),%rdi
  add    $0x8,%rbx
  test   %rdi,%rdi
  je     L11
  mov    %ebp,%r15d
  jmp    L77
  nopl   (%rax)
L97:
  mov    (%r14),%rax
  mov    (%rax,%rbx,1),%rdi
  add    $0x8,%rbx
  test   %rdi,%rdi
  jne    L77
  mov    %r15d,%ebp
L11:
  mov    (%rsp),%rax
  mov    %ebp,(%rax)
  mov    0x8(%rsp),%rax
  mov    %r12,(%rax)
L34:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L7:
  xor    %ebp,%ebp
  jmp    L11
  nopl   0x0(%rax)
L93:
  xor    %edi,%edi
  xor    %ecx,%ecx
  jmp    L99
```

assistant: ```c
void get_dns_list(char *str, char ***list, int *size) {
  struct hostent *he, *he2;
  char **final_list;
  int i, j;
  *size = 0;
  if (!(he = gethostbyname(str)))
    return;
  for (i = 0; he->h_addr_list[i] != 0; i++)
    ;
  *size = i;
  final_list = malloc(sizeof(char *) * (*size));
  for (i = 0, j = 0; he->h_addr_list[i] != 0; i++) {
    if (!(he2 = gethostbyaddr(he->h_addr_list[i], he->h_length, AF_INET)))
      continue;
    final_list[j++] = strdup(he2->h_name);
  }
  *size = j;
  *list = final_list;
}
```
user: Translate the below assembly code into C programming language:

```asm
<_glp_qmdqt>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%r10
  mov    %rdx,%r11
  mov    %rcx,%rsi
  mov    0x30(%rsp),%r13
  mov    (%rdi),%eax
  mov    $0x0,%r14d
  mov    $0x0,%r12d
  jmp    L21
L101:
  movl   $0x0,0x4(%r11,%rdx,4)
  mov    $0x1,%ecx
  lea    0x4(%r11),%r12
  cmpl   $0x0,(%r8)
  jg     L80
L105:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L112:
  sub    $0x1,%ebp
  movslq %ebp,%rbp
  lea    (%r11,%rbp,4),%rcx
  mov    (%rcx),%edx
  mov    %edx,%eax
  neg    %eax
  test   %edx,%edx
  js     L21
  add    $0x1,%r12d
  movslq %r12d,%rax
  mov    0x0(%r13,%rax,4),%eax
  mov    %eax,%edx
  neg    %edx
  mov    %edx,(%rcx)
L21:
  cltq
  mov    (%r10,%rax,4),%edx
  mov    0x4(%r10,%rax,4),%ebp
  lea    -0x2(%rbp),%ebx
  cmp    %ebx,%edx
  jg     L112
  lea    0x1(%r14),%eax
  cltq
  movslq %edx,%rdx
L66:
  mov    %eax,%r14d
  mov    (%r9,%rax,4),%ecx
  mov    %ecx,(%r11,%rdx,4)
  cmp    %eax,(%r8)
  jle    L101
  add    $0x1,%rax
  add    $0x1,%rdx
  cmp    %edx,%ebx
  jge    L66
  jmp    L112
L75:
  mov    (%rdi),%eax
  mov    %eax,(%rbx)
L10:
  add    $0x1,%rcx
  cmp    %ecx,(%r8)
  jl     L105
L80:
  movslq (%r9,%rcx,4),%rax
  lea    0x0(,%rax,4),%rdx
  cmpl   $0x0,(%rsi,%rax,4)
  js     L10
  mov    (%r10,%rax,4),%ebx
  mov    0x4(%r10,%rdx,1),%edx
  cmp    %ebx,%edx
  jle    L10
  movslq %ebx,%rbp
  lea    (%r11,%rbp,4),%rax
  sub    %ebx,%edx
  lea    -0x1(%rdx),%edx
  add    %rbp,%rdx
  lea    (%r12,%rdx,4),%rbp
L67:
  mov    %rax,%rbx
  movslq (%rax),%rdx
  cmpl   $0x0,(%rsi,%rdx,4)
  js     L75
  add    $0x4,%rax
  cmp    %rbp,%rax
  jne    L67
  jmp    L10
```

assistant: ```c
void _glp_qmdqt(int *_root, int xadj[], int adjncy[], int marker[], int *_rchsze, int rchset[], int nbrhd[]) {
  int inhd, irch, j, jstop, jstrt, link, nabor, node;
  irch = 0;
  inhd = 0;
  node = (*_root);
s100:
  jstrt = xadj[node];
  jstop = xadj[node + 1] - 2;
  if (jstop >= jstrt) {
    for (j = jstrt; j <= jstop; j++) {
      irch++;
      adjncy[j] = rchset[irch];
      if (irch >= (*_rchsze))
        goto s400;
    }
  }
  link = adjncy[jstop + 1];
  node = -link;
  if (link >= 0) {
    inhd++;
    node = nbrhd[inhd];
    adjncy[jstop + 1] = -node;
  }
  goto s100;
s400:
  adjncy[j + 1] = 0;
  for (irch = 1; irch <= (*_rchsze); irch++) {
    node = rchset[irch];
    if (marker[node] >= 0) {
      jstrt = xadj[node];
      jstop = xadj[node + 1] - 1;
      for (j = jstrt; j <= jstop; j++) {
        nabor = adjncy[j];
        if (marker[nabor] < 0) {
          adjncy[j] = (*_root);
          goto s600;
        }
      }
    }
  s600:;
  }
  return;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<_glp_qmdqt>:
  endbr64
  push   %r14
  mov    (%rdi),%eax
  mov    %rsi,%r10
  mov    %rdx,%r11
  push   %r13
  mov    %rcx,%rsi
  xor    %r14d,%r14d
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  mov    0x30(%rsp),%r13
L31:
  cltq
  mov    0x4(%r10,%rax,4),%ebp
  movslq (%r10,%rax,4),%rdx
  lea    -0x2(%rbp),%ebx
  cmp    %ebx,%edx
  jg     L62
  lea    0x1(%r14),%eax
  cltq
  nopw   0x0(%rax,%rax,1)
L30:
  mov    (%r9,%rax,4),%ecx
  mov    %eax,%r14d
  mov    %ecx,(%r11,%rdx,4)
  cmp    %eax,(%r8)
  jle    L76
  add    $0x1,%rdx
  add    $0x1,%rax
  cmp    %edx,%ebx
  jge    L30
L62:
  sub    $0x1,%ebp
  movslq %ebp,%rbp
  lea    (%r11,%rbp,4),%rcx
  mov    (%rcx),%edx
  mov    %edx,%eax
  neg    %eax
  test   %edx,%edx
  js     L31
  add    $0x1,%r12d
  movslq %r12d,%rax
  mov    0x0(%r13,%rax,4),%eax
  mov    %eax,%edx
  neg    %edx
  mov    %edx,(%rcx)
  jmp    L31
  nopl   0x0(%rax)
L76:
  movl   $0x0,0x4(%r11,%rdx,4)
  mov    (%r8),%r12d
  mov    $0x1,%ecx
  lea    0x4(%r11),%rbp
  test   %r12d,%r12d
  jg     L127
  jmp    L86
  nopl   0x0(%rax)
L50:
  add    $0x1,%rcx
  cmp    %ecx,(%r8)
  jl     L86
L127:
  movslq (%r9,%rcx,4),%rax
  mov    (%rsi,%rax,4),%ebx
  lea    0x0(,%rax,4),%rdx
  test   %ebx,%ebx
  js     L50
  mov    (%r10,%rax,4),%ebx
  mov    0x4(%r10,%rdx,1),%edx
  cmp    %ebx,%edx
  jle    L50
  sub    %ebx,%edx
  movslq %ebx,%r12
  sub    $0x1,%edx
  lea    (%r11,%r12,4),%rax
  add    %r12,%rdx
  lea    0x0(%rbp,%rdx,4),%rbx
  jmp    L112
  nopw   0x0(%rax,%rax,1)
L121:
  add    $0x4,%rax
  cmp    %rax,%rbx
  je     L50
L112:
  movslq (%rax),%rdx
  mov    (%rsi,%rdx,4),%edx
  test   %edx,%edx
  jns    L121
  mov    (%rdi),%edx
  add    $0x1,%rcx
  mov    %edx,(%rax)
  cmp    %ecx,(%r8)
  jge    L127
L86:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
void _glp_qmdqt(int *_root, int xadj[], int adjncy[], int marker[], int *_rchsze, int rchset[], int nbrhd[]) {
  int inhd, irch, j, jstop, jstrt, link, nabor, node;
  irch = 0;
  inhd = 0;
  node = (*_root);
s100:
  jstrt = xadj[node];
  jstop = xadj[node + 1] - 2;
  if (jstop >= jstrt) {
    for (j = jstrt; j <= jstop; j++) {
      irch++;
      adjncy[j] = rchset[irch];
      if (irch >= (*_rchsze))
        goto s400;
    }
  }
  link = adjncy[jstop + 1];
  node = -link;
  if (link >= 0) {
    inhd++;
    node = nbrhd[inhd];
    adjncy[jstop + 1] = -node;
  }
  goto s100;
s400:
  adjncy[j + 1] = 0;
  for (irch = 1; irch <= (*_rchsze); irch++) {
    node = rchset[irch];
    if (marker[node] >= 0) {
      jstrt = xadj[node];
      jstop = xadj[node + 1] - 1;
      for (j = jstrt; j <= jstop; j++) {
        nabor = adjncy[j];
        if (marker[nabor] < 0) {
          adjncy[j] = (*_root);
          goto s600;
        }
      }
    }
  s600:;
  }
  return;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<_glp_qmdqt>:
  endbr64
  push   %r14
  mov    (%rdi),%eax
  mov    %rsi,%r10
  mov    %rdx,%r11
  push   %r13
  mov    %rcx,%rsi
  xor    %r14d,%r14d
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  mov    0x30(%rsp),%r13
L13:
  cltq
  mov    0x4(%r10,%rax,4),%ebp
  movslq (%r10,%rax,4),%rdx
  lea    -0x2(%rbp),%ebx
  cmp    %ebx,%edx
  jg     L95
  lea    0x1(%r14),%eax
  cltq
  nopw   0x0(%rax,%rax,1)
L102:
  mov    (%r9,%rax,4),%ecx
  mov    %eax,%r14d
  mov    %ecx,(%r11,%rdx,4)
  cmp    %eax,(%r8)
  jle    L83
  add    $0x1,%rdx
  add    $0x1,%rax
  cmp    %edx,%ebx
  jge    L102
L95:
  sub    $0x1,%ebp
  movslq %ebp,%rbp
  lea    (%r11,%rbp,4),%rcx
  mov    (%rcx),%edx
  mov    %edx,%eax
  neg    %eax
  test   %edx,%edx
  js     L13
  add    $0x1,%r12d
  movslq %r12d,%rax
  mov    0x0(%r13,%rax,4),%eax
  mov    %eax,%edx
  neg    %edx
  mov    %edx,(%rcx)
  jmp    L13
  nopl   0x0(%rax)
L83:
  movl   $0x0,0x4(%r11,%rdx,4)
  mov    (%r8),%ebp
  mov    $0x1,%ecx
  lea    0x4(%r11),%r12
  test   %ebp,%ebp
  jg     L52
  jmp    L106
  nopl   0x0(%rax,%rax,1)
L60:
  add    $0x1,%rcx
  cmp    %ecx,%ebp
  jl     L106
L52:
  movslq (%r9,%rcx,4),%rax
  mov    (%rsi,%rax,4),%ebx
  lea    0x0(,%rax,4),%rdx
  test   %ebx,%ebx
  js     L60
  mov    (%r10,%rax,4),%ebx
  mov    0x4(%r10,%rdx,1),%edx
  cmp    %ebx,%edx
  jle    L60
  sub    %ebx,%edx
  movslq %ebx,%r13
  sub    $0x1,%edx
  lea    (%r11,%r13,4),%rax
  add    %r13,%rdx
  lea    (%r12,%rdx,4),%rbx
  jmp    L72
  nopl   (%rax)
L20:
  add    $0x4,%rax
  cmp    %rax,%rbx
  je     L60
L72:
  movslq (%rax),%rdx
  mov    (%rsi,%rdx,4),%edx
  test   %edx,%edx
  jns    L20
  mov    (%rdi),%edx
  add    $0x1,%rcx
  mov    %edx,(%rax)
  mov    (%r8),%ebp
  cmp    %ecx,%ebp
  jge    L52
L106:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
void _glp_qmdqt(int *_root, int xadj[], int adjncy[], int marker[], int *_rchsze, int rchset[], int nbrhd[]) {
  int inhd, irch, j, jstop, jstrt, link, nabor, node;
  irch = 0;
  inhd = 0;
  node = (*_root);
s100:
  jstrt = xadj[node];
  jstop = xadj[node + 1] - 2;
  if (jstop >= jstrt) {
    for (j = jstrt; j <= jstop; j++) {
      irch++;
      adjncy[j] = rchset[irch];
      if (irch >= (*_rchsze))
        goto s400;
    }
  }
  link = adjncy[jstop + 1];
  node = -link;
  if (link >= 0) {
    inhd++;
    node = nbrhd[inhd];
    adjncy[jstop + 1] = -node;
  }
  goto s100;
s400:
  adjncy[j + 1] = 0;
  for (irch = 1; irch <= (*_rchsze); irch++) {
    node = rchset[irch];
    if (marker[node] >= 0) {
      jstrt = xadj[node];
      jstop = xadj[node + 1] - 1;
      for (j = jstrt; j <= jstop; j++) {
        nabor = adjncy[j];
        if (marker[nabor] < 0) {
          adjncy[j] = (*_root);
          goto s600;
        }
      }
    }
  s600:;
  }
  return;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<CSPL_Array_min>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movq   $0x1,-0x10(%rbp)
  jmp    L27
L4:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x8(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  jmp    L25
L0:
  movsd  -0x8(%rbp),%xmm0
L25:
  movsd  %xmm0,-0x8(%rbp)
  addq   $0x1,-0x10(%rbp)
L27:
  mov    -0x10(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jl     L4
  movsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

assistant: ```c
double CSPL_Array_min(const double *inval, const long n) {
  long i;
  double min;
  min = inval[0];
  for (i = 1; i < n; i++) {
    min = (inval[i] < min) ? inval[i] : min;
  }
  return (min);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<CSPL_Array_min>:
  endbr64
  movsd  (%rdi),%xmm0
  cmp    $0x1,%rsi
  jle    L5
  lea    0x8(%rdi),%rax
  lea    (%rdi,%rsi,8),%rdx
L13:
  movsd  (%rax),%xmm1
  minsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L13
L5:
  ret
```

assistant: ```c
double CSPL_Array_min(const double *inval, const long n) {
  long i;
  double min;
  min = inval[0];
  for (i = 1; i < n; i++) {
    min = (inval[i] < min) ? inval[i] : min;
  }
  return (min);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<CSPL_Array_min>:
  endbr64
  movsd  (%rdi),%xmm0
  cmp    $0x1,%rsi
  jle    L11
  lea    0x8(%rdi),%rax
  lea    (%rdi,%rsi,8),%rdx
  cs nopw 0x0(%rax,%rax,1)
L14:
  movsd  (%rax),%xmm1
  add    $0x8,%rax
  minsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  cmp    %rdx,%rax
  jne    L14
L11:
  ret
```

assistant: ```c
double CSPL_Array_min(const double *inval, const long n) {
  long i;
  double min;
  min = inval[0];
  for (i = 1; i < n; i++) {
    min = (inval[i] < min) ? inval[i] : min;
  }
  return (min);
}
```
user: What is the c source code of the assembly code below?

```asm
<CSPL_Array_min>:
  endbr64
  movsd  (%rdi),%xmm0
  cmp    $0x1,%rsi
  jle    L11
  lea    0x8(%rdi),%rax
  lea    (%rdi,%rsi,8),%rdx
  cs nopw 0x0(%rax,%rax,1)
L7:
  movsd  (%rax),%xmm1
  add    $0x8,%rax
  minsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  cmp    %rax,%rdx
  jne    L7
L11:
  ret
```

assistant: ```c
double CSPL_Array_min(const double *inval, const long n) {
  long i;
  double min;
  min = inval[0];
  for (i = 1; i < n; i++) {
    min = (inval[i] < min) ? inval[i] : min;
  }
  return (min);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<nibble2hex>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  cmpl   $0x9,-0x4(%rbp)
  jg     L17
  mov    -0x4(%rbp),%eax
  add    $0x30,%eax
  jmp    L19
L17:
  mov    -0x4(%rbp),%eax
  add    $0x37,%eax
L19:
  pop    %rbp
  ret
```

assistant: ```c
int nibble2hex(int nibble) {
  if (nibble < 10)
    return nibble + 48;
  else
    return nibble + 55;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<nibble2hex>:
  endbr64
  lea    0x30(%rdi),%edx
  lea    0x37(%rdi),%eax
  cmp    $0x9,%edi
  cmovle %edx,%eax
  ret
```

assistant: ```c
int nibble2hex(int nibble) {
  if (nibble < 10)
    return nibble + 48;
  else
    return nibble + 55;
}
```
user: Translate the below assembly code into C programming language:

```asm
<nibble2hex>:
  endbr64
  lea    0x30(%rdi),%edx
  lea    0x37(%rdi),%eax
  cmp    $0x9,%edi
  cmovle %edx,%eax
  ret
```

assistant: ```c
int nibble2hex(int nibble) {
  if (nibble < 10)
    return nibble + 48;
  else
    return nibble + 55;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<nibble2hex>:
  endbr64
  lea    0x30(%rdi),%edx
  lea    0x37(%rdi),%eax
  cmp    $0x9,%edi
  cmovle %edx,%eax
  ret
```

assistant: ```c
int nibble2hex(int nibble) {
  if (nibble < 10)
    return nibble + 48;
  else
    return nibble + 55;
}
```