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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D196(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D268(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D213(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x18(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  -0x14(%rbp),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0xc(%rbp)
  movss  D47(%rip),%xmm0
  comiss -0xc(%rbp),%xmm0
  jbe    L25
  movss  -0xc(%rbp),%xmm1
  movss  D165(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  D37(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
  jmp    L48
L25:
  movss  D223(%rip),%xmm0
  comiss -0xc(%rbp),%xmm0
  jbe    L49
  movss  -0xc(%rbp),%xmm1
  movss  D166(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  D158(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
  jmp    L48
L49:
  movss  D193(%rip),%xmm0
  comiss -0xc(%rbp),%xmm0
  jbe    L6
  movss  -0xc(%rbp),%xmm1
  movss  D163(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  D224(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
  jmp    L48
L6:
  movss  D140(%rip),%xmm0
  comiss -0xc(%rbp),%xmm0
  jbe    L59
  movss  -0xc(%rbp),%xmm1
  movss  D179(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  D91(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
  jmp    L48
L59:
  movss  D28(%rip),%xmm0
  comiss -0xc(%rbp),%xmm0
  jbe    L64
  movss  -0xc(%rbp),%xmm1
  movss  D263(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  D215(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
  jmp    L48
L64:
  movss  -0xc(%rbp),%xmm1
  movss  D148(%rip),%xmm0
  mulss  %xmm0,%xmm1
  movss  D266(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
L48:
  movss  D48(%rip),%xmm0
  comiss -0x10(%rbp),%xmm0
  jbe    L37
  movss  D48(%rip),%xmm0
  movss  %xmm0,-0x10(%rbp)
L37:
  pxor   %xmm2,%xmm2
  cvtss2sd -0x10(%rbp),%xmm2
  movq   %xmm2,%rax
  movq   %rax,%xmm0
  lea    D211(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x18(%rbp),%eax
  cmp    $0x7d0,%eax
  jle    L110
  mov    -0x18(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  D94(%rip),%xmm0
  mulss  %xmm1,%xmm0
  jmp    L113
L110:
  mov    -0x18(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  D171(%rip),%xmm0
  mulss  %xmm1,%xmm0
L113:
  movss  D128(%rip),%xmm1
  addss  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  lea    D210(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L29
  call   <__stack_chk_fail@plt>
L29:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D196
type_infered: string
name: read_data
arguments: label: D268
type_infered: string
name: read_data
arguments: label: D99
type_infered: string
name: read_data
arguments: label: D213
type_infered: string
name: read_data
arguments: label: D47
type_infered: byte[4]
name: read_data
arguments: label: D165
type_infered: byte[4]
name: read_data
arguments: label: D37
type_infered: byte[4]
name: read_data
arguments: label: D223
type_infered: byte[4]
name: read_data
arguments: label: D166
type_infered: byte[4]
name: read_data
arguments: label: D158
type_infered: byte[4]
name: read_data
arguments: label: D193
type_infered: byte[4]
name: read_data
arguments: label: D163
type_infered: byte[4]
name: read_data
arguments: label: D224
type_infered: byte[4]
name: read_data
arguments: label: D140
type_infered: byte[4]
name: read_data
arguments: label: D179
type_infered: byte[4]
name: read_data
arguments: label: D91
type_infered: byte[4]
name: read_data
arguments: label: D28
type_infered: byte[4]
name: read_data
arguments: label: D263
type_infered: byte[4]
name: read_data
arguments: label: D215
type_infered: byte[4]
name: read_data
arguments: label: D148
type_infered: byte[4]
name: read_data
arguments: label: D266
type_infered: byte[4]
name: read_data
arguments: label: D48
type_infered: byte[4]
name: read_data
arguments: label: D211
type_infered: string
name: read_data
arguments: label: D94
type_infered: byte[4]
name: read_data
arguments: label: D171
type_infered: byte[4]
name: read_data
arguments: label: D128
type_infered: byte[4]
name: read_data
arguments: label: D210
type_infered: string

tool: D196: Enter number of shares: 

tool: D268: %d

tool: D99: Enter price per share: 

tool: D213: %f

tool: {"D47": [0x00,0x40,0x1c,0x45]}

tool: {"D165": [0x96,0x43,0x8b,0x3c]}

tool: {"D37": [0x00,0x00,0xf0,0x41]}

tool: {"D223": [0x00,0x50,0xc3,0x45]}

tool: {"D166": [0xd0,0x44,0xd8,0x3b]}

tool: {"D158": [0x00,0x00,0x60,0x42]}

tool: {"D193": [0x00,0x40,0x9c,0x46]}

tool: {"D163": [0x89,0xd2,0x5e,0x3b]}

tool: {"D224": [0x00,0x00,0x98,0x42]}

tool: {"D140": [0x00,0x50,0x43,0x47]}

tool: {"D179": [0xe0,0x2d,0x10,0x3b]}

tool: {"D91": [0x00,0x00,0xc8,0x42]}

tool: {"D28": [0x00,0x24,0xf4,0x48]}

tool: {"D263": [0xe0,0x2d,0x90,0x3a]}

tool: {"D215": [0x00,0x00,0x1b,0x43]}

tool: {"D148": [0xfa,0xed,0x6b,0x3a]}

tool: {"D266": [0x00,0x00,0x7f,0x43]}

tool: {"D48": [0x00,0x00,0x1c,0x42]}

tool: D211: Commission: $%.2f


tool: {"D94": [0x0a,0xd7,0xa3,0x3c]}

tool: {"D171": [0x8f,0xc2,0xf5,0x3c]}

tool: {"D128": [0x00,0x00,0x04,0x42]}

tool: D210: Rivals comission: $%.2f


assistant: ```c
int main(void) {
  int num;
  float commission, price, competitor, value;
  printf("Enter number of shares: ");
  scanf("%d", &num);
  printf("Enter price per share: ");
  scanf("%f", &price);
  value = num * price;
  if (value < 2500.00f)
    commission = 30.00f + .017f * value;
  else if (value < 6250.00f)
    commission = 56.00f + .0066f * value;
  else if (value < 20000.00f)
    commission = 76.00f + .0034f * value;
  else if (value < 50000.00f)
    commission = 100.00f + .0022f * value;
  else if (value < 500000.00f)
    commission = 155.00f + .0011f * value;
  else
    commission = 255.00f + .0009f * value;
  if (commission < 39.00f)
    commission = 39.00f;
  printf("Commission: $%.2f\n", commission);
  printf("Rivals comission: $%.2f\n", 33.00f + (num > 2000 ? num * .02f : num * .03f));
  return 0;
}
```