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

```asm
<main>:
  endbr64
  push   %r12
  lea    D10(%rip),%rdi
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x14(%rsp),%rcx
  lea    0x10(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  lea    D58(%rip),%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%ebx
  mov    0x10(%rsp),%r12d
  xor    %eax,%eax
  mov    0x14(%rsp),%ebp
  lea    D4(%rip),%rdi
  lea    (%rbx,%r12,1),%esi
  imul   %r12d,%ebx
  add    %ebp,%esi
  call   <printf@plt>
  lea    D3(%rip),%rdi
  xor    %eax,%eax
  mov    %ebx,%esi
  imul   %ebp,%esi
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%r8d
  mov    0x14(%rsp),%r9d
  cmp    %r8d,%esi
  jge    L91
  cmp    %r9d,%esi
  jl     L131
  cmp    %r8d,%esi
  cmovg  %r8d,%esi
  cmp    %esi,%r9d
  jl     L100
L65:
  mov    %r8d,%esi
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L162
L91:
  mov    %r9d,%r10d
  jle    L17
  cmp    %r9d,%r8d
  jl     L80
  cmp    %r8d,%esi
  cmovle %esi,%r8d
  cmp    %r8d,%r9d
  jl     L100
L14:
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L162:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L62
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L17:
  cmp    %r9d,%esi
  jle    L60
L100:
  mov    %r9d,%esi
L131:
  lea    D61(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L63:
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%r8d
  mov    0x14(%rsp),%r10d
  cmp    %r8d,%esi
  jle    L151
  cmp    %r10d,%esi
  jg     L14
L60:
  cmp    %r8d,%esi
  cmovl  %r8d,%esi
  cmp    %esi,%r10d
  jle    L162
  mov    %r10d,%esi
  jmp    L14
L151:
  jge    L60
  cmp    %r10d,%r8d
  jle    L60
  jmp    L65
L80:
  mov    %r8d,%esi
  lea    D61(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L63
L62:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D10
type_guessed: string
name: read_data
arguments: label: D58
type_guessed: string
name: read_data
arguments: label: D4
type_guessed: string
name: read_data
arguments: label: D3
type_guessed: string
name: read_data
arguments: label: D12
type_guessed: string
name: read_data
arguments: label: D61
type_guessed: string

tool: D10: Wprowadz trzy liczby calkowite: 

tool: D58: %d %d %d

tool: D4: Suma wynosi: %d


tool: D3: Iloczyn wynosi: %d


tool: D12: Najwieksza liczba to: %d


tool: D61: Najmniejsza liczba to: %d


assistant: ```c
int main() {
  int a, b, c, suma, iloczyn;
  char *msg1 = "Najwieksza liczba to: %d\n";
  char *msg2 = "Najmniejsza liczba to: %d\n";
  printf("Wprowadz trzy liczby calkowite: ");
  scanf("%d %d %d", &a, &b, &c);
  suma = a + b + c;
  iloczyn = a * b * c;
  printf("Suma wynosi: %d\n", suma);
  printf("Iloczyn wynosi: %d\n", iloczyn);
  if (a < b && a < c) {
    printf(msg2, a);
  } else if (b < a && b < c) {
    printf(msg2, b);
  } else if (c < b && c < a) {
    printf(msg2, c);
  }
  if (a > b && a > c) {
    printf(msg1, a);
  } else if (b > a && b > c) {
    printf(msg1, b);
  } else if (c > b && c > a) {
    printf(msg1, c);
  }
}
```