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

```asm
<selectSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L31
L24:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L47
L59:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xc(%rbp)
  jle    L34
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x8(%rbp)
L34:
  addl   $0x1,-0x4(%rbp)
L47:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L59
  mov    -0x8(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  je     L49
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
L49:
  addl   $0x1,-0x10(%rbp)
L31:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L24
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void selectSort(int *num, int size) {
  for (int i = 0; i < size; i++) {
    int min = num[i];
    int index = i;
    for (int j = i + 1; j < size; j++) {
      if (num[j] < min) {
        min = num[j];
        index = j;
      }
    }
    if (index != i) {
      num[index] = num[i];
      num[i] = min;
    }
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<selectSort>:
  endbr64
  test   %esi,%esi
  jle    L30
  mov    $0x1,%r10d
  mov    $0x0,%r9d
  jmp    L16
L6:
  add    $0x1,%rax
  cmp    %eax,%esi
  jle    L43
L60:
  mov    (%rdi,%rax,4),%edx
  cmp    %ecx,%edx
  jge    L6
  mov    %eax,%r8d
  mov    %edx,%ecx
  jmp    L6
L43:
  cmp    %r9d,%r8d
  je     L35
  movslq %r8d,%r8
  mov    %r11d,(%rdi,%r8,4)
  mov    %ecx,(%rdi,%r9,4)
L35:
  add    $0x1,%r9
  add    $0x1,%r10
L16:
  mov    %r9d,%r8d
  mov    (%rdi,%r9,4),%r11d
  cmp    %r10d,%esi
  jle    L30
  mov    %r10,%rax
  mov    %r11d,%ecx
  jmp    L60
L30:
  ret
```

assistant: ```c
void selectSort(int *num, int size) {
  for (int i = 0; i < size; i++) {
    int min = num[i];
    int index = i;
    for (int j = i + 1; j < size; j++) {
      if (num[j] < min) {
        min = num[j];
        index = j;
      }
    }
    if (index != i) {
      num[index] = num[i];
      num[i] = min;
    }
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<selectSort>:
  endbr64
  test   %esi,%esi
  jle    L33
  xor    %r9d,%r9d
  mov    $0x1,%r10d
  mov    (%rdi,%r9,4),%r11d
  movslq %r9d,%r8
  cmp    %r10d,%esi
  jle    L33
  nopl   (%rax)
L56:
  mov    %r10,%rax
  mov    %r11d,%ecx
  cs nopw 0x0(%rax,%rax,1)
L4:
  mov    (%rdi,%rax,4),%edx
  cmp    %ecx,%edx
  jge    L48
  movslq %eax,%r8
  mov    %edx,%ecx
L48:
  add    $0x1,%rax
  cmp    %eax,%esi
  jg     L4
  cmp    %r9d,%r8d
  je     L17
  mov    %r11d,(%rdi,%r8,4)
  mov    %ecx,(%rdi,%r9,4)
L17:
  add    $0x1,%r9
  add    $0x1,%r10
  mov    (%rdi,%r9,4),%r11d
  movslq %r9d,%r8
  cmp    %r10d,%esi
  jg     L56
L33:
  ret
```

assistant: ```c
void selectSort(int *num, int size) {
  for (int i = 0; i < size; i++) {
    int min = num[i];
    int index = i;
    for (int j = i + 1; j < size; j++) {
      if (num[j] < min) {
        min = num[j];
        index = j;
      }
    }
    if (index != i) {
      num[index] = num[i];
      num[i] = min;
    }
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<selectSort>:
  endbr64
  test   %esi,%esi
  jle    L57
  xor    %r9d,%r9d
  mov    $0x1,%r10d
  mov    (%rdi,%r9,4),%r11d
  movslq %r9d,%r8
  cmp    %r10d,%esi
  jle    L57
  nopl   (%rax)
L21:
  mov    %r10,%rax
  mov    %r11d,%ecx
  cs nopw 0x0(%rax,%rax,1)
L55:
  mov    (%rdi,%rax,4),%edx
  cmp    %ecx,%edx
  jge    L13
  movslq %eax,%r8
  mov    %edx,%ecx
L13:
  add    $0x1,%rax
  cmp    %eax,%esi
  jg     L55
  cmp    %r9d,%r8d
  je     L17
  mov    %r11d,(%rdi,%r8,4)
  mov    %ecx,(%rdi,%r9,4)
L17:
  add    $0x1,%r9
  add    $0x1,%r10
  mov    (%rdi,%r9,4),%r11d
  movslq %r9d,%r8
  cmp    %r10d,%esi
  jg     L21
L57:
  ret
```

assistant: ```c
void selectSort(int *num, int size) {
  for (int i = 0; i < size; i++) {
    int min = num[i];
    int index = i;
    for (int j = i + 1; j < size; j++) {
      if (num[j] < min) {
        min = num[j];
        index = j;
      }
    }
    if (index != i) {
      num[index] = num[i];
      num[i] = min;
    }
  }
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<__QADD8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  shl    $0x18,%eax
  sar    $0x18,%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  shl    $0x18,%eax
  sar    $0x18,%eax
  add    %edx,%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <__SSAT@plt>
  and    $0xff,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  shl    $0x10,%eax
  sar    $0x18,%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  shl    $0x10,%eax
  sar    $0x18,%eax
  add    %edx,%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <__SSAT@plt>
  and    $0xff,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  shl    $0x8,%eax
  sar    $0x18,%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  shl    $0x8,%eax
  sar    $0x18,%eax
  add    %edx,%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <__SSAT@plt>
  and    $0xff,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  sar    $0x18,%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  sar    $0x18,%eax
  add    %edx,%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <__SSAT@plt>
  and    $0xff,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shl    $0x18,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  shl    $0x10,%eax
  or     %eax,%edx
  mov    -0xc(%rbp),%eax
  shl    $0x8,%eax
  or     %edx,%eax
  or     -0x10(%rbp),%eax
  cltq
  leave
  ret
```

assistant: ```c
__attribute__((always_)) uint32_t __QADD8(uint32_t x, uint32_t y) {
  int32_t r, s, t, u;
  r = __SSAT(((((int32_t)x << 24) >> 24) + (((int32_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF;
  s = __SSAT(((((int32_t)x << 16) >> 24) + (((int32_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF;
  t = __SSAT(((((int32_t)x << 8) >> 24) + (((int32_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF;
  u = __SSAT(((((int32_t)x) >> 24) + (((int32_t)y) >> 24)), 8) & (int32_t)0x000000FF;
  return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r)));
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<__QADD8>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %rsi,%r14
  movsbl %dil,%edi
  movsbl %sil,%eax
  add    %eax,%edi
  mov    $0x8,%esi
  call   <__SSAT@plt>
  mov    %eax,%ebx
  mov    %ebp,%eax
  movsbl %ah,%edi
  mov    %r14d,%eax
  movsbl %ah,%eax
  add    %eax,%edi
  mov    $0x8,%esi
  call   <__SSAT@plt>
  mov    %eax,%r12d
  mov    %ebp,%edi
  shl    $0x8,%edi
  sar    $0x18,%edi
  mov    %r14d,%eax
  shl    $0x8,%eax
  sar    $0x18,%eax
  add    %eax,%edi
  mov    $0x8,%esi
  call   <__SSAT@plt>
  mov    %eax,%r13d
  sar    $0x18,%ebp
  sar    $0x18,%r14d
  lea    0x0(%rbp,%r14,1),%edi
  mov    $0x8,%esi
  call   <__SSAT@plt>
  movzbl %bl,%ebx
  shl    $0x18,%eax
  or     %eax,%ebx
  shl    $0x10,%r13d
  and    $0xff0000,%r13d
  or     %r13d,%ebx
  shl    $0x8,%r12d
  movzwl %r12w,%r12d
  or     %r12d,%ebx
  movslq %ebx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
__attribute__((always_)) uint32_t __QADD8(uint32_t x, uint32_t y) {
  int32_t r, s, t, u;
  r = __SSAT(((((int32_t)x << 24) >> 24) + (((int32_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF;
  s = __SSAT(((((int32_t)x << 16) >> 24) + (((int32_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF;
  t = __SSAT(((((int32_t)x << 8) >> 24) + (((int32_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF;
  u = __SSAT(((((int32_t)x) >> 24) + (((int32_t)y) >> 24)), 8) & (int32_t)0x000000FF;
  return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r)));
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<__QADD8>:
  endbr64
  mov    %esi,%eax
  push   %r14
  mov    %rsi,%r14
  mov    $0x8,%esi
  push   %r13
  shl    $0x18,%eax
  push   %r12
  sar    $0x18,%eax
  push   %rbp
  mov    %rdi,%rbp
  shl    $0x18,%edi
  push   %rbx
  sar    $0x18,%edi
  add    %eax,%edi
  call   <__SSAT@plt>
  mov    %ebp,%edi
  mov    $0x8,%esi
  mov    %eax,%ebx
  mov    %r14d,%eax
  shl    $0x10,%edi
  shl    $0x10,%eax
  sar    $0x18,%edi
  movzbl %bl,%ebx
  sar    $0x18,%eax
  add    %eax,%edi
  call   <__SSAT@plt>
  mov    %ebp,%edi
  mov    $0x8,%esi
  sar    $0x18,%ebp
  mov    %eax,%r12d
  mov    %r14d,%eax
  shl    $0x8,%edi
  shl    $0x8,%eax
  sar    $0x18,%edi
  sar    $0x18,%eax
  sar    $0x18,%r14d
  add    %eax,%edi
  shl    $0x8,%r12d
  call   <__SSAT@plt>
  lea    0x0(%rbp,%r14,1),%edi
  mov    $0x8,%esi
  movzwl %r12w,%r12d
  mov    %eax,%r13d
  call   <__SSAT@plt>
  shl    $0x10,%r13d
  shl    $0x18,%eax
  and    $0xff0000,%r13d
  or     %eax,%ebx
  or     %r13d,%ebx
  or     %r12d,%ebx
  movslq %ebx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
__attribute__((always_)) uint32_t __QADD8(uint32_t x, uint32_t y) {
  int32_t r, s, t, u;
  r = __SSAT(((((int32_t)x << 24) >> 24) + (((int32_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF;
  s = __SSAT(((((int32_t)x << 16) >> 24) + (((int32_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF;
  t = __SSAT(((((int32_t)x << 8) >> 24) + (((int32_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF;
  u = __SSAT(((((int32_t)x) >> 24) + (((int32_t)y) >> 24)), 8) & (int32_t)0x000000FF;
  return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r)));
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<__QADD8>:
  endbr64
  mov    %esi,%eax
  push   %r14
  mov    %rsi,%r14
  mov    $0x8,%esi
  push   %r13
  shl    $0x18,%eax
  push   %r12
  sar    $0x18,%eax
  push   %rbp
  mov    %rdi,%rbp
  shl    $0x18,%edi
  push   %rbx
  sar    $0x18,%edi
  add    %eax,%edi
  call   <__SSAT@plt>
  mov    %ebp,%edi
  mov    $0x8,%esi
  mov    %eax,%ebx
  mov    %r14d,%eax
  shl    $0x10,%edi
  shl    $0x10,%eax
  sar    $0x18,%edi
  movzbl %bl,%ebx
  sar    $0x18,%eax
  add    %eax,%edi
  call   <__SSAT@plt>
  mov    %ebp,%edi
  mov    $0x8,%esi
  sar    $0x18,%ebp
  mov    %eax,%r12d
  mov    %r14d,%eax
  shl    $0x8,%edi
  shl    $0x8,%eax
  sar    $0x18,%edi
  sar    $0x18,%eax
  sar    $0x18,%r14d
  add    %eax,%edi
  shl    $0x8,%r12d
  call   <__SSAT@plt>
  lea    0x0(%rbp,%r14,1),%edi
  mov    $0x8,%esi
  movzwl %r12w,%r12d
  mov    %eax,%r13d
  call   <__SSAT@plt>
  shl    $0x10,%r13d
  shl    $0x18,%eax
  and    $0xff0000,%r13d
  or     %eax,%ebx
  or     %r13d,%ebx
  or     %r12d,%ebx
  movslq %ebx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
__attribute__((always_)) uint32_t __QADD8(uint32_t x, uint32_t y) {
  int32_t r, s, t, u;
  r = __SSAT(((((int32_t)x << 24) >> 24) + (((int32_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF;
  s = __SSAT(((((int32_t)x << 16) >> 24) + (((int32_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF;
  t = __SSAT(((((int32_t)x << 8) >> 24) + (((int32_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF;
  u = __SSAT(((((int32_t)x) >> 24) + (((int32_t)y) >> 24)), 8) & (int32_t)0x000000FF;
  return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r)));
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<IRQ_set_mask>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,%eax
  mov    %al,-0x14(%rbp)
  cmpb   $0x7,-0x14(%rbp)
  ja     L12
  movl   $0x21,-0x8(%rbp)
  jmp    L11
L12:
  movl   $0xa1,-0x8(%rbp)
  subb   $0x8,-0x14(%rbp)
L11:
  mov    -0x8(%rbp),%eax
  mov    %eax,%edi
  call   <inb@plt>
  mov    %eax,%edx
  movzbl -0x14(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  or     %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <outb@plt>
  nop
  leave
  ret
```

assistant: ```c
void IRQ_set_mask(unsigned char IRQline) {
  uint16_t port;
  uint8_t value;
  if (IRQline < 8) {
    port = (0x20 + 1);
  } else {
    port = (0xA0 + 1);
    IRQline -= 8;
  }
  value = inb(port) | (1 << IRQline);
  outb(port, value);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<IRQ_set_mask>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebp
  mov    $0x21,%ebx
  cmp    $0x7,%dil
  jbe    L0
  lea    -0x8(%rdi),%ebp
  mov    $0xa1,%ebx
L0:
  mov    %ebx,%edi
  call   <inb@plt>
  bts    %ebp,%eax
  mov    %eax,%esi
  mov    %ebx,%edi
  call   <outb@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void IRQ_set_mask(unsigned char IRQline) {
  uint16_t port;
  uint8_t value;
  if (IRQline < 8) {
    port = (0x20 + 1);
  } else {
    port = (0xA0 + 1);
    IRQline -= 8;
  }
  value = inb(port) | (1 << IRQline);
  outb(port, value);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<IRQ_set_mask>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x7,%dil
  jbe    L7
  lea    -0x8(%rdi),%ebx
  mov    $0xa1,%ebp
L6:
  mov    %ebp,%edi
  call   <inb@plt>
  add    $0x8,%rsp
  mov    %ebp,%edi
  bts    %ebx,%eax
  pop    %rbx
  pop    %rbp
  mov    %eax,%esi
  jmp    1070 <outb@plt>
  nopl   0x0(%rax)
L7:
  mov    %edi,%ebx
  mov    $0x21,%ebp
  jmp    L6
```

assistant: ```c
void IRQ_set_mask(unsigned char IRQline) {
  uint16_t port;
  uint8_t value;
  if (IRQline < 8) {
    port = (0x20 + 1);
  } else {
    port = (0xA0 + 1);
    IRQline -= 8;
  }
  value = inb(port) | (1 << IRQline);
  outb(port, value);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<IRQ_set_mask>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x7,%dil
  jbe    L19
  lea    -0x8(%rdi),%ebx
  mov    $0xa1,%ebp
L3:
  mov    %ebp,%edi
  call   <inb@plt>
  add    $0x8,%rsp
  mov    %ebp,%edi
  bts    %ebx,%eax
  pop    %rbx
  pop    %rbp
  mov    %eax,%esi
  jmp    1070 <outb@plt>
  nopl   0x0(%rax)
L19:
  mov    %edi,%ebx
  mov    $0x21,%ebp
  jmp    L3
```

assistant: ```c
void IRQ_set_mask(unsigned char IRQline) {
  uint16_t port;
  uint8_t value;
  if (IRQline < 8) {
    port = (0x20 + 1);
  } else {
    port = (0xA0 + 1);
    IRQline -= 8;
  }
  value = inb(port) | (1 << IRQline);
  outb(port, value);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L6
L52:
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rdx
  imul   $0xffffffffb60b60b7,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x6,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x5a,%edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  add    $0xa,%edx
  mov    -0x34(%rbp),%eax
  cltq
  mov    %edx,-0x30(%rbp,%rax,4)
  addl   $0x1,-0x34(%rbp)
L6:
  cmpl   $0x9,-0x34(%rbp)
  jle    L52
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L18
L9:
  mov    -0x34(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x34(%rbp)
L18:
  cmpl   $0x9,-0x34(%rbp)
  jle    L9
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x30(%rbp),%rax
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <selectionSort@plt>
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L49
L46:
  mov    -0x34(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x34(%rbp)
L49:
  cmpl   $0x9,-0x34(%rbp)
  jle    L46
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L58
  call   <__stack_chk_fail@plt>
L58:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D19
type_guessed: string
name: unpack_data
arguments: data_label: D22
type_guessed: string
name: unpack_data
arguments: data_label: D42
type_guessed: string
name: unpack_data
arguments: data_label: D34
type_guessed: string

tool: D19: Unsorted array:

tool: D22: %d  

tool: D42: 


tool: D34: Sorted array:

assistant: ```c
int main(void) {
  int array[10];
  int i;
  srand(time(NULL));
  for (i = 0; i < 10; i++)
    array[i] = rand() % 90 + 10;
  printf("Unsorted array:\n");
  for (i = 0; i < 10; i++)
    printf("%d  ", array[i]);
  printf("\n\n");
  selectionSort(array, 10);
  printf("Sorted array:\n");
  for (i = 0; i < 10; i++)
    printf("%d  ", array[i]);
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  mov    %rsp,%rbx
  lea    0x28(%rsp),%r12
  mov    %rbx,%rbp
L22:
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rdx
  imul   $0xffffffffb60b60b7,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x6,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x5a,%edx,%edx
  sub    %edx,%eax
  add    $0xa,%eax
  mov    %eax,0x0(%rbp)
  add    $0x4,%rbp
  cmp    %r12,%rbp
  jne    L22
  lea    D10(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rbp
  lea    D24(%rip),%r13
L9:
  mov    0x0(%rbp),%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbp
  cmp    %r12,%rbp
  jne    L9
  lea    D45(%rip),%rdi
  call   <puts@plt>
  mov    %rsp,%rdi
  mov    $0xa,%esi
  call   <selectionSort@plt>
  lea    D9(%rip),%rdi
  call   <puts@plt>
  lea    D24(%rip),%rbp
L5:
  mov    (%rbx),%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbx
  cmp    %r12,%rbx
  jne    L5
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L33
  mov    $0x0,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L33:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D10
type_infered: string
name: unpack_data
arguments: data_label: D24
type_infered: string
name: unpack_data
arguments: data_label: D45
type_infered: string
name: unpack_data
arguments: data_label: D9
type_infered: string

tool: D10: Unsorted array:

tool: D24: %d  

tool: D45: 


tool: D9: Sorted array:

assistant: ```c
int main(void) {
  int array[10];
  int i;
  srand(time(NULL));
  for (i = 0; i < 10; i++)
    array[i] = rand() % 90 + 10;
  printf("Unsorted array:\n");
  for (i = 0; i < 10; i++)
    printf("%d  ", array[i]);
  printf("\n\n");
  selectionSort(array, 10);
  printf("Sorted array:\n");
  for (i = 0; i < 10; i++)
    printf("%d  ", array[i]);
  return 0;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %r14
  xor    %edi,%edi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  lea    0x28(%rsp),%rbp
  call   <time@plt>
  mov    %r12,%rbx
  mov    %r12,%r13
  mov    %eax,%edi
  call   <srand@plt>
  nopl   0x0(%rax)
L21:
  xor    %eax,%eax
  add    $0x4,%r13
  call   <rand@plt>
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0xffffffffb60b60b7,%rdx,%rdx
  sar    $0x1f,%ecx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x6,%edx
  sub    %ecx,%edx
  imul   $0x5a,%edx,%edx
  sub    %edx,%eax
  add    $0xa,%eax
  mov    %eax,-0x4(%r13)
  cmp    %rbp,%r13
  jne    L21
  lea    D4(%rip),%rdi
  mov    %r12,%r13
  lea    D30(%rip),%r14
  call   <puts@plt>
  nopl   0x0(%rax)
L12:
  mov    0x0(%r13),%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x4,%r13
  call   <printf@plt>
  cmp    %rbp,%r13
  jne    L12
  lea    D10(%rip),%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  mov    $0xa,%esi
  call   <selectionSort@plt>
  lea    D33(%rip),%rdi
  call   <puts@plt>
  nopl   0x0(%rax)
L1:
  mov    (%rbx),%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L1
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D4
type_infered: string
name: extract_symbolic_data
arguments: label: D30
type_infered: string
name: extract_symbolic_data
arguments: label: D10
type_infered: string
name: extract_symbolic_data
arguments: label: D33
type_infered: string

tool: D4: Unsorted array:

tool: D30: %d  

tool: D10: 


tool: D33: Sorted array:

assistant: ```c
int main(void) {
  int array[10];
  int i;
  srand(time(NULL));
  for (i = 0; i < 10; i++)
    array[i] = rand() % 90 + 10;
  printf("Unsorted array:\n");
  for (i = 0; i < 10; i++)
    printf("%d  ", array[i]);
  printf("\n\n");
  selectionSort(array, 10);
  printf("Sorted array:\n");
  for (i = 0; i < 10; i++)
    printf("%d  ", array[i]);
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %r14
  xor    %edi,%edi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  lea    0x28(%rsp),%rbp
  call   <time@plt>
  mov    %r12,%rbx
  mov    %r12,%r13
  mov    %eax,%edi
  call   <srand@plt>
  nopl   0x0(%rax)
L30:
  xor    %eax,%eax
  add    $0x4,%r13
  call   <rand@plt>
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0xffffffffb60b60b7,%rdx,%rdx
  sar    $0x1f,%ecx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x6,%edx
  sub    %ecx,%edx
  imul   $0x5a,%edx,%edx
  sub    %edx,%eax
  add    $0xa,%eax
  mov    %eax,-0x4(%r13)
  cmp    %rbp,%r13
  jne    L30
  lea    D7(%rip),%rdi
  mov    %r12,%r13
  lea    D19(%rip),%r14
  call   <puts@plt>
  nopl   0x0(%rax)
L23:
  mov    0x0(%r13),%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x4,%r13
  call   <printf@plt>
  cmp    %rbp,%r13
  jne    L23
  lea    D8(%rip),%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  mov    $0xa,%esi
  call   <selectionSort@plt>
  lea    D16(%rip),%rdi
  call   <puts@plt>
  nopl   0x0(%rax)
L12:
  mov    (%rbx),%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L12
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D7
type: string
name: retrieve_data
arguments: data_tag: D19
type: string
name: retrieve_data
arguments: data_tag: D8
type: string
name: retrieve_data
arguments: data_tag: D16
type: string

tool: D7: Unsorted array:

tool: D19: %d  

tool: D8: 


tool: D16: Sorted array:

assistant: ```c
int main(void) {
  int array[10];
  int i;
  srand(time(NULL));
  for (i = 0; i < 10; i++)
    array[i] = rand() % 90 + 10;
  printf("Unsorted array:\n");
  for (i = 0; i < 10; i++)
    printf("%d  ", array[i]);
  printf("\n\n");
  selectionSort(array, 10);
  printf("Sorted array:\n");
  for (i = 0; i < 10; i++)
    printf("%d  ", array[i]);
  return 0;
}
```