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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0xc(%rbp),%rsi
  lea    -0x10(%rbp),%rcx
  lea    -0x14(%rbp),%rdx
  lea    -0x18(%rbp),%rax
  mov    %rsi,%r8
  mov    %rax,%rsi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  jl     L38
  mov    -0x18(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jl     L38
  mov    -0x18(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jl     L38
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jl     L159
  mov    -0x14(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jl     L159
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L159:
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jl     L41
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L41:
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L38:
  mov    -0x14(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jl     L338
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jl     L338
  mov    -0x14(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jl     L338
  mov    -0x18(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jl     L224
  mov    -0x18(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jl     L224
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L224:
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jl     L130
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L130:
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L338:
  mov    -0x10(%rbp),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  jl     L172
  mov    -0x10(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jl     L172
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jl     L172
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  jl     L328
  mov    -0x18(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jl     L328
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L328:
  mov    -0x14(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jl     L182
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L182:
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L172:
  mov    -0xc(%rbp),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  jl     L263
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jl     L263
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jl     L263
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jl     L298
  mov    -0x14(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jl     L298
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L298:
  mov    -0x10(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jl     L257
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L263
L257:
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L263:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L246
  call   <__stack_chk_fail@plt>
L246:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D5
type_guessed: string
name: unpack_data
arguments: tag: D125
type_guessed: string

tool: D5: %d%d%d%d

tool: D125: The second largest number is %d

assistant: ```c
int main() {
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (a >= b && a >= c && a >= d) {
    if (b >= c && b >= d) {
      printf("The second largest number is %d", b);
    } else {
      if (c >= d) {
        printf("The second largest number is %d", c);
      } else {
        printf("The second largest number is %d", d);
      }
    }
  } else if (b >= a && b >= c && b >= d) {
    if (a >= c && a >= d) {
      printf("The second largest number is %d", a);
    } else {
      if (c >= d) {
        printf("The second largest number is %d", c);
      } else {
        printf("The second largest number is %d", d);
      }
    }
  } else if (c >= b && c >= a && c >= d) {
    if (a >= b && a >= d) {
      printf("The second largest number is %d", a);
    } else {
      if (b >= d) {
        printf("The second largest number is %d", b);
      } else {
        printf("The second largest number is %d", d);
      }
    }
  } else if (d >= b && d >= c && d >= a) {
    if (b >= c && b >= a) {
      printf("The second largest number is %d", b);
    } else {
      if (c >= a) {
        printf("The second largest number is %d", c);
      } else {
        printf("The second largest number is %d", a);
      }
    }
  }
  return 0;
}
```