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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movl   $0x2f2a2d2b,0x44(%rsp)
  lea    0x30(%rsp),%r12
  lea    0x44(%rsp),%r13
  mov    %r12,%rbx
  lea    D27(%rip),%rbp
L133:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  add    $0x4,%rbx
  cmp    %r13,%rbx
  jne    L133
  lea    0x1c(%rsp),%rsi
  lea    D27(%rip),%rdi
  call   <scanf@plt>
  movl   $0x0,0x20(%rsp)
  mov    $0x0,%edi
  movl   $0x0,0xc(%rsp)
  mov    $0x1,%r14d
  mov    $0xffffffff,%r15d
  mov    %r12,%r13
L201:
  movl   $0x0,0x24(%rsp)
  movl   $0x0,0x8(%rsp)
  jmp    L92
L56:
  mov    %eax,0x8(%rsp)
  jmp    L92
L332:
  mov    %eax,0x8(%rsp)
L92:
  movl   $0x0,0x28(%rsp)
  movl   $0x0,(%rsp)
  jmp    L193
L8:
  mov    %eax,(%rsp)
  jmp    L193
L153:
  mov    %eax,(%rsp)
L193:
  movl   $0x0,0x2c(%rsp)
  mov    $0x0,%ebp
  lea    D49(%rip),%r12
  jmp    L165
L20:
  mov    %eax,%ebp
  jmp    L165
L215:
  mov    %eax,%ebp
L165:
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x30(%rsp),%xmm0
  lea    0x20(%rsp),%rcx
  lea    0x10(%r13),%r8
  mov    %r13,%rdx
  mov    %r14d,%esi
  pxor   %xmm2,%xmm2
  jmp    L148
L242:
  cmp    $0x2f,%al
  jne    L63
  pxor   %xmm1,%xmm1
  cvtsi2ssl 0x4(%rdx),%xmm1
  divss  %xmm1,%xmm0
  jmp    L63
L272:
  pxor   %xmm1,%xmm1
  cvtsi2ss %esi,%xmm1
  mulss  %xmm1,%xmm0
  addss  %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x4(%rdx),%xmm0
  mov    %r15d,%esi
L63:
  add    $0x4,%rcx
  add    $0x4,%rdx
  cmp    %r8,%rdx
  je     L204
L148:
  movslq (%rcx),%rax
  movzbl 0x44(%rsp,%rax,1),%eax
  cmp    $0x2d,%al
  je     L272
  jg     L242
  cmp    $0x2a,%al
  je     L299
  cmp    $0x2b,%al
  jne    L63
  pxor   %xmm1,%xmm1
  cvtsi2ss %esi,%xmm1
  mulss  %xmm1,%xmm0
  addss  %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x4(%rdx),%xmm0
  mov    %r14d,%esi
  jmp    L63
L299:
  pxor   %xmm1,%xmm1
  cvtsi2ssl 0x4(%rdx),%xmm1
  mulss  %xmm1,%xmm0
  jmp    L63
L204:
  pxor   %xmm1,%xmm1
  cvtsi2ss %esi,%xmm1
  mulss  %xmm1,%xmm0
  addss  %xmm2,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ssl 0x1c(%rsp),%xmm1
  ucomiss %xmm1,%xmm0
  jp     L223
  je     L158
L223:
  lea    0x1(%rbp),%eax
  mov    %eax,0x2c(%rsp)
  cmp    $0x4,%eax
  je     L287
  cmp    $0x3,%eax
  jne    L215
  cmpl   $0x0,0x40(%rsp)
  jne    L20
  add    $0x2,%ebp
  mov    %ebp,0x2c(%rsp)
L287:
  mov    (%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x28(%rsp)
  cmp    $0x4,%eax
  je     L77
  cmp    $0x3,%eax
  jne    L153
  cmpl   $0x0,0x3c(%rsp)
  jne    L8
  mov    (%rsp),%eax
  add    $0x2,%eax
  mov    %eax,0x28(%rsp)
L77:
  mov    0x8(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x24(%rsp)
  cmp    $0x4,%eax
  je     L118
  cmp    $0x3,%eax
  jne    L332
  cmpl   $0x0,0x38(%rsp)
  jne    L56
  mov    0x8(%rsp),%eax
  add    $0x2,%eax
  mov    %eax,0x24(%rsp)
L118:
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  mov    %eax,0x20(%rsp)
  cmp    $0x4,%eax
  je     L134
  cmpl   $0x3,0xc(%rsp)
  jne    L201
  cmpl   $0x0,0x34(%rsp)
  jne    L201
L134:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L310
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L158:
  lea    0x1(%rdi),%eax
  mov    %eax,0x4(%rsp)
  mov    %edi,%esi
  lea    D18(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%ebx
L314:
  movslq 0x20(%rsp,%rbx,1),%rax
  movsbl 0x44(%rsp,%rax,1),%edx
  mov    0x30(%rsp,%rbx,1),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbx
  cmp    $0x10,%rbx
  jne    L314
  mov    0x1c(%rsp),%edx
  mov    0x40(%rsp),%esi
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%edi
  jmp    L223
L310:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D27
type_guessed: string
name: read_data
arguments: data_label: D49
type_guessed: string
name: read_data
arguments: data_label: D18
type_guessed: string
name: read_data
arguments: data_label: D43
type_guessed: string

tool: D27: %d

tool: D49: %d %c 

tool: D18: count = %d


tool: D43: %d = %d


assistant: ```c
void main() {
  int num[5];
  int ret;
  int i[4], j;
  char operator[4] = {'+', '-', '*', '/'};
  float left, right;
  int sign;
  int count = 0;
  for (j = 0; j < 5; j++)
    scanf("%d", num + j);
  scanf("%d", &ret);
  for (i[0] = 0; i[0] < 4; i[0]++) {
    if (i[0] == 3 && num[1] == 0)
      continue;
    for (i[1] = 0; i[1] < 4; i[1]++) {
      if (i[1] == 3 && num[2] == 0)
        continue;
      for (i[2] = 0; i[2] < 4; i[2]++) {
        if (i[2] == 3 && num[3] == 0)
          continue;
        for (i[3] = 0; i[3] < 4; i[3]++) {
          if (i[3] == 3 && num[4] == 0)
            continue;
          left = 0;
          right = num[0];
          sign = 1;
          for (j = 0; j < 4; j++) {
            switch (operator[i[j]]) {
            case '+':
              left += sign * right;
              right = num[j + 1];
              sign = 1;
              break;
            case '-':
              left += sign * right;
              right = num[j + 1];
              sign = -1;
              break;
            case '*':
              right *= num[j + 1];
              break;
            case '/':
              right /= num[j + 1];
              break;
            }
          }
          if (left + sign * right == ret) {
            printf("count = %d\n", count++);
            for (j = 0; j < 4; j++)
              printf("%d %c ", num[j], operator[i[j]]);
            printf("%d = %d\n", num[4], ret);
          }
        }
      }
    }
  }
}
```