user: What is the c source code of the assembly code below:

```asm
<initialPurchase>:
  endbr64
  push   %r15
  lea    D4(%rip),%r15
  push   %r14
  lea    D3(%rip),%r14
  push   %r13
  lea    D27(%rip),%r13
  push   %r12
  mov    $0x2bc,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    $0x1,%ebx
  lea    -0x1(%rbx),%eax
  sub    $0x8,%rsp
  cmp    $0x3,%eax
  je     L20
L105:
  jg     L69
  cmp    $0x1,%eax
  je     L144
  cmp    $0x2,%eax
  jne    L30
  lea    D0(%rip),%rdi
  call   <puts@plt>
  nopl   (%rax)
L85:
  mov    $0x2,%edi
  call   <spendThisMuch@plt>
  test   %eax,%eax
  js     L85
  mov    %eax,0x8(%rbp)
  sub    %eax,%r12d
L22:
  add    $0x1,%ebx
  lea    -0x1(%rbx),%eax
  cmp    $0x3,%eax
  jne    L105
L20:
  mov    %r15,%rdi
  call   <puts@plt>
  nopw   0x0(%rax,%rax,1)
L58:
  mov    $0x3,%edi
  call   <spendThisMuch@plt>
  test   %eax,%eax
  js     L58
  mov    %eax,0xc(%rbp)
  sub    %eax,%r12d
  jmp    L22
  cs nopw 0x0(%rax,%rax,1)
L69:
  cmp    $0x4,%eax
  jne    L30
  lea    D7(%rip),%rdi
  call   <puts@plt>
  nopl   0x0(%rax)
L48:
  mov    $0x4,%edi
  call   <spendThisMuch@plt>
  test   %eax,%eax
  js     L48
  mov    %eax,0x10(%rbp)
  sub    %eax,%r12d
L5:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L30:
  mov    %r14,%rdi
  call   <puts@plt>
  nopl   0x0(%rax,%rax,1)
L42:
  xor    %edi,%edi
  call   <spendThisMuch@plt>
  lea    -0xc8(%rax),%edx
  cmp    $0x64,%edx
  ja     L42
  mov    %eax,0x0(%rbp)
  sub    %eax,%r12d
  cmp    $0x5,%ebx
  jne    L22
  jmp    L5
  nopl   0x0(%rax,%rax,1)
L144:
  mov    %r13,%rdi
  call   <puts@plt>
L128:
  mov    $0x1,%edi
  call   <spendThisMuch@plt>
  test   %eax,%eax
  js     L128
  mov    %eax,0x4(%rbp)
  sub    %eax,%r12d
  jmp    L22
```

tool_calls: name: retrieve_data
arguments: data_label: D4
data_type: string
name: retrieve_data
arguments: data_label: D3
data_type: string
name: retrieve_data
arguments: data_label: D27
data_type: string
name: retrieve_data
arguments: data_label: D0
data_type: string
name: retrieve_data
arguments: data_label: D7
data_type: string

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

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

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

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

tool: D7: 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;
}
```