user: Converte this assembly snippet into its equivalent C code:

```asm
<practice_2>:
  endbr64
  sub    $0x28,%rsp
  lea    D1(%rip),%rdi
  movsd  %xmm2,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  lea    D83(%rip),%rdi
  call   <scanf@plt>
  movsd  0x10(%rsp),%xmm0
  movsd  D69(%rip),%xmm1
  movsd  0x8(%rsp),%xmm2
  comisd %xmm0,%xmm1
  jb     L5
  movsd  D78(%rip),%xmm2
  mulsd  %xmm0,%xmm2
L72:
  lea    D117(%rip),%rdi
  movapd %xmm2,%xmm0
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L83
  add    $0x28,%rsp
  ret
  nopl   0x0(%rax)
L5:
  movsd  D172(%rip),%xmm3
  comisd %xmm0,%xmm3
  jb     L87
  subsd  %xmm1,%xmm0
  mulsd  D97(%rip),%xmm0
  movsd  D153(%rip),%xmm2
  addsd  %xmm0,%xmm2
  jmp    L72
  nopl   0x0(%rax,%rax,1)
L87:
  movsd  D128(%rip),%xmm1
  comisd %xmm0,%xmm1
  jae    L109
  movsd  D144(%rip),%xmm3
  comisd %xmm0,%xmm3
  jb     L118
  subsd  %xmm1,%xmm0
  mulsd  D65(%rip),%xmm0
  movsd  D62(%rip),%xmm2
  addsd  %xmm0,%xmm2
  jmp    L72
  nopl   0x0(%rax)
L109:
  subsd  %xmm3,%xmm0
  mulsd  D175(%rip),%xmm0
  movsd  D155(%rip),%xmm2
  addsd  %xmm0,%xmm2
  jmp    L72
  nopl   (%rax)
L118:
  movsd  D24(%rip),%xmm1
  comisd %xmm0,%xmm1
  jae    L68
  comisd %xmm1,%xmm0
  jbe    L72
  subsd  %xmm1,%xmm0
  mulsd  D6(%rip),%xmm0
  addsd  D25(%rip),%xmm0
  movapd %xmm0,%xmm2
  jmp    L72
  nopl   (%rax)
L68:
  subsd  %xmm3,%xmm0
  mulsd  D13(%rip),%xmm0
  movsd  D132(%rip),%xmm2
  addsd  %xmm0,%xmm2
  jmp    L72
L83:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D1
data_type: string
name: read_data
arguments: tag: D83
data_type: string
name: read_data
arguments: tag: D69
data_type: byte[8]
name: read_data
arguments: tag: D78
data_type: f64
name: read_data
arguments: tag: D117
data_type: string
name: read_data
arguments: tag: D172
data_type: byte[8]
name: read_data
arguments: tag: D97
data_type: f64
name: read_data
arguments: tag: D153
data_type: byte[8]
name: read_data
arguments: tag: D128
data_type: byte[8]
name: read_data
arguments: tag: D144
data_type: byte[8]
name: read_data
arguments: tag: D65
data_type: f64
name: read_data
arguments: tag: D62
data_type: byte[8]
name: read_data
arguments: tag: D175
data_type: f64
name: read_data
arguments: tag: D155
data_type: byte[8]
name: read_data
arguments: tag: D24
data_type: byte[8]
name: read_data
arguments: tag: D6
data_type: f64
name: read_data
arguments: tag: D25
data_type: byte[8]
name: read_data
arguments: tag: D13
data_type: f64
name: read_data
arguments: tag: D132
data_type: byte[8]

tool: D1: Net income:

tool: D83: %lf

tool: {"D69": [0x00,0x00,0x00,0x00,0x00,0x6a,0xf8,0x40]}

tool: D78: 0.1

tool: D117: royalties: bonus=%lf

tool: {"D172": [0x00,0x00,0x00,0x00,0x00,0x6a,0x08,0x41]}

tool: D97: 0.075

tool: {"D153": [0x00,0x00,0x00,0x00,0x00,0x88,0xc3,0x40]}

tool: {"D128": [0x00,0x00,0x00,0x00,0x00,0x6a,0x18,0x41]}

tool: {"D144": [0x00,0x00,0x00,0x00,0x80,0x4f,0x22,0x41]}

tool: D65: 0.03

tool: {"D62": [0x00,0x00,0x00,0x00,0x00,0xdb,0xda,0x40]}

tool: D175: 0.05

tool: {"D155": [0x00,0x00,0x00,0x00,0x00,0x17,0xd1,0x40]}

tool: {"D24": [0x00,0x00,0x00,0x00,0x80,0x84,0x2e,0x41]}

tool: D6: 0.01

tool: {"D25": [0x00,0x00,0x00,0x00,0x80,0x49,0xe3,0x40]}

tool: D13: 0.015

tool: {"D132": [0x00,0x00,0x00,0x00,0x80,0x5b,0xe0,0x40]}

assistant: ```c
void practice_2(void) {
  double i;
  double bonus1, bonus2, bonus4, bonus6, bonus10, bonus;
  printf("Net income:");
  scanf("%lf", &i);
  bonus1 = 100000 * 0.1;
  bonus2 = bonus1 + 100000 * 0.075;
  bonus4 = bonus2 + 200000 * 0.05;
  bonus6 = bonus4 + 200000 * 0.03;
  bonus10 = bonus6 + 400000 * 0.015;
  if (i <= 100000) {
    bonus = i * 0.1;
  } else if (i <= 200000) {
    bonus = bonus1 + (i - 100000) * 0.075;
  } else if (i <= 400000) {
    bonus = bonus2 + (i - 200000) * 0.05;
  } else if (i <= 600000) {
    bonus = bonus4 + (i - 400000) * 0.03;
  } else if (i <= 1000000) {
    bonus = bonus6 + (i - 600000) * 0.015;
  } else if (i > 1000000) {
    bonus = bonus10 + (i - 1000000) * 0.01;
  }
  printf("royalties: bonus=%lf", bonus);
  printf("\n");
}
```