user: 请将以下的汇编代码转换成C语言代码:

```asm
<majorityElement1>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %esi,%esi
  jle    L118
  lea    -0x1(%rsi),%eax
  mov    %rdi,%r9
  mov    %rdi,%rcx
  xor    %r8d,%r8d
  mov    %rax,%r10
  lea    0x4(%rdi,%rax,4),%rdi
  xor    %esi,%esi
  mov    %r9,%rax
  jmp    L17
  nopl   0x0(%rax,%rax,1)
L83:
  cmp    %r14d,%edx
  je     L113
  test   %esi,%esi
  je     L263
  test   %r8d,%r8d
  je     L46
  sub    $0x1,%esi
  sub    $0x1,%r8d
  nopl   0x0(%rax)
L167:
  add    $0x4,%rax
  cmp    %rax,%rdi
  je     L259
L17:
  mov    (%rax),%edx
  cmp    %r12d,%edx
  jne    L83
  add    $0x4,%rax
  add    $0x1,%esi
  cmp    %rax,%rdi
  jne    L17
L259:
  cmp    $0x2,%r10d
  jbe    L111
  mov    %r13d,%eax
  movd   %r12d,%xmm7
  pxor   %xmm3,%xmm3
  pshufd $0x0,%xmm7,%xmm6
  shr    $0x2,%eax
  movdqa %xmm3,%xmm2
  movdqa %xmm3,%xmm4
  sub    $0x1,%eax
  movd   %r14d,%xmm7
  shl    $0x4,%rax
  pshufd $0x0,%xmm7,%xmm5
  lea    0x10(%r9,%rax,1),%rax
L148:
  movdqu (%rcx),%xmm0
  movdqu (%rcx),%xmm1
  add    $0x10,%rcx
  pcmpeqd %xmm6,%xmm0
  pcmpeqd %xmm5,%xmm1
  psubd  %xmm0,%xmm2
  pcmpeqd %xmm4,%xmm0
  pand   %xmm1,%xmm0
  psubd  %xmm0,%xmm3
  cmp    %rcx,%rax
  jne    L148
  movdqa %xmm3,%xmm0
  mov    %r13d,%eax
  psrldq $0x8,%xmm0
  and    $0xfffffffc,%eax
  paddd  %xmm0,%xmm3
  movdqa %xmm3,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm3
  movdqa %xmm2,%xmm0
  psrldq $0x8,%xmm0
  movd   %xmm3,%ebx
  paddd  %xmm0,%xmm2
  movdqa %xmm2,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm2
  movd   %xmm2,%ebp
  test   $0x3,%r13b
  je     L146
L128:
  movslq %eax,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    (%r9,%rdx,4),%edx
  cmp    %r12d,%edx
  je     L252
  cmp    %r14d,%edx
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
L257:
  lea    0x1(%rax),%edx
  cmp    %edx,%r13d
  jle    L146
  mov    0x4(%r9,%rcx,1),%edx
  cmp    %edx,%r12d
  je     L168
  cmp    %edx,%r14d
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%ebx
L237:
  add    $0x2,%eax
  cmp    %eax,%r13d
  jle    L146
  mov    0x8(%r9,%rcx,1),%eax
  cmp    %eax,%r12d
  je     L47
  cmp    %eax,%r14d
  sete   %al
  movzbl %al,%eax
  add    %eax,%ebx
L146:
  mov    $0x8,%edi
  call   <malloc@plt>
  movslq %r13d,%rdx
  sar    $0x1f,%r13d
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sub    %r13d,%edx
  cmp    %ebp,%edx
  jge    L120
  mov    %r12d,(%rax)
  mov    $0x2,%esi
  mov    $0x4,%edi
  mov    $0x1,%ecx
L34:
  cmp    %ebx,%edx
  jge    L162
  mov    %r14d,(%rax,%rdi,1)
  mov    %esi,%ecx
L162:
  mov    %ecx,(%r15)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L113:
  add    $0x1,%r8d
  jmp    L167
  nopl   0x0(%rax)
L263:
  mov    %edx,%r12d
  mov    $0x1,%esi
  jmp    L167
  nopl   (%rax)
L46:
  mov    %edx,%r14d
  mov    $0x1,%r8d
  jmp    L167
  xchg   %ax,%ax
L120:
  mov    $0x1,%esi
  xor    %edi,%edi
  xor    %ecx,%ecx
  jmp    L34
  nopl   0x0(%rax,%rax,1)
L252:
  add    $0x1,%ebp
  jmp    L257
  nopl   0x0(%rax,%rax,1)
L168:
  add    $0x1,%ebp
  jmp    L237
  nopl   0x0(%rax,%rax,1)
L47:
  add    $0x1,%ebp
  jmp    L146
  nopl   0x0(%rax,%rax,1)
L118:
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  jmp    L146
L111:
  xor    %eax,%eax
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  jmp    L128
```

assistant: ```c
int *majorityElement1(int *nums, int size, int *returnSize) {
  int count1 = 0, count2 = 0;
  int a, b;
  for (int i = 0; i < size; i++) {
    if (nums[i] == a)
      count1++;
    else if (nums[i] == b)
      count2++;
    else {
      if (count1 == 0)
        a = nums[i], count1 = 1;
      else if (count2 == 0)
        b = nums[i], count2 = 1;
      else
        count1--, count2--;
    }
  }
  count1 = count2 = 0;
  for (int i = 0; i < size; i++)
    if (nums[i] == a)
      count1++;
    else if (nums[i] == b)
      count2++;
  int *res = (int *)malloc(sizeof(int) * 2);
  int index = 0;
  if (count1 > size / 3)
    res[index++] = a;
  if (count2 > size / 3)
    res[index++] = b;
  *returnSize = index;
  return res;
}
```