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

```asm
<EvaluateHighestPriorityOperator>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %ecx,%eax
  test   %ecx,%ecx
  je     L122
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %rdx,%rbp
  mov    %ecx,%r14d
  jle    L145
  mov    %ecx,%esi
  mov    $0x0,%eax
  mov    $0xffffffff,%ebx
  jmp    L93
L114:
  movslq %ebx,%rcx
  mov    0x0(%rbp,%rax,4),%edi
  cmp    %edi,0x0(%rbp,%rcx,4)
  cmovl  %eax,%ebx
L26:
  add    $0x1,%rax
  cmp    %rsi,%rax
  je     L116
L93:
  cmp    $0xffffffff,%ebx
  jne    L114
  mov    %eax,%ebx
  jmp    L26
L145:
  mov    $0xffffffff,%ebx
L116:
  movslq %ebx,%r15
  lea    0x0(,%r15,4),%rax
  lea    (%r12,%rax,1),%rsi
  mov    %rsi,0x8(%rsp)
  mov    (%rsi),%esi
  mov    %esi,(%rsp)
  mov    0x4(%r12,%rax,1),%ecx
  mov    %ecx,0x4(%rsp)
  add    %r13,%r15
  movsbl (%r15),%edx
  lea    D15(%rip),%rdi
  call   <printf@plt>
  movzbl (%r15),%edx
  cmp    $0x2d,%dl
  je     L131
  jg     L34
  cmp    $0x2a,%dl
  je     L159
  cmp    $0x2b,%dl
  jne    L136
  mov    (%rsp),%eax
  add    0x4(%rsp),%eax
L147:
  mov    0x8(%rsp),%rdi
  mov    %eax,(%rdi)
  add    $0x1,%ebx
  cmp    %ebx,%r14d
  jle    L120
  movslq %ebx,%rbx
L96:
  mov    0x4(%r12,%rbx,4),%eax
  mov    %eax,(%r12,%rbx,4)
  movzbl 0x0(%r13,%rbx,1),%eax
  mov    %al,-0x1(%r13,%rbx,1)
  mov    0x0(%rbp,%rbx,4),%eax
  mov    %eax,-0x4(%rbp,%rbx,4)
  add    $0x1,%rbx
  cmp    %ebx,%r14d
  jg     L96
L120:
  movslq %r14d,%rax
  movl   $0x0,(%r12,%rax,4)
  movb   $0x0,-0x1(%r13,%rax,1)
  movl   $0x0,-0x4(%rbp,%rax,4)
  lea    -0x1(%r14),%eax
L122:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L34:
  cmp    $0x2f,%dl
  jne    L136
  mov    (%rsp),%eax
  cltd
  idivl  0x4(%rsp)
  jmp    L147
L131:
  mov    (%rsp),%eax
  sub    0x4(%rsp),%eax
  jmp    L147
L159:
  mov    (%rsp),%eax
  imul   0x4(%rsp),%eax
  jmp    L147
L136:
  movsbl %dl,%edx
  mov    0x4(%rsp),%ecx
  mov    (%rsp),%esi
  lea    D7(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L122
```

tool_calls: name: parse_data
arguments: data_tag: D15
type_infered: string
name: parse_data
arguments: data_tag: D7
type_infered: string

tool: D15: evaluating: '%d%c%d'


tool: D7: unsupported operation %d %c %d


assistant: ```c
int EvaluateHighestPriorityOperator(int *numbers, char *operators, int *priorities, int op_count) {
  int op_chosen = 0;
  int i = 0;
  int result = 0, num_left = 0, num_right = 0;
  if (0 == op_count) {
    return 0;
  }
  for (op_chosen = -1, i = 0; i < op_count; ++i) {
    if (-1 == op_chosen || priorities[op_chosen] < priorities[i]) {
      op_chosen = i;
    }
  }
  num_left = numbers[op_chosen];
  num_right = numbers[op_chosen + 1];
  printf("evaluating: '%d%c%d'\n", num_left, operators[op_chosen], num_right);
  switch (operators[op_chosen]) {
  case '+':
    result = num_left + num_right;
    break;
  case '-':
    result = num_left - num_right;
    break;
  case '*':
    result = num_left * num_right;
    break;
  case '/':
    result = num_left / num_right;
    break;
  default:
    printf("unsupported operation %d %c %d\n", num_left, operators[op_chosen], num_right);
    return -1;
  }
  numbers[op_chosen] = result;
  for (i = op_chosen + 1; i < op_count; ++i) {
    numbers[i] = numbers[i + 1];
    operators[i - 1] = operators[i];
    priorities[i - 1] = priorities[i];
  }
  numbers[op_count] = 0;
  operators[op_count - 1] = 0;
  priorities[op_count - 1] = 0;
  return op_count - 1;
}
```