user: Converte this assembly snippet into its equivalent C code:

```asm
<change>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L55
L51:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L16
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
L16:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L73
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
L73:
  addq   $0x4,-0x18(%rbp)
L55:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x18(%rbp)
  jb     L51
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  mov    %edx,(%rax)
  movl   $0x0,-0x20(%rbp)
  jmp    L49
L78:
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  jmp    L35
L30:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L76
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
L76:
  addq   $0x4,-0x18(%rbp)
L35:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x18(%rbp)
  jb     L30
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x8(%rbp)
  je     L32
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  mov    %edx,(%rax)
L32:
  addl   $0x1,-0x20(%rbp)
L49:
  cmpl   $0x2,-0x20(%rbp)
  jle    L78
  mov    -0x28(%rbp),%rax
  mov    0x10(%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x28(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  mov    0x50(%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x50(%rax),%rdx
  mov    -0x28(%rbp),%rax
  mov    0x8(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  mov    0x60(%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x60(%rax),%rdx
  mov    -0x28(%rbp),%rax
  mov    0xc(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0xc(%rax),%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D3
type_guessed: string

tool: D3: max = %d, min = %d


assistant: ```c
void change(int (*p)[5], int n) {
  int i, temp;
  int *pc = *p;
  int *max = *p, *min = *p;
  while (pc < *p + n) {
    if (*max < *pc)
      max = pc;
    if (*min > *pc)
      min = pc;
    pc++;
  }
  printf("max = %d, min = %d\n", *max, *min);
  temp = *(*p + n / 2);
  *(*p + n / 2) = *max;
  *max = temp;
  temp = **p;
  **p = *min;
  *min = temp;
  for (i = 0; i < 3; i++) {
    min = *p + i + 1;
    pc = *p + i + 1;
    while (pc < *p + n) {
      if (*min > *pc)
        min = pc;
      pc++;
    }
    if (min != *p + i + 1) {
      temp = *(*p + i + 1);
      *(*p + i + 1) = *min;
      *min = temp;
    }
  }
  temp = *(*p + 5 - 1);
  *(*p + 5 - 1) = *(*p + 1);
  *(*p + 1) = temp;
  temp = **(p + 5 - 1);
  **(p + 5 - 1) = *(*p + 2);
  *(*p + 2) = temp;
  temp = *(*(p + 5 - 1) + 5 - 1);
  *(*(p + 5 - 1) + 5 - 1) = *(*p + 3);
  *(*p + 3) = temp;
}
```