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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  lea    -0x84(%rbp),%rax
  mov    %rax,%rsi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x84(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x68(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xa0(%rbp)
  movq   $0x0,-0x98(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xb0(%rbp)
  movq   $0x0,-0xa8(%rbp)
  movslq %edx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L96:
  cmp    %rdx,%rsp
  je     L59
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L96
L59:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L133
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L133:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x84(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x58(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0xc0(%rbp)
  movq   $0x0,-0xb8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0xd0(%rbp)
  movq   $0x0,-0xc8(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L48:
  cmp    %rdx,%rsp
  je     L173
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L48
L173:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L88
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L88:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x84(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L121:
  cmp    %rdx,%rsp
  je     L41
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L121
L41:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L53
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L53:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0x80(%rbp)
  jmp    L246
L136:
  mov    -0x80(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x80(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0x80(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x60(%rbp),%rax
  add    %rsi,%rax
  mov    %rax,%rsi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  addl   $0x1,-0x80(%rbp)
L246:
  mov    -0x84(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L136
  movl   $0x0,-0x80(%rbp)
  jmp    L64
L189:
  mov    -0x60(%rbp),%rax
  mov    -0x80(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,-0x7c(%rbp)
  mov    -0x50(%rbp),%rax
  mov    -0x80(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,-0x78(%rbp)
  mov    -0x40(%rbp),%rax
  mov    -0x80(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,-0x74(%rbp)
  mov    -0x78(%rbp),%edx
  mov    -0x7c(%rbp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x70(%rbp)
  mov    -0x78(%rbp),%edx
  mov    -0x7c(%rbp),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0x6c(%rbp)
  mov    -0x74(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jle    L213
  mov    -0x74(%rbp),%eax
  cmp    -0x78(%rbp),%eax
  jle    L213
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L155
L213:
  mov    -0x74(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  je     L145
  mov    -0x74(%rbp),%eax
  cmp    -0x78(%rbp),%eax
  jne    L187
L145:
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L155
L187:
  mov    -0x70(%rbp),%eax
  sub    -0x6c(%rbp),%eax
  cmp    %eax,-0x74(%rbp)
  jne    L74
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L155
L74:
  mov    -0x70(%rbp),%eax
  sub    -0x6c(%rbp),%eax
  sub    -0x74(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L66
  mov    -0x70(%rbp),%eax
  sub    -0x6c(%rbp),%eax
  cmp    %eax,-0x74(%rbp)
  jge    L66
  mov    -0x74(%rbp),%edx
  mov    -0x6c(%rbp),%ecx
  mov    -0x70(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <print@plt>
  jmp    L155
L66:
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
L155:
  addl   $0x1,-0x80(%rbp)
L64:
  mov    -0x84(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L189
  mov    $0x0,%eax
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L164
  call   <__stack_chk_fail@plt>
L164:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_label: D55
data_type: string
name: parse_data
arguments: data_label: D1
data_type: string
name: parse_data
arguments: data_label: D8
data_type: string
name: parse_data
arguments: data_label: D35
data_type: string
name: parse_data
arguments: data_label: D9
data_type: string

tool: D55: %d

tool: D1: %d%d%d

tool: D8: -1


tool: D35: 1


tool: D9: 3


assistant: ```c
int main() {
  int t;
  scanf("%d", &t);
  int A[t], B[t], C[t], i;
  int max, min, a, b, c;
  for (i = 0; i < t; i++)
    scanf("%d%d%d", &A[i], &B[i], &C[i]);
  for (i = 0; i < t; i++) {
    a = A[i];
    b = B[i];
    c = C[i];
    max = (a > b) ? a : b;
    min = (a < b) ? a : b;
    if (c > a && c > b) {
      printf("-1\n");
      continue;
    } else if (c == a || c == b) {
      printf("1\n");
      continue;
    } else if (max - min == c) {
      printf("3\n");
      continue;
    } else if ((max - min - c) % 2 == 0 && (max - min) > c) {
      print(max, min, c);
      continue;
    } else {
      printf("-1\n");
      continue;
    }
  }
  return 0;
}
```