user: Converte this assembly snippet into its equivalent C code:

```asm
<concat>:
  endbr64
  push   %r12
  mov    %rdi,%rax
  mov    %rdx,%rdi
  push   %rbp
  push   %rbx
  test   %ecx,%ecx
  je     L284
  lea    0x1(%rsi),%r10
  mov    %rax,%rdx
  sub    %r10,%rdx
  cmp    $0xe,%rdx
  jbe    L75
  lea    -0x1(%rcx),%r9d
  cmp    $0x6,%r9d
  jbe    L75
  cmp    $0xe,%r9d
  jbe    L49
  mov    %ecx,%r10d
  xor    %edx,%edx
  shr    $0x4,%r10d
  shl    $0x4,%r10
  nop
L308:
  movdqu (%rsi,%rdx,1),%xmm0
  movups %xmm0,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %r10,%rdx
  jne    L308
  mov    %ecx,%r12d
  mov    %ecx,%r11d
  and    $0xfffffff0,%r12d
  mov    %r12d,%ebx
  sub    %r12d,%r9d
  lea    (%rax,%rbx,1),%rdx
  lea    (%rsi,%rbx,1),%r10
  cmp    %r12d,%ecx
  je     L166
  mov    %ecx,%ebp
  sub    %r12d,%ebp
  lea    -0x1(%rbp),%r11d
  cmp    $0x6,%r11d
  jbe    L136
L164:
  mov    (%rsi,%rbx,1),%rsi
  mov    %rsi,(%rax,%rbx,1)
  mov    %ebp,%esi
  and    $0xfffffff8,%esi
  mov    %esi,%r11d
  sub    %esi,%r9d
  add    %r11,%rdx
  add    %r11,%r10
  mov    %ecx,%r11d
  cmp    %esi,%ebp
  je     L166
L136:
  movzbl (%r10),%esi
  mov    %ecx,%r11d
  mov    %sil,(%rdx)
  test   %r9d,%r9d
  je     L166
  movzbl 0x1(%r10),%ecx
  mov    %cl,0x1(%rdx)
  cmp    $0x1,%r9d
  je     L166
  movzbl 0x2(%r10),%ecx
  mov    %cl,0x2(%rdx)
  cmp    $0x2,%r9d
  je     L166
  movzbl 0x3(%r10),%ecx
  mov    %cl,0x3(%rdx)
  cmp    $0x3,%r9d
  je     L166
  movzbl 0x4(%r10),%ecx
  mov    %cl,0x4(%rdx)
  cmp    $0x4,%r9d
  je     L166
  movzbl 0x5(%r10),%ecx
  mov    %cl,0x5(%rdx)
  cmp    $0x5,%r9d
  je     L166
  movzbl 0x6(%r10),%ecx
  mov    %cl,0x6(%rdx)
L166:
  add    %r11,%rax
L284:
  lea    -0x1(%r8),%ecx
  test   %r8d,%r8d
  je     L45
  lea    0x1(%rdi),%rsi
  mov    %rax,%rdx
  sub    %rsi,%rdx
  cmp    $0xe,%rdx
  jbe    L52
  cmp    $0x6,%ecx
  jbe    L52
  cmp    $0xe,%ecx
  jbe    L207
  mov    %r8d,%esi
  xor    %edx,%edx
  shr    $0x4,%esi
  shl    $0x4,%rsi
  nopl   0x0(%rax)
L177:
  movdqu (%rdi,%rdx,1),%xmm1
  movups %xmm1,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %rsi,%rdx
  jne    L177
  mov    %r8d,%r10d
  and    $0xfffffff0,%r10d
  mov    %r10d,%r9d
  sub    %r10d,%ecx
  lea    (%rax,%r9,1),%rdx
  lea    (%rdi,%r9,1),%rsi
  cmp    %r10d,%r8d
  je     L45
  sub    %r10d,%r8d
  lea    -0x1(%r8),%r10d
  cmp    $0x6,%r10d
  jbe    L276
L130:
  mov    (%rdi,%r9,1),%rdi
  mov    %rdi,(%rax,%r9,1)
  mov    %r8d,%eax
  and    $0xfffffff8,%eax
  mov    %eax,%edi
  sub    %eax,%ecx
  add    %rdi,%rdx
  add    %rdi,%rsi
  cmp    %r8d,%eax
  je     L45
L276:
  movzbl (%rsi),%eax
  mov    %al,(%rdx)
  test   %ecx,%ecx
  je     L45
  movzbl 0x1(%rsi),%eax
  mov    %al,0x1(%rdx)
  cmp    $0x1,%ecx
  je     L45
  movzbl 0x2(%rsi),%eax
  mov    %al,0x2(%rdx)
  cmp    $0x2,%ecx
  je     L45
  movzbl 0x3(%rsi),%eax
  mov    %al,0x3(%rdx)
  cmp    $0x3,%ecx
  je     L45
  movzbl 0x4(%rsi),%eax
  mov    %al,0x4(%rdx)
  cmp    $0x4,%ecx
  je     L45
  movzbl 0x5(%rsi),%eax
  mov    %al,0x5(%rdx)
  cmp    $0x5,%ecx
  je     L45
  movzbl 0x6(%rsi),%eax
  mov    %al,0x6(%rdx)
L45:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nop
L52:
  mov    %r8d,%r8d
  xor    %edx,%edx
  nopl   (%rax)
L280:
  movzbl (%rdi,%rdx,1),%ecx
  mov    %cl,(%rax,%rdx,1)
  add    $0x1,%rdx
  cmp    %r8,%rdx
  jne    L280
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L75:
  mov    %ecx,%r11d
  xor    %edx,%edx
  nopl   (%rax)
L324:
  movzbl (%rsi,%rdx,1),%ecx
  mov    %cl,(%rax,%rdx,1)
  add    $0x1,%rdx
  cmp    %r11,%rdx
  jne    L324
  jmp    L166
L49:
  mov    %ecx,%ebp
  mov    %rsi,%r10
  mov    %rax,%rdx
  xor    %ebx,%ebx
  jmp    L164
L207:
  mov    %rdi,%rsi
  mov    %rax,%rdx
  xor    %r9d,%r9d
  jmp    L130
```

assistant: ```c
void concat(unsigned char *out, const unsigned char *in1, const unsigned char *in2, unsigned l1, unsigned l2) {
  while (l1--)
    *out++ = *in1++;
  while (l2--)
    *out++ = *in2++;
}
```