user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<getAmount>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <InputHandler@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <checkNullity@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L59
L55:
  cmpl   $0x0,-0x10(%rbp)
  jne    L156
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x24,%al
  je     L159
L156:
  cmpl   $0x0,-0x10(%rbp)
  jne    L155
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x24,%al
  je     L155
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x4,%edi
  call   <exit@plt>
L155:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L85
  addl   $0x1,-0x14(%rbp)
  jmp    L119
L85:
  cmpl   $0x1,-0x14(%rbp)
  jbe    L62
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x5,%edi
  call   <exit@plt>
L62:
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x10(%rbp)
  jne    L44
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L131
L44:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  jne    L119
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x10(%rbp)
  jne    L66
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L119
L66:
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x6,%edi
  call   <exit@plt>
  jmp    L119
L159:
  nop
  jmp    L119
L131:
  nop
L119:
  addl   $0x1,-0x10(%rbp)
L59:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L55
  mov    -0xc(%rbp),%eax
  cltq
  lea    -0x4(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L106
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x6,%edi
  call   <exit@plt>
L106:
  mov    -0x8(%rbp),%rax
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D43
type: string
name: unpack_data
arguments: data_tag: D22
type: string
name: unpack_data
arguments: data_tag: D11
type: string
name: unpack_data
arguments: data_tag: D17
type: string
name: unpack_data
arguments: data_tag: D1
type: string

tool: D43: Enter purchase amount: 

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


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


tool: D17: You have entered invalid input.


tool: D1: Please enter amount in format $120.00


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;
}
```