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

```asm
<DoArithmEval>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmp    %edx,%esi
  jge    L821
  movslq %esi,%rbx
  add    %rdi,%rbx
  jmp    L1400
  nopl   (%rax)
L924:
  add    $0x1,%ebp
  add    $0x1,%rbx
  cmp    %ebp,%r12d
  je     L176
L1400:
  movsbl (%rbx),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L924
  cmp    %ebp,%r12d
  jle    L821
  movslq %r12d,%rax
  lea    -0x1(%r13,%rax,1),%rbx
  jmp    L1060
  nopl   0x0(%rax)
L1711:
  sub    $0x1,%r12d
  sub    $0x1,%rbx
  cmp    %ebp,%r12d
  je     L176
L1060:
  movsbl (%rbx),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L1711
L678:
  lea    0x18(%rsp),%r15
  lea    0x14(%rsp),%rbx
  xor    %eax,%eax
  mov    %r12d,%edx
  mov    %r15,%r9
  mov    %rbx,%r8
  lea    D182(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1068
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1501
  nopl   0x0(%rax,%rax,1)
L176:
  xor    %eax,%eax
L1644:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L1380
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L1068:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D26(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L453
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  je     L32
  mov    0x20(%rsp),%edx
  xor    %eax,%eax
  test   %edx,%edx
  setne  %al
L32:
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
  nopw   0x0(%rax,%rax,1)
L453:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D85(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1373
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x1c(%rsp),%eax
  or     0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1501:
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x1c(%rsp),%eax
  or     0x20(%rsp),%eax
  setne  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L821:
  cmp    %ebp,%r12d
  jne    L678
  jmp    L176
  nopl   (%rax)
L1373:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D1(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L1118
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D199(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1193
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x1c(%rsp),%eax
  and    0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1118:
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x1c(%rsp),%eax
  xor    0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1193:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D147(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L942
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D219(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L1434
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D36(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L1049
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D81(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L272
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D191(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L741
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D42(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L482
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D0(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L756
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x20(%rsp),%eax
  add    0x1c(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
  nopl   0x0(%rax)
L942:
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L248
L56:
  mov    0x14(%rsp),%eax
  cmp    %eax,%ebp
  jl     L1693
  jmp    L1732
  nopl   (%rax)
L516:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebp,%eax
  jle    L1732
L1693:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L516
L1732:
  mov    0x18(%rsp),%eax
  cmp    %r12d,%eax
  jl     L1297
  jmp    L1789
  nopl   (%rax)
L362:
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %r12d,%eax
  jge    L1789
L1297:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  mov    0x18(%rsp),%eax
  jne    L362
L1789:
  mov    0x14(%rsp),%edx
  sub    %eax,%r12d
  sub    %ebp,%edx
  cmp    %r12d,%edx
  je     L1067
L1601:
  movl   $0x1,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1434:
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1739
L1519:
  mov    0x14(%rsp),%eax
  cmp    %eax,%ebp
  jl     L598
  jmp    L509
  nopl   0x0(%rax,%rax,1)
L423:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebp,%eax
  jle    L509
L598:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L423
L509:
  mov    0x18(%rsp),%eax
  cmp    %r12d,%eax
  jl     L449
  jmp    L584
  nopl   (%rax)
L890:
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %r12d,%eax
  jge    L584
L449:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  mov    0x18(%rsp),%eax
  jne    L890
L584:
  mov    0x14(%rsp),%edx
  sub    %eax,%r12d
  sub    %ebp,%edx
  cmp    %r12d,%edx
  je     L1810
L145:
  movl   $0x0,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1049:
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1649
L1558:
  mov    0x14(%rsp),%eax
  cmp    %eax,%ebp
  jl     L747
  jmp    L1752
  nopl   0x0(%rax,%rax,1)
L1157:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebp,%eax
  jle    L1752
L747:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L1157
L1752:
  mov    0x18(%rsp),%eax
  cmp    %r12d,%eax
  jl     L1382
  jmp    L1561
  nopl   (%rax)
L352:
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %r12d,%eax
  jge    L1561
L1382:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  mov    0x18(%rsp),%eax
  jne    L352
L1561:
  mov    0x14(%rsp),%ebx
  sub    %eax,%r12d
  movslq %ebp,%rdi
  cltq
  lea    0x0(%r13,%rax,1),%rsi
  sub    %ebp,%ebx
  cmp    %ebx,%r12d
  mov    %ebx,%edx
  cmovle %r12d,%edx
  add    %r13,%rdi
  movslq %edx,%rdx
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  jg     L32
  cmp    %ebx,%r12d
  setle  %cl
  xor    %eax,%eax
  test   %edx,%edx
  sete   %al
  and    %ecx,%eax
  jmp    L32
L1739:
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1519
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L248:
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L56
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L272:
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L738
L1204:
  mov    0x14(%rsp),%eax
  cmp    %eax,%ebp
  jl     L1554
  jmp    L1234
  nopl   0x0(%rax,%rax,1)
L1630:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebp,%eax
  jle    L1234
L1554:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L1630
L1234:
  movslq 0x18(%rsp),%rax
  mov    %eax,%edx
  cmp    %r12d,%eax
  jl     L847
  jmp    L1163
L1498:
  mov    0x18(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x18(%rsp)
  cmp    %r12d,%edx
  jge    L983
L847:
  movslq %edx,%rdx
  xor    %eax,%eax
  movsbl 0x0(%r13,%rdx,1),%edi
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L1498
  movslq 0x18(%rsp),%rax
L1163:
  mov    0x14(%rsp),%ebx
  sub    %eax,%r12d
  movslq %ebp,%rdi
  lea    0x0(%r13,%rax,1),%rsi
  sub    %ebp,%ebx
  cmp    %ebx,%r12d
  mov    %ebx,%edx
  cmovle %r12d,%edx
  add    %r13,%rdi
  movslq %edx,%rdx
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  jg     L32
  cmp    %ebx,%r12d
  setl   %cl
  xor    %eax,%eax
  test   %edx,%edx
  sete   %al
  and    %ecx,%eax
  jmp    L32
L1067:
  cltq
  movslq %ebp,%rdi
  movslq %edx,%rdx
  add    %r13,%rdi
  lea    0x0(%r13,%rax,1),%rsi
  call   <strncmp@plt>
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L983:
  movslq %edx,%rax
  jmp    L1163
L1810:
  cltq
  movslq %ebp,%rdi
  movslq %edx,%rdx
  add    %r13,%rdi
  lea    0x0(%r13,%rax,1),%rsi
  call   <strncmp@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L738:
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1204
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setg   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L741:
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L77
L1699:
  mov    0x14(%rsp),%eax
  cmp    %eax,%ebp
  jl     L197
  jmp    L632
  nopw   0x0(%rax,%rax,1)
L570:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebp,%eax
  jle    L632
L197:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L570
L632:
  movslq 0x18(%rsp),%rax
  mov    %eax,%edx
  cmp    %r12d,%eax
  jl     L12
  jmp    L1110
L329:
  mov    0x18(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x18(%rsp)
  cmp    %r12d,%edx
  jge    L1759
L12:
  movslq %edx,%rdx
  xor    %eax,%eax
  movsbl 0x0(%r13,%rdx,1),%edi
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L329
  movslq 0x18(%rsp),%rax
L1110:
  mov    0x14(%rsp),%ebx
  sub    %eax,%r12d
  movslq %ebp,%rdi
  lea    0x0(%r13,%rax,1),%rsi
  sub    %ebp,%ebx
  cmp    %ebx,%r12d
  mov    %ebx,%edx
  cmovle %r12d,%edx
  add    %r13,%rdi
  movslq %edx,%rdx
  call   <strncmp@plt>
  mov    %eax,%r8d
  mov    $0x1,%eax
  test   %r8d,%r8d
  js     L32
  sete   %dl
  xor    %eax,%eax
  cmp    %ebx,%r12d
  setge  %al
  and    %edx,%eax
  jmp    L32
L1759:
  movslq %edx,%rax
  jmp    L1110
L1649:
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1558
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setge  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L756:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D161(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L300
  mov    0x14(%rsp),%edx
  cmp    %ebp,%edx
  je     L300
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x1c(%rsp),%eax
  sub    0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L482:
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1003
L825:
  mov    0x14(%rsp),%eax
  cmp    %eax,%ebp
  jl     L604
  jmp    L1504
  nopw   0x0(%rax,%rax,1)
L542:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebp,%eax
  jle    L1504
L604:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L542
L1504:
  movslq 0x18(%rsp),%rax
  mov    %eax,%edx
  cmp    %r12d,%eax
  jl     L11
  jmp    L1647
L424:
  mov    0x18(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x18(%rsp)
  cmp    %r12d,%edx
  jge    L1150
L11:
  movslq %edx,%rdx
  xor    %eax,%eax
  movsbl 0x0(%r13,%rdx,1),%edi
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L424
  movslq 0x18(%rsp),%rax
L1647:
  mov    0x14(%rsp),%ebx
  sub    %eax,%r12d
  movslq %ebp,%rdi
  lea    0x0(%r13,%rax,1),%rsi
  sub    %ebp,%ebx
  cmp    %ebx,%r12d
  mov    %ebx,%edx
  cmovle %r12d,%edx
  add    %r13,%rdi
  movslq %edx,%rdx
  call   <strncmp@plt>
  mov    %eax,%r8d
  mov    $0x1,%eax
  test   %r8d,%r8d
  js     L32
  sete   %dl
  xor    %eax,%eax
  cmp    %ebx,%r12d
  setg   %al
  and    %edx,%eax
  jmp    L32
L300:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D80(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L754
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x1c(%rsp),%eax
  imul   0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1150:
  movslq %edx,%rax
  jmp    L1647
L77:
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1699
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setle  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1380:
  call   <__stack_chk_fail@plt>
L1003:
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L825
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setl   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L754:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D218(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1709
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x20(%rsp),%ebx
  test   %ebx,%ebx
  je     L483
L531:
  mov    0x1c(%rsp),%eax
  cltd
  idiv   %ebx
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1709:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D190(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L614
  movslq %ebp,%r15
  add    %r13,%r15
  movzbl (%r15),%ecx
  cmp    $0x7e,%cl
  je     L1452
  cmp    $0x21,%cl
  je     L1254
  cmp    $0x2d,%cl
  je     L1170
  mov    $0x7,%edx
  mov    %r15,%rdi
  mov    %cl,0xf(%rsp)
  movslq %r12d,%rbx
  lea    D84(%rip),%rsi
  call   <strncmp@plt>
  movzbl 0xf(%rsp),%ecx
  test   %eax,%eax
  jne    L657
  cmpb   $0x29,-0x1(%r13,%rbx,1)
  jne    L176
  mov    %r12d,%eax
  sub    %ebp,%eax
  sub    $0x8,%eax
  jmp    L32
L483:
  lea    D52(%rip),%rdi
  xor    %eax,%eax
  call   <bug@plt>
  jmp    L531
L657:
  mov    $0x7,%edx
  lea    D156(%rip),%rsi
  mov    %r15,%rdi
  mov    %cl,0xf(%rsp)
  call   <strncmp@plt>
  movzbl 0xf(%rsp),%ecx
  test   %eax,%eax
  je     L666
  cmp    $0x28,%cl
  jne    L870
  cmpb   $0x29,-0x1(%r13,%rbx,1)
  jne    L176
  lea    -0x1(%r12),%edx
  lea    0x1(%rbp),%esi
  mov    %r14,%rcx
  mov    %r13,%rdi
  call   <DoArithmEval>
  jmp    L1644
L1170:
  lea    0x1c(%rsp),%rcx
  lea    0x1(%rbp),%esi
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x1c(%rsp),%eax
  neg    %eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1254:
  lea    0x1c(%rsp),%rcx
  lea    0x1(%rbp),%esi
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  xor    %eax,%eax
  cmpl   $0x0,0x1c(%rsp)
  sete   %al
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1452:
  lea    0x1c(%rsp),%rcx
  lea    0x1(%rbp),%esi
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x1c(%rsp),%eax
  not    %eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L614:
  mov    0x14(%rsp),%edx
  lea    0x1c(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x18(%rsp),%esi
  lea    0x20(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L176
  mov    0x20(%rsp),%ebx
  test   %ebx,%ebx
  je     L464
L200:
  mov    0x1c(%rsp),%eax
  cltd
  idiv   %ebx
  mov    $0x1,%eax
  mov    %edx,(%r14)
  jmp    L1644
L870:
  add    %rbx,%r13
  xor    %edx,%edx
  xor    %eax,%eax
  mov    %r15,%rdi
  movzbl 0x0(%r13),%ebx
  movb   $0x0,0x0(%r13)
  lea    0x20(%rsp),%rsi
  call   <strtol@plt>
  mov    %eax,(%r14)
  xor    %eax,%eax
  cmp    %r13,0x20(%rsp)
  mov    %bl,0x0(%r13)
  sete   %al
  jmp    L1644
L666:
  add    $0x7,%ebp
  cmp    %r12d,%ebp
  jg     L1053
  cmpb   $0x0,0x0(%r13,%rbx,1)
  jne    L258
  sub    $0x1,%r12d
  movslq %r12d,%rbx
L258:
  movslq %ebp,%r15
L287:
  mov    %r15d,%ebp
  cmp    %r15d,%r12d
  jl     L1053
  movsbl 0x0(%r13,%r15,1),%edi
  xor    %eax,%eax
  add    $0x1,%r15
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L287
  jmp    L1166
L1002:
  lea    -0x1(%rbx),%r12d
  sub    $0x1,%rbx
  cmp    %ebx,%ebp
  jg     L172
L1166:
  movsbl 0x0(%r13,%rbx,1),%edi
  xor    %eax,%eax
  mov    %ebx,%r12d
  call   <iswhite@plt>
  test   %eax,%eax
  jne    L1002
L172:
  movslq %r12d,%rbx
L1053:
  cmpb   $0x29,0x0(%r13,%rbx,1)
  je     L1099
  lea    D20(%rip),%rdi
  xor    %eax,%eax
  call   <bug@plt>
L159:
  movslq %ebp,%r15
  movzbl 0x0(%r13,%r15,1),%eax
  cmp    $0x22,%al
  je     L673
  cmp    $0x3c,%al
  je     L673
L1634:
  movzbl 0x0(%r13,%rbx,1),%eax
  cmp    $0x22,%al
  je     L1293
  cmp    $0x3e,%al
  je     L1293
L259:
  cmp    %r12d,%ebp
  jg     L79
L958:
  sub    %ebp,%r12d
  lea    0x2(%r12),%edi
  movslq %edi,%rdi
  call   <malloc@plt>
  lea    0x1(%r12),%edx
  lea    0x0(%r13,%r15,1),%rsi
  movslq %r12d,%r12
  mov    %rax,%rdi
  movslq %edx,%rdx
  call   <memcpy@plt>
  movb   $0x0,0x1(%rax,%r12,1)
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <checkAbsOrCurrentDir@plt>
  test   %eax,%eax
  je     L145
  jmp    L1601
L464:
  lea    D52(%rip),%rdi
  xor    %eax,%eax
  call   <bug@plt>
  jmp    L200
L79:
  lea    D130(%rip),%rdi
  xor    %eax,%eax
  call   <bug@plt>
  jmp    L958
L673:
  add    $0x1,%ebp
  movslq %ebp,%r15
  jmp    L1634
L1099:
  sub    $0x1,%r12d
  movslq %r12d,%rbx
  jmp    L159
L1293:
  sub    $0x1,%r12d
  jmp    L259
```

tool_calls: name: read_data
arguments: tag: D182
data_type: string
name: read_data
arguments: tag: D26
data_type: string
name: read_data
arguments: tag: D85
data_type: string
name: read_data
arguments: tag: D1
data_type: string
name: read_data
arguments: tag: D199
data_type: string
name: read_data
arguments: tag: D147
data_type: string
name: read_data
arguments: tag: D219
data_type: string
name: read_data
arguments: tag: D36
data_type: string
name: read_data
arguments: tag: D81
data_type: string
name: read_data
arguments: tag: D191
data_type: string
name: read_data
arguments: tag: D42
data_type: string
name: read_data
arguments: tag: D0
data_type: string
name: read_data
arguments: tag: D161
data_type: string
name: read_data
arguments: tag: D80
data_type: string
name: read_data
arguments: tag: D218
data_type: string
name: read_data
arguments: tag: D190
data_type: string
name: read_data
arguments: tag: D84
data_type: string
name: read_data
arguments: tag: D52
data_type: string
name: read_data
arguments: tag: D156
data_type: string
name: read_data
arguments: tag: D20
data_type: string
name: read_data
arguments: tag: D130
data_type: string

tool: D182: ||

tool: D26: &&

tool: D85: |

tool: D1: ^

tool: D199: &

tool: D147: !=

tool: D219: ==

tool: D36: >=

tool: D81: >

tool: D191: <=

tool: D42: <

tool: D0: +

tool: D161: -

tool: D80: *

tool: D218: /

tool: D190: %

tool: D84: length(

tool: D52: Division by zero in expression

tool: D156: exists(

tool: D20: Wrong syntax in exists("file")

tool: D130: Missing file name in exists("file")

assistant: ```c
int DoArithmEval(char *buf, int pos1, int pos2, int *result) {
  int spl1, spl2;
  int l;
  int result1, result2;
  char c, *p;
  while ((pos1 < pos2) && iswhite(buf[pos1]))
    pos1++;
  while ((pos1 < pos2) && iswhite(buf[pos2 - 1]))
    pos2--;
  if (pos1 == pos2)
    return 0;
  if (SpliceInfix(buf, pos1, pos2, "||", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
      return 0;
    *result = result1 || result2;
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "&&", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
      return 0;
    *result = result1 && result2;
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "|", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
      return 0;
    *result = result1 | result2;
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "^", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
      return 0;
    *result = result1 ^ result2;
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "&", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
      return 0;
    *result = result1 & result2;
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "!=", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2)) {
      while ((pos1 < spl1) && iswhite(buf[spl1 - 1]))
        spl1--;
      while ((pos2 > spl2) && iswhite(buf[spl2]))
        spl2++;
      if (spl1 - pos1 != pos2 - spl2)
        *result = 1;
      else
        *result = (strncmp(buf + pos1, buf + spl2, spl1 - pos1) != 0);
    } else
      *result = (result1 != result2);
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "==", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2)) {
      while ((pos1 < spl1) && iswhite(buf[spl1 - 1]))
        spl1--;
      while ((pos2 > spl2) && iswhite(buf[spl2]))
        spl2++;
      if (spl1 - pos1 != pos2 - spl2)
        *result = 0;
      else
        *result = (strncmp(buf + pos1, buf + spl2, spl1 - pos1) == 0);
    } else
      *result = (result1 == result2);
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, ">=", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2)) {
      while ((pos1 < spl1) && iswhite(buf[spl1 - 1]))
        spl1--;
      while ((pos2 > spl2) && iswhite(buf[spl2]))
        spl2++;
      l = spl1 - pos1;
      if (l > pos2 - spl2)
        l = pos2 - spl2;
      result1 = strncmp(buf + pos1, buf + spl2, l);
      *result = (result1 > 0) || ((result1 == 0) && (spl1 - pos1 >= pos2 - spl2));
    } else
      *result = (result1 >= result2);
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, ">", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2)) {
      while ((pos1 < spl1) && iswhite(buf[spl1 - 1]))
        spl1--;
      while ((pos2 > spl2) && iswhite(buf[spl2]))
        spl2++;
      l = spl1 - pos1;
      if (l > pos2 - spl2)
        l = pos2 - spl2;
      result1 = strncmp(buf + pos1, buf + spl2, l);
      *result = (result1 > 0) || ((result1 == 0) && (spl1 - pos1 > pos2 - spl2));
    } else
      *result = (result1 > result2);
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "<=", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2)) {
      while ((pos1 < spl1) && iswhite(buf[spl1 - 1]))
        spl1--;
      while ((pos2 > spl2) && iswhite(buf[spl2]))
        spl2++;
      l = spl1 - pos1;
      if (l > pos2 - spl2)
        l = pos2 - spl2;
      result1 = strncmp(buf + pos1, buf + spl2, l);
      *result = (result1 < 0) || ((result1 == 0) && (spl1 - pos1 <= pos2 - spl2));
    } else
      *result = (result1 <= result2);
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "<", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2)) {
      while ((pos1 < spl1) && iswhite(buf[spl1 - 1]))
        spl1--;
      while ((pos2 > spl2) && iswhite(buf[spl2]))
        spl2++;
      l = spl1 - pos1;
      if (l > pos2 - spl2)
        l = pos2 - spl2;
      result1 = strncmp(buf + pos1, buf + spl2, l);
      *result = (result1 < 0) || ((result1 == 0) && (spl1 - pos1 < pos2 - spl2));
    } else
      *result = (result1 < result2);
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "+", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
      return 0;
    *result = result1 + result2;
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "-", &spl1, &spl2))
    if (spl1 != pos1) {
      if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
        return 0;
      *result = result1 - result2;
      return 1;
    }
  if (SpliceInfix(buf, pos1, pos2, "*", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
      return 0;
    *result = result1 * result2;
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "/", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
      return 0;
    if (result2 == 0)
      bug("Division by zero in expression");
    *result = result1 / result2;
    return 1;
  }
  if (SpliceInfix(buf, pos1, pos2, "%", &spl1, &spl2)) {
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2))
      return 0;
    if (result2 == 0)
      bug("Division by zero in expression");
    *result = result1 % result2;
    return 1;
  }
  if (buf[pos1] == '~') {
    if (!DoArithmEval(buf, pos1 + 1, pos2, &result1))
      return 0;
    *result = ~result1;
    return 1;
  }
  if (buf[pos1] == '!') {
    if (!DoArithmEval(buf, pos1 + 1, pos2, &result1))
      return 0;
    *result = !result1;
    return 1;
  }
  if (buf[pos1] == '-') {
    if (!DoArithmEval(buf, pos1 + 1, pos2, &result1))
      return 0;
    *result = -result1;
    return 1;
  }
  if (strncmp(buf + pos1, "length(", strlen("length(")) == 0) {
    if (buf[pos2 - 1] != ')')
      return 0;
    *result = pos2 - pos1 - (int)strlen("length()");
    return 1;
  }
  if (strncmp(buf + pos1, "exists(", strlen("exists(")) == 0) {
    char *file;
    pos1 += (int)strlen("exists(");
    if (pos1 <= pos2 && buf[pos2] == '\0')
      pos2--;
    while ((pos1 <= pos2) && iswhite(buf[pos1]))
      pos1++;
    while ((pos1 <= pos2) && iswhite(buf[pos2]))
      pos2--;
    if (buf[pos2] != ')')
      bug("Wrong syntax in exists(\"file\")");
    else
      pos2--;
    if (buf[pos1] == '\"' || buf[pos1] == '<')
      pos1++;
    if (buf[pos2] == '\"' || buf[pos2] == '>')
      pos2--;
    if (pos1 > pos2)
      bug("Missing file name in exists(\"file\")");
    file = malloc(pos2 - pos1 + 2);
    memcpy(file, buf + pos1, pos2 - pos1 + 1);
    file[pos2 - pos1 + 1] = '\0';
    if (checkAbsOrCurrentDir(file) == 0)
      *result = 0;
    else
      *result = 1;
    return 1;
  }
  if (buf[pos1] == '(') {
    if (buf[pos2 - 1] != ')')
      return 0;
    return DoArithmEval(buf, pos1 + 1, pos2 - 1, result);
  }
  c = buf[pos2];
  buf[pos2] = 0;
  *result = (int)strtol(buf + pos1, &p, 0);
  buf[pos2] = c;
  return (p == buf + pos2);
}
```