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

```asm
<microqr_expand_binary>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
L13:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  cmp    $0x1e,%eax
  ja     L20
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D80(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D80(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x20(%rbp),%rax
  lea    D18(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  addl   $0x1,-0x8(%rbp)
  jmp    L20
  mov    -0x20(%rbp),%rax
  lea    D2(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  addl   $0x1,-0x8(%rbp)
  jmp    L20
  cmpl   $0x3,-0x24(%rbp)
  je     L106
  cmpl   $0x3,-0x24(%rbp)
  jg     L242
  cmpl   $0x1,-0x24(%rbp)
  je     L118
  cmpl   $0x2,-0x24(%rbp)
  je     L166
  jmp    L242
L118:
  mov    -0x20(%rbp),%rax
  lea    D2(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  jmp    L242
L166:
  mov    -0x20(%rbp),%rax
  lea    D20(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  jmp    L242
L106:
  mov    -0x20(%rbp),%rax
  lea    D111(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  nop
L242:
  mov    -0x24(%rbp),%eax
  mov    $0x4,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    -0x20(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <diran@plt>
  addl   $0x2,-0x8(%rbp)
  jmp    L20
  cmpl   $0x3,-0x24(%rbp)
  je     L49
  cmpl   $0x3,-0x24(%rbp)
  jg     L24
  cmpl   $0x1,-0x24(%rbp)
  je     L265
  cmpl   $0x2,-0x24(%rbp)
  je     L259
  jmp    L24
L265:
  mov    -0x20(%rbp),%rax
  lea    D18(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  jmp    L24
L259:
  mov    -0x20(%rbp),%rax
  lea    D103(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  jmp    L24
L49:
  mov    -0x20(%rbp),%rax
  lea    D33(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  nop
L24:
  mov    -0x24(%rbp),%eax
  mov    $0x2,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    -0x20(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <diran@plt>
  addl   $0x2,-0x8(%rbp)
  jmp    L20
  cmpl   $0x2,-0x24(%rbp)
  je     L138
  cmpl   $0x3,-0x24(%rbp)
  je     L232
  jmp    L137
L138:
  mov    -0x20(%rbp),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  jmp    L137
L232:
  mov    -0x20(%rbp),%rax
  lea    D75(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  nop
L137:
  mov    -0x24(%rbp),%eax
  mov    $0x2,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    -0x20(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <diran@plt>
  addl   $0x2,-0x8(%rbp)
  jmp    L20
  cmpl   $0x2,-0x24(%rbp)
  je     L261
  cmpl   $0x3,-0x24(%rbp)
  je     L54
  jmp    L84
L261:
  mov    -0x20(%rbp),%rax
  lea    D31(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  jmp    L84
L54:
  mov    -0x20(%rbp),%rax
  lea    D63(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  nop
L84:
  mov    -0x24(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    -0x20(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <diran@plt>
  addl   $0x2,-0x8(%rbp)
  nop
L20:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L13
  nop
  nop
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D18
data_type: string
name: retrieve_data
arguments: data_label: D2
data_type: string
name: retrieve_data
arguments: data_label: D20
data_type: string
name: retrieve_data
arguments: data_label: D111
data_type: string
name: retrieve_data
arguments: data_label: D103
data_type: string
name: retrieve_data
arguments: data_label: D33
data_type: string
name: retrieve_data
arguments: data_label: D40
data_type: string
name: retrieve_data
arguments: data_label: D75
data_type: string
name: retrieve_data
arguments: data_label: D31
data_type: string
name: retrieve_data
arguments: data_label: D63
data_type: string

tool: D18: 1

tool: D2: 0

tool: D20: 00

tool: D111: 000

tool: D103: 01

tool: D33: 001

tool: D40: 10

tool: D75: 010

tool: D31: 11

tool: D63: 011

assistant: ```c
void microqr_expand_binary(char binary_stream[], char full_stream[], int version) {
  int i, length;
  length = strlen(binary_stream);
  i = 0;
  do {
    switch (binary_stream[i]) {
    case '1':
      concat(full_stream, "1");
      i++;
      break;
    case '0':
      concat(full_stream, "0");
      i++;
      break;
    case 'N':
      switch (version) {
      case 1:
        concat(full_stream, "0");
        break;
      case 2:
        concat(full_stream, "00");
        break;
      case 3:
        concat(full_stream, "000");
        break;
      }
      diran(full_stream, binary_stream[i + 1], 4 << version);
      i += 2;
      break;
    case 'A':
      switch (version) {
      case 1:
        concat(full_stream, "1");
        break;
      case 2:
        concat(full_stream, "01");
        break;
      case 3:
        concat(full_stream, "001");
        break;
      }
      diran(full_stream, binary_stream[i + 1], 2 << version);
      i += 2;
      break;
    case 'B':
      switch (version) {
      case 2:
        concat(full_stream, "10");
        break;
      case 3:
        concat(full_stream, "010");
        break;
      }
      diran(full_stream, binary_stream[i + 1], 2 << version);
      i += 2;
      break;
    case 'K':
      switch (version) {
      case 2:
        concat(full_stream, "11");
        break;
      case 3:
        concat(full_stream, "011");
        break;
      }
      diran(full_stream, binary_stream[i + 1], 1 << version);
      i += 2;
      break;
    }
  } while (i < length);
}
```