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

```asm
<cmd_sdwrtest>:
  endbr64
  push   %r12
  pcmpeqd %xmm5,%xmm5
  sub    $0x210,%rsp
  movdqa D58(%rip),%xmm3
  movdqa D30(%rip),%xmm9
  mov    %rsp,%rsi
  movdqa D50(%rip),%xmm7
  movdqa D73(%rip),%xmm8
  lea    0x200(%rsp),%rdx
  movdqa D18(%rip),%xmm6
  movdqa D45(%rip),%xmm4
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  mov    %rsi,%rax
  nopl   0x0(%rax)
L26:
  movdqa %xmm3,%xmm2
  add    $0x10,%rax
  paddd  %xmm9,%xmm3
  movdqa %xmm2,%xmm10
  movdqa %xmm2,%xmm0
  movdqa %xmm2,%xmm1
  paddd  %xmm8,%xmm10
  punpcklwd %xmm10,%xmm0
  punpckhwd %xmm10,%xmm1
  movdqa %xmm0,%xmm10
  punpcklwd %xmm1,%xmm0
  punpckhwd %xmm1,%xmm10
  movdqa %xmm2,%xmm1
  paddd  %xmm6,%xmm2
  paddd  %xmm7,%xmm1
  punpcklwd %xmm10,%xmm0
  movdqa %xmm1,%xmm10
  punpcklwd %xmm2,%xmm1
  pand   %xmm4,%xmm0
  punpckhwd %xmm2,%xmm10
  movdqa %xmm1,%xmm2
  punpckhwd %xmm10,%xmm2
  punpcklwd %xmm10,%xmm1
  punpcklwd %xmm2,%xmm1
  pand   %xmm4,%xmm1
  packuswb %xmm1,%xmm0
  pxor   %xmm5,%xmm0
  movaps %xmm0,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L26
  mov    $0x1,%edi
  call   <sd_write_sector@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L9
  lea    D36(%rip),%rdi
  call   <puts@plt>
L27:
  mov    0x208(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0x210,%rsp
  mov    %r12d,%eax
  pop    %r12
  ret
L9:
  mov    %eax,%esi
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  mov    $0xffffffff,%r12d
  call   <printf@plt>
  jmp    L27
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D58
type_guessed: byte[16]
name: extract_symbolic_data
arguments: data_label: D30
type_guessed: byte[16]
name: extract_symbolic_data
arguments: data_label: D50
type_guessed: byte[16]
name: extract_symbolic_data
arguments: data_label: D73
type_guessed: byte[16]
name: extract_symbolic_data
arguments: data_label: D18
type_guessed: byte[16]
name: extract_symbolic_data
arguments: data_label: D45
type_guessed: byte[16]
name: extract_symbolic_data
arguments: data_label: D36
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D37
type_guessed: string

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

tool: {"D30": [0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00]}

tool: {"D50": [0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: {"D73": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D18": [0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00]}

tool: {"D45": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

tool: D36: Nice, test seems to be OK :-)

tool: D37: ERROR: sd_write_sector function returned with %d


assistant: ```c
int cmd_sdwrtest(int argc, char **argv) {
  unsigned char buffer[512];
  int i;
  for (i = 0; i < sizeof(buffer); i++)
    buffer[i] = i ^ 0xFF;
  i = sd_write_sector(1, buffer);
  if (i) {
    printf("ERROR: sd_write_sector function returned with %d\n", i);
    return -1;
  } else {
    printf("Nice, test seems to be OK :-)\n");
    return 0;
  }
}
```