user: Converte this assembly snippet into its equivalent C code:

```asm
<DoArithmEval>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%r13
  mov    %esi,%ebx
  mov    %edx,%ebp
  mov    %rcx,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmp    %edx,%esi
  jge    L172
  movslq %esi,%r15
  add    %rdi,%r15
L949:
  movsbl (%r15),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L879
  add    $0x1,%ebx
  add    $0x1,%r15
  cmp    %ebx,%ebp
  jne    L949
  mov    $0x0,%r12d
  jmp    L30
L879:
  cmp    %ebx,%ebp
  jle    L172
  movslq %ebp,%rax
  lea    -0x1(%r13,%rax,1),%r15
L1489:
  movsbl (%r15),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L172
  sub    $0x1,%ebp
  sub    $0x1,%r15
  cmp    %ebx,%ebp
  jne    L1489
L30:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1419
  mov    %r12d,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L172:
  cmp    %ebp,%ebx
  je     L138
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D141(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L950
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x1c(%rsp),%eax
  or     0x20(%rsp),%eax
  setne  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L950:
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D58(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L794
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  je     L227
  cmpl   $0x0,0x20(%rsp)
  setne  %al
  movzbl %al,%eax
L227:
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L794:
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D176(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L859
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x1c(%rsp),%eax
  or     0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L859:
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D105(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1674
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x1c(%rsp),%eax
  xor    0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1674:
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D172(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L45
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x1c(%rsp),%eax
  and    0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L45:
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D133(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L891
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D119(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L174
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D92(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L1090
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D97(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L36
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D103(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L261
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D167(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  jne    L593
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D216(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L799
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x20(%rsp),%eax
  add    0x1c(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L891:
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1416
L1429:
  mov    0x14(%rsp),%eax
  cmp    %ebx,%eax
  jle    L419
L303:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L419
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebx,%eax
  jg     L303
L419:
  mov    0x18(%rsp),%eax
  cmp    %ebp,%eax
  jge    L9
L1567:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L9
  mov    0x18(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %ebp,%eax
  jl     L1567
L9:
  mov    0x14(%rsp),%edx
  sub    %ebx,%edx
  mov    0x18(%rsp),%eax
  sub    %eax,%ebp
  cmp    %ebp,%edx
  je     L404
  movl   $0x1,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1416:
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1429
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L404:
  movslq %edx,%rdx
  cltq
  lea    0x0(%r13,%rax,1),%rsi
  movslq %ebx,%rdi
  add    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L174:
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1272
L948:
  mov    0x14(%rsp),%eax
  cmp    %ebx,%eax
  jle    L942
L367:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L942
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebx,%eax
  jg     L367
L942:
  mov    0x18(%rsp),%eax
  cmp    %ebp,%eax
  jge    L678
L773:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L678
  mov    0x18(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %ebp,%eax
  jl     L773
L678:
  mov    0x14(%rsp),%edx
  sub    %ebx,%edx
  mov    0x18(%rsp),%eax
  sub    %eax,%ebp
  cmp    %ebp,%edx
  je     L1585
  movl   $0x0,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1272:
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L948
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1585:
  movslq %edx,%rdx
  cltq
  lea    0x0(%r13,%rax,1),%rsi
  movslq %ebx,%rdi
  add    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1090:
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L853
L104:
  mov    0x14(%rsp),%eax
  cmp    %ebx,%eax
  jle    L926
L800:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L926
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebx,%eax
  jg     L800
L926:
  mov    0x18(%rsp),%eax
  cmp    %ebp,%eax
  jge    L26
L611:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L26
  mov    0x18(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %ebp,%eax
  jl     L611
L26:
  mov    0x14(%rsp),%r12d
  sub    %ebx,%r12d
  mov    0x18(%rsp),%eax
  sub    %eax,%ebp
  cmp    %r12d,%ebp
  mov    %r12d,%edx
  cmovle %ebp,%edx
  movslq %edx,%rdx
  cltq
  lea    0x0(%r13,%rax,1),%rsi
  movslq %ebx,%rdi
  add    %r13,%rdi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  jle    L474
L1178:
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L853:
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L104
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setge  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L474:
  cmp    %r12d,%ebp
  setle  %cl
  test   %edx,%edx
  sete   %al
  movzbl %al,%eax
  and    %ecx,%eax
  jmp    L1178
L36:
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L975
L1655:
  mov    0x14(%rsp),%eax
  cmp    %eax,%ebx
  jge    L687
L284:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L687
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebx,%eax
  jg     L284
L687:
  mov    0x18(%rsp),%eax
  cmp    %ebp,%eax
  jge    L356
L77:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L356
  mov    0x18(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %ebp,%eax
  jl     L77
L356:
  mov    0x14(%rsp),%r12d
  sub    %ebx,%r12d
  mov    0x18(%rsp),%eax
  sub    %eax,%ebp
  cmp    %r12d,%ebp
  mov    %r12d,%edx
  cmovle %ebp,%edx
  movslq %edx,%rdx
  cltq
  lea    0x0(%r13,%rax,1),%rsi
  movslq %ebx,%rdi
  add    %r13,%rdi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  jle    L1507
L1633:
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L975:
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L1655
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setg   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1507:
  cmp    %r12d,%ebp
  setl   %cl
  test   %edx,%edx
  sete   %al
  movzbl %al,%eax
  and    %ecx,%eax
  jmp    L1633
L261:
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1544
L118:
  mov    0x14(%rsp),%eax
  cmp    %eax,%ebx
  jge    L493
L1563:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L493
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebx,%eax
  jg     L1563
L493:
  mov    0x18(%rsp),%eax
  cmp    %ebp,%eax
  jge    L915
L530:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L915
  mov    0x18(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %ebp,%eax
  jl     L530
L915:
  mov    0x14(%rsp),%r12d
  sub    %ebx,%r12d
  mov    0x18(%rsp),%eax
  sub    %eax,%ebp
  cmp    %r12d,%ebp
  mov    %r12d,%edx
  cmovle %ebp,%edx
  movslq %edx,%rdx
  cltq
  lea    0x0(%r13,%rax,1),%rsi
  movslq %ebx,%rdi
  add    %r13,%rdi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  js     L1086
  cmp    %r12d,%ebp
  setge  %cl
  test   %edx,%edx
  sete   %al
  movzbl %al,%eax
  and    %ecx,%eax
L1086:
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1544:
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L118
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setle  %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L593:
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  jne    L1357
L402:
  mov    0x14(%rsp),%eax
  cmp    %eax,%ebx
  jge    L309
L594:
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L309
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x14(%rsp)
  cmp    %ebx,%eax
  jg     L594
L309:
  mov    0x18(%rsp),%eax
  cmp    %ebp,%eax
  jge    L1461
L1343:
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  test   %eax,%eax
  je     L1461
  mov    0x18(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %ebp,%eax
  jl     L1343
L1461:
  mov    0x14(%rsp),%r12d
  sub    %ebx,%r12d
  mov    0x18(%rsp),%eax
  sub    %eax,%ebp
  cmp    %r12d,%ebp
  mov    %r12d,%edx
  cmovle %ebp,%edx
  movslq %edx,%rdx
  cltq
  lea    0x0(%r13,%rax,1),%rsi
  movslq %ebx,%rdi
  add    %r13,%rdi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  js     L72
  cmp    %r12d,%ebp
  setg   %cl
  test   %edx,%edx
  sete   %al
  movzbl %al,%eax
  and    %ecx,%eax
L72:
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1357:
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  test   %eax,%eax
  je     L402
  mov    0x20(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  setl   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L799:
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D109(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1635
  mov    0x14(%rsp),%edx
  cmp    %ebx,%edx
  jne    L1187
L1635:
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D190(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1182
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x1c(%rsp),%eax
  imul   0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1187:
  lea    0x1c(%rsp),%rcx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x1c(%rsp),%eax
  sub    0x20(%rsp),%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1182:
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D112(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  test   %eax,%eax
  je     L1119
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x20(%rsp),%ebx
  test   %ebx,%ebx
  je     L954
L380:
  mov    0x1c(%rsp),%eax
  cltd
  idiv   %ebx
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L954:
  lea    D52(%rip),%rdi
  mov    $0x0,%eax
  call   <bug@plt>
  jmp    L380
L1119:
  lea    0x18(%rsp),%r9
  lea    0x14(%rsp),%r8
  lea    D106(%rip),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <SpliceInfix@plt>
  mov    %eax,0xc(%rsp)
  test   %eax,%eax
  jne    L392
  movslq %ebx,%rax
  add    %r13,%rax
  mov    %rax,(%rsp)
  movzbl (%rax),%r15d
  cmp    $0x7e,%r15b
  je     L940
  cmp    $0x21,%r15b
  je     L590
  cmp    $0x2d,%r15b
  je     L232
  mov    $0x7,%edx
  lea    D38(%rip),%rsi
  mov    (%rsp),%rdi
  call   <strncmp@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L1172
  movslq %ebp,%rax
  cmpb   $0x29,-0x1(%r13,%rax,1)
  jne    L30
  mov    %ebp,%eax
  sub    %ebx,%eax
  sub    $0x8,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L392:
  lea    0x1c(%rsp),%rcx
  mov    0x14(%rsp),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  lea    0x20(%rsp),%rcx
  mov    %ebp,%edx
  mov    0x18(%rsp),%esi
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x20(%rsp),%ebx
  test   %ebx,%ebx
  je     L1268
L1056:
  mov    0x1c(%rsp),%eax
  cltd
  idiv   %ebx
  mov    %edx,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1268:
  lea    D52(%rip),%rdi
  mov    $0x0,%eax
  call   <bug@plt>
  jmp    L1056
L940:
  lea    0x1c(%rsp),%rcx
  lea    0x1(%rbx),%esi
  mov    %ebp,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x1c(%rsp),%eax
  not    %eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L590:
  lea    0x1c(%rsp),%rcx
  lea    0x1(%rbx),%esi
  mov    %ebp,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  cmpl   $0x0,0x1c(%rsp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L232:
  lea    0x1c(%rsp),%rcx
  lea    0x1(%rbx),%esi
  mov    %ebp,%edx
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L30
  mov    0x1c(%rsp),%eax
  neg    %eax
  mov    %eax,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1172:
  mov    $0x7,%edx
  lea    D90(%rip),%rsi
  mov    (%rsp),%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L73
  cmp    $0x28,%r15b
  jne    L1442
  movslq %ebp,%rax
  mov    0xc(%rsp),%r12d
  cmpb   $0x29,-0x1(%r13,%rax,1)
  jne    L30
  lea    -0x1(%rbp),%edx
  lea    0x1(%rbx),%esi
  mov    %r14,%rcx
  mov    %r13,%rdi
  call   <DoArithmEval>
  mov    %eax,%r12d
  jmp    L30
L73:
  add    $0x7,%ebx
  cmp    %ebp,%ebx
  jg     L1455
  movslq %ebp,%rax
  cmpb   $0x0,0x0(%r13,%rax,1)
  jne    L1455
  sub    $0x1,%ebp
L1455:
  movslq %ebx,%r12
L850:
  mov    %r12d,%ebx
  cmp    %r12d,%ebp
  jl     L1368
  movsbl 0x0(%r13,%r12,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  add    $0x1,%r12
  test   %eax,%eax
  jne    L850
  movslq %ebp,%r12
L1283:
  mov    %r12d,%ebp
  cmp    %r12d,%ebx
  jg     L1368
  movsbl 0x0(%r13,%r12,1),%edi
  mov    $0x0,%eax
  call   <iswhite@plt>
  sub    $0x1,%r12
  test   %eax,%eax
  jne    L1283
L1368:
  movslq %ebp,%rax
  cmpb   $0x29,0x0(%r13,%rax,1)
  jne    L111
  sub    $0x1,%ebp
L597:
  movslq %ebx,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x22,%al
  je     L602
  cmp    $0x3c,%al
  je     L602
L1356:
  movslq %ebp,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x22,%al
  je     L19
  cmp    $0x3e,%al
  je     L19
L96:
  cmp    %ebp,%ebx
  jg     L928
L1363:
  sub    %ebx,%ebp
  lea    0x2(%rbp),%edi
  movslq %edi,%rdi
  call   <malloc@plt>
  mov    %rax,%r12
  lea    0x1(%rbp),%edx
  movslq %edx,%rdx
  movslq %ebx,%rsi
  add    %r13,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movslq %ebp,%rbp
  movb   $0x0,0x1(%r12,%rbp,1)
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <checkAbsOrCurrentDir@plt>
  test   %eax,%eax
  jne    L1670
  movl   $0x0,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L111:
  lea    D65(%rip),%rdi
  mov    $0x0,%eax
  call   <bug@plt>
  jmp    L597
L602:
  add    $0x1,%ebx
  jmp    L1356
L19:
  sub    $0x1,%ebp
  jmp    L96
L928:
  lea    D174(%rip),%rdi
  mov    $0x0,%eax
  call   <bug@plt>
  jmp    L1363
L1670:
  movl   $0x1,(%r14)
  mov    $0x1,%r12d
  jmp    L30
L1442:
  movslq %ebp,%rbp
  add    %rbp,%r13
  movzbl 0x0(%r13),%ebx
  movb   $0x0,0x0(%r13)
  lea    0x20(%rsp),%rsi
  mov    $0x0,%edx
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <strtol@plt>
  mov    %eax,(%r14)
  mov    %bl,0x0(%r13)
  cmp    %r13,0x20(%rsp)
  sete   %r12b
  movzbl %r12b,%r12d
  jmp    L30
L138:
  mov    $0x0,%r12d
  jmp    L30
L1419:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D141
datatype: string
name: retrieve_data
arguments: data_label: D58
datatype: string
name: retrieve_data
arguments: data_label: D176
datatype: string
name: retrieve_data
arguments: data_label: D105
datatype: string
name: retrieve_data
arguments: data_label: D172
datatype: string
name: retrieve_data
arguments: data_label: D133
datatype: string
name: retrieve_data
arguments: data_label: D119
datatype: string
name: retrieve_data
arguments: data_label: D92
datatype: string
name: retrieve_data
arguments: data_label: D97
datatype: string
name: retrieve_data
arguments: data_label: D103
datatype: string
name: retrieve_data
arguments: data_label: D167
datatype: string
name: retrieve_data
arguments: data_label: D216
datatype: string
name: retrieve_data
arguments: data_label: D109
datatype: string
name: retrieve_data
arguments: data_label: D190
datatype: string
name: retrieve_data
arguments: data_label: D112
datatype: string
name: retrieve_data
arguments: data_label: D52
datatype: string
name: retrieve_data
arguments: data_label: D106
datatype: string
name: retrieve_data
arguments: data_label: D38
datatype: string
name: retrieve_data
arguments: data_label: D90
datatype: string
name: retrieve_data
arguments: data_label: D65
datatype: string
name: retrieve_data
arguments: data_label: D174
datatype: string

tool: D141: ||

tool: D58: &&

tool: D176: |

tool: D105: ^

tool: D172: &

tool: D133: !=

tool: D119: ==

tool: D92: >=

tool: D97: >

tool: D103: <=

tool: D167: <

tool: D216: +

tool: D109: -

tool: D190: *

tool: D112: /

tool: D52: Division by zero in expression

tool: D106: %

tool: D38: length(

tool: D90: exists(

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

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