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

```asm
<getAmount>:
  endbr64
  push   %r15
  lea    D37(%rip),%rdi
  xor    %r15d,%r15d
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <printf@plt>
  xor    %eax,%eax
  call   <InputHandler@plt>
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <checkNullity@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  movslq %eax,%rbp
  mov    %rbp,%rbx
  test   %ebp,%ebp
  jg     L156
  jmp    L25
  nopl   (%rax)
L38:
  cmp    $0xa,%dil
  je     L92
  call   <isdigit@plt>
  test   %eax,%eax
  jne    L92
  cmpb   $0xa,(%r12,%r15,1)
  je     L92
L26:
  lea    D3(%rip),%rdi
  call   <printf@plt>
  lea    D30(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    $0x6,%edi
  call   <exit@plt>
L92:
  add    $0x1,%r15
  cmp    %r15,%rbp
  je     L25
L156:
  mov    %r15d,%r14d
  test   %r15,%r15
  je     L55
  cmpb   $0x2e,(%r12,%r15,1)
  je     L7
L144:
  cmp    $0x1,%r13d
  jbe    L2
  lea    D14(%rip),%rdi
  call   <printf@plt>
  mov    $0x5,%edi
  call   <exit@plt>
L2:
  lea    -0x1(%rbx),%eax
  movsbl (%r12,%r15,1),%edi
  cmp    %r14d,%eax
  je     L38
  call   <isdigit@plt>
  test   %eax,%eax
  je     L26
  add    $0x1,%r15
  cmp    %r15,%rbp
  jne    L156
  nop
L25:
  cmpb   $0x2e,-0x4(%r12,%rbp,1)
  je     L23
  lea    D3(%rip),%rdi
  call   <printf@plt>
  lea    D30(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    $0x6,%edi
  call   <exit@plt>
L23:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L55:
  cmpb   $0x24,(%r12)
  je     L92
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    $0x4,%edi
  call   <exit@plt>
  cmpb   $0x2e,(%r12,%r15,1)
  jne    L144
L7:
  add    $0x1,%r13d
  jmp    L92
```

tool_calls: name: parse_data
arguments: data_label: D37
type: string
name: parse_data
arguments: data_label: D3
type: string
name: parse_data
arguments: data_label: D30
type: string
name: parse_data
arguments: data_label: D14
type: string
name: parse_data
arguments: data_label: D9
type: string

tool: D37: Enter purchase amount: 

tool: D3: You have entered invalid input.


tool: D30: Please enter amount in format $120.00


tool: D14: Invalid imput: Please use no more than 1 "."


tool: D9: Invalid imput: Please start amount with $ 


assistant: ```c
char *getAmount(void) {
  printf("Enter purchase amount: ");
  char *amount = InputHandler();
  checkNullity(amount);
  int len = strlen(amount);
  unsigned int period = 0;
  for (int i = 0; i < len; i++) {
    if (i == 0 && amount[i] == '$') {
      continue;
    }
    if (i == 0 && amount[i] != '$') {
      printf("Invalid imput: Please start amount with $ \n");
      exit(4);
    }
    if (amount[i] == '.') {
      period++;
      continue;
    }
    if (period > 1) {
      printf("Invalid imput: Please use no more than 1 \".\"\n");
      exit(5);
    }
    if (i == len - 1 && amount[i] == '\n') {
      continue;
    }
    if (!isdigit(amount[i])) {
      if (!(i == len - 1 && amount[i] == '\n')) {
        printf("You have entered invalid input.\n");
        printf("Please enter amount in format $120.00\n");
        free(amount);
        exit(6);
      }
    }
  }
  if (amount[len - 4] != '.') {
    printf("You have entered invalid input.\n");
    printf("Please enter amount in format $120.00\n");
    free(amount);
    exit(6);
  }
  return amount;
}
```