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

```asm
<main>:
  endbr64
  push   %r13
  lea    D29(%rip),%r13
  push   %r12
  mov    %r13,%rdi
  push   %rbp
  push   %rbx
  sub    $0x1b8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1a8(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rsi
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L151
  lea    0x10(%rsp),%r12
  xor    %ebx,%ebx
  mov    %r12,%rbp
  xchg   %ax,%ax
L136:
  mov    %rbp,%rsi
  mov    %r13,%rdi
  add    $0x1,%ebx
  add    $0x4,%rbp
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  cmp    %ebx,%eax
  jg     L136
  test   %eax,%eax
  jle    L151
  lea    -0x1(%rax),%edx
  cmp    $0x4,%edx
  jbe    L124
  mov    %eax,%edx
  pxor   %xmm5,%xmm5
  movdqa D22(%rip),%xmm7
  movdqa %xmm5,%xmm4
  shr    $0x2,%edx
  movdqa %xmm5,%xmm1
  movdqa %xmm5,%xmm3
  lea    -0x1(%rdx),%ecx
  lea    0x10(%r12),%rdx
  movdqa %xmm5,%xmm6
  shl    $0x4,%rcx
  add    %rdx,%rcx
  jmp    L19
L207:
  add    $0x10,%rdx
L19:
  movdqa (%r12),%xmm2
  mov    %rdx,%r12
  movdqa %xmm2,%xmm0
  pand   %xmm7,%xmm0
  pcmpeqd %xmm6,%xmm0
  pcmpeqd %xmm6,%xmm0
  movdqa %xmm0,%xmm8
  psubd  %xmm0,%xmm1
  pandn  %xmm7,%xmm8
  paddd  %xmm8,%xmm3
  movdqa %xmm0,%xmm8
  pand   %xmm2,%xmm0
  pandn  %xmm2,%xmm8
  paddd  %xmm0,%xmm5
  paddd  %xmm8,%xmm4
  cmp    %rcx,%rdx
  jne    L207
  movdqa %xmm5,%xmm0
  mov    %eax,%ecx
  psrldq $0x8,%xmm0
  and    $0xfffffffc,%ecx
  paddd  %xmm0,%xmm5
  movdqa %xmm5,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm5
  movdqa %xmm4,%xmm0
  psrldq $0x8,%xmm0
  movd   %xmm5,%esi
  paddd  %xmm0,%xmm4
  movdqa %xmm4,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm4
  movdqa %xmm1,%xmm0
  psrldq $0x8,%xmm0
  movd   %xmm4,%edx
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movdqa %xmm3,%xmm0
  psrldq $0x8,%xmm0
  movd   %xmm1,%ebx
  paddd  %xmm3,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%ebp
  test   $0x3,%al
  je     L208
L139:
  movslq %ecx,%rdi
  mov    0x10(%rsp,%rdi,4),%edi
  test   $0x1,%dil
  jne    L219
  add    $0x1,%ebp
  add    %edi,%edx
L203:
  lea    0x1(%rcx),%edi
  cmp    %edi,%eax
  jle    L208
  movslq %edi,%rdi
  mov    0x10(%rsp,%rdi,4),%edi
  test   $0x1,%dil
  je     L235
  add    $0x1,%ebx
  add    %edi,%esi
L143:
  lea    0x2(%rcx),%edi
  cmp    %edi,%eax
  jle    L208
  movslq %edi,%rdi
  mov    0x10(%rsp,%rdi,4),%edi
  test   $0x1,%dil
  je     L186
  add    $0x1,%ebx
  add    %edi,%esi
L137:
  lea    0x3(%rcx),%edi
  cmp    %edi,%eax
  jle    L208
  movslq %edi,%rdi
  mov    0x10(%rsp,%rdi,4),%edi
  test   $0x1,%dil
  je     L128
  add    $0x1,%ebx
  add    %edi,%esi
L182:
  add    $0x4,%ecx
  cmp    %ecx,%eax
  jle    L208
  movslq %ecx,%rcx
  mov    0x10(%rsp,%rcx,4),%eax
  test   $0x1,%al
  jne    L167
  add    $0x1,%ebp
  add    %eax,%edx
L208:
  pxor   %xmm0,%xmm0
  lea    D39(%rip),%rdi
  mov    $0x1,%eax
  cvtsi2ss %edx,%xmm0
  call   <printf@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  lea    D4(%rip),%rdi
  cvtsi2ss %ebp,%xmm0
  mov    $0x1,%eax
  cvtsi2ss %ebx,%xmm1
  divss  %xmm1,%xmm0
  call   <printf@plt>
  mov    0x1a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L38
  add    $0x1b8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L219:
  add    $0x1,%ebx
  add    %edi,%esi
  jmp    L203
L235:
  add    $0x1,%ebp
  add    %edi,%edx
  jmp    L143
L186:
  add    $0x1,%ebp
  add    %edi,%edx
  jmp    L137
L128:
  add    $0x1,%ebp
  add    %edi,%edx
  jmp    L182
L167:
  add    $0x1,%ebx
  add    %eax,%esi
  jmp    L208
L151:
  xor    %esi,%esi
  xor    %edx,%edx
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  jmp    L208
L124:
  xor    %esi,%esi
  xor    %edx,%edx
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  xor    %ecx,%ecx
  jmp    L139
L38:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D29
type_infered: string
name: unpack_data
arguments: data_tag: D22
type_infered: byte[16]
name: unpack_data
arguments: data_tag: D39
type_infered: string
name: unpack_data
arguments: data_tag: D4
type_infered: string

tool: D29: %d

tool: {"D22": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: D39: Sum even: %d
Sum odd: %d


tool: D4: Ratio: %.2f


assistant: ```c
int main() {
  int i, n, a[100], count_even = 0, count_odd = 0, sum_even = 0, sum_odd = 0;
  scanf("%d", &n);
  for (i = 0; i < n; ++i)
    scanf("%d", &a[i]);
  for (i = 0; i < n; ++i) {
    if (a[i] % 2) {
      count_odd++;
      sum_odd += a[i];
    } else {
      count_even++;
      sum_even += a[i];
    }
  }
  printf("Sum even: %d\nSum odd: %d\n", sum_even, sum_odd);
  printf("Ratio: %.2f\n", (float)count_even / count_odd);
  return 0;
}
```