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

```asm
<test_fetch_and_op>:
  endbr64
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  mov    $0xfffffff5,%eax
  lock xadd %al,0x65(%rsp)
  mov    %al,0x65(%rsp)
  mov    $0xfffffff5,%eax
  lock xadd %al,0x67(%rsp)
  mov    %al,0x67(%rsp)
  mov    $0xfffffff5,%eax
  lock xadd %ax,0xa(%rsp)
  mov    %ax,0xa(%rsp)
  mov    $0xfffffff5,%eax
  lock xadd %ax,0xe(%rsp)
  mov    %ax,0xe(%rsp)
  mov    $0xfffffff5,%eax
  lock xadd %eax,0x14(%rsp)
  mov    %eax,0x14(%rsp)
  mov    $0xfffffff5,%eax
  lock xadd %eax,0x1c(%rsp)
  mov    %eax,0x1c(%rsp)
  mov    $0xfffffffffffffff5,%rax
  lock xadd %rax,0x28(%rsp)
  mov    %rax,0x28(%rsp)
  mov    $0xfffffffffffffff5,%rax
  lock xadd %rax,0x38(%rsp)
  mov    %rax,0x38(%rsp)
  mov    $0xfffffffffffffff5,%rax
  lock xadd %rax,0x48(%rsp)
  mov    %rax,0x48(%rsp)
  mov    $0xfffffffffffffff5,%rax
  lock xadd %rax,0x58(%rsp)
  mov    %rax,0x58(%rsp)
  mov    $0xb,%eax
  lock xadd %al,0x65(%rsp)
  mov    %al,0x65(%rsp)
  mov    $0xb,%eax
  lock xadd %al,0x67(%rsp)
  mov    %al,0x67(%rsp)
  mov    $0xb,%eax
  lock xadd %ax,0xa(%rsp)
  mov    %ax,0xa(%rsp)
  mov    $0xb,%eax
  lock xadd %ax,0xe(%rsp)
  mov    %ax,0xe(%rsp)
  mov    $0xb,%eax
  lock xadd %eax,0x14(%rsp)
  mov    %eax,0x14(%rsp)
  mov    $0xb,%eax
  lock xadd %eax,0x1c(%rsp)
  mov    %eax,0x1c(%rsp)
  mov    $0xb,%eax
  lock xadd %rax,0x28(%rsp)
  mov    %rax,0x28(%rsp)
  mov    $0xb,%eax
  lock xadd %rax,0x38(%rsp)
  mov    %rax,0x38(%rsp)
  mov    $0xb,%eax
  lock xadd %rax,0x48(%rsp)
  mov    %rax,0x48(%rsp)
  mov    $0xb,%eax
  lock xadd %rax,0x58(%rsp)
  mov    %rax,0x58(%rsp)
  movzbl 0x65(%rsp),%eax
L47:
  mov    %eax,%edx
  mov    %eax,%ecx
  or     $0xfffffff5,%ecx
  lock cmpxchg %cl,0x65(%rsp)
  jne    L47
  mov    %dl,0x65(%rsp)
  movzbl 0x67(%rsp),%eax
L21:
  mov    %eax,%edx
  mov    %eax,%ecx
  or     $0xfffffff5,%ecx
  lock cmpxchg %cl,0x67(%rsp)
  jne    L21
  mov    %dl,0x67(%rsp)
  movzwl 0xa(%rsp),%eax
L360:
  mov    %eax,%edx
  mov    %eax,%ecx
  or     $0xfffffff5,%ecx
  lock cmpxchg %cx,0xa(%rsp)
  jne    L360
  mov    %dx,0xa(%rsp)
  movzwl 0xe(%rsp),%eax
L9:
  mov    %eax,%edx
  mov    %eax,%ecx
  or     $0xfffffff5,%ecx
  lock cmpxchg %cx,0xe(%rsp)
  jne    L9
  mov    %dx,0xe(%rsp)
  mov    0x14(%rsp),%eax
L163:
  mov    %eax,%edx
  mov    %eax,%ecx
  or     $0xfffffff5,%ecx
  lock cmpxchg %ecx,0x14(%rsp)
  jne    L163
  mov    %edx,0x14(%rsp)
  mov    0x1c(%rsp),%eax
L164:
  mov    %eax,%edx
  mov    %eax,%ecx
  or     $0xfffffff5,%ecx
  lock cmpxchg %ecx,0x1c(%rsp)
  jne    L164
  mov    %edx,0x1c(%rsp)
  mov    0x28(%rsp),%rax
L19:
  mov    %rax,%rdx
  mov    %rax,%rcx
  or     $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x28(%rsp)
  jne    L19
  mov    %rdx,0x28(%rsp)
  mov    0x38(%rsp),%rax
L56:
  mov    %rax,%rdx
  mov    %rax,%rcx
  or     $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x38(%rsp)
  jne    L56
  mov    %rdx,0x38(%rsp)
  mov    0x48(%rsp),%rax
L148:
  mov    %rax,%rdx
  mov    %rax,%rcx
  or     $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x48(%rsp)
  jne    L148
  mov    %rdx,0x48(%rsp)
  mov    0x58(%rsp),%rax
L363:
  mov    %rax,%rdx
  mov    %rax,%rcx
  or     $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x58(%rsp)
  jne    L363
  mov    %rdx,0x58(%rsp)
  movzbl 0x65(%rsp),%eax
L96:
  mov    %eax,%edx
  mov    %eax,%ecx
  xor    $0xfffffff5,%ecx
  lock cmpxchg %cl,0x65(%rsp)
  jne    L96
  mov    %dl,0x65(%rsp)
  movzbl 0x67(%rsp),%eax
L192:
  mov    %eax,%edx
  mov    %eax,%ecx
  xor    $0xfffffff5,%ecx
  lock cmpxchg %cl,0x67(%rsp)
  jne    L192
  mov    %dl,0x67(%rsp)
  movzwl 0xa(%rsp),%eax
L251:
  mov    %eax,%edx
  mov    %eax,%ecx
  xor    $0xfffffff5,%ecx
  lock cmpxchg %cx,0xa(%rsp)
  jne    L251
  mov    %dx,0xa(%rsp)
  movzwl 0xe(%rsp),%eax
L67:
  mov    %eax,%edx
  mov    %eax,%ecx
  xor    $0xfffffff5,%ecx
  lock cmpxchg %cx,0xe(%rsp)
  jne    L67
  mov    %dx,0xe(%rsp)
  mov    0x14(%rsp),%eax
L255:
  mov    %eax,%edx
  mov    %eax,%ecx
  xor    $0xfffffff5,%ecx
  lock cmpxchg %ecx,0x14(%rsp)
  jne    L255
  mov    %edx,0x14(%rsp)
  mov    0x1c(%rsp),%eax
L352:
  mov    %eax,%edx
  mov    %eax,%ecx
  xor    $0xfffffff5,%ecx
  lock cmpxchg %ecx,0x1c(%rsp)
  jne    L352
  mov    %edx,0x1c(%rsp)
  mov    0x28(%rsp),%rax
L385:
  mov    %rax,%rdx
  mov    %rax,%rcx
  xor    $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x28(%rsp)
  jne    L385
  mov    %rdx,0x28(%rsp)
  mov    0x38(%rsp),%rax
L38:
  mov    %rax,%rdx
  mov    %rax,%rcx
  xor    $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x38(%rsp)
  jne    L38
  mov    %rdx,0x38(%rsp)
  mov    0x48(%rsp),%rax
L153:
  mov    %rax,%rdx
  mov    %rax,%rcx
  xor    $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x48(%rsp)
  jne    L153
  mov    %rdx,0x48(%rsp)
  mov    0x58(%rsp),%rax
L319:
  mov    %rax,%rdx
  mov    %rax,%rcx
  xor    $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x58(%rsp)
  jne    L319
  mov    %rdx,0x58(%rsp)
  movzbl 0x65(%rsp),%eax
L161:
  mov    %eax,%edx
  mov    %eax,%ecx
  and    $0xfffffff5,%ecx
  lock cmpxchg %cl,0x65(%rsp)
  jne    L161
  mov    %dl,0x65(%rsp)
  movzbl 0x67(%rsp),%eax
L60:
  mov    %eax,%edx
  mov    %eax,%ecx
  and    $0xfffffff5,%ecx
  lock cmpxchg %cl,0x67(%rsp)
  jne    L60
  mov    %dl,0x67(%rsp)
  movzwl 0xa(%rsp),%eax
L227:
  mov    %eax,%edx
  mov    %eax,%ecx
  and    $0xfffffff5,%ecx
  lock cmpxchg %cx,0xa(%rsp)
  jne    L227
  mov    %dx,0xa(%rsp)
  movzwl 0xe(%rsp),%eax
L171:
  mov    %eax,%edx
  mov    %eax,%ecx
  and    $0xfffffff5,%ecx
  lock cmpxchg %cx,0xe(%rsp)
  jne    L171
  mov    %dx,0xe(%rsp)
  mov    0x14(%rsp),%eax
L208:
  mov    %eax,%edx
  mov    %eax,%ecx
  and    $0xfffffff5,%ecx
  lock cmpxchg %ecx,0x14(%rsp)
  jne    L208
  mov    %edx,0x14(%rsp)
  mov    0x1c(%rsp),%eax
L31:
  mov    %eax,%edx
  mov    %eax,%ecx
  and    $0xfffffff5,%ecx
  lock cmpxchg %ecx,0x1c(%rsp)
  jne    L31
  mov    %edx,0x1c(%rsp)
  mov    0x28(%rsp),%rax
L30:
  mov    %rax,%rdx
  mov    %rax,%rcx
  and    $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x28(%rsp)
  jne    L30
  mov    %rdx,0x28(%rsp)
  mov    0x38(%rsp),%rax
L136:
  mov    %rax,%rdx
  mov    %rax,%rcx
  and    $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x38(%rsp)
  jne    L136
  mov    %rdx,0x38(%rsp)
  mov    0x48(%rsp),%rax
L175:
  mov    %rax,%rdx
  mov    %rax,%rcx
  and    $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x48(%rsp)
  jne    L175
  mov    %rdx,0x48(%rsp)
  mov    0x58(%rsp),%rax
L383:
  mov    %rax,%rdx
  mov    %rax,%rcx
  and    $0xfffffffffffffff5,%rcx
  lock cmpxchg %rcx,0x58(%rsp)
  jne    L383
  mov    %rdx,0x58(%rsp)
  movzbl 0x65(%rsp),%eax
L248:
  mov    %eax,%ecx
  mov    %eax,%edx
  and    $0xfffffff5,%edx
  not    %edx
  lock cmpxchg %dl,0x65(%rsp)
  jne    L248
  mov    %cl,0x65(%rsp)
  movzbl 0x67(%rsp),%eax
L125:
  mov    %eax,%ecx
  mov    %eax,%edx
  and    $0xfffffff5,%edx
  not    %edx
  lock cmpxchg %dl,0x67(%rsp)
  jne    L125
  mov    %cl,0x67(%rsp)
  movzwl 0xa(%rsp),%eax
L154:
  mov    %eax,%ecx
  mov    %eax,%edx
  and    $0xfffffff5,%edx
  not    %edx
  lock cmpxchg %dx,0xa(%rsp)
  jne    L154
  mov    %cx,0xa(%rsp)
  movzwl 0xe(%rsp),%eax
L159:
  mov    %eax,%ecx
  mov    %eax,%edx
  and    $0xfffffff5,%edx
  not    %edx
  lock cmpxchg %dx,0xe(%rsp)
  jne    L159
  mov    %cx,0xe(%rsp)
  mov    0x14(%rsp),%eax
L327:
  mov    %eax,%ecx
  mov    %eax,%edx
  and    $0xfffffff5,%edx
  not    %edx
  lock cmpxchg %edx,0x14(%rsp)
  jne    L327
  mov    %ecx,0x14(%rsp)
  mov    0x1c(%rsp),%eax
L119:
  mov    %eax,%ecx
  mov    %eax,%edx
  and    $0xfffffff5,%edx
  not    %edx
  lock cmpxchg %edx,0x1c(%rsp)
  jne    L119
  mov    %ecx,0x1c(%rsp)
  mov    0x28(%rsp),%rax
L158:
  mov    %rax,%rcx
  mov    %rax,%rdx
  and    $0xfffffffffffffff5,%rdx
  not    %rdx
  lock cmpxchg %rdx,0x28(%rsp)
  jne    L158
  mov    %rcx,0x28(%rsp)
  mov    0x38(%rsp),%rax
L137:
  mov    %rax,%rcx
  mov    %rax,%rdx
  and    $0xfffffffffffffff5,%rdx
  not    %rdx
  lock cmpxchg %rdx,0x38(%rsp)
  jne    L137
  mov    %rcx,0x38(%rsp)
  mov    0x48(%rsp),%rax
L328:
  mov    %rax,%rcx
  mov    %rax,%rdx
  and    $0xfffffffffffffff5,%rdx
  not    %rdx
  lock cmpxchg %rdx,0x48(%rsp)
  jne    L328
  mov    %rcx,0x48(%rsp)
  mov    0x58(%rsp),%rax
L302:
  mov    %rax,%rdx
  and    $0xfffffffffffffff5,%rdx
  not    %rdx
  lock cmpxchg %rdx,0x58(%rsp)
  jne    L302
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  add    $0x78,%rsp
  ret
L22:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void test_fetch_and_op(void) {
  signed char sc[2];
  unsigned char uc[2];
  signed short ss[2];
  unsigned short us[2];
  signed int si[2];
  unsigned int ui[2];
  signed long sl[2];
  unsigned long ul[2];
  signed long long sll[2];
  unsigned long long ull[2];
  sc[1] = __sync_fetch_and_add(&sc[1], -11);
  uc[1] = __sync_fetch_and_add(&uc[1], -11);
  ss[1] = __sync_fetch_and_add(&ss[1], -11);
  us[1] = __sync_fetch_and_add(&us[1], -11);
  si[1] = __sync_fetch_and_add(&si[1], -11);
  ui[1] = __sync_fetch_and_add(&ui[1], -11);
  sl[1] = __sync_fetch_and_add(&sl[1], -11);
  ul[1] = __sync_fetch_and_add(&ul[1], -11);
  sll[1] = __sync_fetch_and_add(&sll[1], -11);
  ull[1] = __sync_fetch_and_add(&ull[1], -11);
  sc[1] = __sync_fetch_and_sub(&sc[1], -11);
  uc[1] = __sync_fetch_and_sub(&uc[1], -11);
  ss[1] = __sync_fetch_and_sub(&ss[1], -11);
  us[1] = __sync_fetch_and_sub(&us[1], -11);
  si[1] = __sync_fetch_and_sub(&si[1], -11);
  ui[1] = __sync_fetch_and_sub(&ui[1], -11);
  sl[1] = __sync_fetch_and_sub(&sl[1], -11);
  ul[1] = __sync_fetch_and_sub(&ul[1], -11);
  sll[1] = __sync_fetch_and_sub(&sll[1], -11);
  ull[1] = __sync_fetch_and_sub(&ull[1], -11);
  sc[1] = __sync_fetch_and_or(&sc[1], -11);
  uc[1] = __sync_fetch_and_or(&uc[1], -11);
  ss[1] = __sync_fetch_and_or(&ss[1], -11);
  us[1] = __sync_fetch_and_or(&us[1], -11);
  si[1] = __sync_fetch_and_or(&si[1], -11);
  ui[1] = __sync_fetch_and_or(&ui[1], -11);
  sl[1] = __sync_fetch_and_or(&sl[1], -11);
  ul[1] = __sync_fetch_and_or(&ul[1], -11);
  sll[1] = __sync_fetch_and_or(&sll[1], -11);
  ull[1] = __sync_fetch_and_or(&ull[1], -11);
  sc[1] = __sync_fetch_and_xor(&sc[1], -11);
  uc[1] = __sync_fetch_and_xor(&uc[1], -11);
  ss[1] = __sync_fetch_and_xor(&ss[1], -11);
  us[1] = __sync_fetch_and_xor(&us[1], -11);
  si[1] = __sync_fetch_and_xor(&si[1], -11);
  ui[1] = __sync_fetch_and_xor(&ui[1], -11);
  sl[1] = __sync_fetch_and_xor(&sl[1], -11);
  ul[1] = __sync_fetch_and_xor(&ul[1], -11);
  sll[1] = __sync_fetch_and_xor(&sll[1], -11);
  ull[1] = __sync_fetch_and_xor(&ull[1], -11);
  sc[1] = __sync_fetch_and_and(&sc[1], -11);
  uc[1] = __sync_fetch_and_and(&uc[1], -11);
  ss[1] = __sync_fetch_and_and(&ss[1], -11);
  us[1] = __sync_fetch_and_and(&us[1], -11);
  si[1] = __sync_fetch_and_and(&si[1], -11);
  ui[1] = __sync_fetch_and_and(&ui[1], -11);
  sl[1] = __sync_fetch_and_and(&sl[1], -11);
  ul[1] = __sync_fetch_and_and(&ul[1], -11);
  sll[1] = __sync_fetch_and_and(&sll[1], -11);
  ull[1] = __sync_fetch_and_and(&ull[1], -11);
  sc[1] = __sync_fetch_and_nand(&sc[1], -11);
  uc[1] = __sync_fetch_and_nand(&uc[1], -11);
  ss[1] = __sync_fetch_and_nand(&ss[1], -11);
  us[1] = __sync_fetch_and_nand(&us[1], -11);
  si[1] = __sync_fetch_and_nand(&si[1], -11);
  ui[1] = __sync_fetch_and_nand(&ui[1], -11);
  sl[1] = __sync_fetch_and_nand(&sl[1], -11);
  ul[1] = __sync_fetch_and_nand(&ul[1], -11);
  sll[1] = __sync_fetch_and_nand(&sll[1], -11);
  ull[1] = __sync_fetch_and_nand(&ull[1], -11);
}
```