user: Converte this assembly snippet into its equivalent C code:

```asm
<test_xor>:
  endbr64
  sub    $0x18,%rsp
  mov    $0x1,%ecx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x6(%rsp),%rdx
  movzbl D386(%rip),%eax
  mov    %al,0x6(%rsp)
L80:
  movzbl (%rdx),%eax
  lock cmpxchg %cl,0x2f07(%rip)        # 408f <a.23>
  je     L44
  mov    %al,(%rdx)
  jmp    L80
  xchg   %ax,%ax
L44:
  movzbl D386(%rip),%eax
  test   %al,%al
  je     1080 <test_xor.cold>
  movzbl D660(%rip),%eax
L83:
  mov    %eax,%edx
  xor    $0x56,%edx
  lock cmpxchg %dl,0x2edb(%rip)        # 408e <a.22>
  jne    L83
  cmp    $0x62,%dl
  jne    1080 <test_xor.cold>
  movzbl D660(%rip),%eax
  cmp    $0x62,%al
  jne    1080 <test_xor.cold>
  movzbl D28(%rip),%eax
L165:
  mov    %eax,%edx
  xor    $0x56,%edx
  lock cmpxchg %dl,0x2eac(%rip)        # 408d <a.21>
  jne    L165
  cmp    $0x62,%dl
  jne    1080 <test_xor.cold>
  movzbl D28(%rip),%eax
  cmp    $0x62,%al
  jne    1080 <test_xor.cold>
  movzbl D324(%rip),%eax
L249:
  mov    %eax,%edx
  xor    $0x56,%edx
  lock cmpxchg %dl,0x2e7d(%rip)        # 408c <a.20>
  jne    L249
  cmp    $0x62,%dl
  jne    1080 <test_xor.cold>
  movzbl D324(%rip),%eax
  cmp    $0x62,%al
  jne    1080 <test_xor.cold>
  movzwl D120(%rip),%eax
L89:
  mov    %eax,%edx
  xor    $0x7856,%dx
  lock cmpxchg %dx,0x2e4a(%rip)        # 408a <a.19>
  jne    L89
  cmp    $0x6a62,%dx
  jne    1080 <test_xor.cold>
  movzwl D120(%rip),%eax
  cmp    $0x6a62,%ax
  jne    1080 <test_xor.cold>
  movzwl D578(%rip),%eax
L233:
  mov    %eax,%edx
  xor    $0x7856,%dx
  lock cmpxchg %dx,0x2e13(%rip)        # 4088 <a.18>
  jne    L233
  cmp    $0x6a62,%dx
  jne    1080 <test_xor.cold>
  movzwl D578(%rip),%eax
  cmp    $0x6a62,%ax
  jne    1080 <test_xor.cold>
  mov    D203(%rip),%eax
L113:
  mov    %eax,%edx
  xor    $0x7856,%edx
  lock cmpxchg %edx,0x2ddb(%rip)        # 4084 <a.17>
  jne    L113
  cmp    $0x6a62,%edx
  jne    1080 <test_xor.cold>
  mov    D203(%rip),%eax
  cmp    $0x6a62,%eax
  jne    1080 <test_xor.cold>
  mov    D430(%rip),%eax
L213:
  mov    %eax,%edx
  xor    $0x7856,%edx
  lock cmpxchg %edx,0x2da2(%rip)        # 4080 <a.16>
  jne    L213
  cmp    $0x6a62,%edx
  jne    1080 <test_xor.cold>
  mov    D430(%rip),%eax
  cmp    $0x6a62,%eax
  jne    1080 <test_xor.cold>
  mov    D22(%rip),%rax
L207:
  mov    %rax,%rdx
  xor    $0x7856,%rdx
  lock cmpxchg %rdx,0x2d61(%rip)        # 4078 <a.15>
  jne    L207
  cmp    $0x6a62,%rdx
  jne    1080 <test_xor.cold>
  mov    D22(%rip),%rax
  cmp    $0x6a62,%rax
  jne    1080 <test_xor.cold>
  mov    D156(%rip),%rax
L63:
  mov    %rax,%rdx
  xor    $0x7856,%rdx
  lock cmpxchg %rdx,0x2d1d(%rip)        # 4070 <a.14>
  jne    L63
  cmp    $0x6a62,%rdx
  jne    1080 <test_xor.cold>
  mov    D156(%rip),%rax
  cmp    $0x6a62,%rax
  jne    1080 <test_xor.cold>
  mov    D719(%rip),%rax
L269:
  mov    %rax,%rdx
  xor    $0x7856,%rdx
  lock cmpxchg %rdx,0x2cd9(%rip)        # 4068 <a.13>
  jne    L269
  cmp    $0x6a62,%rdx
  jne    1080 <test_xor.cold>
  mov    D719(%rip),%rax
  cmp    $0x6a62,%rax
  jne    1080 <test_xor.cold>
  mov    D49(%rip),%rax
L109:
  mov    %rax,%rdx
  xor    $0x7856,%rdx
  lock cmpxchg %rdx,0x2c95(%rip)        # 4060 <a.12>
  jne    L109
  cmp    $0x6a62,%rdx
  jne    1080 <test_xor.cold>
  mov    D49(%rip),%rax
  cmp    $0x6a62,%rax
  jne    1080 <test_xor.cold>
  lea    0x7(%rsp),%rdx
  mov    $0x1,%ecx
  movzbl D182(%rip),%eax
  mov    %al,0x7(%rsp)
L110:
  movzbl (%rdx),%eax
  lock cmpxchg %cl,0x2c52(%rip)        # 405f <a.11>
  je     L203
  mov    %al,(%rdx)
  jmp    L110
  nopl   0x0(%rax,%rax,1)
L203:
  movzbl D182(%rip),%eax
  test   %al,%al
  je     1080 <test_xor.cold>
  movzbl D504(%rip),%eax
L261:
  mov    %eax,%edx
  xor    $0x78,%edx
  lock cmpxchg %dl,0x2c23(%rip)        # 405e <a.10>
  jne    L261
  cmp    $0x87,%dl
  jne    1080 <test_xor.cold>
  movzbl D504(%rip),%eax
  cmp    $0x87,%al
  jne    1080 <test_xor.cold>
  movzbl D1(%rip),%eax
L126:
  mov    %eax,%edx
  xor    $0x78,%edx
  lock cmpxchg %dl,0x2bf4(%rip)        # 405d <a.9>
  jne    L126
  cmp    $0x87,%dl
  jne    1080 <test_xor.cold>
  movzbl D1(%rip),%eax
  cmp    $0x87,%al
  jne    1080 <test_xor.cold>
  movzbl D520(%rip),%eax
L155:
  mov    %eax,%edx
  xor    $0x78,%edx
  lock cmpxchg %dl,0x2bc5(%rip)        # 405c <a.8>
  jne    L155
  cmp    $0x87,%dl
  jne    1080 <test_xor.cold>
  movzbl D520(%rip),%eax
  cmp    $0x87,%al
  jne    1080 <test_xor.cold>
  movzwl D341(%rip),%eax
L173:
  mov    %eax,%edx
  xor    $0x5678,%dx
  lock cmpxchg %dx,0x2b92(%rip)        # 405a <a.7>
  jne    L173
  cmp    $0xa987,%dx
  jne    1080 <test_xor.cold>
  movzwl D341(%rip),%eax
  cmp    $0xa987,%ax
  jne    1080 <test_xor.cold>
  movzwl D574(%rip),%eax
L224:
  mov    %eax,%edx
  xor    $0x5678,%dx
  lock cmpxchg %dx,0x2b5b(%rip)        # 4058 <a.6>
  jne    L224
  cmp    $0xa987,%dx
  jne    1080 <test_xor.cold>
  movzwl D574(%rip),%eax
  cmp    $0xa987,%ax
  jne    1080 <test_xor.cold>
  mov    D167(%rip),%eax
L40:
  mov    %eax,%edx
  xor    $0x12345678,%edx
  lock cmpxchg %edx,0x2b23(%rip)        # 4054 <a.5>
  jne    L40
  cmp    $0xedcba987,%edx
  jne    1080 <test_xor.cold>
  mov    D167(%rip),%eax
  cmp    $0xedcba987,%eax
  jne    1080 <test_xor.cold>
  mov    D624(%rip),%eax
L206:
  mov    %eax,%edx
  xor    $0x12345678,%edx
  lock cmpxchg %edx,0x2aea(%rip)        # 4050 <a.4>
  jne    L206
  cmp    $0xedcba987,%edx
  jne    1080 <test_xor.cold>
  mov    D624(%rip),%eax
  cmp    $0xedcba987,%eax
  jne    1080 <test_xor.cold>
  mov    D370(%rip),%rax
L222:
  mov    %rax,%rdx
  xor    $0x12345678,%rdx
  lock cmpxchg %rdx,0x2aa9(%rip)        # 4048 <a.3>
  jne    L222
  cmp    $0xffffffffedcba987,%rdx
  jne    1080 <test_xor.cold>
  mov    D370(%rip),%rax
  cmp    $0xffffffffedcba987,%rax
  jne    1080 <test_xor.cold>
  mov    D473(%rip),%rax
L142:
  mov    %rax,%rdx
  xor    $0x12345678,%rdx
  lock cmpxchg %rdx,0x2a65(%rip)        # 4040 <a.2>
  jne    L142
  cmp    $0xffffffffedcba987,%rdx
  jne    1080 <test_xor.cold>
  mov    D473(%rip),%rax
  cmp    $0xffffffffedcba987,%rax
  jne    1080 <test_xor.cold>
  mov    D635(%rip),%rax
L120:
  mov    %rax,%rdx
  xor    $0x12345678,%rdx
  lock cmpxchg %rdx,0x2a21(%rip)        # 4038 <a.1>
  jne    L120
  cmp    $0xffffffffedcba987,%rdx
  jne    1080 <test_xor.cold>
  mov    D635(%rip),%rax
  cmp    $0xffffffffedcba987,%rax
  jne    1080 <test_xor.cold>
  mov    D286(%rip),%rax
L17:
  mov    %rax,%rdx
  xor    $0x12345678,%rdx
  lock cmpxchg %rdx,0x29dd(%rip)        # 4030 <a.0>
  jne    L17
  cmp    $0xffffffffedcba987,%rdx
  jne    1080 <test_xor.cold>
  mov    D286(%rip),%rax
  cmp    $0xffffffffedcba987,%rax
  jne    1080 <test_xor.cold>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L64
  add    $0x18,%rsp
  ret
L64:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void test_xor(void) {
  do {
    do {
      static volatile _Atomic(_Bool) a = (_Bool)((0x1234));
      if ((a ^= ((0x7856))) != (_Bool)((_Bool)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (_Bool)((_Bool)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(char) a = (char)((0x1234));
      if ((a ^= ((0x7856))) != (char)((char)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (char)((char)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed char) a = (signed char)((0x1234));
      if ((a ^= ((0x7856))) != (signed char)((signed char)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (signed char)((signed char)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned char) a = (unsigned char)((0x1234));
      if ((a ^= ((0x7856))) != (unsigned char)((unsigned char)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (unsigned char)((unsigned char)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed short) a = (signed short)((0x1234));
      if ((a ^= ((0x7856))) != (signed short)((signed short)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (signed short)((signed short)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned short) a = (unsigned short)((0x1234));
      if ((a ^= ((0x7856))) != (unsigned short)((unsigned short)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (unsigned short)((unsigned short)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed int) a = (signed int)((0x1234));
      if ((a ^= ((0x7856))) != (signed int)((signed int)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (signed int)((signed int)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned int) a = (unsigned int)((0x1234));
      if ((a ^= ((0x7856))) != (unsigned int)((unsigned int)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (unsigned int)((unsigned int)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed long) a = (signed long)((0x1234));
      if ((a ^= ((0x7856))) != (signed long)((signed long)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (signed long)((signed long)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned long) a = (unsigned long)((0x1234));
      if ((a ^= ((0x7856))) != (unsigned long)((unsigned long)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (unsigned long)((unsigned long)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed long long) a = (signed long long)((0x1234));
      if ((a ^= ((0x7856))) != (signed long long)((signed long long)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (signed long long)((signed long long)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned long long) a = (unsigned long long)((0x1234));
      if ((a ^= ((0x7856))) != (unsigned long long)((unsigned long long)((0x1234)) ^ ((0x7856))))
        abort();
      if (a != (unsigned long long)((unsigned long long)((0x1234)) ^ ((0x7856))))
        abort();
    } while (0);
  } while (0);
  do {
    do {
      static volatile _Atomic(_Bool) a = (_Bool)((-1));
      if ((a ^= ((0x12345678))) != (_Bool)((_Bool)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (_Bool)((_Bool)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(char) a = (char)((-1));
      if ((a ^= ((0x12345678))) != (char)((char)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (char)((char)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed char) a = (signed char)((-1));
      if ((a ^= ((0x12345678))) != (signed char)((signed char)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (signed char)((signed char)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned char) a = (unsigned char)((-1));
      if ((a ^= ((0x12345678))) != (unsigned char)((unsigned char)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (unsigned char)((unsigned char)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed short) a = (signed short)((-1));
      if ((a ^= ((0x12345678))) != (signed short)((signed short)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (signed short)((signed short)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned short) a = (unsigned short)((-1));
      if ((a ^= ((0x12345678))) != (unsigned short)((unsigned short)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (unsigned short)((unsigned short)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed int) a = (signed int)((-1));
      if ((a ^= ((0x12345678))) != (signed int)((signed int)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (signed int)((signed int)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned int) a = (unsigned int)((-1));
      if ((a ^= ((0x12345678))) != (unsigned int)((unsigned int)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (unsigned int)((unsigned int)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed long) a = (signed long)((-1));
      if ((a ^= ((0x12345678))) != (signed long)((signed long)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (signed long)((signed long)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned long) a = (unsigned long)((-1));
      if ((a ^= ((0x12345678))) != (unsigned long)((unsigned long)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (unsigned long)((unsigned long)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(signed long long) a = (signed long long)((-1));
      if ((a ^= ((0x12345678))) != (signed long long)((signed long long)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (signed long long)((signed long long)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
    do {
      static volatile _Atomic(unsigned long long) a = (unsigned long long)((-1));
      if ((a ^= ((0x12345678))) != (unsigned long long)((unsigned long long)((-1)) ^ ((0x12345678))))
        abort();
      if (a != (unsigned long long)((unsigned long long)((-1)) ^ ((0x12345678))))
        abort();
    } while (0);
  } while (0);
}
```