user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  sub    $0x28,%rsp
  lea    D36(%rip),%rdi
  lea    0xc(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%r8
  lea    0x10(%rsp),%rcx
  call   <scanf@plt>
  mov    0x8(%rsp),%r10d
  xor    %eax,%eax
  mov    0x14(%rsp),%esi
  mov    0xc(%rsp),%r9d
  mov    0x10(%rsp),%r8d
  cmp    %r9d,%r10d
  setg   %al
  xor    %edx,%edx
  cmp    %r8d,%eax
  setg   %dl
  cmp    %esi,%edx
  jg     L185
  cmp    %esi,%eax
  setg   %al
  movzbl %al,%eax
  cmp    %eax,%r8d
  jl     L12
  xor    %eax,%eax
  cmp    %r8d,%r10d
  setg   %al
  xor    %edx,%edx
  cmp    %eax,%r9d
  setl   %dl
  cmp    %edx,%esi
  jl     L41
  cmp    %eax,%esi
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r9d
  jl     L12
  xor    %eax,%eax
  cmp    %esi,%r10d
  setg   %al
  xor    %edx,%edx
  cmp    %eax,%r9d
  setl   %dl
  cmp    %edx,%r8d
  jl     L41
  cmp    %eax,%r8d
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r9d
  jl     L185
  xor    %eax,%eax
  cmp    %r8d,%r9d
  setg   %al
  xor    %edx,%edx
  cmp    %eax,%esi
  setl   %dl
  cmp    %edx,%r10d
  jl     L12
  cmp    %eax,%r10d
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%esi
  jl     L19
  xor    %eax,%eax
  cmp    %r9d,%r10d
  setl   %al
  xor    %edx,%edx
  cmp    %eax,%r8d
  setl   %dl
  cmp    %edx,%esi
  jl     L185
  cmp    %eax,%esi
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r8d
  jl     L12
  xor    %eax,%eax
  cmp    %esi,%r9d
  setg   %al
  xor    %edx,%edx
  cmp    %eax,%r10d
  setl   %dl
  cmp    %edx,%r8d
  jl     L19
  cmp    %eax,%r8d
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r10d
  jl     L185
  xor    %eax,%eax
  cmp    %esi,%r8d
  setg   %al
  xor    %edx,%edx
  cmp    %eax,%r10d
  setl   %dl
  cmp    %edx,%r9d
  jl     L19
  cmp    %eax,%r9d
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r10d
  jl     L41
  xor    %eax,%eax
  cmp    %r8d,%r10d
  setl   %al
  xor    %edx,%edx
  cmp    %eax,%r9d
  setl   %dl
  cmp    %edx,%esi
  jl     L41
  cmp    %eax,%esi
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r9d
  jl     L12
  xor    %eax,%eax
  cmp    %r8d,%r9d
  setl   %al
  xor    %edx,%edx
  cmp    %eax,%r10d
  setl   %dl
  cmp    %edx,%esi
  jl     L19
  cmp    %eax,%esi
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r10d
  jl     L12
  xor    %eax,%eax
  cmp    %esi,%r10d
  setl   %al
  xor    %edx,%edx
  cmp    %eax,%r9d
  setl   %dl
  cmp    %edx,%r8d
  jl     L41
  cmp    %eax,%r8d
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r9d
  jl     L185
  xor    %eax,%eax
  cmp    %esi,%r9d
  setl   %al
  xor    %edx,%edx
  cmp    %eax,%r10d
  setl   %dl
  cmp    %edx,%r8d
  jl     L19
  cmp    %eax,%r8d
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r10d
  jl     L185
  xor    %eax,%eax
  cmp    %esi,%r8d
  setl   %al
  cmp    %eax,%r10d
  setl   %al
  movzbl %al,%eax
  cmp    %eax,%r9d
  jge    L41
L19:
  mov    %r10d,%esi
  lea    D1(%rip),%rdi
  call   <printf@plt>
  jmp    L167
L41:
  mov    %r9d,%esi
L12:
  lea    D1(%rip),%rdi
  call   <printf@plt>
L167:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L23
  xor    %eax,%eax
  add    $0x28,%rsp
  ret
L185:
  mov    %r8d,%esi
  lea    D1(%rip),%rdi
  call   <printf@plt>
  jmp    L167
L23:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D36
type_infered: string
name: extract_symbolic_data
arguments: label: D1
type_infered: string

tool: D36: %d %d %d %d

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