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

```asm
<main>:
  endbr64
  sub    $0x28,%rsp
  lea    D2(%rip),%rdi
  lea    0x8(%rsp),%rsi
  lea    0x14(%rsp),%r8
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rcx
  lea    0xc(%rsp),%rdx
  call   <scanf@plt>
  mov    0x8(%rsp),%esi
  mov    0xc(%rsp),%r8d
  mov    0x10(%rsp),%r9d
  mov    0x14(%rsp),%r10d
  cmp    %r8d,%esi
  jge    L18
L137:
  cmp    %r9d,%r8d
  jge    L181
L138:
  cmp    %r8d,%esi
  mov    %r8d,%eax
  cmovge %esi,%eax
  cmp    %eax,%r9d
  jge    L59
  cmp    %r10d,%eax
  jle    L253
L47:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L100
  xor    %eax,%eax
  add    $0x28,%rsp
  ret
L181:
  cmp    %r10d,%r8d
  jl     L138
  cmp    %r10d,%r9d
  mov    %r10d,%eax
  cmovge %r9d,%eax
  cmp    %eax,%esi
  jge    L200
  cmp    %r10d,%esi
  mov    %r10d,%eax
  cmovge %esi,%eax
  cmp    %eax,%r9d
  jge    L134
  cmp    %r9d,%esi
  cmovl  %r9d,%esi
  cmp    %r10d,%esi
  jg     L47
L275:
  mov    %r10d,%esi
  lea    D9(%rip),%rdi
  call   <printf@plt>
  jmp    L47
L18:
  cmp    %r9d,%esi
  jl     L237
  cmp    %r10d,%esi
  jl     L237
  cmp    %r10d,%r9d
  mov    %r10d,%eax
  cmovge %r9d,%eax
  cmp    %eax,%r8d
  jge    L50
  cmp    %r10d,%r8d
  mov    %r10d,%eax
  cmovge %r8d,%eax
  cmp    %eax,%r9d
  jge    L134
  cmp    %r9d,%r8d
  cmovl  %r9d,%r8d
  cmp    %r10d,%r8d
  jg     L47
  jmp    L275
L237:
  cmp    %r8d,%esi
  jne    L138
  jmp    L137
L59:
  cmp    %r10d,%r9d
  jl     L161
  cmp    %r10d,%eax
  jle    L275
  cmp    %r10d,%r8d
  mov    %r10d,%eax
  cmovge %r8d,%eax
  cmp    %eax,%esi
  jge    L200
  cmp    %r10d,%esi
  cmovl  %r10d,%esi
  cmp    %esi,%r8d
  jl     L47
L50:
  mov    %r8d,%esi
L200:
  lea    D9(%rip),%rdi
  call   <printf@plt>
  jmp    L47
L161:
  cmp    %eax,%r9d
  cmovge %r9d,%eax
  cmp    %eax,%r10d
  jl     L47
L134:
  mov    %r9d,%esi
  lea    D9(%rip),%rdi
  call   <printf@plt>
  jmp    L47
L253:
  cmp    %r9d,%r8d
  mov    %r9d,%eax
  cmovge %r8d,%eax
  cmp    %eax,%esi
  jge    L200
  cmp    %r9d,%esi
  cmovl  %r9d,%esi
  cmp    %esi,%r8d
  jl     L47
  jmp    L50
L100:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D2
type: string
name: disassemble_data
arguments: tag: D9
type: string

tool: D2: %d%d%d%d

tool: D9: 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 \n", b);
    else if (c >= b && c >= d)
      printf("The second largest number is %d \n", c);
    else if (d >= b && d >= c)
      printf("The second largest number is %d \n", d);
  } else if (b >= a && b >= c && b >= d) {
    if (a >= c && a >= d)
      printf("The second largest number is %d \n", a);
    else if (c >= a && c >= d)
      printf("The second largest number is %d \n", c);
    else if (d >= c && d >= a)
      printf("The second largest number is %d \n", d);
  } else if (c >= a && c >= b && c >= d) {
    if (d >= a && d >= b)
      printf("The second largest number is %d \n", d);
    else if (a >= b && a >= d)
      printf("The second largest number is %d \n", a);
    else if (b >= a && b >= d)
      printf("The second largest number is %d \n", b);
  } else if (d >= a && d >= b && d >= c) {
    if (c >= a && c >= b)
      printf("The second largest number is %d \n", c);
    else if (a >= c && a >= b)
      printf("The second largest number is %d \n", a);
    else if (b >= a && b >= c)
      printf("The second largest number is %d \n", b);
  }
  return 0;
}
```