user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_item>:
  endbr64
  push   %r14
  xor    %ecx,%ecx
  mov    $0x10,%edx
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x110,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  lea    0x1(%rsp),%r13
  mov    %rbp,%rsi
  call   <scan@plt>
  movsbl (%rsp),%eax
  mov    %r13,%rsi
  lea    D18(%rip),%rdi
  add    $0x1,%eax
  cltq
  movb   $0x0,(%rsp,%rax,1)
  xor    %eax,%eax
  call   <printf@plt>
  xor    %ecx,%ecx
  mov    $0x10,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scan@plt>
  movsbl (%rsp),%eax
  mov    %r13,%rsi
  lea    D23(%rip),%rdi
  add    $0x1,%eax
  cltq
  movb   $0x0,(%rsp,%rax,1)
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    $0x1,%ecx
  mov    %r12,%rdi
  mov    $0x2,%edx
  call   <scan@plt>
  mov    %rbp,%rdi
  call   <makeInteger@plt>
  lea    D51(%rip),%rdi
  mov    %eax,%ebx
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  cmp    $0x6,%ebx
  jle    L49
  cmp    $0x5a,%ebx
  jne    L5
  mov    $0x1,%ecx
  mov    $0x1,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scan@plt>
L5:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L34
  add    $0x110,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L49:
  cmp    $0x4,%ebx
  jg     L19
  cmp    $0x3,%ebx
  ja     L5
L19:
  xor    %ecx,%ecx
  mov    $0x2,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scan@plt>
  mov    %rbp,%rdi
  call   <makeInteger@plt>
  lea    D29(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %ecx,%ecx
  mov    $0x2,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scan@plt>
  mov    %rbp,%rdi
  call   <makeInteger@plt>
  lea    D38(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %ecx,%ecx
  mov    $0x2,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scan@plt>
  mov    %rbp,%rdi
  call   <makeInteger@plt>
  lea    D93(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x1,%ecx
  mov    $0x4,%edx
  call   <scan@plt>
  xor    %ecx,%ecx
  mov    %rbp,%rsi
  mov    $0x2,%edx
  mov    %r12,%rdi
  call   <scan@plt>
  mov    %rbp,%rdi
  call   <makeInteger@plt>
  xor    %ecx,%ecx
  mov    %rbp,%rsi
  mov    $0x2,%edx
  mov    %r12,%rdi
  mov    %eax,%r14d
  call   <scan@plt>
  mov    %rbp,%rdi
  call   <makeInteger@plt>
  xor    %ecx,%ecx
  mov    $0x2,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <scan@plt>
  mov    %rbp,%rdi
  call   <makeInteger@plt>
  mov    %r14d,%esi
  lea    D105(%rip),%rdi
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%esi
  lea    D62(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13d,%esi
  lea    D5(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  imul   $0x2710,%ebx,%esi
  lea    D30(%rip),%rdi
  add    %r14d,%esi
  imul   $0x5f5e100,%r13d,%r13d
  xor    %eax,%eax
  add    %r13d,%esi
  movslq %esi,%rsi
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x1,%ecx
  mov    $0x6,%edx
  call   <scan@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x1,%ecx
  mov    $0x1,%edx
  call   <scan@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x1,%ecx
  mov    $0x7,%edx
  call   <scan@plt>
  xor    %ecx,%ecx
  mov    $0x1,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scan@plt>
  movsbl (%rsp),%esi
  lea    D44(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%ecx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0xd,%edx
  call   <scan@plt>
  jmp    L5
L34:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D18
type: string
name: parse_data
arguments: label: D23
type: string
name: parse_data
arguments: label: D51
type: string
name: parse_data
arguments: label: D29
type: string
name: parse_data
arguments: label: D38
type: string
name: parse_data
arguments: label: D93
type: string
name: parse_data
arguments: label: D105
type: string
name: parse_data
arguments: label: D62
type: string
name: parse_data
arguments: label: D5
type: string
name: parse_data
arguments: label: D30
type: string
name: parse_data
arguments: label: D44
type: string

tool: D18: Identified Name    : %s


tool: D23: Un-identified Name : %s


tool: D51: Type               : %d


tool: D29: Align              : %d


tool: D38: Cursed             : %d


tool: D93: Special            : %d


tool: D105: low                : %d


tool: D62: mid                : %d


tool: D5: high               : %d


tool: D30: Value              : %ld


tool: D44: Armor Class        : %d


assistant: ```c
int get_item(FILE *fp) {
  char num;
  char buf[256];
  int dum = 0;
  unsigned long value = 0;
  uint8_t type;
  uint16_t low, mid, high;
  int align, cursed, special;
  scan(fp, buf, 16, 0);
  buf[buf[0] + 1] = 0;
  printf("Identified Name    : %s\n", &buf[1]);
  scan(fp, buf, 16, 0);
  buf[buf[0] + 1] = 0;
  printf("Un-identified Name : %s\n", &buf[1]);
  scan(fp, buf, 2, 1);
  type = makeInteger(buf);
  printf("Type               : %d\n", type);
  switch (type) {
  case 0:
  case 1:
  case 2:
  case 3:
  case 5:
  case 6:
    scan(fp, buf, 2, 0);
    align = makeInteger(buf);
    printf("Align              : %d\n", align);
    scan(fp, buf, 2, 0);
    cursed = makeInteger(buf);
    printf("Cursed             : %d\n", cursed);
    scan(fp, buf, 2, 0);
    special = makeInteger(buf);
    printf("Special            : %d\n", special);
    scan(fp, buf, 4, 1);
    scan(fp, buf, 2, 0);
    low = makeInteger(buf);
    scan(fp, buf, 2, 0);
    mid = makeInteger(buf);
    scan(fp, buf, 2, 0);
    high = makeInteger(buf);
    printf("low                : %d\n", low);
    printf("mid                : %d\n", mid);
    printf("high               : %d\n", high);
    value = low + (mid * 10000) + (high * 10000 * 10000);
    printf("Value              : %ld\n", value);
    scan(fp, buf, 6, 1);
    scan(fp, buf, 1, 1);
    scan(fp, buf, 7, 1);
    scan(fp, buf, 1, 0);
    printf("Armor Class        : %d\n", (int8_t)buf[0]);
    scan(fp, buf, 13, 1);
    break;
  case 90:
    scan(fp, buf, 1, 1);
    break;
  default:
    break;
  }
  return 0;
}
```