user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_spg_get_symmetry>:
  endbr64
  push   %rbp
  pxor   %xmm0,%xmm0
  mov    $0x24,%ecx
  lea    D207(%rip),%rsi
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  lea    -0x160(%rbp),%r13
  push   %r12
  mov    %r13,%rdi
  push   %rbx
  sub    $0x1c8,%rsp
  movq   D68(%rip),%xmm1
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movaps %xmm0,-0x1a0(%rbp)
  mov    D233(%rip),%rax
  rep movsq %ds:(%rsi),%es:(%rdi)
  movaps %xmm0,-0x180(%rbp)
  movdqa D11(%rip),%xmm0
  mov    %rax,-0x170(%rbp)
  mov    %rsp,%rax
  movaps %xmm0,-0x1e0(%rbp)
  movdqa D177(%rip),%xmm0
  movaps %xmm1,-0x1b0(%rbp)
  movaps %xmm0,-0x1d0(%rbp)
  movdqa D49(%rip),%xmm0
  movaps %xmm1,-0x190(%rbp)
  movaps %xmm0,-0x1c0(%rbp)
  cmp    %rax,%rsp
  je     L31
L4:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L4
L31:
  sub    $0x710,%rsp
  orq    $0x0,0x708(%rsp)
  mov    %rsp,%rax
  mov    %rsp,%rbx
  cmp    %rax,%rsp
  je     L28
L16:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L16
L28:
  sub    $0x4b0,%rsp
  orq    $0x0,0x4a8(%rsp)
  movapd D31(%rip),%xmm0
  lea    D27(%rip),%rdi
  movapd D193(%rip),%xmm2
  movapd D8(%rip),%xmm1
  movapd D219(%rip),%xmm3
  movaps %xmm0,-0x150(%rbp)
  movapd D51(%rip),%xmm0
  mov    %rsp,%r12
  movaps %xmm2,-0x160(%rbp)
  movaps %xmm0,-0x140(%rbp)
  movapd D186(%rip),%xmm0
  movaps %xmm1,-0x130(%rbp)
  movaps %xmm0,-0x120(%rbp)
  movq   D156(%rip),%xmm0
  movaps %xmm2,-0xd0(%rbp)
  movapd D109(%rip),%xmm2
  movaps %xmm0,-0x110(%rbp)
  movapd D14(%rip),%xmm0
  movaps %xmm1,-0xa0(%rbp)
  movapd D240(%rip),%xmm1
  movaps %xmm0,-0x100(%rbp)
  movaps %xmm0,-0x70(%rbp)
  movapd D73(%rip),%xmm0
  movaps %xmm3,-0xf0(%rbp)
  movapd D76(%rip),%xmm3
  movaps %xmm2,-0xc0(%rbp)
  movapd D196(%rip),%xmm2
  movaps %xmm1,-0x90(%rbp)
  movapd D43(%rip),%xmm1
  movaps %xmm0,-0x60(%rbp)
  movapd D62(%rip),%xmm0
  movaps %xmm3,-0xe0(%rbp)
  movaps %xmm2,-0xb0(%rbp)
  movaps %xmm1,-0x80(%rbp)
  movaps %xmm0,-0x50(%rbp)
  call   <puts@plt>
  push   $0x0
  mov    %r13,%r8
  mov    $0x32,%edx
  push   $0xc
  lea    -0x1b0(%rbp),%rcx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  lea    -0x1e0(%rbp),%r9
  call   <spg_get_symmetry@plt>
  mov    %r12,%rsp
  mov    %eax,-0x1e4(%rbp)
  test   %eax,%eax
  jle    L21
  add    $0x24,%rbx
  xor    %r13d,%r13d
  lea    D92(%rip),%r14
  nopl   (%rax)
L27:
  add    $0x1,%r13d
  lea    D188(%rip),%rdi
  lea    -0x24(%rbx),%r15
  xor    %eax,%eax
  mov    %r13d,%esi
  call   <printf@plt>
L35:
  mov    0x8(%r15),%ecx
  mov    0x4(%r15),%edx
  mov    %r14,%rdi
  xor    %eax,%eax
  mov    (%r15),%esi
  add    $0xc,%r15
  call   <printf@plt>
  cmp    %r15,%rbx
  jne    L35
  movsd  0x10(%r12),%xmm2
  mov    $0x3,%eax
  add    $0x18,%r12
  movsd  -0x10(%r12),%xmm1
  movsd  -0x18(%r12),%xmm0
  lea    D35(%rip),%rdi
  add    $0x24,%rbx
  call   <printf@plt>
  cmp    -0x1e4(%rbp),%r13d
  jne    L27
L21:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L38
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L38:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D207
data_type: string
name: retrieve_data
arguments: data_tag: D68
data_type: byte[8]
name: retrieve_data
arguments: data_tag: D233
data_type: byte[8]
name: retrieve_data
arguments: data_tag: D11
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D177
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D49
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D31
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D27
data_type: string
name: retrieve_data
arguments: data_tag: D193
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D8
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D219
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D51
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D186
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D156
data_type: byte[8]
name: retrieve_data
arguments: data_tag: D109
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D14
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D240
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D73
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D76
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D196
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D43
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D62
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D92
data_type: string
name: retrieve_data
arguments: data_tag: D188
data_type: string
name: retrieve_data
arguments: data_tag: D35
data_type: string

tool: 

tool: {"D68": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

tool: {"D233": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40]}

tool: {"D11": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00]}

tool: {"D177": [0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: {"D49": [0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00]}

tool: {"D31": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33,0x33,0x33,0x33,0x33,0xe3,0x3f]}

tool: D27: *** Example of spg_get_symmetry (Rutile two unit cells) ***:

tool: {"D193": [0.1,0.1]}

tool: {"D8": [0x9a,0x99,0x99,0x99,0x99,0x99,0xd9,0x3f,0x9a,0x99,0x99,0x99,0x99,0x99,0xd9,0x3f]}

tool: {"D219": [0.25,0.9]}

tool: {"D51": [0x33,0x33,0x33,0x33,0x33,0x33,0xe3,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x3f]}

tool: {"D186": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x99,0x99,0x99,0x99,0x99,0x99,0xe9,0x3f]}

tool: {"D156": [0x99,0x99,0x99,0x99,0x99,0x99,0xe9,0x3f]}

tool: {"D109": [0.5,0.6]}

tool: {"D14": [0x34,0x33,0x33,0x33,0x33,0x33,0xd3,0x3f,0xcd,0xcc,0xcc,0xcc,0xcc,0xcc,0xec,0x3f]}

tool: {"D240": [0.5,0.7999999999999999]}

tool: {"D73": [0.75,0.9]}

tool: {"D76": [0x34,0x33,0x33,0x33,0x33,0x33,0xd3,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x3f]}

tool: {"D196": [0x33,0x33,0x33,0x33,0x33,0x33,0xe3,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x3f]}

tool: {"D43": [0x99,0x99,0x99,0x99,0x99,0x99,0xe9,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: {"D62": [0x34,0x33,0x33,0x33,0x33,0x33,0xd3,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x3f]}

tool: D92: %2d %2d %2d


tool: D188: --- %d ---


tool: D35: %f %f %f


assistant: ```c
void test_spg_get_symmetry(void) {
  double lattice[3][3] = {{4, 0, 0}, {0, 4, 0}, {0, 0, 3}};
  double position[][3] = {{0, 0, 0}, {0.5, 0.5, 0.25}, {0.3, 0.3, 0}, {0.7, 0.7, 0}, {0.2, 0.8, 0.25}, {0.8, 0.2, 0.25}, {0, 0, 0.5}, {0.5, 0.5, 0.75}, {0.3, 0.3, 0.5}, {0.7, 0.7, 0.5}, {0.2, 0.8, 0.75}, {0.8, 0.2, 0.75}};
  int types[] = {1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2};
  int num_atom = 12;
  int max_size = 50;
  int i, j, size;
  int rotation[max_size][3][3];
  double translation[max_size][3];
  double origin_shift[3] = {0.1, 0.1, 0};
  for (i = 0; i < num_atom; i++) {
    for (j = 0; j < 3; j++) {
      position[i][j] += origin_shift[j];
    }
  }
  printf("*** Example of spg_get_symmetry (Rutile two unit cells) ***:\n");
  size = spg_get_symmetry(rotation, translation, max_size, lattice, position, types, num_atom, 1e-5);
  for (i = 0; i < size; i++) {
    printf("--- %d ---\n", i + 1);
    for (j = 0; j < 3; j++)
      printf("%2d %2d %2d\n", rotation[i][j][0], rotation[i][j][1], rotation[i][j][2]);
    printf("%f %f %f\n", translation[i][0], translation[i][1], translation[i][2]);
  }
}
```