user: Translate the below assembly code into C programming language:

```asm
<_glp_mat_amd_order1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xe8,%rsp
  mov    %edi,%r12d
  mov    %rsi,%r15
  mov    %rdx,%rbx
  mov    %rcx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0xd8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <_glp_amd_defaults@plt>
  movslq %r12d,%rax
  lea    0x4(,%rax,4),%r14
  lea    (%r15,%r14,1),%r13
  cmpl   $0x1,0x0(%r13)
  jle    L7
  mov    $0x1,%eax
L56:
  subl   $0x1,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,0x0(%r13)
  jg     L56
L7:
  test   %r12d,%r12d
  js     L176
  lea    0x4(%r15),%rsi
  mov    %rsi,%rax
  mov    %r12d,%edx
  lea    0x8(%r15,%rdx,4),%rdx
L174:
  subl   $0x1,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L174
  lea    0x4(%rbp),%rcx
  lea    0x4(%rbx),%rdx
  lea    0x30(%rsp),%r9
  mov    %rsp,%r8
  mov    %r12d,%edi
  call   <_glp_amd_order@plt>
  cmp    $0x1,%eax
  ja     L165
L10:
  mov    $0x0,%eax
L109:
  addl   $0x1,0x4(%r15,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jge    L109
L2:
  cmpl   $0x1,0x0(%r13)
  jle    L39
  mov    $0x1,%eax
L36:
  addl   $0x1,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,0x0(%r13)
  jg     L36
L39:
  lea    0x0(,%r12,4),%edx
  lea    0x0(%rbp,%r14,1),%rdi
  mov    $0x0,%esi
  call   <memset@plt>
  test   %r12d,%r12d
  jle    L180
  mov    $0x1,%ebx
  lea    D24(%rip),%r14
  lea    D55(%rip),%r15
  jmp    L102
L87:
  mov    $0x208,%edx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <_glp_lib_xassert@plt>
L58:
  mov    %r12d,%eax
  add    0x0(%rbp,%rbx,4),%eax
  cltq
  cmpl   $0x0,0x0(%rbp,%rax,4)
  jne    L150
L175:
  mov    %r12d,%eax
  add    0x0(%rbp,%rbx,4),%eax
  cltq
  mov    %r13d,0x0(%rbp,%rax,4)
  add    $0x1,%rbx
  cmp    %ebx,%r12d
  jl     L180
L102:
  mov    %ebx,%r13d
  mov    0x0(%rbp,%rbx,4),%eax
  add    $0x1,%eax
  mov    %eax,0x0(%rbp,%rbx,4)
  cmp    %r12d,%eax
  jg     L87
  test   %eax,%eax
  jg     L58
  jmp    L87
L150:
  mov    $0x209,%edx
  mov    %r14,%rsi
  lea    D10(%rip),%rdi
  call   <_glp_lib_xassert@plt>
  jmp    L175
L176:
  lea    0x4(%rbp),%rcx
  lea    0x4(%rbx),%rdx
  lea    0x4(%r15),%rsi
  lea    0x30(%rsp),%r9
  mov    %rsp,%r8
  mov    %r12d,%edi
  call   <_glp_amd_order@plt>
  cmp    $0x1,%eax
  jbe    L2
  mov    $0x200,%edx
  lea    D24(%rip),%rsi
  lea    D30(%rip),%rdi
  call   <_glp_lib_xassert@plt>
  jmp    L2
L165:
  mov    $0x200,%edx
  lea    D24(%rip),%rsi
  lea    D30(%rip),%rdi
  call   <_glp_lib_xassert@plt>
  jmp    L10
L180:
  mov    0xd8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  add    $0xe8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D24
type: string
name: unpack_data
arguments: label: D55
type: string
name: unpack_data
arguments: label: D10
type: string
name: unpack_data
arguments: label: D30
type: string

tool: D24: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/macmanes-lab/BinPacker/refs/heads/master/glpk-4.40/src/glpmat.c

tool: D55: 1 <= P_per[k] && P_per[k] <= n

tool: D10: P_per[n+P_per[k]] == 0

tool: D30: ret == AMD_OK || ret == AMD_OK_BUT_JUMBLED

assistant: ```c
void _glp_mat_amd_order1(int n, int A_ptr[], int A_ind[], int P_per[]) {
  int k, ret;
  double Control[5], Info[20];
  _glp_amd_defaults(Control);
  for (k = 1; k < A_ptr[n + 1]; k++)
    A_ind[k]--;
  for (k = 1; k <= n + 1; k++)
    A_ptr[k]--;
  ret = _glp_amd_order(n, &A_ptr[1], &A_ind[1], &P_per[1], Control, Info);
  ((void)((ret == 0 || ret == 1) || (_glp_lib_xassert("ret == AMD_OK || ret == AMD_OK_BUT_JUMBLED", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/macmanes-lab/BinPacker/refs/heads/master/glpk-4.40/src/glpmat.c", 512), 1)));
  for (k = 1; k <= n + 1; k++)
    A_ptr[k]++;
  for (k = 1; k < A_ptr[n + 1]; k++)
    A_ind[k]++;
  memset(&P_per[n + 1], 0, n * sizeof(int));
  for (k = 1; k <= n; k++) {
    P_per[k]++;
    ((void)((1 <= P_per[k] && P_per[k] <= n) || (_glp_lib_xassert("1 <= P_per[k] && P_per[k] <= n", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/macmanes-lab/BinPacker/refs/heads/master/glpk-4.40/src/glpmat.c", 520), 1)));
    ((void)((P_per[n + P_per[k]] == 0) || (_glp_lib_xassert("P_per[n+P_per[k]] == 0", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/macmanes-lab/BinPacker/refs/heads/master/glpk-4.40/src/glpmat.c", 521), 1)));
    P_per[n + P_per[k]] = k;
  }
  return;
}
```