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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x10,%edx
  mov    $0x58,%esi
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  lea    0x10(%rsp),%rbx
  mov    %rbp,%rdi
  call   <memset@plt>
  nop
L65:
  xor    %r12d,%r12d
  nopl   0x0(%rax,%rax,1)
L54:
  xor    %eax,%eax
  call   <getc@plt>
  mov    %al,(%rbx,%r12,1)
  cmp    $0xa,%al
  je     L120
  add    $0x1,%r12
  cmp    $0x10,%r12
  jne    L54
  xor    %r13d,%r13d
L14:
  movzbl 0x0(%rbp),%eax
  xor    %al,(%rbx)
  mov    %rbx,%rdi
  mov    %rbx,%r15
  movzbl 0x1(%rbp),%eax
  xor    %al,0x1(%rbx)
  lea    0x10(%rbx),%r12
  movzbl 0x2(%rbp),%eax
  xor    %al,0x2(%rbx)
  movzbl 0x3(%rbp),%eax
  xor    %al,0x3(%rbx)
  movzbl 0x4(%rbp),%eax
  xor    %al,0x4(%rbx)
  movzbl 0x5(%rbp),%eax
  xor    %al,0x5(%rbx)
  movzbl 0x6(%rbp),%eax
  xor    %al,0x6(%rbx)
  movzbl 0x7(%rbp),%eax
  xor    %al,0x7(%rbx)
  movzbl 0x8(%rbp),%eax
  xor    %al,0x8(%rbx)
  movzbl 0x9(%rbp),%eax
  xor    %al,0x9(%rbx)
  movzbl 0xa(%rbp),%eax
  xor    %al,0xa(%rbx)
  movzbl 0xb(%rbp),%eax
  xor    %al,0xb(%rbx)
  movzbl 0xc(%rbp),%eax
  xor    %al,0xc(%rbx)
  movzbl 0xd(%rbp),%eax
  xor    %al,0xd(%rbx)
  movzbl 0xe(%rbp),%eax
  xor    %al,0xe(%rbx)
  movzbl 0xf(%rbp),%eax
  xor    %al,0xf(%rbx)
  call   <aes_encrypt@plt>
  cs nopw 0x0(%rax,%rax,1)
L181:
  movsbl (%r15),%edi
  add    $0x1,%r15
  call   <putc@plt>
  cmp    %r15,%r12
  jne    L181
  cmp    $0x1,%r13b
  je     L151
  mov    %rbp,%rax
  mov    %rbx,%rbp
  mov    %rax,%rbx
  jmp    L65
  cs nopw 0x0(%rax,%rax,1)
L120:
  mov    $0x10,%r14d
  mov    $0x10,%eax
  movabs $0x101010101010101,%rsi
  sub    %r12d,%r14d
  sub    %r12,%rax
  add    %rbx,%r12
  movzbl %r14b,%edx
  imul   %rsi,%rdx
  cmp    $0x8,%eax
  jae    L2
  test   $0x4,%al
  jne    L49
  test   %eax,%eax
  jne    L97
L22:
  mov    $0x1,%r13d
  jmp    L14
L151:
  test   %r14b,%r14b
  jne    L172
  lea    0x1(%rbx),%rdx
  mov    %rbp,%rax
  sub    %rdx,%rax
  cmp    $0xe,%rax
  jbe    L38
  movdqa D7(%rip),%xmm0
  pxor   (%rbx),%xmm0
  movaps %xmm0,0x0(%rbp)
L147:
  mov    %rbp,%rdi
  lea    0x10(%rbp),%rbx
  call   <aes_encrypt@plt>
  nop
L158:
  movsbl 0x0(%rbp),%edi
  add    $0x1,%rbp
  call   <putc@plt>
  cmp    %rbp,%rbx
  jne    L158
L172:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L139
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L2:
  lea    0x8(%r12),%rsi
  mov    %eax,%ecx
  mov    %rdx,(%r12)
  and    $0xfffffffffffffff8,%rsi
  mov    %rdx,-0x8(%r12,%rcx,1)
  sub    %rsi,%r12
  add    %r12d,%eax
  and    $0xfffffff8,%eax
  cmp    $0x8,%eax
  jb     L22
  and    $0xfffffff8,%eax
  xor    %ecx,%ecx
L134:
  mov    %ecx,%edi
  add    $0x8,%ecx
  mov    %rdx,(%rsi,%rdi,1)
  cmp    %eax,%ecx
  jb     L134
  jmp    L22
L97:
  mov    %dl,(%r12)
  test   $0x2,%al
  je     L22
  mov    %eax,%eax
  mov    %dx,-0x2(%r12,%rax,1)
  jmp    L22
L38:
  movzbl (%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x0(%rbp)
  movzbl 0x1(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x1(%rbp)
  movzbl 0x2(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x2(%rbp)
  movzbl 0x3(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x3(%rbp)
  movzbl 0x4(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x4(%rbp)
  movzbl 0x5(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x5(%rbp)
  movzbl 0x6(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x6(%rbp)
  movzbl 0x7(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x7(%rbp)
  movzbl 0x8(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x8(%rbp)
  movzbl 0x9(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0x9(%rbp)
  movzbl 0xa(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0xa(%rbp)
  movzbl 0xb(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0xb(%rbp)
  movzbl 0xc(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0xc(%rbp)
  movzbl 0xd(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0xd(%rbp)
  movzbl 0xe(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0xe(%rbp)
  movzbl 0xf(%rbx),%eax
  xor    $0x10,%eax
  mov    %al,0xf(%rbp)
  jmp    L147
L49:
  mov    %eax,%eax
  mov    %edx,(%r12)
  mov    %edx,-0x4(%r12,%rax,1)
  jmp    L22
L139:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D7
type_guessed: byte[16]

tool: {"D7": [0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10]}

assistant: ```c
int main() {
  uint8_t block1[16];
  uint8_t block2[16];
  uint8_t *block_prev = block1;
  uint8_t *block_cur = block2;
  uint8_t last = 0;
  uint8_t pad = 0;
  memset(block1, 'X', 16);
  while (1) {
    size_t num_input = 0;
    for (num_input = 0; num_input < 16; num_input++) {
      block_cur[num_input] = getc();
      if (block_cur[num_input] == '\n') {
        last = 1;
        break;
      }
    }
    if (last == 1) {
      pad = 16 - (num_input % 16);
      for (; num_input < 16; num_input++) {
        block_cur[num_input] = pad;
      }
    }
    for (size_t i = 0; i < 16; i++) {
      block_cur[i] ^= block_prev[i];
    }
    aes_encrypt(block_cur);
    for (size_t i = 0; i < 16; i++) {
      putc(block_cur[i]);
    }
    uint8_t *tmp = block_prev;
    block_prev = block_cur;
    block_cur = tmp;
    if (last == 1) {
      break;
    }
  }
  if (pad == 0) {
    for (size_t i = 0; i < 16; i++) {
      block_cur[i] = block_prev[i] ^ 0x10;
    }
    aes_encrypt(block_cur);
    for (size_t i = 0; i < 16; i++) {
      putc(block_cur[i]);
    }
  }
  return 0;
}
```