user: 请从给定的汇编指令推导出C源代码:

```asm
<get_result>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x40(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L144
L80:
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L87
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x40(%rbp),%eax
  cltq
  mov    %dl,-0x22(%rbp,%rax,1)
  addl   $0x1,-0x40(%rbp)
  jmp    L146
L87:
  mov    -0x40(%rbp),%eax
  cltq
  movb   $0x0,-0x22(%rbp,%rax,1)
  movl   $0x0,-0x40(%rbp)
  lea    -0x22(%rbp),%rdx
  lea    -0x36(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x41(%rbp)
L146:
  addl   $0x1,-0x3c(%rbp)
L144:
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L80
  mov    -0x40(%rbp),%eax
  cltq
  movb   $0x0,-0x22(%rbp,%rax,1)
  lea    -0x22(%rbp),%rdx
  lea    -0x2c(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  movsbl -0x41(%rbp),%eax
  cmp    $0x2f,%eax
  je     L2
  cmp    $0x2f,%eax
  jg     L56
  cmp    $0x2d,%eax
  je     L141
  cmp    $0x2d,%eax
  jg     L56
  cmp    $0x2a,%eax
  je     L133
  cmp    $0x2b,%eax
  jne    L56
  lea    -0x36(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  add    %ebx,%eax
  jmp    L56
L141:
  lea    -0x36(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,%edx
  mov    %ebx,%eax
  sub    %edx,%eax
  jmp    L56
L133:
  lea    -0x36(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  imul   %ebx,%eax
  jmp    L56
L2:
  lea    -0x36(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,%ecx
  mov    %ebx,%eax
  cltd
  idiv   %ecx
  jmp    L56
L56:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L28
  call   <__stack_chk_fail@plt>
L28:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int get_result(char buffer[2000]) {
  char left[10];
  char right[10];
  char temp[10];
  int index = 0;
  char operator;
  for (int x = 0; buffer[x] != '='; x++) {
    if (isdigit(buffer[x])) {
      temp[index] = buffer[x];
      index++;
    } else {
      temp[index] = '\0';
      index = 0;
      strcpy(left, temp);
      operator= buffer[x];
    }
  }
  temp[index] = '\0';
  strcpy(right, temp);
  switch (operator) {
  case '+':
    return atoi(left) + atoi(right);
  case '-':
    return atoi(left) - atoi(right);
  case '*':
    return atoi(left) * atoi(right);
  case '/':
    return atoi(left) / atoi(right);
  }
}
```