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

```asm
<alu>:
  endbr64
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movabs $0x3030303030303030,%rax
  mov    %rax,0xf(%rsp)
  movb   $0x0,0x17(%rsp)
  cmp    $0xf,%edi
  ja     L172
  mov    %rsi,%r9
  mov    %rdx,%r10
  mov    %rcx,%rsi
  mov    %r8,%rcx
  mov    %edi,%edi
  lea    D3(%rip),%rdx
  movslq (%rdx,%rdi,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_add@plt>
L141:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0x28,%rsp
  ret
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_adc@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_sub@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_alu_sbc@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_and@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_or@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_xor@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_neg_a@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_neg_b@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_not_a@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_not_b@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_alu_asl@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_alu_lsr@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_alu_rol@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_alu_ror@plt>
  jmp    L141
  lea    0xf(%rsp),%rax
  test   %r8,%r8
  cmove  %rax,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  mov    %r9,%rdi
  call   <op_alu_reset@plt>
  jmp    L141
L172:
  mov    %edi,%edx
  mov    %edi,%esi
  lea    D13(%rip),%rdi
  call   <printf@plt>
  jmp    L141
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D13
datatype: string

tool: D13: ALU(%i): Invalide operation %i selected

assistant: ```c
void alu(unsigned int alu_opcode, char reg_in_a[], char reg_in_b[], char reg_out_accu[], char flags[]) {
  char dummyflags[9] = "00000000";
  switch (alu_opcode) {
  case 1:
    op_add(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 10:
    op_adc(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 2:
    op_sub(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 11:
    op_alu_sbc(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 3:
    op_and(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 4:
    op_or(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 5:
    op_xor(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 6:
    op_neg_a(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 7:
    op_neg_b(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 8:
    op_not_a(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 9:
    op_not_b(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 12:
    op_alu_asl(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 13:
    op_alu_lsr(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 14:
    op_alu_rol(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 15:
    op_alu_ror(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  case 0:
    op_alu_reset(reg_in_a, reg_in_b, reg_out_accu, (flags == NULL) ? dummyflags : flags);
    break;
  default:
    printf("ALU(%i): Invalide operation %i selected", alu_opcode, alu_opcode);
  }
}
```