user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x400,%edx
  mov    $0x10,%esi
  lea    D68(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x158,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x148(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%r12
  lea    0x28(%rsp),%r14
  mov    %r12,%rbp
  lea    0xb8(%rsp),%rbx
  mov    %r12,%r13
  call   <printf@plt>
  mov    $0x1234,%edi
  xor    %eax,%eax
  call   <srand@plt>
  nopw   0x0(%rax,%rax,1)
L375:
  mov    $0x400,%edx
  mov    $0x10,%esi
  mov    %r14,%rdi
  call   <posix_memalign@plt>
  test   %eax,%eax
  jne    L139
  mov    0x28(%rsp),%rax
  add    $0x8,%r13
  mov    %rax,-0x8(%r13)
  cmp    %rbx,%r13
  jne    L375
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L137:
  mov    0x0(%rbp),%rcx
  add    $0x8,%rbp
  lea    0x8(%rcx),%rdi
  movq   $0x0,(%rcx)
  movq   $0x0,0x3f8(%rcx)
  and    $0xfffffffffffffff8,%rdi
  sub    %rdi,%rcx
  add    $0x400,%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
  cmp    %rbp,%rbx
  jne    L137
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    $0x11,%edi
  xor    %eax,%eax
  call   <xor_gen_base@plt>
  mov    %r12,%rdx
  mov    $0x400,%esi
  xor    %eax,%eax
  mov    $0x11,%edi
  call   <xor_check@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  jne    L413
L450:
  mov    0x30(%rsp),%rax
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    $0x11,%edi
  movb   $0x7,0x3fe(%rax)
  xor    %eax,%eax
  call   <xor_check@plt>
  test   %eax,%eax
  je     L207
L333:
  mov    0x30(%rsp),%rax
  xor    %ebp,%ebp
  movb   $0x0,0x3fe(%rax)
L153:
  mov    %ebp,%r15d
  mov    $0x3ff,%ebx
  jmp    L339
  nopl   0x0(%rax)
L11:
  mov    (%r12,%rbp,8),%rax
  movb   $0x0,(%rax,%rbx,1)
  sub    $0x1,%rbx
  jb     L393
L339:
  mov    (%r12,%rbp,8),%rax
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    $0x11,%edi
  movb   $0x5,(%rax,%rbx,1)
  xor    %eax,%eax
  call   <xor_check@plt>
  test   %eax,%eax
  jne    L11
  mov    %ebx,%edx
  mov    %r15d,%esi
  lea    D71(%rip),%rdi
  mov    $0x1,%r14d
  call   <printf@plt>
L489:
  mov    0x148(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L272
  add    $0x158,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L139:
  lea    D88(%rip),%rdi
  xor    %eax,%eax
  mov    $0x1,%r14d
  call   <printf@plt>
  jmp    L489
L207:
  xor    %esi,%esi
  lea    D129(%rip),%rdi
  add    $0x1,%r14d
  call   <printf@plt>
  jmp    L333
L413:
  mov    %eax,%esi
  lea    D139(%rip),%rdi
  xor    %eax,%eax
  mov    $0x1,%r14d
  call   <printf@plt>
  jmp    L450
L393:
  mov    $0x2e,%edi
  add    $0x1,%rbp
  call   <putchar@plt>
  cmp    $0x11,%rbp
  jne    L153
  xor    %ebx,%ebx
L221:
  mov    (%r12,%rbx,8),%rdi
  mov    $0x400,%esi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <rand_buffer@plt>
  cmp    $0x11,%rbx
  jne    L221
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    $0x11,%edi
  xor    %eax,%eax
  call   <xor_gen_base@plt>
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    $0x11,%edi
  call   <xor_check@plt>
  test   %eax,%eax
  jne    L443
L301:
  mov    0x30(%rsp),%rax
  mov    $0x400,%esi
  mov    $0x11,%edi
  movzbl 0x3fe(%rax),%ebx
  mov    %ebx,%edx
  xor    $0x1,%edx
  mov    %dl,0x3fe(%rax)
  xor    %eax,%eax
  mov    %r12,%rdx
  call   <xor_check@plt>
  test   %eax,%eax
  je     L250
L34:
  mov    0x30(%rsp),%rax
  xor    %ebp,%ebp
  mov    %bl,0x3fe(%rax)
L1:
  mov    %ebp,(%rsp)
  mov    $0x3ff,%ebx
  jmp    L291
L23:
  mov    (%r12,%rbp,8),%rax
  mov    $0x400,%esi
  mov    $0x11,%edi
  add    %rbx,%rax
  movzbl (%rax),%r15d
  mov    %r15d,%edx
  xor    $0x1,%edx
  mov    %dl,(%rax)
  xor    %eax,%eax
  mov    %r12,%rdx
  call   <xor_check@plt>
  test   %eax,%eax
  je     L370
  mov    (%r12,%rbp,8),%rax
  mov    %r15b,(%rax,%rbx,1)
  sub    $0x1,%rbx
  jb     L154
L291:
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    $0x11,%edi
  call   <xor_check@plt>
  test   %eax,%eax
  je     L23
  mov    (%rsp),%esi
  mov    %ebx,%edx
  lea    D66(%rip),%rdi
  xor    %eax,%eax
  mov    $0x1,%r14d
  call   <printf@plt>
  jmp    L489
L370:
  mov    (%rsp),%esi
  mov    %ebx,%edx
  lea    D71(%rip),%rdi
  mov    $0x1,%r14d
  call   <printf@plt>
  jmp    L489
L250:
  lea    D12(%rip),%rdi
  add    $0x1,%r14d
  call   <puts@plt>
  jmp    L34
L443:
  mov    %eax,%esi
  lea    D54(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%r14d
  call   <printf@plt>
  jmp    L301
L154:
  mov    $0x2e,%edi
  add    $0x1,%rbp
  call   <putchar@plt>
  cmp    $0x11,%rbp
  jne    L1
  mov    $0x3,%ebp
L459:
  xor    %ebx,%ebx
L42:
  mov    (%r12,%rbx,8),%rdi
  mov    $0x400,%esi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <rand_buffer@plt>
  cmp    %ebx,%ebp
  jg     L42
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <xor_gen_base@plt>
  xor    %r13d,%r13d
L125:
  xor    %ebx,%ebx
  jmp    L349
L486:
  mov    (%r12,%r13,8),%rax
  mov    $0x400,%esi
  mov    %ebp,%edi
  add    %rbx,%rax
  movzbl (%rax),%r15d
  mov    %r15d,%edx
  xor    $0x1,%edx
  mov    %dl,(%rax)
  xor    %eax,%eax
  mov    %r12,%rdx
  call   <xor_check@plt>
  test   %eax,%eax
  je     L387
  mov    (%r12,%r13,8),%rax
  mov    %r15b,(%rax,%rbx,1)
  add    $0x1,%rbx
  cmp    $0x400,%rbx
  je     L298
L349:
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    %ebp,%edi
  call   <xor_check@plt>
  test   %eax,%eax
  je     L486
L271:
  mov    %ebp,%esi
  lea    D120(%rip),%rdi
  xor    %eax,%eax
  mov    $0x1,%r14d
  call   <printf@plt>
  jmp    L489
L387:
  mov    %ebp,%esi
  lea    D24(%rip),%rdi
  mov    $0x1,%r14d
  call   <printf@plt>
  jmp    L489
L272:
  call   <__stack_chk_fail@plt>
L298:
  add    $0x1,%r13
  cmp    %r13d,%ebp
  jg     L125
  mov    $0x2e,%edi
  add    $0x1,%ebp
  call   <putchar@plt>
  cmp    $0x12,%ebp
  jne    L459
  xor    %edi,%edi
  xor    %eax,%eax
  mov    $0x1,%r13d
  call   <fflush@plt>
L466:
  mov    $0x3,%ebp
L373:
  xor    %ebx,%ebx
L409:
  mov    (%r12,%rbx,8),%rdi
  mov    %r13d,%esi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <rand_buffer@plt>
  cmp    %ebx,%ebp
  jg     L409
  mov    %r12,%rdx
  mov    %r13d,%esi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <xor_gen_base@plt>
  xor    %ebx,%ebx
L126:
  xor    %r15d,%r15d
L263:
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    %r13d,%esi
  mov    %ebp,%edi
  call   <xor_check@plt>
  test   %eax,%eax
  jne    L271
  mov    (%r12,%r15,8),%rax
  mov    %r13d,%esi
  mov    %ebp,%edi
  add    %rbx,%rax
  movzbl (%rax),%ecx
  mov    %ecx,%edx
  mov    %cl,(%rsp)
  xor    $0x1,%edx
  mov    %dl,(%rax)
  xor    %eax,%eax
  mov    %r12,%rdx
  call   <xor_check@plt>
  movzbl (%rsp),%ecx
  test   %eax,%eax
  je     L346
  mov    (%r12,%r15,8),%rax
  add    $0x1,%r15
  mov    %cl,(%rax,%rbx,1)
  cmp    %r15d,%ebp
  jg     L263
  add    $0xa,%rbx
  cmp    %ebx,%r13d
  jg     L126
  add    $0x1,%ebp
  cmp    $0x12,%ebp
  jne    L373
  mov    $0x2e,%edi
  add    $0x1,%r13d
  call   <putchar@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <fflush@plt>
  cmp    $0x401,%r13d
  jne    L466
  lea    0x148(%rsp),%rax
  xor    %ebp,%ebp
  mov    $0x400,%r15d
  mov    %rax,(%rsp)
  lea    0xc0(%rsp),%rbx
L311:
  mov    %ebp,%r13d
  xor    %edx,%edx
L121:
  mov    (%r12,%rdx,1),%rdi
  mov    %r15d,%esi
  xor    %eax,%eax
  mov    %rdx,0x8(%rsp)
  call   <rand_buffer@plt>
  mov    0x8(%rsp),%rdx
  mov    %rbp,%rax
  add    (%r12,%rdx,1),%rax
  mov    %rax,(%rbx,%rdx,1)
  add    $0x8,%rdx
  cmp    $0x88,%rdx
  jne    L121
  mov    %rbx,%rdx
  mov    %r15d,%esi
  mov    $0x11,%edi
  xor    %eax,%eax
  call   <xor_gen_base@plt>
  xor    %eax,%eax
  mov    %rbx,%rdx
  mov    %r15d,%esi
  mov    $0x11,%edi
  call   <xor_check@plt>
  test   %eax,%eax
  jne    L493
  mov    %rbx,%rcx
L408:
  xor    %r9d,%r9d
L416:
  mov    %r9,%rax
  add    (%rcx),%rax
  mov    %r15d,%esi
  mov    $0x11,%edi
  movzbl (%rax),%r10d
  mov    %r9,0x18(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %r10d,%edx
  mov    %r10b,0x8(%rsp)
  xor    $0x1,%edx
  mov    %dl,(%rax)
  xor    %eax,%eax
  mov    %rbx,%rdx
  call   <xor_check@plt>
  movzbl 0x8(%rsp),%r10d
  mov    0x10(%rsp),%rcx
  test   %eax,%eax
  mov    0x18(%rsp),%r9
  je     L303
  mov    (%rcx),%rax
  mov    %r10b,(%rax,%r9,1)
  add    $0x1,%r9
  cmp    %r9d,%r15d
  jg     L416
  add    $0x8,%rcx
  cmp    %rcx,(%rsp)
  jne    L408
  mov    $0x2e,%edi
  add    $0x20,%rbp
  sub    $0x20,%r15d
  call   <putchar@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <fflush@plt>
  cmp    $0x400,%rbp
  jne    L311
  test   %r14d,%r14d
  jne    L489
  lea    D75(%rip),%rdi
  call   <puts@plt>
  jmp    L489
L346:
  xor    %ecx,%ecx
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    $0x1,%r14d
  lea    D7(%rip),%rdi
  call   <printf@plt>
  jmp    L489
L493:
  mov    %r15d,%edx
  mov    %r13d,%esi
  lea    D59(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%r14d
  jmp    L489
L303:
  xor    %ecx,%ecx
  mov    %r15d,%edx
  mov    %r13d,%esi
  mov    $0x1,%r14d
  lea    D69(%rip),%rdi
  call   <printf@plt>
  jmp    L489
```

tool_calls: name: disassemble_data
arguments: data_tag: D68
type_guessed: string
name: disassemble_data
arguments: data_tag: D71
type_guessed: string
name: disassemble_data
arguments: data_tag: D88
type_guessed: string
name: disassemble_data
arguments: data_tag: D129
type_guessed: string
name: disassemble_data
arguments: data_tag: D139
type_guessed: string
name: disassemble_data
arguments: data_tag: D66
type_guessed: string
name: disassemble_data
arguments: data_tag: D12
type_guessed: string
name: disassemble_data
arguments: data_tag: D54
type_guessed: string
name: disassemble_data
arguments: data_tag: D120
type_guessed: string
name: disassemble_data
arguments: data_tag: D24
type_guessed: string
name: disassemble_data
arguments: data_tag: D75
type_guessed: string
name: disassemble_data
arguments: data_tag: D7
type_guessed: string
name: disassemble_data
arguments: data_tag: D59
type_guessed: string
name: disassemble_data
arguments: data_tag: D69
type_guessed: string

tool: D68: Test xor_check_test %d sources X %d bytes


tool: D71: 
fail corrupt buffer test j=%d, i=%d


tool: D88: alloc error: Fail

tool: D129: 
fail corrupt buffer test %d


tool: D139: 
fail zero test %d


tool: D66: 
Fail rand test with un-corrupted buffer j=%d, i=%d


tool: D12: 
Fail corrupt buffer test, passed when should have failed

tool: D54: fail first rand test %d


tool: D120: 
fail rand test %d sources


tool: D24: 
fail rand test corrupted buffer %d sources


tool: D75: Pass

tool: D7: 
fail rand test corrupted buffer %d sources, len=%d, ret=%d


tool: D59: fail end test - offset: %d, len: %d


tool: D69: fail end test corrupted buffer - offset: %d, len: %d, ret: %d


assistant: ```c
int main(int argc, char *argv[]) {
  int i, j, k, ret, fail = 0;
  void *buffs[16 + 1];
  char c;
  int serr, lerr;
  char *tmp_buf[16 + 1];
  printf("Test xor_check_test %d sources X %d bytes\n", 16, 1024);
  srand(0x1234);
  for (i = 0; i < 16 + 1; i++) {
    void *buf;
    if (posix_memalign(&buf, 16, 1024)) {
      printf("alloc error: Fail");
      return 1;
    }
    buffs[i] = buf;
  }
  for (i = 0; i < 16 + 1; i++)
    memset(buffs[i], 0, 1024);
  xor_gen_base(16 + 1, 1024, buffs);
  ret = xor_check(16 + 1, 1024, buffs);
  if (ret != 0) {
    fail++;
    printf("\nfail zero test %d\n", ret);
  }
  ((char *)(buffs[0]))[1024 - 2] = 0x7;
  ret = xor_check(16 + 1, 1024, buffs);
  if (ret == 0) {
    fail++;
    printf("\nfail corrupt buffer test %d\n", ret);
  }
  ((char *)(buffs[0]))[1024 - 2] = 0;
  for (j = 0; j < 16 + 1; j++) {
    for (i = 1024 - 1; i >= 0; i--) {
      ((char *)buffs[j])[i] = 0x5;
      ret = xor_check(16 + 1, 1024, buffs);
      if (ret == 0) {
        fail++;
        printf("\nfail corrupt buffer test j=%d, i=%d\n", j, i);
        return 1;
      }
      ((char *)buffs[j])[i] = 0;
    }
    putchar('.');
  }
  for (i = 0; i < 16 + 1; i++)
    rand_buffer(buffs[i], 1024);
  xor_gen_base(16 + 1, 1024, buffs);
  ret = xor_check(16 + 1, 1024, buffs);
  if (ret != 0) {
    fail++;
    printf("fail first rand test %d\n", ret);
  }
  c = ((char *)(buffs[0]))[1024 - 2];
  ((char *)(buffs[0]))[1024 - 2] = c ^ 0x1;
  ret = xor_check(16 + 1, 1024, buffs);
  if (ret == 0) {
    fail++;
    printf("\nFail corrupt buffer test, passed when should have failed\n");
  }
  ((char *)(buffs[0]))[1024 - 2] = c;
  for (j = 0; j < 16 + 1; j++) {
    for (i = 1024 - 1; i >= 0; i--) {
      ret = xor_check(16 + 1, 1024, buffs);
      if (ret != 0) {
        fail++;
        printf("\nFail rand test with un-corrupted buffer j=%d, i=%d\n", j, i);
        return 1;
      }
      c = ((char *)buffs[j])[i];
      ((char *)buffs[j])[i] = c ^ 1;
      ret = xor_check(16 + 1, 1024, buffs);
      if (ret == 0) {
        fail++;
        printf("\nfail corrupt buffer test j=%d, i=%d\n", j, i);
        return 1;
      }
      ((char *)buffs[j])[i] = c;
    }
    putchar('.');
  }
  for (j = 3; j <= 16 + 1; j++) {
    for (i = 0; i < j; i++)
      rand_buffer(buffs[i], 1024);
    xor_gen_base(j, 1024, buffs);
    for (i = 0; i < j; i++) {
      for (k = 0; k < 1024; k++) {
        ret = xor_check(j, 1024, buffs);
        if (ret != 0) {
          printf("\nfail rand test %d sources\n", j);
          fail++;
          return 1;
        }
        c = ((char *)buffs[i])[k];
        ((char *)buffs[i])[k] = c ^ 1;
        ret = xor_check(j, 1024, buffs);
        if (ret == 0) {
          printf("\nfail rand test corrupted buffer %d sources\n", j);
          fail++;
          return 1;
        }
        ((char *)buffs[i])[k] = c;
      }
    }
    putchar('.');
  }
  fflush(0);
  k = 1;
  while (k <= 1024) {
    for (j = 3; j <= 16 + 1; j++) {
      for (i = 0; i < j; i++)
        rand_buffer(buffs[i], k);
      xor_gen_base(j, k, buffs);
      for (lerr = 0; lerr < k; lerr += 10) {
        for (serr = 0; serr < j; serr++) {
          ret = xor_check(j, k, buffs);
          if (ret != 0) {
            printf("\nfail rand test %d sources\n", j);
            fail++;
            return 1;
          }
          c = ((char *)buffs[serr])[lerr];
          ((char *)buffs[serr])[lerr] = c ^ 1;
          ret = xor_check(j, k, buffs);
          if (ret == 0) {
            printf("\nfail rand test corrupted buffer "
                   "%d sources, len=%d, ret=%d\n",
                   j, k, ret);
            fail++;
            return 1;
          }
          ((char *)buffs[serr])[lerr] = c;
        }
      }
    }
    putchar('.');
    fflush(0);
    k += 1;
  }
  for (i = 0; i < 1024; i += 32) {
    for (j = 0; j < 16 + 1; j++) {
      rand_buffer(buffs[j], 1024 - i);
      tmp_buf[j] = (char *)buffs[j] + i;
    }
    xor_gen_base(16 + 1, 1024 - i, (void *)tmp_buf);
    ret = xor_check(16 + 1, 1024 - i, (void *)tmp_buf);
    if (ret != 0) {
      printf("fail end test - offset: %d, len: %d\n", i, 1024 - i);
      fail++;
      return 1;
    }
    for (serr = 0; serr < 16 + 1; serr++) {
      for (lerr = 0; lerr < (1024 - i); lerr++) {
        c = tmp_buf[serr][lerr];
        tmp_buf[serr][lerr] = c ^ 1;
        ret = xor_check(16 + 1, 1024 - i, (void *)tmp_buf);
        if (ret == 0) {
          printf("fail end test corrupted buffer - "
                 "offset: %d, len: %d, ret: %d\n",
                 i, 1024 - i, ret);
          fail++;
          return 1;
        }
        tmp_buf[serr][lerr] = c;
      }
    }
    putchar('.');
    fflush(0);
  }
  if (fail == 0)
    printf("Pass\n");
  return fail;
}
```