user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x1,-0x40(%rbp)
  movl   $0xc7,-0x3c(%rbp)
  mov    $0x0,%eax
  call   <clrscr@plt>
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L229
L25:
  movl   $0xfffffffd,-0x44(%rbp)
  jmp    L98
L152:
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x44(%rbp),%rax
  mov    %rax,%rsi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
L98:
  mov    -0x44(%rbp),%eax
  test   %eax,%eax
  js     L152
  mov    -0x44(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D124(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D46(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,%esi
  lea    D138(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x12b,-0x34(%rbp)
  jg     L19
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L18
L19:
  cmpl   $0x18f,-0x34(%rbp)
  jg     L2
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L18
L2:
  cmpl   $0x1f3,-0x34(%rbp)
  jg     L213
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x28(%rbp)
  jmp    L18
L213:
  cmpl   $0x257,-0x34(%rbp)
  jg     L4
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x24(%rbp)
  jmp    L18
L4:
  cmpl   $0x2bb,-0x34(%rbp)
  jg     L155
  mov    -0x20(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  jmp    L18
L155:
  cmpl   $0x31f,-0x34(%rbp)
  jg     L20
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L18
L20:
  cmpl   $0x383,-0x34(%rbp)
  jg     L165
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  jmp    L18
L165:
  cmpl   $0x3e7,-0x34(%rbp)
  jg     L35
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L18
L35:
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
L18:
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x40(%rbp),%rax
  mov    %rax,%rsi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L229:
  mov    -0x40(%rbp),%eax
  cmp    $0x1,%eax
  je     L25
  movl   $0x0,-0x38(%rbp)
  jmp    L39
L158:
  addl   $0x1,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,%esi
  lea    D112(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x63,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,%esi
  lea    D101(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x38(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x38(%rbp)
L39:
  cmpl   $0x7,-0x38(%rbp)
  jle    L158
  mov    -0x38(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L132
  call   <__stack_chk_fail@plt>
L132:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D9
type: string
name: read_data
arguments: label: D128
type: string
name: read_data
arguments: label: D44
type: string
name: read_data
arguments: label: D124
type: f64
name: read_data
arguments: label: D46
type: byte[8]
name: read_data
arguments: label: D138
type: string
name: read_data
arguments: label: D91
type: string
name: read_data
arguments: label: D112
type: string
name: read_data
arguments: label: D101
type: string
name: read_data
arguments: label: D78
type: string
name: read_data
arguments: label: D45
type: string

tool: D9: ----------

tool: D128: Sales:	

tool: D44: %d

tool: D124: 0.09

tool: {"D46": [0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x40]}

tool: D138: Salary:	%d


tool: D91: Continue? (1 = yes, 0 = no) 

tool: D112: %d - 

tool: D101: %d:	

tool: D78: %d


tool: D45: 1000+    :	%d


assistant: ```c
void main() {
  int ranges[9] = {0};
  int curSale;
  int curTotal;
  int cont = 1;
  int numPref = 199;
  int i;
  clrscr();
  printf("----------\n");
  while (cont == 1) {
    curSale = -3;
    while (curSale < 0) {
      printf("Sales:\t");
      scanf("%d", &curSale);
    }
    curTotal = 200 + (0.09 * curSale);
    printf("Salary:\t%d\n", curTotal);
    if (curTotal <= 299) {
      ranges[0] += 1;
    } else if (curTotal <= 399) {
      ranges[1] += 1;
    } else if (curTotal <= 499) {
      ranges[2] += 1;
    } else if (curTotal <= 599) {
      ranges[3] += 1;
    } else if (curTotal <= 699) {
      ranges[4] += 1;
    } else if (curTotal <= 799) {
      ranges[5] += 1;
    } else if (curTotal <= 899) {
      ranges[6] += 1;
    } else if (curTotal <= 999) {
      ranges[7] += 1;
    } else {
      ranges[8] += 1;
    }
    printf("----------\n");
    printf("Continue? (1 = yes, 0 = no) ");
    scanf("%d", &cont);
    printf("----------\n");
    printf("----------\n");
  }
  for (i = 0; i <= 7; i += 1) {
    numPref += 1;
    printf("%d - ", numPref);
    numPref += 99;
    printf("%d:\t", numPref);
    printf("%d\n", ranges[i]);
  }
  printf("1000+    :\t%d\n", ranges[i]);
  printf("----------\n");
}
```