ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x20(%rsp)
  movl   $0x0,0x24(%rsp)
  lea    0x1c(%rsp),%rsi
  lea    D29(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x0,0x1c(%rsp)
  jle    L26
  pxor   %xmm3,%xmm3
  movss  %xmm3,0xc(%rsp)
  mov    $0x0,%ebp
  mov    $0x0,%ebx
  lea    D2(%rip),%r12
L11:
  lea    0x24(%rsp),%rdx
  lea    0x20(%rsp),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x20(%rsp),%xmm0
  mulss  0x24(%rsp),%xmm0
  addss  0xc(%rsp),%xmm0
  movss  %xmm0,0xc(%rsp)
  add    0x20(%rsp),%ebp
  add    $0x1,%ebx
  cmp    %ebx,0x1c(%rsp)
  jg     L11
L1:
  pxor   %xmm1,%xmm1
  cvtsi2ss %ebp,%xmm1
  movss  0xc(%rsp),%xmm0
  divss  %xmm1,%xmm0
  lea    D5(%rip),%rdi
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  mov    $0x0,%eax
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L26:
  pxor   %xmm4,%xmm4
  movss  %xmm4,0xc(%rsp)
  mov    $0x0,%ebp
  jmp    L1
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D29
type_infered: string
name: read_data
arguments: data_label: D2
type_infered: string
name: read_data
arguments: data_label: D5
type_infered: string

tool: D29: %i

tool: D2: %i%f

tool: D5: %.2f

assistant: ```c
int main(int argc, char *argv[]) {
  int a, i, c = 0, m = 0;
  float n = 0.0, tol = 0.0;
  scanf("%i", &a);
  for (i = 0; i < a; i++) {
    scanf("%i%f", &m, &n);
    tol += m * n;
    c += m;
  }
  printf("%.2f", tol / c);
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  push   %r14
  lea    D13(%rip),%rdi
  push   %r13
  push   %r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  movl   $0x0,0x20(%rsp)
  movl   $0x0,0x24(%rsp)
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  pxor   %xmm0,%xmm0
  test   %eax,%eax
  jle    L7
  xor    %ebx,%ebx
  lea    0x24(%rsp),%r14
  lea    0x20(%rsp),%r13
  lea    D21(%rip),%r12
  nopw   0x0(%rax,%rax,1)
L2:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  movss  %xmm0,0xc(%rsp)
  add    $0x1,%ebx
  call   <scanf@plt>
  pxor   %xmm1,%xmm1
  movss  0xc(%rsp),%xmm0
  add    0x20(%rsp),%ebp
  cvtsi2ssl 0x20(%rsp),%xmm1
  mulss  0x24(%rsp),%xmm1
  addss  %xmm1,%xmm0
  cmp    %ebx,0x1c(%rsp)
  jg     L2
L7:
  pxor   %xmm1,%xmm1
  lea    D25(%rip),%rdi
  cvtsi2ss %ebp,%xmm1
  divss  %xmm1,%xmm0
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D13
type: string
name: disassemble_data
arguments: data_label: D21
type: string
name: disassemble_data
arguments: data_label: D25
type: string

tool: D13: %i

tool: D21: %i%f

tool: D25: %.2f

assistant: ```c
int main(int argc, char *argv[]) {
  int a, i, c = 0, m = 0;
  float n = 0.0, tol = 0.0;
  scanf("%i", &a);
  for (i = 0; i < a; i++) {
    scanf("%i%f", &m, &n);
    tol += m * n;
    c += m;
  }
  printf("%.2f", tol / c);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  push   %r14
  lea    D7(%rip),%rdi
  push   %r13
  push   %r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  movl   $0x0,0x20(%rsp)
  movl   $0x0,0x24(%rsp)
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  pxor   %xmm0,%xmm0
  test   %eax,%eax
  jle    L26
  xor    %ebx,%ebx
  lea    0x24(%rsp),%r14
  lea    0x20(%rsp),%r13
  lea    D26(%rip),%r12
  nopw   0x0(%rax,%rax,1)
L11:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  movss  %xmm0,0xc(%rsp)
  add    $0x1,%ebx
  call   <scanf@plt>
  pxor   %xmm1,%xmm1
  movss  0xc(%rsp),%xmm0
  add    0x20(%rsp),%ebp
  cvtsi2ssl 0x20(%rsp),%xmm1
  mulss  0x24(%rsp),%xmm1
  addss  %xmm1,%xmm0
  cmp    %ebx,0x1c(%rsp)
  jg     L11
L26:
  pxor   %xmm1,%xmm1
  lea    D17(%rip),%rdi
  cvtsi2ss %ebp,%xmm1
  divss  %xmm1,%xmm0
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D7
type_infered: string
name: parse_data
arguments: data_label: D26
type_infered: string
name: parse_data
arguments: data_label: D17
type_infered: string

tool: D7: %i

tool: D26: %i%f

tool: D17: %.2f

assistant: ```c
int main(int argc, char *argv[]) {
  int a, i, c = 0, m = 0;
  float n = 0.0, tol = 0.0;
  scanf("%i", &a);
  for (i = 0; i < a; i++) {
    scanf("%i%f", &m, &n);
    tol += m * n;
    c += m;
  }
  printf("%.2f", tol / c);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<is_C_identifier>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  cmpb   $0x22,-0x9(%rbp)
  jne    L58
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  movzbl -0x9(%rbp),%eax
  mov    %eax,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  jne    L189
  cmpb   $0x5f,-0x9(%rbp)
  je     L189
  cmpb   $0x24,-0x9(%rbp)
  je     L189
  mov    $0x0,%eax
  jmp    L71
L162:
  movzbl -0x9(%rbp),%eax
  mov    %eax,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  jne    L189
  cmpb   $0x5f,-0x9(%rbp)
  je     L189
  cmpb   $0x24,-0x9(%rbp)
  je     L189
  mov    $0x0,%eax
  jmp    L71
L189:
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  cmpb   $0x22,-0x9(%rbp)
  jne    L162
  mov    $0x1,%eax
  jmp    L71
L58:
  movzbl -0x9(%rbp),%eax
  mov    %eax,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  jne    L52
  cmpb   $0x5f,-0x9(%rbp)
  je     L52
  cmpb   $0x24,-0x9(%rbp)
  je     L52
  mov    $0x0,%eax
  jmp    L71
L186:
  movzbl -0x9(%rbp),%eax
  mov    %eax,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  jne    L52
  cmpb   $0x5f,-0x9(%rbp)
  je     L52
  cmpb   $0x24,-0x9(%rbp)
  je     L52
  mov    $0x0,%eax
  jmp    L71
L52:
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  cmpb   $0x0,-0x9(%rbp)
  jne    L186
  mov    $0x1,%eax
L71:
  leave
  ret
```

assistant: ```c
int is_C_identifier(char *name) {
  char *s;
  unsigned char c;
  s = name;
  c = *s;
  if (c == '"') {
    c = *++s;
    if (!isalpha(c) && c != '_' && c != '$')
      return (0);
    while ((c = *++s) != '"') {
      if (!isalnum(c) && c != '_' && c != '$')
        return (0);
    }
    return (1);
  }
  if (!isalpha(c) && c != '_' && c != '$')
    return (0);
  while ((c = *++s) != '\0') {
    if (!isalnum(c) && c != '_' && c != '$')
      return (0);
  }
  return (1);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<is_C_identifier>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  movzbl (%rdi),%ebp
  cmp    $0x22,%bpl
  je     L141
  movzbl %bpl,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  jne    L156
  cmp    $0x5f,%bpl
  je     L156
  cmp    $0x24,%bpl
  jne    L205
L156:
  lea    0x1(%rbx),%rbp
  movzbl 0x1(%rbx),%ebx
  test   %bl,%bl
  jne    L24
  mov    $0x1,%eax
  jmp    L205
L141:
  movzbl 0x1(%rdi),%ebp
  movzbl %bpl,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  jne    L157
  cmp    $0x5f,%bpl
  je     L157
  cmp    $0x24,%bpl
  jne    L205
L157:
  lea    0x2(%rbx),%rbp
  movzbl 0x2(%rbx),%ebx
  cmp    $0x22,%bl
  jne    L69
  mov    $0x1,%eax
  jmp    L205
L219:
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%ebx
  cmp    $0x22,%bl
  je     L59
L69:
  movzbl %bl,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  jne    L219
  cmp    $0x5f,%bl
  je     L219
  cmp    $0x24,%bl
  je     L219
  jmp    L205
L59:
  mov    $0x1,%eax
  jmp    L205
L102:
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%ebx
  test   %bl,%bl
  je     L9
L24:
  movzbl %bl,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  jne    L102
  cmp    $0x5f,%bl
  je     L102
  cmp    $0x24,%bl
  je     L102
  jmp    L205
L9:
  mov    $0x1,%eax
L205:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
int is_C_identifier(char *name) {
  char *s;
  unsigned char c;
  s = name;
  c = *s;
  if (c == '"') {
    c = *++s;
    if (!isalpha(c) && c != '_' && c != '$')
      return (0);
    while ((c = *++s) != '"') {
      if (!isalnum(c) && c != '_' && c != '$')
        return (0);
    }
    return (1);
  }
  if (!isalpha(c) && c != '_' && c != '$')
    return (0);
  while ((c = *++s) != '\0') {
    if (!isalnum(c) && c != '_' && c != '$')
      return (0);
  }
  return (1);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<is_C_identifier>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  movzbl (%rdi),%ebp
  cmp    $0x22,%bpl
  je     L77
  movzbl %bpl,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  je     L181
L28:
  lea    0x1(%rbx),%rbp
  movzbl 0x1(%rbx),%ebx
  test   %bl,%bl
  je     L32
  nop
L37:
  movzbl %bl,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  jne    L60
  cmp    $0x5f,%bl
  je     L60
  cmp    $0x24,%bl
  jne    L109
L60:
  movzbl 0x1(%rbp),%ebx
  add    $0x1,%rbp
  test   %bl,%bl
  jne    L37
L32:
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  ret
  xchg   %ax,%ax
L181:
  cmp    $0x5f,%bpl
  je     L28
  cmp    $0x24,%bpl
  je     L28
L109:
  xor    %eax,%eax
L41:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L77:
  movzbl 0x1(%rdi),%edi
  mov    %edi,%ebp
  call   <isalpha@plt>
  test   %eax,%eax
  je     L186
L70:
  lea    0x2(%rbx),%rbp
  movzbl 0x2(%rbx),%ebx
  cmp    $0x22,%bl
  je     L32
  nopl   0x0(%rax)
L25:
  movzbl %bl,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  jne    L18
  cmp    $0x5f,%bl
  je     L18
  cmp    $0x24,%bl
  jne    L109
L18:
  movzbl 0x1(%rbp),%ebx
  add    $0x1,%rbp
  cmp    $0x22,%bl
  jne    L25
  jmp    L32
  nopl   (%rax)
L186:
  cmp    $0x5f,%bpl
  je     L70
  cmp    $0x24,%bpl
  je     L70
  xor    %eax,%eax
  jmp    L41
```

assistant: ```c
int is_C_identifier(char *name) {
  char *s;
  unsigned char c;
  s = name;
  c = *s;
  if (c == '"') {
    c = *++s;
    if (!isalpha(c) && c != '_' && c != '$')
      return (0);
    while ((c = *++s) != '"') {
      if (!isalnum(c) && c != '_' && c != '$')
        return (0);
    }
    return (1);
  }
  if (!isalpha(c) && c != '_' && c != '$')
    return (0);
  while ((c = *++s) != '\0') {
    if (!isalnum(c) && c != '_' && c != '$')
      return (0);
  }
  return (1);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<is_C_identifier>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  movzbl (%rdi),%ebp
  cmp    $0x22,%bpl
  je     L109
  movzbl %bpl,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  je     L37
L158:
  lea    0x1(%rbx),%rbp
  movzbl 0x1(%rbx),%ebx
  test   %bl,%bl
  je     L116
  nop
L141:
  movzbl %bl,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  jne    L128
  cmp    $0x5f,%bl
  je     L128
  cmp    $0x24,%bl
  jne    L168
L128:
  movzbl 0x1(%rbp),%ebx
  add    $0x1,%rbp
  test   %bl,%bl
  jne    L141
L116:
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  ret
  xchg   %ax,%ax
L37:
  cmp    $0x5f,%bpl
  je     L158
  cmp    $0x24,%bpl
  je     L158
L168:
  xor    %eax,%eax
L138:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L109:
  movzbl 0x1(%rdi),%edi
  mov    %edi,%ebp
  call   <isalpha@plt>
  test   %eax,%eax
  je     L118
L21:
  lea    0x2(%rbx),%rbp
  movzbl 0x2(%rbx),%ebx
  cmp    $0x22,%bl
  je     L116
  nopl   0x0(%rax)
L85:
  movzbl %bl,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  jne    L127
  cmp    $0x5f,%bl
  je     L127
  cmp    $0x24,%bl
  jne    L168
L127:
  movzbl 0x1(%rbp),%ebx
  add    $0x1,%rbp
  cmp    $0x22,%bl
  jne    L85
  jmp    L116
  nopl   (%rax)
L118:
  cmp    $0x5f,%bpl
  je     L21
  cmp    $0x24,%bpl
  je     L21
  xor    %eax,%eax
  jmp    L138
```

assistant: ```c
int is_C_identifier(char *name) {
  char *s;
  unsigned char c;
  s = name;
  c = *s;
  if (c == '"') {
    c = *++s;
    if (!isalpha(c) && c != '_' && c != '$')
      return (0);
    while ((c = *++s) != '"') {
      if (!isalnum(c) && c != '_' && c != '$')
        return (0);
    }
    return (1);
  }
  if (!isalpha(c) && c != '_' && c != '$')
    return (0);
  while ((c = *++s) != '\0') {
    if (!isalnum(c) && c != '_' && c != '$')
      return (0);
  }
  return (1);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<PrintUnsigned>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %edx,-0x60(%rbp)
  mov    %ecx,-0x64(%rbp)
  mov    %r8d,-0x68(%rbp)
  mov    %r9,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x21,-0x44(%rbp)
  cmpq   $0x0,-0x58(%rbp)
  jne    L96
  mov    -0x70(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x30,%edi
  call   <PrintCh@plt>
L96:
  subl   $0x1,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  movb   $0x0,-0x30(%rbp,%rax,1)
  jmp    L30
L4:
  mov    -0x5c(%rbp),%edi
  mov    -0x58(%rbp),%rax
  mov    $0x0,%edx
  div    %rdi
  mov    %rax,-0x40(%rbp)
  mov    -0x5c(%rbp),%eax
  imul   -0x40(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x58(%rbp),%rax
  sub    %rdx,%rax
  mov    %rax,-0x38(%rbp)
  cmpq   $0x9,-0x38(%rbp)
  ja     L41
  mov    -0x38(%rbp),%rax
  add    $0x30,%eax
  subl   $0x1,-0x44(%rbp)
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %dl,-0x30(%rbp,%rax,1)
  jmp    L66
L41:
  mov    -0x38(%rbp),%rax
  add    $0x57,%eax
  subl   $0x1,-0x44(%rbp)
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %dl,-0x30(%rbp,%rax,1)
L66:
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L30:
  cmpq   $0x0,-0x58(%rbp)
  jne    L4
  cmpl   $0x0,-0x60(%rbp)
  jle    L35
  cmpl   $0x0,-0x68(%rbp)
  jne    L35
  mov    -0x60(%rbp),%edx
  mov    -0x44(%rbp),%eax
  add    %edx,%eax
  sub    $0x20,%eax
  mov    %eax,%esi
  cmpl   $0x0,-0x64(%rbp)
  je     L63
  mov    $0x30,%ecx
  jmp    L117
L63:
  mov    $0x20,%ecx
L117:
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdx
  mov    %ecx,%edi
  call   <PrintRepeatedChar@plt>
L35:
  lea    -0x30(%rbp),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  add    %rax,%rdx
  mov    -0x70(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <PrintStr@plt>
  cmpl   $0x0,-0x60(%rbp)
  jle    L75
  cmpl   $0x0,-0x68(%rbp)
  je     L75
  mov    -0x60(%rbp),%edx
  mov    -0x44(%rbp),%eax
  add    %edx,%eax
  sub    $0x20,%eax
  mov    %eax,%ecx
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdx
  mov    %ecx,%esi
  mov    $0x20,%edi
  call   <PrintRepeatedChar@plt>
L75:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L6
  call   <__stack_chk_fail@plt>
L6:
  leave
  ret
```

assistant: ```c
void PrintUnsigned(unsigned long Num, unsigned int Base, int FieldWidth, int ZeroPad, int LeftJustify, struct OutputStream *Stream) {
  char Result[33];
  int ResPos = sizeof(Result);
  if (Num == 0)
    PrintCh('0', Stream);
  Result[--ResPos] = '\0';
  while (Num > 0) {
    unsigned long NextNum = Num / Base;
    unsigned long Digit = Num - NextNum * Base;
    if (Digit < 10)
      Result[--ResPos] = '0' + Digit;
    else
      Result[--ResPos] = 'a' + Digit - 10;
    Num = NextNum;
  }
  if (FieldWidth > 0 && !LeftJustify)
    PrintRepeatedChar(ZeroPad ? '0' : ' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream);
  PrintStr(&Result[ResPos], Stream);
  if (FieldWidth > 0 && LeftJustify)
    PrintRepeatedChar(' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<PrintUnsigned>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edx,%r12d
  mov    %ecx,%r14d
  mov    %r8d,%r13d
  mov    %r9,%rbp
  mov    %fs:0x28,%rdx
  mov    %rdx,0x28(%rsp)
  xor    %edx,%edx
  test   %rdi,%rdi
  je     L81
  mov    %esi,%eax
  movb   $0x0,0x20(%rsp)
  mov    $0x1f,%esi
  mov    %eax,%ecx
  jmp    L44
L81:
  mov    %r9,%rsi
  mov    $0x30,%edi
  call   <PrintCh@plt>
  movb   $0x0,0x20(%rsp)
  mov    $0x20,%ebx
L80:
  test   %r12d,%r12d
  setg   %r15b
  test   %r13d,%r13d
  jne    L64
  test   %r15b,%r15b
  je     L64
  lea    -0x20(%rbx,%r12,1),%esi
  cmp    $0x1,%r14d
  sbb    %edi,%edi
  and    $0xfffffff0,%edi
  add    $0x30,%edi
  mov    %rbp,%rdx
  call   <PrintRepeatedChar@plt>
  movslq %ebx,%rbx
  lea    (%rsp,%rbx,1),%rdi
  mov    %rbp,%rsi
  call   <PrintStr@plt>
L33:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L49:
  mov    %esi,%ebx
  movslq %esi,%rax
  add    $0x57,%edx
  mov    %dl,(%rsp,%rax,1)
L95:
  sub    $0x1,%esi
  cmp    %r8,%rcx
  ja     L80
L44:
  mov    %rdi,%r8
  mov    %rdi,%rax
  mov    $0x0,%edx
  div    %rcx
  mov    %rax,%rdi
  mov    %r8,%rax
  mov    $0x0,%edx
  div    %rcx
  cmp    $0x9,%rdx
  ja     L49
  mov    %esi,%ebx
  movslq %esi,%rax
  add    $0x30,%edx
  mov    %dl,(%rsp,%rax,1)
  jmp    L95
L64:
  movslq %ebx,%rax
  lea    (%rsp,%rax,1),%rdi
  mov    %rbp,%rsi
  call   <PrintStr@plt>
  test   %r13d,%r13d
  je     L33
  test   %r15b,%r15b
  je     L33
  lea    -0x20(%rbx,%r12,1),%esi
  mov    %rbp,%rdx
  mov    $0x20,%edi
  call   <PrintRepeatedChar@plt>
  jmp    L33
L0:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void PrintUnsigned(unsigned long Num, unsigned int Base, int FieldWidth, int ZeroPad, int LeftJustify, struct OutputStream *Stream) {
  char Result[33];
  int ResPos = sizeof(Result);
  if (Num == 0)
    PrintCh('0', Stream);
  Result[--ResPos] = '\0';
  while (Num > 0) {
    unsigned long NextNum = Num / Base;
    unsigned long Digit = Num - NextNum * Base;
    if (Digit < 10)
      Result[--ResPos] = '0' + Digit;
    else
      Result[--ResPos] = 'a' + Digit - 10;
    Num = NextNum;
  }
  if (FieldWidth > 0 && !LeftJustify)
    PrintRepeatedChar(ZeroPad ? '0' : ' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream);
  PrintStr(&Result[ResPos], Stream);
  if (FieldWidth > 0 && LeftJustify)
    PrintRepeatedChar(' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream);
}
```
user: What is the c source code of the assembly code below?

```asm
<PrintUnsigned>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %r9,%r13
  push   %r12
  mov    %r8d,%r12d
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rdx
  mov    %rdx,0x38(%rsp)
  xor    %edx,%edx
  test   %rdi,%rdi
  je     L77
  movb   $0x0,0x30(%rsp)
  mov    %rdi,%rax
  mov    $0x1f,%ecx
  mov    %esi,%edi
  lea    0x10(%rsp),%r8
  nopl   0x0(%rax)
L47:
  xor    %edx,%edx
  mov    %rax,%r10
  mov    %ecx,%r14d
  div    %rdi
  cmp    $0x9,%rdx
  lea    0x30(%rdx),%r9d
  lea    0x57(%rdx),%esi
  cmovbe %r9d,%esi
  mov    %sil,(%r8,%rcx,1)
  sub    $0x1,%rcx
  cmp    %r10,%rdi
  jbe    L47
  movslq %r14d,%rax
L9:
  test   %ebx,%ebx
  lea    (%r8,%rax,1),%r15
  setg   %dl
  test   %r12d,%r12d
  jne    L89
  test   %dl,%dl
  je     L89
  cmp    $0x1,%ebp
  lea    -0x20(%r14,%rbx,1),%esi
  mov    %r13,%rdx
  sbb    %edi,%edi
  and    $0xfffffff0,%edi
  add    $0x30,%edi
  call   <PrintRepeatedChar@plt>
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <PrintStr@plt>
L82:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L35
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L89:
  mov    %r13,%rsi
  mov    %r15,%rdi
  mov    %dl,0xf(%rsp)
  call   <PrintStr@plt>
  test   %r12d,%r12d
  je     L82
  movzbl 0xf(%rsp),%edx
  test   %dl,%dl
  je     L82
  lea    -0x20(%r14,%rbx,1),%esi
  mov    %r13,%rdx
  mov    $0x20,%edi
  call   <PrintRepeatedChar@plt>
  jmp    L82
  nopl   0x0(%rax)
L77:
  mov    %r9,%rsi
  mov    $0x30,%edi
  mov    $0x20,%r14d
  call   <PrintCh@plt>
  movb   $0x0,0x30(%rsp)
  mov    $0x20,%eax
  lea    0x10(%rsp),%r8
  jmp    L9
L35:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void PrintUnsigned(unsigned long Num, unsigned int Base, int FieldWidth, int ZeroPad, int LeftJustify, struct OutputStream *Stream) {
  char Result[33];
  int ResPos = sizeof(Result);
  if (Num == 0)
    PrintCh('0', Stream);
  Result[--ResPos] = '\0';
  while (Num > 0) {
    unsigned long NextNum = Num / Base;
    unsigned long Digit = Num - NextNum * Base;
    if (Digit < 10)
      Result[--ResPos] = '0' + Digit;
    else
      Result[--ResPos] = 'a' + Digit - 10;
    Num = NextNum;
  }
  if (FieldWidth > 0 && !LeftJustify)
    PrintRepeatedChar(ZeroPad ? '0' : ' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream);
  PrintStr(&Result[ResPos], Stream);
  if (FieldWidth > 0 && LeftJustify)
    PrintRepeatedChar(' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<PrintUnsigned>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %r9,%r13
  push   %r12
  mov    %r8d,%r12d
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L36
  movb   $0x0,0x30(%rsp)
  mov    %esi,%esi
  mov    $0x1f,%ecx
  lea    0x10(%rsp),%r8
  jmp    L3
  nopl   0x0(%rax,%rax,1)
L5:
  add    $0x30,%edx
  mov    %dl,(%r8,%rcx,1)
  sub    $0x1,%rcx
  cmp    %rdi,%rsi
  ja     L110
L109:
  mov    %rax,%rdi
L3:
  mov    %rdi,%rax
  xor    %edx,%edx
  mov    %ecx,%r14d
  div    %rsi
  cmp    $0x9,%rdx
  jbe    L5
  add    $0x57,%edx
  mov    %dl,(%r8,%rcx,1)
  sub    $0x1,%rcx
  cmp    %rdi,%rsi
  jbe    L109
L110:
  movslq %r14d,%rax
L78:
  test   %ebx,%ebx
  lea    (%r8,%rax,1),%r15
  setg   %dl
  test   %r12d,%r12d
  jne    L0
  test   %dl,%dl
  je     L0
  cmp    $0x1,%ebp
  lea    -0x20(%r14,%rbx,1),%esi
  mov    %r13,%rdx
  sbb    %edi,%edi
  and    $0xfffffff0,%edi
  add    $0x30,%edi
  call   <PrintRepeatedChar@plt>
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <PrintStr@plt>
L75:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L54
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L0:
  mov    %r13,%rsi
  mov    %r15,%rdi
  mov    %dl,0xf(%rsp)
  call   <PrintStr@plt>
  test   %r12d,%r12d
  je     L75
  movzbl 0xf(%rsp),%edx
  test   %dl,%dl
  je     L75
  lea    -0x20(%r14,%rbx,1),%esi
  mov    %r13,%rdx
  mov    $0x20,%edi
  call   <PrintRepeatedChar@plt>
  jmp    L75
  nopl   0x0(%rax)
L36:
  mov    %r9,%rsi
  mov    $0x30,%edi
  mov    $0x20,%r14d
  call   <PrintCh@plt>
  movb   $0x0,0x30(%rsp)
  mov    $0x20,%eax
  lea    0x10(%rsp),%r8
  jmp    L78
L54:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void PrintUnsigned(unsigned long Num, unsigned int Base, int FieldWidth, int ZeroPad, int LeftJustify, struct OutputStream *Stream) {
  char Result[33];
  int ResPos = sizeof(Result);
  if (Num == 0)
    PrintCh('0', Stream);
  Result[--ResPos] = '\0';
  while (Num > 0) {
    unsigned long NextNum = Num / Base;
    unsigned long Digit = Num - NextNum * Base;
    if (Digit < 10)
      Result[--ResPos] = '0' + Digit;
    else
      Result[--ResPos] = 'a' + Digit - 10;
    Num = NextNum;
  }
  if (FieldWidth > 0 && !LeftJustify)
    PrintRepeatedChar(ZeroPad ? '0' : ' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream);
  PrintStr(&Result[ResPos], Stream);
  if (FieldWidth > 0 && LeftJustify)
    PrintRepeatedChar(' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<stopRobot>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <HiveX_motor_setDutyCycle@plt>
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <HiveX_motor_setDutyCycle@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void stopRobot() {
  HiveX_motor_setDutyCycle(0, 0);
  HiveX_motor_setDutyCycle(1, 0);
}
```