user: What would the C source look like for the assembly code provided here:

```asm
<micro_qr_m3>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x38(%rbp)
  cmpl   $0x1,-0x4c(%rbp)
  jne    L276
  movl   $0x54,-0x34(%rbp)
L276:
  cmpl   $0x2,-0x4c(%rbp)
  jne    L264
  movl   $0x44,-0x34(%rbp)
L264:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x24(%rbp)
  cmpl   $0x7,-0x24(%rbp)
  jg     L301
  movl   $0x0,-0x40(%rbp)
  jmp    L141
L262:
  mov    -0x48(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  addl   $0x1,-0x40(%rbp)
L141:
  mov    -0x40(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L262
  movl   $0x1,-0x38(%rbp)
  jmp    L17
L301:
  mov    -0x48(%rbp),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
L17:
  cmpl   $0x0,-0x38(%rbp)
  jne    L298
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x24(%rbp)
  cmpl   $0x4,-0x24(%rbp)
  jg     L298
  movl   $0x0,-0x40(%rbp)
  jmp    L353
L187:
  mov    -0x48(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  addl   $0x1,-0x40(%rbp)
L353:
  mov    -0x40(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L187
  movl   $0x1,-0x38(%rbp)
L298:
  cmpl   $0x0,-0x38(%rbp)
  jne    L86
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltd
  shr    $0x1d,%edx
  add    %edx,%eax
  and    $0x7,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    $0x8,%eax
  sub    %edx,%eax
  mov    %eax,-0x30(%rbp)
  cmpl   $0x8,-0x30(%rbp)
  jne    L228
  movl   $0x0,-0x30(%rbp)
L228:
  movl   $0x0,-0x40(%rbp)
  jmp    L46
L183:
  mov    -0x48(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  addl   $0x1,-0x40(%rbp)
L46:
  mov    -0x40(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L183
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x24(%rbp)
  cmpl   $0x4,-0x24(%rbp)
  jle    L16
  mov    -0x24(%rbp),%eax
  sub    $0x4,%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  mov    %eax,-0x30(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L277
L21:
  mov    -0x40(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L139
  lea    D30(%rip),%rax
  jmp    L210
L139:
  lea    D61(%rip),%rax
L210:
  mov    -0x48(%rbp),%rdx
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcat@plt>
  addl   $0x1,-0x40(%rbp)
L277:
  mov    -0x40(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L21
L16:
  mov    -0x48(%rbp),%rax
  lea    D25(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
L86:
  cmpl   $0x1,-0x4c(%rbp)
  jne    L26
  movl   $0xb,-0x2c(%rbp)
  movl   $0x6,-0x28(%rbp)
L26:
  cmpl   $0x2,-0x4c(%rbp)
  jne    L32
  movl   $0x9,-0x2c(%rbp)
  movl   $0x8,-0x28(%rbp)
L32:
  movl   $0x0,-0x40(%rbp)
  jmp    L121
L180:
  mov    -0x40(%rbp),%eax
  cltq
  movb   $0x0,-0x14(%rbp,%rax,1)
  movl   $0x0,-0x3c(%rbp)
  jmp    L144
L160:
  mov    -0x40(%rbp),%eax
  lea    0x0(,%rax,8),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L74
  mov    -0x40(%rbp),%eax
  cltq
  movzbl -0x14(%rbp,%rax,1),%edx
  mov    -0x3c(%rbp),%eax
  mov    $0x80,%esi
  mov    %eax,%ecx
  sar    %cl,%esi
  mov    %esi,%eax
  add    %eax,%edx
  mov    -0x40(%rbp),%eax
  cltq
  mov    %dl,-0x14(%rbp,%rax,1)
L74:
  addl   $0x1,-0x3c(%rbp)
L144:
  cmpl   $0x7,-0x3c(%rbp)
  jle    L160
  addl   $0x1,-0x40(%rbp)
L121:
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x40(%rbp)
  jl     L180
  cmpl   $0x1,-0x4c(%rbp)
  jne    L212
  movb   $0x0,-0xa(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L53
L334:
  mov    -0x3c(%rbp),%eax
  add    $0x50,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L52
  movzbl -0xa(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  mov    $0x80,%esi
  mov    %eax,%ecx
  sar    %cl,%esi
  mov    %esi,%eax
  add    %edx,%eax
  mov    %al,-0xa(%rbp)
L52:
  addl   $0x1,-0x3c(%rbp)
L53:
  cmpl   $0x3,-0x3c(%rbp)
  jle    L334
L212:
  cmpl   $0x2,-0x4c(%rbp)
  jne    L161
  movb   $0x0,-0xc(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L22
L58:
  mov    -0x3c(%rbp),%eax
  add    $0x40,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L368
  movzbl -0xc(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  mov    $0x80,%esi
  mov    %eax,%ecx
  sar    %cl,%esi
  mov    %esi,%eax
  add    %edx,%eax
  mov    %al,-0xc(%rbp)
L368:
  addl   $0x1,-0x3c(%rbp)
L22:
  cmpl   $0x3,-0x3c(%rbp)
  jle    L58
L161:
  mov    $0x11d,%edi
  call   <rs_init_gf@plt>
  mov    -0x28(%rbp),%eax
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <rs_init_code@plt>
  lea    -0x1d(%rbp),%rdx
  lea    -0x14(%rbp),%rcx
  mov    -0x2c(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <rs_encode@plt>
  mov    $0x0,%eax
  call   <rs_free@plt>
  movl   $0x0,-0x40(%rbp)
  jmp    L193
L206:
  mov    -0x28(%rbp),%eax
  sub    -0x40(%rbp),%eax
  sub    $0x1,%eax
  cltq
  movzbl -0x1d(%rbp,%rax,1),%eax
  movzbl %al,%ecx
  mov    -0x48(%rbp),%rax
  mov    $0x80,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <qr_diran@plt>
  addl   $0x1,-0x40(%rbp)
L193:
  mov    -0x40(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L206
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L336
  call   <__stack_chk_fail@plt>
L336:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D6
data_type: string
name: extract_symbolic_data
arguments: data_label: D40
data_type: string
name: extract_symbolic_data
arguments: data_label: D30
data_type: string
name: extract_symbolic_data
arguments: data_label: D61
data_type: string
name: extract_symbolic_data
arguments: data_label: D25
data_type: string

tool: D6: 0

tool: D40: 0000000

tool: D30: 00010001

tool: D61: 11101100

tool: D25: 0000

assistant: ```c
void micro_qr_m3(char binary_data[], int ecc_mode) {
  int i, j, latch;
  int bits_total, bits_left, remainder;
  int data_codewords, ecc_codewords;
  unsigned char data_blocks[12], ecc_blocks[9];
  latch = 0;
  if (ecc_mode == 1) {
    bits_total = 84;
  }
  if (ecc_mode == 2) {
    bits_total = 68;
  }
  bits_left = bits_total - strlen(binary_data);
  if (bits_left <= 7) {
    for (i = 0; i < bits_left; i++) {
      strcat(binary_data, "0");
    }
    latch = 1;
  } else {
    strcat(binary_data, "0000000");
  }
  if (latch == 0) {
    bits_left = bits_total - strlen(binary_data);
    if (bits_left <= 4) {
      for (i = 0; i < bits_left; i++) {
        strcat(binary_data, "0");
      }
      latch = 1;
    }
  }
  if (latch == 0) {
    remainder = 8 - (strlen(binary_data) % 8);
    if (remainder == 8) {
      remainder = 0;
    }
    for (i = 0; i < remainder; i++) {
      strcat(binary_data, "0");
    }
    bits_left = bits_total - strlen(binary_data);
    if (bits_left > 4) {
      remainder = (bits_left - 4) / 8;
      for (i = 0; i < remainder; i++) {
        strcat(binary_data, i & 1 ? "00010001" : "11101100");
      }
    }
    strcat(binary_data, "0000");
  }
  if (ecc_mode == 1) {
    data_codewords = 11;
    ecc_codewords = 6;
  }
  if (ecc_mode == 2) {
    data_codewords = 9;
    ecc_codewords = 8;
  }
  for (i = 0; i < (data_codewords - 1); i++) {
    data_blocks[i] = 0;
    for (j = 0; j < 8; j++) {
      if (binary_data[(i * 8) + j] == '1') {
        data_blocks[i] += 0x80 >> j;
      }
    }
  }
  if (ecc_mode == 1) {
    data_blocks[10] = 0;
    for (j = 0; j < 4; j++) {
      if (binary_data[80 + j] == '1') {
        data_blocks[10] += 0x80 >> j;
      }
    }
  }
  if (ecc_mode == 2) {
    data_blocks[8] = 0;
    for (j = 0; j < 4; j++) {
      if (binary_data[64 + j] == '1') {
        data_blocks[8] += 0x80 >> j;
      }
    }
  }
  rs_init_gf(0x11d);
  rs_init_code(ecc_codewords, 0);
  rs_encode(data_codewords, data_blocks, ecc_blocks);
  rs_free();
  for (i = 0; i < ecc_codewords; i++) {
    qr_diran(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80);
  }
  return;
}
```