user: 请将以下的汇编代码转换成C语言代码:

```asm
<initialPurchase>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x2bc,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L97
L110:
  cmpl   $0x4,-0x8(%rbp)
  ja     L115
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D11(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D11(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L46:
  mov    $0x0,%edi
  call   <spendThisMuch@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0xc7,-0x4(%rbp)
  jle    L46
  cmpl   $0x12c,-0x4(%rbp)
  jg     L46
  mov    -0x18(%rbp),%rax
  mov    -0x4(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x4(%rbp),%eax
  sub    %eax,-0xc(%rbp)
  jmp    L115
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L81:
  mov    $0x1,%edi
  call   <spendThisMuch@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  js     L81
  mov    -0x18(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x4(%rbp),%eax
  sub    %eax,-0xc(%rbp)
  jmp    L115
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L23:
  mov    $0x2,%edi
  call   <spendThisMuch@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  js     L23
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x4(%rbp),%eax
  sub    %eax,-0xc(%rbp)
  jmp    L115
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L94:
  mov    $0x3,%edi
  call   <spendThisMuch@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  js     L94
  mov    -0x18(%rbp),%rax
  lea    0xc(%rax),%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x4(%rbp),%eax
  sub    %eax,-0xc(%rbp)
  jmp    L115
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L118:
  mov    $0x4,%edi
  call   <spendThisMuch@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  js     L118
  mov    -0x18(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x4(%rbp),%eax
  sub    %eax,-0xc(%rbp)
  nop
L115:
  addl   $0x1,-0x8(%rbp)
L97:
  cmpl   $0x4,-0x8(%rbp)
  jle    L110
  mov    -0xc(%rbp),%eax
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D8
datatype: string
name: parse_data
arguments: tag: D34
datatype: string
name: parse_data
arguments: tag: D6
datatype: string
name: parse_data
arguments: tag: D35
datatype: string
name: parse_data
arguments: tag: D32
datatype: string

tool: D8: HOW MUCH DO YOU WANT TO SPEND ON YOUR OXEN TEAM

tool: D34: HOW MUCH DO YOU WANT TO SPEND ON AMMUNITION

tool: D6: HOW MUCH DO YOU WANT TO SPEND ON CLOTHING

tool: D35: HOW MUCH DO YOU WANT TO SPEND ON FOOD

tool: D32: HOW MUCH DO YOU WANT TO SPEND ON MISCELANEOUS SUPPLIES

assistant: ```c
int initialPurchase(int a[]) {
  int moneySpent;
  int money = 700;
  for (int supply = 0; supply <= 4; supply++) {
    switch (supply) {
    case 0:
      puts("HOW MUCH DO YOU WANT TO SPEND ON YOUR OXEN TEAM");
      do {
        moneySpent = spendThisMuch(0);
      } while (moneySpent < 200 || moneySpent > 300);
      a[0] = moneySpent;
      money -= moneySpent;
      break;
    case 1:
      puts("HOW MUCH DO YOU WANT TO SPEND ON AMMUNITION");
      do {
        moneySpent = spendThisMuch(1);
      } while (moneySpent < 0);
      a[1] = moneySpent;
      money -= moneySpent;
      break;
    case 2:
      puts("HOW MUCH DO YOU WANT TO SPEND ON CLOTHING");
      do {
        moneySpent = spendThisMuch(2);
      } while (moneySpent < 0);
      a[2] = moneySpent;
      money -= moneySpent;
      break;
    case 3:
      puts("HOW MUCH DO YOU WANT TO SPEND ON FOOD");
      do {
        moneySpent = spendThisMuch(3);
      } while (moneySpent < 0);
      a[3] = moneySpent;
      money -= moneySpent;
      break;
    case 4:
      puts("HOW MUCH DO YOU WANT TO SPEND ON MISCELANEOUS SUPPLIES");
      do {
        moneySpent = spendThisMuch(4);
      } while (moneySpent < 0);
      a[4] = moneySpent;
      money -= moneySpent;
      break;
    }
  }
  return money;
}
```