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

```asm
<ex4>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x54(%rbp)
  movl   $0x0,-0x50(%rbp)
  movl   $0x0,-0x4c(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L15
L64:
  mov    -0x48(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x40(%rbp),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x48(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%edx
  mov    -0x50(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  cmp    %eax,%edx
  jle    L6
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x50(%rbp)
L6:
  mov    -0x4c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4c(%rbp)
  test   %eax,%eax
  je     L74
  mov    -0x48(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%edx
  mov    -0x54(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  cmp    %eax,%edx
  jge    L17
L74:
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x54(%rbp)
L17:
  addl   $0x1,-0x48(%rbp)
L15:
  cmpl   $0xb,-0x48(%rbp)
  jle    L64
  movl   $0x0,-0x44(%rbp)
  jmp    L65
L57:
  mov    -0x44(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  mov    -0x44(%rbp),%edx
  lea    0x1(%rdx),%ecx
  mov    %eax,%edx
  mov    %ecx,%esi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x44(%rbp)
L65:
  cmpl   $0xb,-0x44(%rbp)
  jle    L57
  mov    -0x50(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  mov    -0x50(%rbp),%edx
  lea    0x1(%rdx),%ecx
  mov    %eax,%edx
  mov    %ecx,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x54(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  mov    -0x54(%rbp),%edx
  lea    0x1(%rdx),%ecx
  mov    %eax,%edx
  mov    %ecx,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L59
  call   <__stack_chk_fail@plt>
L59:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D44
data_type: string
name: unpack_data
arguments: tag: D49
data_type: string
name: unpack_data
arguments: tag: D1
data_type: string
name: unpack_data
arguments: tag: D47
data_type: string
name: unpack_data
arguments: tag: D27
data_type: string

tool: D44: Informe a temperatura do mes n%d: 

tool: D49: %d

tool: D1: Temperatura mes n%d=%d


tool: D47: Maior temperatura:
	mes=%d
	temp=%d


tool: D27: Menor temperatura:
	mes=%d
	temp=%d


assistant: ```c
void ex4() {
  int tm[12], menor = 0, maior = 0, f = 0;
  for (int i = 0; i < 12; i++) {
    printf("Informe a temperatura do mes n%d: ", i + 1);
    scanf("%d", &tm[i]);
    if (tm[i] > tm[maior])
      maior = i;
    if (!f++ || tm[i] < tm[menor])
      menor = i;
  }
  for (int i = 0; i < 12; i++)
    printf("Temperatura mes n%d=%d\n", i + 1, tm[i]);
  printf("Maior temperatura:\n\tmes=%d\n\ttemp=%d\n", maior + 1, tm[maior]);
  printf("Menor temperatura:\n\tmes=%d\n\ttemp=%d\n", menor + 1, tm[menor]);
}
```