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

```asm
<wBasLCase>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0x0,%eax
  call   <wPopString@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L9
L12:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %rax,%rdx
  mov    -0x10(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  addl   $0x1,-0x10(%rbp)
L9:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L12
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <wPushString@plt>
  nop
  leave
  ret
```

assistant: ```c
void wBasLCase() {
  int len, i;
  char *string;
  string = wPopString();
  len = strlen(string);
  for (i = 0; i < len; i++) {
    string[i] = (char)tolower((int)string[i]);
  }
  wPushString(string);
}
```
user: What is the c source code of the assembly code below:

```asm
<wBasLCase>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    $0x0,%eax
  call   <wPopString@plt>
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L15
  mov    %r12,%rbx
  lea    -0x1(%rax),%eax
  lea    0x1(%r12,%rax,1),%rbp
L16:
  movsbl (%rbx),%edi
  call   <tolower@plt>
  mov    %al,(%rbx)
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  jne    L16
L15:
  mov    %r12,%rdi
  call   <wPushString@plt>
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void wBasLCase() {
  int len, i;
  char *string;
  string = wPopString();
  len = strlen(string);
  for (i = 0; i < len; i++) {
    string[i] = (char)tolower((int)string[i]);
  }
  wPushString(string);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<wBasLCase>:
  endbr64
  push   %r12
  xor    %eax,%eax
  push   %rbp
  push   %rbx
  call   <wPopString@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strlen@plt>
  test   %eax,%eax
  jle    L4
  sub    $0x1,%eax
  mov    %r12,%rbx
  lea    0x1(%r12,%rax,1),%rbp
  nopl   0x0(%rax)
L6:
  movsbl (%rbx),%edi
  add    $0x1,%rbx
  call   <tolower@plt>
  mov    %al,-0x1(%rbx)
  cmp    %rbp,%rbx
  jne    L6
L4:
  pop    %rbx
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  jmp    10b0 <wPushString@plt>
```

assistant: ```c
void wBasLCase() {
  int len, i;
  char *string;
  string = wPopString();
  len = strlen(string);
  for (i = 0; i < len; i++) {
    string[i] = (char)tolower((int)string[i]);
  }
  wPushString(string);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<wBasLCase>:
  endbr64
  push   %r12
  xor    %eax,%eax
  push   %rbp
  push   %rbx
  call   <wPopString@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strlen@plt>
  test   %eax,%eax
  jle    L7
  sub    $0x1,%eax
  mov    %r12,%rbx
  lea    0x1(%r12,%rax,1),%rbp
  nopl   0x0(%rax)
L15:
  movsbl (%rbx),%edi
  add    $0x1,%rbx
  call   <tolower@plt>
  mov    %al,-0x1(%rbx)
  cmp    %rbp,%rbx
  jne    L15
L7:
  pop    %rbx
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  jmp    10b0 <wPushString@plt>
```

assistant: ```c
void wBasLCase() {
  int len, i;
  char *string;
  string = wPopString();
  len = strlen(string);
  for (i = 0; i < len; i++) {
    string[i] = (char)tolower((int)string[i]);
  }
  wPushString(string);
}
```
user: What is the c source code of the assembly code below?

```asm
<test_range_float_gt_le>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  comiss D13(%rip),%xmm0
  ja     L38
  jmp    L36
L38:
  movss  D17(%rip),%xmm0
  comiss -0x4(%rbp),%xmm0
  jae    L11
  jmp    L36
L11:
  movss  -0x4(%rbp),%xmm0
  ucomiss D17(%rip),%xmm0
  setnp  %al
  mov    $0x0,%edx
  movss  -0x4(%rbp),%xmm0
  ucomiss D17(%rip),%xmm0
  cmovne %edx,%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <__analyzer_eval@plt>
L36:
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D13
data_type: byte[4]
name: read_data
arguments: data_label: D17
data_type: byte[4]

tool: {"D13": [0x00,0x00,0x40,0x40]}

tool: {"D17": [0x00,0x00,0x80,0x40]}

assistant: ```c
void test_range_float_gt_le(float f) {
  if (f > 3)
    if (f <= 4)
      __analyzer_eval(f == 4);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<test_range_float_gt_le>:
  endbr64
  comiss D6(%rip),%xmm0
  jbe    L0
  movss  D17(%rip),%xmm1
  comiss %xmm0,%xmm1
  jae    L5
L0:
  ret
L5:
  sub    $0x8,%rsp
  ucomiss %xmm1,%xmm0
  setnp  %dil
  movzbl %dil,%edi
  mov    $0x0,%eax
  cmovne %eax,%edi
  call   <__analyzer_eval@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
type_guessed: byte[4]
name: extract_symbolic_data
arguments: label: D17
type_guessed: byte[4]

tool: {"D6": [0x00,0x00,0x40,0x40]}

tool: {"D17": [0x00,0x00,0x80,0x40]}

assistant: ```c
void test_range_float_gt_le(float f) {
  if (f > 3)
    if (f <= 4)
      __analyzer_eval(f == 4);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<test_range_float_gt_le>:
  endbr64
  comiss D17(%rip),%xmm0
  jbe    L6
  movss  D3(%rip),%xmm1
  comiss %xmm0,%xmm1
  jae    L19
L6:
  ret
  nopl   0x0(%rax,%rax,1)
L19:
  xor    %edi,%edi
  ucomiss %xmm1,%xmm0
  mov    $0x0,%eax
  setnp  %dil
  cmovne %eax,%edi
  jmp    1050 <__analyzer_eval@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D17
type_infered: byte[4]
name: retrieve_data
arguments: tag: D3
type_infered: byte[4]

tool: {"D17": [0x00,0x00,0x40,0x40]}

tool: {"D3": [0x00,0x00,0x80,0x40]}

assistant: ```c
void test_range_float_gt_le(float f) {
  if (f > 3)
    if (f <= 4)
      __analyzer_eval(f == 4);
}
```
user: What is the c source code of the assembly code below:

```asm
<test_range_float_gt_le>:
  endbr64
  comiss D4(%rip),%xmm0
  jbe    L0
  movss  D15(%rip),%xmm1
  comiss %xmm0,%xmm1
  jae    L18
L0:
  ret
  nopl   0x0(%rax,%rax,1)
L18:
  xor    %edi,%edi
  ucomiss %xmm1,%xmm0
  mov    $0x0,%eax
  setnp  %dil
  cmovne %eax,%edi
  jmp    1050 <__analyzer_eval@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D4
datatype: byte[4]
name: retrieve_data
arguments: data_tag: D15
datatype: byte[4]

tool: {"D4": [0x00,0x00,0x40,0x40]}

tool: {"D15": [0x00,0x00,0x80,0x40]}

assistant: ```c
void test_range_float_gt_le(float f) {
  if (f > 3)
    if (f <= 4)
      __analyzer_eval(f == 4);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<findPrimeGreaterThan>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L31
  addl   $0x2,-0x4(%rbp)
  jmp    L32
L31:
  addl   $0x1,-0x4(%rbp)
  jmp    L32
L25:
  addl   $0x2,-0x4(%rbp)
L32:
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <isPrime@plt>
  test   %eax,%eax
  je     L25
  mov    -0x4(%rbp),%eax
  leave
  ret
```

assistant: ```c
int findPrimeGreaterThan(int val) {
  if (val & 1)
    val += 2;
  else
    val++;
  while (!isPrime(val))
    val += 2;
  return val;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<findPrimeGreaterThan>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  and    $0x1,%ebx
  lea    0x1(%rbx,%rdi,1),%ebx
  jmp    L2
L14:
  add    $0x2,%ebx
L2:
  mov    %ebx,%edi
  call   <isPrime@plt>
  test   %eax,%eax
  je     L14
  mov    %ebx,%eax
  pop    %rbx
  ret
```

assistant: ```c
int findPrimeGreaterThan(int val) {
  if (val & 1)
    val += 2;
  else
    val++;
  while (!isPrime(val))
    val += 2;
  return val;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<findPrimeGreaterThan>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  and    $0x1,%r12d
  lea    0x1(%r12,%rdi,1),%r12d
  jmp    L11
  nopl   0x0(%rax)
L0:
  add    $0x2,%r12d
L11:
  mov    %r12d,%edi
  call   <isPrime@plt>
  test   %eax,%eax
  je     L0
  mov    %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
int findPrimeGreaterThan(int val) {
  if (val & 1)
    val += 2;
  else
    val++;
  while (!isPrime(val))
    val += 2;
  return val;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<findPrimeGreaterThan>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  and    $0x1,%r12d
  lea    0x1(%r12,%rdi,1),%r12d
  jmp    L17
  nopl   0x0(%rax)
L18:
  add    $0x2,%r12d
L17:
  mov    %r12d,%edi
  call   <isPrime@plt>
  test   %eax,%eax
  je     L18
  mov    %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
int findPrimeGreaterThan(int val) {
  if (val & 1)
    val += 2;
  else
    val++;
  while (!isPrime(val))
    val += 2;
  return val;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<ft_striter>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L33
  cmpq   $0x0,-0x10(%rbp)
  je     L33
  jmp    L58
L45:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x10(%rbp),%rdx
  mov    %rax,%rdi
  call   *%rdx
L58:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L44
  cmpq   $0x0,-0x8(%rbp)
  jne    L45
  jmp    L44
L33:
  nop
L44:
  leave
  ret
```

assistant: ```c
void ft_striter(char *s, void (*f)(char *)) {
  if (s == NULL || f == NULL)
    return;
  while (*s && s != NULL) {
    f(s++);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<ft_striter>:
  endbr64
  test   %rdi,%rdi
  je     L15
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  test   %rsi,%rsi
  je     L28
  cmpb   $0x0,(%rdi)
  je     L28
L8:
  mov    %rbx,%rdi
  add    $0x1,%rbx
  call   *%rbp
  cmpb   $0x0,(%rbx)
  jne    L8
L28:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L15:
  ret
```

assistant: ```c
void ft_striter(char *s, void (*f)(char *)) {
  if (s == NULL || f == NULL)
    return;
  while (*s && s != NULL) {
    f(s++);
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<ft_striter>:
  endbr64
  test   %rdi,%rdi
  je     L37
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L32
  cmpb   $0x0,(%rdi)
  mov    %rdi,%rbx
  je     L32
  nop
L1:
  mov    %rbx,%rdi
  add    $0x1,%rbx
  call   *%rbp
  cmpb   $0x0,(%rbx)
  jne    L1
L32:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L37:
  ret
```

assistant: ```c
void ft_striter(char *s, void (*f)(char *)) {
  if (s == NULL || f == NULL)
    return;
  while (*s && s != NULL) {
    f(s++);
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<ft_striter>:
  endbr64
  test   %rdi,%rdi
  je     L26
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L31
  cmpb   $0x0,(%rdi)
  mov    %rdi,%rbx
  je     L31
  nop
L39:
  mov    %rbx,%rdi
  add    $0x1,%rbx
  call   *%rbp
  cmpb   $0x0,(%rbx)
  jne    L39
L31:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L26:
  ret
```

assistant: ```c
void ft_striter(char *s, void (*f)(char *)) {
  if (s == NULL || f == NULL)
    return;
  while (*s && s != NULL) {
    f(s++);
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<reheap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
L50:
  mov    -0x8(%rbp),%eax
  add    %eax,%eax
  cmp    %eax,-0x20(%rbp)
  jl     L53
  mov    -0x8(%rbp),%eax
  add    %eax,%eax
  cmp    %eax,-0x20(%rbp)
  jle    L62
  mov    -0x8(%rbp),%eax
  lea    (%rax,%rax,1),%edi
  mov    -0x8(%rbp),%eax
  add    %eax,%eax
  lea    -0x1(%rax),%esi
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    %edi,%edx
  mov    %rax,%rdi
  call   <greater@plt>
  test   %rax,%rax
  je     L36
  mov    -0x8(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L33
L36:
  mov    -0x8(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L33
L62:
  mov    -0x8(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x4(%rbp)
L33:
  mov    -0x8(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x4(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    %edi,%edx
  mov    %rax,%rdi
  call   <greater@plt>
  test   %rax,%rax
  je     L44
  mov    -0x4(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x8(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rcx
  mov    %edi,%edx
  mov    %rax,%rdi
  call   <swap@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L50
L53:
  nop
  jmp    L25
L44:
  nop
L25:
  nop
  leave
  ret
```

assistant: ```c
void reheap(void *base, int i, int k, size_t size, int (*cmp)(const void *, const void *)) {
  int j = i;
  int son;
  do {
    if (2 * j > k) {
      break;
    } else {
      if (2 * j + 1 <= k) {
        if (greater(base, 2 * j - 1, 2 * j, size, cmp))
          son = 2 * j;
        else
          son = 2 * j + 1;
      } else {
        son = 2 * j;
      }
    }
    if (greater(base, son - 1, j - 1, size, cmp)) {
      swap(base, j - 1, son - 1, size);
      j = son;
    } else {
      break;
    }
  } while (1);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<reheap>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %esi,%ebx
  mov    %edx,%r14d
  mov    %rcx,%r12
  mov    %r8,0x8(%rsp)
  lea    (%rsi,%rsi,1),%r15d
  cmp    %r15d,%edx
  jge    L49
L21:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L34:
  sub    $0x1,%ebx
  lea    -0x1(%rbp),%r15d
  mov    0x8(%rsp),%r8
  mov    %r12,%rcx
  mov    %ebx,%edx
  mov    %r15d,%esi
  mov    %r13,%rdi
  call   <greater@plt>
  test   %rax,%rax
  je     L21
  mov    %r12,%rcx
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <swap@plt>
  lea    0x0(%rbp,%rbp,1),%r15d
  cmp    %r14d,%r15d
  jg     L21
  mov    %ebp,%ebx
L49:
  mov    %r15d,%ebp
  cmp    %r15d,%r14d
  jle    L34
  lea    -0x1(%r15),%esi
  mov    0x8(%rsp),%r8
  mov    %r12,%rcx
  mov    %r15d,%edx
  mov    %r13,%rdi
  call   <greater@plt>
  cmp    $0x1,%rax
  adc    $0x0,%r15d
  mov    %r15d,%ebp
  jmp    L34
```

assistant: ```c
void reheap(void *base, int i, int k, size_t size, int (*cmp)(const void *, const void *)) {
  int j = i;
  int son;
  do {
    if (2 * j > k) {
      break;
    } else {
      if (2 * j + 1 <= k) {
        if (greater(base, 2 * j - 1, 2 * j, size, cmp))
          son = 2 * j;
        else
          son = 2 * j + 1;
      } else {
        son = 2 * j;
      }
    }
    if (greater(base, son - 1, j - 1, size, cmp)) {
      swap(base, j - 1, son - 1, size);
      j = son;
    } else {
      break;
    }
  } while (1);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<reheap>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    (%rsi,%rsi,1),%ebp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edx,0x8(%rsp)
  cmp    %ebp,%edx
  jl     L51
  mov    %rdi,%r13
  mov    %esi,%r9d
  mov    %rcx,%r12
  mov    %r8,%r15
  jmp    L38
  nop
L15:
  lea    -0x1(%r9),%ebp
  mov    %r15,%r8
  mov    %r12,%rcx
  mov    %r14d,%esi
  mov    %ebp,%edx
  mov    %r13,%rdi
  call   <greater@plt>
  test   %rax,%rax
  je     L51
  mov    %ebp,%esi
  mov    %r12,%rcx
  mov    %r14d,%edx
  mov    %r13,%rdi
  call   <swap@plt>
  lea    (%rbx,%rbx,1),%ebp
  cmp    0x8(%rsp),%ebp
  jg     L51
  mov    %ebx,%r9d
L38:
  lea    -0x1(%rbp),%r14d
  mov    %ebp,%ebx
  cmp    %ebp,0x8(%rsp)
  jle    L15
  mov    %r15,%r8
  mov    %r12,%rcx
  mov    %ebp,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  mov    %r9d,0xc(%rsp)
  call   <greater@plt>
  mov    0xc(%rsp),%r9d
  test   %rax,%rax
  jne    L15
  add    $0x1,%ebx
  mov    %ebp,%r14d
  jmp    L15
  xchg   %ax,%ax
L51:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void reheap(void *base, int i, int k, size_t size, int (*cmp)(const void *, const void *)) {
  int j = i;
  int son;
  do {
    if (2 * j > k) {
      break;
    } else {
      if (2 * j + 1 <= k) {
        if (greater(base, 2 * j - 1, 2 * j, size, cmp))
          son = 2 * j;
        else
          son = 2 * j + 1;
      } else {
        son = 2 * j;
      }
    }
    if (greater(base, son - 1, j - 1, size, cmp)) {
      swap(base, j - 1, son - 1, size);
      j = son;
    } else {
      break;
    }
  } while (1);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<reheap>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    (%rsi,%rsi,1),%ebp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edx,0x8(%rsp)
  cmp    %ebp,%edx
  jl     L20
  mov    %rdi,%r13
  mov    %esi,%r9d
  mov    %rcx,%r12
  mov    %r8,%r15
  jmp    L9
  nop
L55:
  lea    -0x1(%r9),%ebp
  mov    %r15,%r8
  mov    %r12,%rcx
  mov    %r14d,%esi
  mov    %ebp,%edx
  mov    %r13,%rdi
  call   <greater@plt>
  test   %rax,%rax
  je     L20
  mov    %ebp,%esi
  mov    %r12,%rcx
  mov    %r14d,%edx
  mov    %r13,%rdi
  call   <swap@plt>
  lea    (%rbx,%rbx,1),%ebp
  cmp    0x8(%rsp),%ebp
  jg     L20
  mov    %ebx,%r9d
L9:
  lea    -0x1(%rbp),%r14d
  mov    %ebp,%ebx
  cmp    %ebp,0x8(%rsp)
  jle    L55
  mov    %r15,%r8
  mov    %r12,%rcx
  mov    %ebp,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  mov    %r9d,0xc(%rsp)
  call   <greater@plt>
  mov    0xc(%rsp),%r9d
  test   %rax,%rax
  jne    L55
  add    $0x1,%ebx
  mov    %ebp,%r14d
  jmp    L55
  xchg   %ax,%ax
L20:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void reheap(void *base, int i, int k, size_t size, int (*cmp)(const void *, const void *)) {
  int j = i;
  int son;
  do {
    if (2 * j > k) {
      break;
    } else {
      if (2 * j + 1 <= k) {
        if (greater(base, 2 * j - 1, 2 * j, size, cmp))
          son = 2 * j;
        else
          son = 2 * j + 1;
      } else {
        son = 2 * j;
      }
    }
    if (greater(base, son - 1, j - 1, size, cmp)) {
      swap(base, j - 1, son - 1, size);
      j = son;
    } else {
      break;
    }
  } while (1);
}
```
user: Translate the below assembly code into C programming language:

```asm
<Graphics_DrawCircle>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    $0x1,%r15d
  sub    %edx,%r15d
  test   %edx,%edx
  js     L30
  mov    %edi,%r13d
  mov    %esi,%r14d
  mov    %edx,%r12d
  mov    %ecx,%ebx
  mov    $0x0,%ebp
  jmp    L4
L15:
  sub    $0x1,%r12d
  mov    %ebp,%eax
  sub    %r12d,%eax
  lea    0x1(%r15,%rax,2),%r15d
L19:
  cmp    %ebp,%r12d
  jl     L30
L4:
  lea    (%r14,%rbp,1),%eax
  lea    0x0(%r13,%r12,1),%ecx
  mov    %ebx,%edx
  mov    %eax,0x10(%rsp)
  mov    %eax,%esi
  mov    %ecx,0x8(%rsp)
  mov    %ecx,%edi
  call   <ST7735_DrawPixel@plt>
  lea    (%r14,%r12,1),%r8d
  lea    0x0(%rbp,%r13,1),%r9d
  mov    %ebx,%edx
  mov    %r8d,0xc(%rsp)
  mov    %r8d,%esi
  mov    %r9d,0x14(%rsp)
  mov    %r9d,%edi
  call   <ST7735_DrawPixel@plt>
  mov    %r13d,%eax
  sub    %r12d,%eax
  mov    %ebx,%edx
  mov    0x10(%rsp),%esi
  mov    %eax,0x10(%rsp)
  mov    %eax,%edi
  call   <ST7735_DrawPixel@plt>
  mov    %r13d,%ecx
  sub    %ebp,%ecx
  mov    %ebx,%edx
  mov    0xc(%rsp),%esi
  mov    %ecx,0x18(%rsp)
  mov    %ecx,%edi
  call   <ST7735_DrawPixel@plt>
  mov    %r14d,%edx
  sub    %ebp,%edx
  mov    %edx,%esi
  mov    %ebx,%edx
  mov    %esi,0x1c(%rsp)
  mov    0x10(%rsp),%edi
  call   <ST7735_DrawPixel@plt>
  mov    %r14d,%eax
  sub    %r12d,%eax
  mov    %ebx,%edx
  mov    %eax,0xc(%rsp)
  mov    %eax,%esi
  mov    0x18(%rsp),%edi
  call   <ST7735_DrawPixel@plt>
  mov    %ebx,%edx
  mov    0x1c(%rsp),%esi
  mov    0x8(%rsp),%edi
  call   <ST7735_DrawPixel@plt>
  mov    %ebx,%edx
  mov    0xc(%rsp),%esi
  mov    0x14(%rsp),%edi
  call   <ST7735_DrawPixel@plt>
  add    $0x1,%ebp
  test   %r15d,%r15d
  jg     L15
  lea    0x1(%r15,%rbp,2),%r15d
  jmp    L19
L30:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void Graphics_DrawCircle(int x0, int y0, int radius, int color) {
  int x = radius;
  int y = 0;
  int decisionOver2 = 1 - x;
  while (y <= x) {
    ST7735_DrawPixel(x + x0, y + y0, color);
    ST7735_DrawPixel(y + x0, x + y0, color);
    ST7735_DrawPixel(-x + x0, y + y0, color);
    ST7735_DrawPixel(-y + x0, x + y0, color);
    ST7735_DrawPixel(-x + x0, -y + y0, color);
    ST7735_DrawPixel(-y + x0, -x + y0, color);
    ST7735_DrawPixel(x + x0, -y + y0, color);
    ST7735_DrawPixel(y + x0, -x + y0, color);
    y++;
    if (decisionOver2 <= 0) {
      decisionOver2 += 2 * y + 1;
    } else {
      x--;
      decisionOver2 += 2 * (y - x) + 1;
    }
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<Graphics_DrawCircle>:
  endbr64
  push   %r15
  mov    $0x1,%r15d
  push   %r14
  sub    %edx,%r15d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  test   %edx,%edx
  js     L36
  mov    %edi,%r13d
  mov    %esi,%r14d
  mov    %edx,%r12d
  mov    %ecx,%ebx
  xor    %ebp,%ebp
  jmp    L37
  nopw   0x0(%rax,%rax,1)
L2:
  sub    $0x1,%r12d
  mov    %ebp,%eax
  sub    %r12d,%eax
  lea    0x1(%r15,%rax,2),%r15d
  cmp    %ebp,%r12d
  jl     L36
L37:
  lea    0x0(%r13,%r12,1),%r10d
  lea    0x0(%rbp,%r14,1),%ecx
  mov    %ebx,%edx
  mov    %r10d,%edi
  mov    %ecx,%esi
  mov    %r10d,0x1c(%rsp)
  mov    %ecx,0xc(%rsp)
  call   <ST7735_DrawPixel@plt>
  lea    0x0(%r13,%rbp,1),%r8d
  lea    (%r14,%r12,1),%r11d
  mov    %ebx,%edx
  mov    %r8d,%edi
  mov    %r11d,%esi
  mov    %r8d,0x18(%rsp)
  mov    %r11d,0x10(%rsp)
  call   <ST7735_DrawPixel@plt>
  mov    %r13d,%r9d
  mov    0xc(%rsp),%esi
  mov    %ebx,%edx
  sub    %r12d,%r9d
  mov    %r9d,%edi
  mov    %r9d,0xc(%rsp)
  call   <ST7735_DrawPixel@plt>
  mov    %r13d,%ecx
  mov    0x10(%rsp),%esi
  mov    %ebx,%edx
  sub    %ebp,%ecx
  mov    %ecx,%edi
  mov    %ecx,0x14(%rsp)
  call   <ST7735_DrawPixel@plt>
  mov    %r14d,%r11d
  mov    0xc(%rsp),%edi
  mov    %ebx,%edx
  sub    %ebp,%r11d
  add    $0x1,%ebp
  mov    %r11d,%esi
  mov    %r11d,0x10(%rsp)
  call   <ST7735_DrawPixel@plt>
  mov    %r14d,%r9d
  mov    0x14(%rsp),%edi
  mov    %ebx,%edx
  sub    %r12d,%r9d
  mov    %r9d,%esi
  mov    %r9d,0xc(%rsp)
  call   <ST7735_DrawPixel@plt>
  mov    0x10(%rsp),%esi
  mov    0x1c(%rsp),%edi
  mov    %ebx,%edx
  call   <ST7735_DrawPixel@plt>
  mov    0xc(%rsp),%esi
  mov    0x18(%rsp),%edi
  mov    %ebx,%edx
  call   <ST7735_DrawPixel@plt>
  test   %r15d,%r15d
  jg     L2
  lea    0x1(%r15,%rbp,2),%r15d
  cmp    %ebp,%r12d
  jge    L37
L36:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void Graphics_DrawCircle(int x0, int y0, int radius, int color) {
  int x = radius;
  int y = 0;
  int decisionOver2 = 1 - x;
  while (y <= x) {
    ST7735_DrawPixel(x + x0, y + y0, color);
    ST7735_DrawPixel(y + x0, x + y0, color);
    ST7735_DrawPixel(-x + x0, y + y0, color);
    ST7735_DrawPixel(-y + x0, x + y0, color);
    ST7735_DrawPixel(-x + x0, -y + y0, color);
    ST7735_DrawPixel(-y + x0, -x + y0, color);
    ST7735_DrawPixel(x + x0, -y + y0, color);
    ST7735_DrawPixel(y + x0, -x + y0, color);
    y++;
    if (decisionOver2 <= 0) {
      decisionOver2 += 2 * y + 1;
    } else {
      x--;
      decisionOver2 += 2 * (y - x) + 1;
    }
  }
}
```