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

```asm
<decode_special_triadic>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x50,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movzbl %al,%eax
  mov    %rax,-0x40(%rbp)
  mov    -0x58(%rbp),%rax
  sar    $0x8,%rax
  and    $0xff,%eax
  mov    %rax,-0x38(%rbp)
  mov    -0x58(%rbp),%rax
  sar    $0x10,%rax
  and    $0x7,%eax
  mov    %rax,-0x30(%rbp)
  mov    -0x58(%rbp),%rax
  sar    $0x13,%rax
  and    $0x7,%eax
  mov    %rax,-0x28(%rbp)
  mov    -0x58(%rbp),%rax
  sar    $0x16,%rax
  and    $0x1,%eax
  add    $0x2,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%rax
  sar    $0x17,%rax
  and    $0x1,%eax
  mov    %rax,-0x18(%rbp)
  mov    -0x58(%rbp),%rax
  sar    $0x1a,%rax
  and    $0x3,%eax
  cmp    $0x3,%rax
  je     L109
  cmp    $0x3,%rax
  jg     L78
  cmp    $0x1,%rax
  je     L98
  cmp    $0x2,%rax
  je     L88
L78:
  lea    D251(%rip),%rax
  mov    %rax,-0x50(%rbp)
  lea    D181(%rip),%rax
  mov    %rax,-0x48(%rbp)
  jmp    L125
L98:
  lea    D251(%rip),%rax
  mov    %rax,-0x50(%rbp)
  lea    D138(%rip),%rax
  mov    %rax,-0x48(%rbp)
  jmp    L125
L88:
  lea    D240(%rip),%rax
  mov    %rax,-0x50(%rbp)
  lea    D169(%rip),%rax
  mov    %rax,-0x48(%rbp)
  jmp    L125
L109:
  lea    D240(%rip),%rax
  mov    %rax,-0x50(%rbp)
  lea    D106(%rip),%rax
  mov    %rax,-0x48(%rbp)
  nop
L125:
  mov    -0x58(%rbp),%rax
  sar    $0x18,%rax
  and    $0x3,%eax
  cmp    $0x3,%rax
  je     L161
  cmp    $0x3,%rax
  jg     L44
  cmp    $0x2,%rax
  je     L89
  cmp    $0x2,%rax
  jg     L44
  test   %rax,%rax
  je     L164
  cmp    $0x1,%rax
  je     L153
  jmp    L44
L164:
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D253(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0xa,%edi
  call   <pad_to@plt>
  mov    -0x38(%rbp),%rax
  and    $0x7,%eax
  mov    %rax,%rcx
  mov    -0x38(%rbp),%rax
  sar    $0x3,%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode_indirect_address@plt>
  lea    D252(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    -0x40(%rbp),%rax
  and    $0x7,%eax
  mov    %rax,%rcx
  mov    -0x40(%rbp),%rax
  sar    $0x3,%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode_indirect_address@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rsi
  lea    D197(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0x0,%eax
  call   <new_line@plt>
  mov    $0x27,%edi
  call   <pad_to@plt>
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D161(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0x31,%edi
  call   <pad_to@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%r12
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rbx
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %r12,%rcx
  mov    %rbx,%rdx
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  jmp    L1
L153:
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D253(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0xa,%edi
  call   <pad_to@plt>
  mov    -0x38(%rbp),%rax
  and    $0x7,%eax
  mov    %rax,%rcx
  mov    -0x38(%rbp),%rax
  sar    $0x3,%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode_indirect_address@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rbx
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rsi
  mov    -0x48(%rbp),%rax
  mov    %rax,%rcx
  mov    %rbx,%rdx
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0x0,%eax
  call   <new_line@plt>
  mov    $0x27,%edi
  call   <pad_to@plt>
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D161(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0x31,%edi
  call   <pad_to@plt>
  mov    -0x40(%rbp),%rax
  and    $0x7,%eax
  mov    %rax,%rcx
  mov    -0x40(%rbp),%rax
  sar    $0x3,%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode_indirect_address@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rbx
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rbx,%rdx
  mov    %rax,%rsi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  jmp    L1
L89:
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D253(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0xa,%edi
  call   <pad_to@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%r12
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rbx
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %r12,%rcx
  mov    %rbx,%rdx
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0x0,%eax
  call   <new_line@plt>
  mov    $0x27,%edi
  call   <pad_to@plt>
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0x31,%edi
  call   <pad_to@plt>
  mov    -0x38(%rbp),%rax
  and    $0x7,%eax
  mov    %rax,%rcx
  mov    -0x38(%rbp),%rax
  sar    $0x3,%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode_indirect_address@plt>
  lea    D252(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    -0x40(%rbp),%rax
  and    $0x7,%eax
  mov    %rax,%rcx
  mov    -0x40(%rbp),%rax
  sar    $0x3,%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode_indirect_address@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rsi
  lea    D197(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  jmp    L1
L161:
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D253(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0xa,%edi
  call   <pad_to@plt>
  mov    -0x38(%rbp),%rax
  and    $0x7,%eax
  mov    %rax,%rcx
  mov    -0x38(%rbp),%rax
  sar    $0x3,%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode_indirect_address@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rbx
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rbx,%rdx
  mov    %rax,%rsi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0x0,%eax
  call   <new_line@plt>
  mov    $0x27,%edi
  call   <pad_to@plt>
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D161(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    $0x31,%edi
  call   <pad_to@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rsi
  lea    D158(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  mov    -0x40(%rbp),%rax
  and    $0x7,%eax
  mov    %rax,%rcx
  mov    -0x40(%rbp),%rax
  sar    $0x3,%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <decode_indirect_address@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <_regname@plt>
  mov    %rax,%rsi
  lea    D197(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <myprint@plt>
  nop
L1:
  nop
L44:
  nop
  add    $0x50,%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D251
datatype: string
name: retrieve_data
arguments: data_tag: D181
datatype: string
name: retrieve_data
arguments: data_tag: D138
datatype: string
name: retrieve_data
arguments: data_tag: D240
datatype: string
name: retrieve_data
arguments: data_tag: D169
datatype: string
name: retrieve_data
arguments: data_tag: D106
datatype: string
name: retrieve_data
arguments: data_tag: D253
datatype: string
name: retrieve_data
arguments: data_tag: D252
datatype: string
name: retrieve_data
arguments: data_tag: D197
datatype: string
name: retrieve_data
arguments: data_tag: D161
datatype: string
name: retrieve_data
arguments: data_tag: D39
datatype: string
name: retrieve_data
arguments: data_tag: D148
datatype: string
name: retrieve_data
arguments: data_tag: D51
datatype: string
name: retrieve_data
arguments: data_tag: D158
datatype: string

tool: D251: MPYF3

tool: D181: ADDF3

tool: D138: SUBF3

tool: D240: MPYI3

tool: D169: ADDI3

tool: D106: SUBI3

tool: D253: %s

tool: D252: , 

tool: D197: , %s

tool: D161: || %s

tool: D39: %s, %s, %s

tool: D148: , %s, %s

tool: D51: || %s 

tool: D158: %s, 

assistant: ```c
void decode_special_triadic(long int op_code) {
  char *op1;
  char *op2;
  long int src1;
  long int src2;
  long int src3;
  long int src4;
  long int dst1;
  long int dst2;
  src4 = op_code & 0xff;
  src3 = (op_code >> 8) & 0xff;
  src2 = (op_code >> 16) & 0x7;
  src1 = (op_code >> 19) & 0x7;
  dst2 = ((op_code >> 22) & 0x1) + 2;
  dst1 = (op_code >> 23) & 0x1;
  switch ((op_code >> 26) & 0x3) {
  default:
  case 0x00L:
    op1 = "MPYF3";
    op2 = "ADDF3";
    break;
  case 0x01L:
    op1 = "MPYF3";
    op2 = "SUBF3";
    break;
  case 0x02L:
    op1 = "MPYI3";
    op2 = "ADDI3";
    break;
  case 0x03L:
    op1 = "MPYI3";
    op2 = "SUBI3";
    break;
  }
  switch ((op_code >> 24) & 0x3) {
  case 0x00L:
    myprint("%s", op1);
    pad_to(10);
    decode_indirect_address(src3 >> 3, src3 & 7, 1);
    myprint(", ");
    decode_indirect_address(src4 >> 3, src4 & 7, 1);
    myprint(", %s", _regname(dst1));
    new_line();
    pad_to(39);
    myprint("|| %s", op2);
    pad_to(39 + 10);
    myprint("%s, %s, %s", _regname(src1), _regname(src2), _regname(dst2));
    break;
  case 0x01L:
    myprint("%s", op1);
    pad_to(10);
    decode_indirect_address(src3 >> 3, src3 & 7, 1);
    myprint(", %s, %s", _regname(src1), _regname(dst1), op2);
    new_line();
    pad_to(39);
    myprint("|| %s", op2);
    pad_to(39 + 10);
    decode_indirect_address(src4 >> 3, src4 & 7, 1);
    myprint(", %s, %s", _regname(src2), _regname(dst2));
    break;
  case 0x02L:
    myprint("%s", op1);
    pad_to(10);
    myprint("%s, %s, %s", _regname(src1), _regname(src2), _regname(dst1));
    new_line();
    pad_to(39);
    myprint("|| %s ", op2);
    pad_to(39 + 10);
    decode_indirect_address(src3 >> 3, src3 & 7, 1);
    myprint(", ");
    decode_indirect_address(src4 >> 3, src4 & 7, 1);
    myprint(", %s", _regname(dst2));
    break;
  case 0x03L:
    myprint("%s", op1);
    pad_to(10);
    decode_indirect_address(src3 >> 3, src3 & 7, 1);
    myprint(", %s, %s", _regname(src1), _regname(dst1));
    new_line();
    pad_to(39);
    myprint("|| %s", op2);
    pad_to(39 + 10);
    myprint("%s, ", _regname(src2));
    decode_indirect_address(src4 >> 3, src4 & 7, 1);
    myprint(", %s", _regname(dst2));
    break;
  }
  return;
}
```