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    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    %edx,%esi
  jge    L1450
  movslq %esi,%rbx
  add    %rdi,%rbx
  jmp    L368
  nopl   (%rax)
L294:
  add    $0x1,%ebp
  add    $0x1,%rbx
  cmp    %ebp,%r12d
  je     L1005
L368:
  movsbl (%rbx),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L294
  cmp    %ebp,%r12d
  jle    L1450
  movslq %r12d,%rax
  lea    -0x1(%r13,%rax,1),%rbx
  jmp    L384
  nopl   0x0(%rax)
L1449:
  sub    $0x1,%r12d
  sub    $0x1,%rbx
  cmp    %ebp,%r12d
  je     L1005
L384:
  movsbl (%rbx),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L1449
L1164:
  lea    0x8(%rsp),%r15
  lea    0x4(%rsp),%rbx
  xor    %eax,%eax
  mov    %r12d,%edx
  mov    %r15,%r9
  mov    %rbx,%r8
  lea    D56(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1161
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L274
  nopl   0x0(%rax,%rax,1)
L1005:
  xor    %eax,%eax
L1644:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L26
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L1161:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D83(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1696
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  je     L1607
  mov    0x10(%rsp),%edx
  xor    %eax,%eax
  test   %edx,%edx
  setne  %al
L1607:
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
  nopw   0x0(%rax,%rax,1)
L1696:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D123(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L889
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0xc(%rsp),%eax
  or     0x10(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L274:
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0xc(%rsp),%eax
  or     0x10(%rsp),%eax
  setne  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1450:
  cmp    %ebp,%r12d
  jne    L1164
  jmp    L1005
  nopl   (%rax)
L889:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D43(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L326
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D70(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1457
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0xc(%rsp),%eax
  and    0x10(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L326:
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0xc(%rsp),%eax
  xor    0x10(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1457:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D153(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L737
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D100(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L1367
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D55(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L1075
  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
  jne    L1028
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D205(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L827
  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
  jne    L111
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D72(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L1571
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D7(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L440
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x10(%rsp),%eax
  add    0xc(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L737:
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1705
L1738:
  mov    0x4(%rsp),%eax
  cmp    %ebp,%eax
  jg     L376
  jmp    L710
  nopl   (%rax)
L1243:
  mov    0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x4(%rsp)
  cmp    %ebp,%eax
  jle    L710
L376:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L1243
L710:
  mov    0x8(%rsp),%eax
  cmp    %r12d,%eax
  jl     L1506
  jmp    L151
  nopl   (%rax)
L498:
  add    $0x1,%eax
  mov    %eax,0x8(%rsp)
  cmp    %r12d,%eax
  jge    L151
L1506:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  mov    0x8(%rsp),%eax
  jne    L498
L151:
  mov    0x4(%rsp),%edx
  sub    %eax,%r12d
  sub    %ebp,%edx
  cmp    %r12d,%edx
  je     L93
  movl   $0x1,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1367:
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1732
L1131:
  mov    0x4(%rsp),%eax
  cmp    %ebp,%eax
  jg     L449
  jmp    L994
  nopl   0x0(%rax,%rax,1)
L1482:
  mov    0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x4(%rsp)
  cmp    %ebp,%eax
  jle    L994
L449:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L1482
L994:
  mov    0x8(%rsp),%eax
  cmp    %r12d,%eax
  jl     L1383
  jmp    L401
  nopl   (%rax)
L1234:
  add    $0x1,%eax
  mov    %eax,0x8(%rsp)
  cmp    %r12d,%eax
  jge    L401
L1383:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  mov    0x8(%rsp),%eax
  jne    L1234
L401:
  mov    0x4(%rsp),%edx
  sub    %eax,%r12d
  sub    %ebp,%edx
  cmp    %r12d,%edx
  je     L1462
  movl   $0x0,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1075:
  lea    D104(%rip),%rdi
  xor    %eax,%eax
  call   <bug@plt>
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1654
L955:
  mov    0x4(%rsp),%eax
  cmp    %ebp,%eax
  jg     L1205
  jmp    L545
  nopl   0x0(%rax)
L253:
  mov    0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x4(%rsp)
  cmp    %ebp,%eax
  jle    L545
L1205:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L253
L545:
  mov    0x8(%rsp),%ebx
  cmp    %r12d,%ebx
  jl     L796
  jmp    L865
  nopl   (%rax)
L730:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%ebx
  mov    %ebx,0x8(%rsp)
  cmp    %r12d,%ebx
  jge    L865
L796:
  movslq %ebx,%rbx
  xor    %eax,%eax
  movsbl 0x0(%r13,%rbx,1),%edi
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L730
  mov    0x8(%rsp),%ebx
L865:
  movslq %ebp,%rdi
  add    %r13,%rdi
  call   <strdup@plt>
  movslq %ebx,%rdi
  mov    %rax,%r15
  mov    0x4(%rsp),%eax
  add    %r13,%rdi
  sub    %ebp,%eax
  cltq
  movb   $0x0,(%r15,%rax,1)
  call   <strdup@plt>
  xor    %edx,%edx
  mov    %r15,%rsi
  mov    %rax,%rbp
  mov    %r12d,%eax
  sub    %ebx,%eax
  mov    %rbp,%rdi
  cltq
  movb   $0x0,0x0(%rbp,%rax,1)
  xor    %eax,%eax
  call   <fnmatch@plt>
  mov    %r15,%rdi
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    $0x1,%eax
  jmp    L1644
L1732:
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1131
L761:
  mov    0x10(%rsp),%eax
  cmp    %eax,0xc(%rsp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1705:
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1738
  mov    0x10(%rsp),%eax
  cmp    %eax,0xc(%rsp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1028:
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1063
L148:
  mov    0x4(%rsp),%eax
  cmp    %ebp,%eax
  jg     L551
  jmp    L628
  nopl   0x0(%rax)
L1242:
  mov    0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x4(%rsp)
  cmp    %ebp,%eax
  jle    L628
L551:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L1242
L628:
  movslq 0x8(%rsp),%rax
  mov    %eax,%edx
  cmp    %r12d,%eax
  jl     L39
  jmp    L69
L927:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x8(%rsp)
  cmp    %r12d,%edx
  jge    L417
L39:
  movslq %edx,%rdx
  xor    %eax,%eax
  movsbl 0x0(%r13,%rdx,1),%edi
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L927
  movslq 0x8(%rsp),%rax
L69:
  mov    0x4(%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     L1607
  cmp    %ebx,%r12d
  setle  %cl
  xor    %eax,%eax
  test   %edx,%edx
  sete   %al
  and    %ecx,%eax
  jmp    L1607
L93:
  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
L1462:
  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
L1063:
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L148
  mov    0x10(%rsp),%eax
  cmp    %eax,0xc(%rsp)
  setge  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L417:
  movslq %edx,%rax
  jmp    L69
L1654:
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L955
  jmp    L761
L827:
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L629
L590:
  mov    0x4(%rsp),%eax
  cmp    %eax,%ebp
  jl     L1517
  jmp    L53
  xchg   %ax,%ax
L513:
  mov    0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x4(%rsp)
  cmp    %ebp,%eax
  jle    L53
L1517:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L513
L53:
  movslq 0x8(%rsp),%rax
  mov    %eax,%edx
  cmp    %r12d,%eax
  jl     L1370
  jmp    L1559
L325:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x8(%rsp)
  cmp    %r12d,%edx
  jge    L1502
L1370:
  movslq %edx,%rdx
  xor    %eax,%eax
  movsbl 0x0(%r13,%rdx,1),%edi
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L325
  movslq 0x8(%rsp),%rax
L1559:
  mov    0x4(%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     L1607
  cmp    %ebx,%r12d
  setl   %cl
  xor    %eax,%eax
  test   %edx,%edx
  sete   %al
  and    %ecx,%eax
  jmp    L1607
L1502:
  movslq %edx,%rax
  jmp    L1559
L440:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D142(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L110
  mov    0x4(%rsp),%edx
  cmp    %ebp,%edx
  je     L110
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0xc(%rsp),%eax
  sub    0x10(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1571:
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1628
L177:
  mov    0x4(%rsp),%eax
  cmp    %ebp,%eax
  jg     L1652
  jmp    L987
  nopl   0x0(%rax,%rax,1)
L1694:
  mov    0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x4(%rsp)
  cmp    %ebp,%eax
  jle    L987
L1652:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L1694
L987:
  movslq 0x8(%rsp),%rax
  mov    %eax,%edx
  cmp    %r12d,%eax
  jl     L497
  jmp    L604
  nopl   0x0(%rax,%rax,1)
L445:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x8(%rsp)
  cmp    %r12d,%edx
  jge    L857
L497:
  movslq %edx,%rdx
  xor    %eax,%eax
  movsbl 0x0(%r13,%rdx,1),%edi
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L445
  movslq 0x8(%rsp),%rax
L604:
  mov    0x4(%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
  js     L1607
  cmp    %ebx,%r12d
  setg   %cl
  xor    %eax,%eax
  test   %edx,%edx
  sete   %al
  and    %ecx,%eax
  jmp    L1607
L111:
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1741
L786:
  mov    0x4(%rsp),%eax
  cmp    %ebp,%eax
  jg     L1291
  jmp    L748
  nopw   0x0(%rax,%rax,1)
L1409:
  mov    0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x4(%rsp)
  cmp    %ebp,%eax
  jle    L748
L1291:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  xor    %eax,%eax
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L1409
L748:
  movslq 0x8(%rsp),%rax
  mov    %eax,%edx
  cmp    %r12d,%eax
  jl     L1747
  jmp    L747
L1746:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x8(%rsp)
  cmp    %r12d,%edx
  jge    L609
L1747:
  movslq %edx,%rdx
  xor    %eax,%eax
  movsbl 0x0(%r13,%rdx,1),%edi
  call   <isWhite@plt>
  test   %eax,%eax
  jne    L1746
  movslq 0x8(%rsp),%rax
L747:
  mov    0x4(%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     L1607
  sete   %dl
  xor    %eax,%eax
  cmp    %ebx,%r12d
  setge  %al
  and    %edx,%eax
  jmp    L1607
L1741:
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L786
  mov    0x10(%rsp),%eax
  cmp    %eax,0xc(%rsp)
  setle  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L857:
  movslq %edx,%rax
  jmp    L604
L609:
  movslq %edx,%rax
  jmp    L747
L110:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D89(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1492
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0xc(%rsp),%eax
  imul   0x10(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1628:
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L177
  mov    0x10(%rsp),%eax
  cmp    %eax,0xc(%rsp)
  setl   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1492:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D139(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L698
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x10(%rsp),%ebx
  test   %ebx,%ebx
  je     L1553
L1010:
  mov    0xc(%rsp),%eax
  cltd
  idiv   %ebx
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L629:
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L590
  mov    0x10(%rsp),%eax
  cmp    %eax,0xc(%rsp)
  setg   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L26:
  call   <__stack_chk_fail@plt>
L1553:
  lea    D128(%rip),%rdi
  xor    %eax,%eax
  call   <bug@plt>
  jmp    L1010
L698:
  xor    %eax,%eax
  mov    %r15,%r9
  mov    %rbx,%r8
  mov    %r12d,%edx
  lea    D93(%rip),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L1200
  movslq %ebp,%r15
  add    %r13,%r15
  movzbl (%r15),%ebx
  cmp    $0x7e,%bl
  je     L1706
  cmp    $0x21,%bl
  je     L1389
  cmp    $0x2d,%bl
  je     L961
  mov    $0x7,%edx
  lea    D36(%rip),%rsi
  mov    %r15,%rdi
  call   <strncmp@plt>
  mov    %eax,%r8d
  movslq %r12d,%rax
  test   %r8d,%r8d
  jne    L283
  cmpb   $0x29,-0x1(%r13,%rax,1)
  jne    L1005
  mov    %r12d,%eax
  sub    %ebp,%eax
  sub    $0x8,%eax
  jmp    L1607
L1200:
  mov    0x4(%rsp),%edx
  lea    0xc(%rsp),%rcx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x8(%rsp),%esi
  lea    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0x10(%rsp),%ebx
  test   %ebx,%ebx
  je     L1691
L1665:
  mov    0xc(%rsp),%eax
  cltd
  idiv   %ebx
  mov    $0x1,%eax
  mov    %edx,(%r14)
  jmp    L1644
L283:
  cmp    $0x28,%bl
  jne    L1082
  cmpb   $0x29,-0x1(%r13,%rax,1)
  jne    L1005
  lea    -0x1(%r12),%edx
  lea    0x1(%rbp),%esi
  mov    %r14,%rcx
  mov    %r13,%rdi
  call   <DoArithmEval>
  jmp    L1644
L1389:
  lea    0xc(%rsp),%rcx
  lea    0x1(%rbp),%esi
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  xor    %eax,%eax
  cmpl   $0x0,0xc(%rsp)
  sete   %al
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L961:
  lea    0xc(%rsp),%rcx
  lea    0x1(%rbp),%esi
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0xc(%rsp),%eax
  neg    %eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1691:
  lea    D128(%rip),%rdi
  xor    %eax,%eax
  call   <bug@plt>
  jmp    L1665
L1706:
  lea    0xc(%rsp),%rcx
  lea    0x1(%rbp),%esi
  mov    %r12d,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1005
  mov    0xc(%rsp),%eax
  not    %eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L1644
L1082:
  add    %rax,%r13
  xor    %edx,%edx
  xor    %eax,%eax
  mov    %r15,%rdi
  movzbl 0x0(%r13),%ebx
  movb   $0x0,0x0(%r13)
  lea    0x10(%rsp),%rsi
  call   <strtol@plt>
  mov    %eax,(%r14)
  xor    %eax,%eax
  cmp    %r13,0x10(%rsp)
  mov    %bl,0x0(%r13)
  sete   %al
  jmp    L1644
```

tool_calls: name: unpack_data
arguments: data_label: D56
type_guessed: string
name: unpack_data
arguments: data_label: D83
type_guessed: string
name: unpack_data
arguments: data_label: D123
type_guessed: string
name: unpack_data
arguments: data_label: D43
type_guessed: string
name: unpack_data
arguments: data_label: D70
type_guessed: string
name: unpack_data
arguments: data_label: D153
type_guessed: string
name: unpack_data
arguments: data_label: D100
type_guessed: string
name: unpack_data
arguments: data_label: D55
type_guessed: string
name: unpack_data
arguments: data_label: D26
type_guessed: string
name: unpack_data
arguments: data_label: D205
type_guessed: string
name: unpack_data
arguments: data_label: D80
type_guessed: string
name: unpack_data
arguments: data_label: D72
type_guessed: string
name: unpack_data
arguments: data_label: D7
type_guessed: string
name: unpack_data
arguments: data_label: D104
type_guessed: string
name: unpack_data
arguments: data_label: D142
type_guessed: string
name: unpack_data
arguments: data_label: D89
type_guessed: string
name: unpack_data
arguments: data_label: D139
type_guessed: string
name: unpack_data
arguments: data_label: D128
type_guessed: string
name: unpack_data
arguments: data_label: D93
type_guessed: string
name: unpack_data
arguments: data_label: D36
type_guessed: string

tool: D56: ||

tool: D83: &&

tool: D123: |

tool: D43: ^

tool: D70: &

tool: D153: !=

tool: D100: ==

tool: D55: =~

tool: D26: >=

tool: D205: >

tool: D80: <=

tool: D72: <

tool: D7: +

tool: D104: globbing support has not been compiled in

tool: D142: -

tool: D89: *

tool: D139: /

tool: D128: Division by zero in expression

tool: D93: %

tool: D36: length(

assistant: ```c
int DoArithmEval(char *buf, int pos1, int pos2, int *result) {
  int spl1, spl2, result1, result2, l;
  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)) {
    bug("globbing support has not been compiled in");
    if (!DoArithmEval(buf, pos1, spl1, &result1) || !DoArithmEval(buf, spl2, pos2, &result2)) {
      char *str1, *str2;
      while ((pos1 < spl1) && isWhite(buf[spl1 - 1]))
        spl1--;
      while ((pos2 > spl2) && isWhite(buf[spl2]))
        spl2++;
      str1 = strdup(buf + pos1);
      str1[spl1 - pos1] = '\0';
      str2 = strdup(buf + spl2);
      str2[pos2 - spl2] = '\0';
      *result = (fnmatch(str2, str1, 0) == 0);
      free(str1);
      free(str2);
    } 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 - strlen("length()");
    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);
}
```