user: Please show me the C implementation that matches the assembly code listed below:

```asm
<microqr_expand_binary>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  mov    %edx,%r12d
  call   <strlen@plt>
  mov    %eax,%r15d
  mov    $0x4,%eax
  mov    %r12d,%ecx
  shl    %cl,%eax
  mov    %eax,0x8(%rsp)
  mov    $0x1,%eax
  shl    %cl,%eax
  mov    %eax,0xc(%rsp)
  mov    $0x2,%eax
  shl    %cl,%eax
  mov    %eax,0x4(%rsp)
  mov    $0x0,%ebx
  jmp    L238
  lea    D27(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  add    $0x1,%ebx
  jmp    L55
  lea    D24(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  add    $0x1,%ebx
  jmp    L55
  cmp    $0x2,%r12d
  je     L217
  cmp    $0x3,%r12d
  je     L53
  cmp    $0x1,%r12d
  je     L63
L73:
  movsbl 0x1(%r13,%rbp,1),%esi
  mov    0x8(%rsp),%edx
  mov    %r14,%rdi
  call   <diran@plt>
  add    $0x2,%ebx
  jmp    L55
L63:
  lea    D24(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L73
L217:
  lea    D90(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L73
L53:
  lea    D121(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L73
  cmp    $0x2,%r12d
  je     L192
  cmp    $0x3,%r12d
  je     L233
  cmp    $0x1,%r12d
  je     L85
L122:
  movsbl 0x1(%r13,%rbp,1),%esi
  mov    0x4(%rsp),%edx
  mov    %r14,%rdi
  call   <diran@plt>
  add    $0x2,%ebx
  jmp    L55
L85:
  lea    D27(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L122
L192:
  lea    D53(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L122
L233:
  lea    D56(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L122
  cmp    $0x2,%r12d
  je     L149
  cmp    $0x3,%r12d
  je     L44
L194:
  movsbl 0x1(%r13,%rbp,1),%esi
  mov    0x4(%rsp),%edx
  mov    %r14,%rdi
  call   <diran@plt>
  add    $0x2,%ebx
L55:
  cmp    %r15d,%ebx
  jge    L160
L238:
  movslq %ebx,%rbp
  movzbl 0x0(%r13,%rbp,1),%eax
  sub    $0x30,%eax
  cmp    $0x1e,%al
  ja     L55
  movzbl %al,%eax
  lea    D1(%rip),%rcx
  movslq (%rcx,%rax,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
L149:
  lea    D12(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L194
L44:
  lea    D15(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L194
  cmp    $0x2,%r12d
  je     L156
  cmp    $0x3,%r12d
  je     L181
L230:
  movsbl 0x1(%r13,%rbp,1),%esi
  mov    0xc(%rsp),%edx
  mov    %r14,%rdi
  call   <diran@plt>
  add    $0x2,%ebx
  jmp    L55
L156:
  lea    D47(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L230
L181:
  lea    D99(%rip),%rsi
  mov    %r14,%rdi
  call   <concat@plt>
  jmp    L230
L160:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D27
type_infered: string
name: disassemble_data
arguments: data_tag: D24
type_infered: string
name: disassemble_data
arguments: data_tag: D90
type_infered: string
name: disassemble_data
arguments: data_tag: D121
type_infered: string
name: disassemble_data
arguments: data_tag: D53
type_infered: string
name: disassemble_data
arguments: data_tag: D56
type_infered: string
name: disassemble_data
arguments: data_tag: D12
type_infered: string
name: disassemble_data
arguments: data_tag: D15
type_infered: string
name: disassemble_data
arguments: data_tag: D47
type_infered: string
name: disassemble_data
arguments: data_tag: D99
type_infered: string

tool: D27: 1

tool: D24: 0

tool: D90: 00

tool: D121: 000

tool: D53: 01

tool: D56: 001

tool: D12: 10

tool: D15: 010

tool: D47: 11

tool: D99: 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);
}
```