user: Translate the below assembly code into C programming language:

```asm
<encode_page>:
  endbr64
  push   %rbx
  mov    %edx,%ebx
  mov    %rdi,%r10
  mov    %rsi,%r11
  sub    $0x850,%rsp
  movdqa D50(%rip),%xmm0
  movdqa D19(%rip),%xmm2
  mov    %fs:0x28,%rax
  mov    %rax,0x848(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%rdx
  lea    0x440(%rsp),%rdi
  movaps %xmm0,(%rsp)
  movdqa D14(%rip),%xmm0
  mov    %rdx,%rax
  movaps %xmm0,0x10(%rsp)
  movdqa D59(%rip),%xmm0
  movaps %xmm0,0x20(%rsp)
  movdqa D12(%rip),%xmm0
  movaps %xmm0,0x30(%rsp)
  movdqa D44(%rip),%xmm0
  nopw   0x0(%rax,%rax,1)
L43:
  movdqa %xmm0,%xmm1
  add    $0x10,%rax
  paddd  %xmm2,%xmm0
  movaps %xmm1,-0x10(%rax)
  cmp    %rax,%rdi
  jne    L43
  movl   $0x7c,0x440(%rsp)
  mov    $0x1,%eax
  nopl   (%rax)
L54:
  mov    %rax,%rcx
  and    $0xf,%ecx
  mov    (%rsp,%rcx,4),%ecx
  mov    %ecx,(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    $0x100,%rax
  jne    L54
  mov    %rdi,%rcx
  xor    %r8d,%r8d
  cs nopw 0x0(%rax,%rax,1)
L6:
  mov    (%rdx),%esi
  add    $0x4,%rdx
  add    $0x4,%rcx
  lea    (%rsi,%r8,1),%eax
  add    -0x4(%rcx),%eax
  movzbl %al,%r8d
  movzbl %al,%eax
  mov    0x40(%rsp,%rax,4),%r9d
  mov    %r9d,-0x4(%rdx)
  mov    %esi,0x40(%rsp,%rax,4)
  cmp    %rdx,%rdi
  jne    L6
  test   %ebx,%ebx
  jle    L42
  lea    0x1(%rbx),%r9d
  mov    $0x1,%edx
  xor    %edi,%edi
  nopl   0x0(%rax)
L26:
  movzbl %dl,%esi
  mov    0x40(%rsp,%rsi,4),%eax
  lea    (%rdi,%rax,1),%ecx
  movzbl %cl,%edi
  movzbl %cl,%ecx
  mov    0x40(%rsp,%rcx,4),%r8d
  mov    %r8d,0x40(%rsp,%rsi,4)
  movzbl %al,%r8d
  mov    %r8d,0x40(%rsp,%rcx,4)
  add    0x40(%rsp,%rsi,4),%eax
  movzbl %al,%eax
  mov    -0x4(%r10,%rdx,4),%ecx
  xor    0x40(%rsp,%rax,4),%ecx
  mov    %ecx,-0x4(%r11,%rdx,4)
  add    $0x1,%rdx
  cmp    %rdx,%r9
  jne    L26
L42:
  mov    0x848(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x850,%rsp
  pop    %rbx
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D50
type_infered: byte[16]
name: disassemble_data
arguments: label: D19
type_infered: byte[16]
name: disassemble_data
arguments: label: D14
type_infered: byte[16]
name: disassemble_data
arguments: label: D59
type_infered: byte[16]
name: disassemble_data
arguments: label: D12
type_infered: byte[16]
name: disassemble_data
arguments: label: D44
type_infered: byte[16]

tool: {"D50": [0x7c,0x00,0x00,0x00,0x4e,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

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

tool: {"D14": [0x55,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x07,0x00,0x00,0x00]}

tool: {"D59": [0x2d,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x7b,0x00,0x00,0x00,0x38,0x00,0x00,0x00]}

tool: {"D12": [0x17,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x11,0x00,0x00,0x00]}

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

assistant: ```c
void encode_page(uint8_t *inpg, uint8_t *outpg, const int size) {
  uint8_t key[] = {0x7C, 0x4E, 0x03, 0x04, 0x55, 0x05, 0x09, 0x07, 0x2D, 0x2C, 0x7B, 0x38, 0x17, 0x0D, 0x17, 0x11};
  int i, i3, x, val, idx;
  uint8_t key1[0x100];
  uint8_t key2[0x100];
  for (i = 0; i < 0x100; i++) {
    key1[i] = i;
    key2[i] = key[i & 0xf];
  }
  i3 = 0;
  for (i = 0; i < 0x100; i++) {
    x = key1[i];
    i3 = key1[i] + i3;
    i3 += key2[i];
    i3 &= 0xff;
    key1[i] = key1[i3];
    key1[i3] = x;
  }
  idx = 0;
  for (i = 0; i < size; i++) {
    x = key1[(i + 1) & 0xff];
    val = x;
    idx = (x + idx) & 0xff;
    key1[(i + 1) & 0xff] = key1[idx];
    key1[idx] = (x & 0xff);
    val = (key1[(i + 1) & 0xff] + x) & 0xff;
    val = key1[val];
    outpg[i] = val ^ inpg[i];
  }
}
```