user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<sub_spg_standardize_cell>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,%r11
  mov    %rsi,%rax
  mov    %rdx,%rsi
  mov    %ecx,%r10d
  mov    %r8d,%r13d
  mov    %r9d,%r12d
  mov    %fs:0x28,%rdx
  mov    %rdx,-0x38(%rbp)
  xor    %edx,%edx
  movslq %ecx,%rcx
  lea    (%rcx,%rcx,2),%rdx
  lea    0xf(,%rdx,8),%rdx
  mov    %rdx,%r8
  and    $0xfffffffffffffff0,%r8
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rdi
  sub    %rdx,%rdi
L26:
  cmp    %rdi,%rsp
  je     L105
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L26
L105:
  mov    %r8,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L30
  orq    $0x0,-0x8(%rsp,%rdx,1)
L30:
  mov    %rsp,%r14
  lea    0xf(,%rcx,4),%rdx
  mov    %rdx,%rdi
  and    $0xfffffffffffffff0,%rdi
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L71:
  cmp    %rcx,%rsp
  je     L171
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L71
L171:
  mov    %rdi,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L61
  orq    $0x0,-0x8(%rsp,%rdx,1)
L61:
  mov    %rsp,%rdi
  mov    %r11,%rcx
  lea    -0x80(%rbp),%rbx
  lea    -0x38(%rbp),%r8
  mov    %rbx,%rdx
L93:
  movsd  (%rcx),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  0x8(%rcx),%xmm1
  movsd  %xmm1,0x8(%rdx)
  movsd  0x10(%rcx),%xmm1
  movsd  %xmm1,0x10(%rdx)
  add    $0x18,%rcx
  add    $0x18,%rdx
  cmp    %r8,%rdx
  jne    L93
  test   %r10d,%r10d
  jle    L103
  mov    %r14,%rcx
  mov    %r10d,%r9d
  mov    $0x0,%edx
L33:
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx)
  movsd  0x8(%rax),%xmm1
  movsd  %xmm1,0x8(%rcx)
  movsd  0x10(%rax),%xmm1
  movsd  %xmm1,0x10(%rcx)
  mov    (%rsi,%rdx,4),%r8d
  mov    %r8d,(%rdi,%rdx,4)
  add    $0x1,%rdx
  add    $0x18,%rax
  add    $0x18,%rcx
  cmp    %r9,%rdx
  jne    L33
L103:
  lea    -0x80(%rbp),%rax
  mov    %r12d,%r9d
  mov    %r13d,%r8d
  mov    %r10d,%ecx
  mov    %rdi,%rdx
  mov    %r14,%rsi
  mov    %rax,%rdi
  call   <spg_standardize_cell@plt>
  mov    %eax,%r15d
  mov    $0x1,%eax
  test   %r15d,%r15d
  jne    L146
L55:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L70
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L146:
  lea    D29(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %r13d,%r13d
  jne    L83
  lea    D47(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L162:
  test   %r12d,%r12d
  jne    L86
  lea    D17(%rip),%rdi
  call   <puts@plt>
L115:
  lea    D49(%rip),%rdi
  call   <puts@plt>
  lea    0x18(%rbx),%r13
  lea    D85(%rip),%r12
L141:
  movsd  0x30(%rbx),%xmm2
  movsd  0x18(%rbx),%xmm1
  movsd  (%rbx),%xmm0
  mov    %r12,%rdi
  mov    $0x3,%eax
  call   <printf@plt>
  add    $0x8,%rbx
  cmp    %r13,%rbx
  jne    L141
  mov    %r15d,%esi
  lea    D91(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D44(%rip),%rdi
  call   <puts@plt>
  test   %r15d,%r15d
  jle    L182
  mov    %r14,%rbx
  lea    -0x1(%r15),%eax
  lea    (%rax,%rax,2),%rax
  lea    0x18(%r14,%rax,8),%r13
  lea    D85(%rip),%r12
L49:
  movsd  0x10(%rbx),%xmm2
  movsd  0x8(%rbx),%xmm1
  movsd  (%rbx),%xmm0
  mov    %r12,%rdi
  mov    $0x3,%eax
  call   <printf@plt>
  add    $0x18,%rbx
  cmp    %r13,%rbx
  jne    L49
  mov    $0x0,%eax
  jmp    L55
L83:
  lea    D21(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L162
L86:
  lea    D1(%rip),%rdi
  call   <puts@plt>
  jmp    L115
L182:
  mov    $0x0,%eax
  jmp    L55
L70:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D29
type_infered: string
name: extract_symbolic_data
arguments: label: D47
type_infered: string
name: extract_symbolic_data
arguments: label: D17
type_infered: string
name: extract_symbolic_data
arguments: label: D49
type_infered: string
name: extract_symbolic_data
arguments: label: D85
type_infered: string
name: extract_symbolic_data
arguments: label: D91
type_infered: string
name: extract_symbolic_data
arguments: label: D44
type_infered: string
name: extract_symbolic_data
arguments: label: D21
type_infered: string
name: extract_symbolic_data
arguments: label: D1
type_infered: string

tool: D29: VASP POSCAR format: 

tool: D47: to_primitive=0 and 

tool: D17: no_idealize=0

tool: D49: 1.0

tool: D85: %f %f %f


tool: D91: %d


tool: D44: Direct

tool: D21: to_primitive=1 and 

tool: D1: no_idealize=1

assistant: ```c
int sub_spg_standardize_cell(double lattice[3][3], double position[][3], int types[], const int num_atom, const double symprec, const int to_primitive, const int no_idealize) {
  int i, num_primitive_atom;
  double lat[3][3], pos[num_atom][3];
  int typ[num_atom];
  for (i = 0; i < 3; i++) {
    lat[i][0] = lattice[i][0];
    lat[i][1] = lattice[i][1];
    lat[i][2] = lattice[i][2];
  }
  for (i = 0; i < num_atom; i++) {
    pos[i][0] = position[i][0];
    pos[i][1] = position[i][1];
    pos[i][2] = position[i][2];
    typ[i] = types[i];
  }
  num_primitive_atom = spg_standardize_cell(lat, pos, typ, num_atom, to_primitive, no_idealize, symprec);
  if (num_primitive_atom) {
    printf("VASP POSCAR format: ");
    if (to_primitive == 0) {
      printf("to_primitive=0 and ");
    } else {
      printf("to_primitive=1 and ");
    }
    if (no_idealize == 0) {
      printf("no_idealize=0\n");
    } else {
      printf("no_idealize=1\n");
    }
    printf("1.0\n");
    for (i = 0; i < 3; i++) {
      printf("%f %f %f\n", lat[0][i], lat[1][i], lat[2][i]);
    }
    printf("%d\n", num_primitive_atom);
    printf("Direct\n");
    for (i = 0; i < num_primitive_atom; i++) {
      printf("%f %f %f\n", pos[i][0], pos[i][1], pos[i][2]);
    }
    return 0;
  } else {
    return 1;
  }
}
```