user: 请将以下的汇编代码转换成C语言代码:

```asm
<micro_qr_m2>:
  endbr64
  push   %r15
  xor    %r15d,%r15d
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%esi
  setne  %r15b
  call   <strlen@plt>
  lea    0x20(,%r15,8),%r15d
  mov    %r15d,%r14d
  sub    %eax,%r14d
  cmp    $0x5,%r14d
  jg     L205
  xor    %ebp,%ebp
  lea    D23(%rip),%r12
  test   %r14d,%r14d
  jle    L166
  nopl   (%rax)
L41:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  add    $0x1,%ebp
  call   <concat@plt>
  cmp    %ebp,%r14d
  jne    L41
L166:
  xor    %r14d,%r14d
  cmp    $0x2,%r13d
  lea    0xb(%rsp),%r12
  sete   %r14b
  xor    %ebp,%ebp
  add    $0x5,%r14d
  cmp    $0x2,%r13d
  setne  %bpl
  xor    %esi,%esi
  add    $0x4,%ebp
  cmp    $0x8,%ebp
  jb     L53
  movq   $0x0,0xb(%rsp)
  mov    %ebp,%eax
  lea    0x10(%rsp),%rdi
  movq   $0x0,-0x8(%r12,%rax,1)
  mov    %r12,%rax
  sub    %rdi,%rax
  add    %ebp,%eax
  and    $0xfffffff8,%eax
  cmp    $0x8,%eax
  jb     L14
  and    $0xfffffff8,%eax
  mov    %eax,%edx
  xor    %eax,%eax
L114:
  mov    %eax,%ecx
  add    $0x8,%eax
  mov    %rsi,(%rdi,%rcx,1)
  cmp    %edx,%eax
  jb     L114
L14:
  lea    -0x1(%rbp),%ecx
  mov    %rbx,%rax
  mov    %r12,%rdx
  lea    0x8(%rbx,%rcx,8),%rsi
  nopw   0x0(%rax,%rax,1)
L159:
  cmpb   $0x31,(%rax)
  sete   %cl
  shl    $0x7,%ecx
  cmpb   $0x31,0x1(%rax)
  mov    %cl,(%rdx)
  jne    L148
  add    $0x40,%ecx
  mov    %cl,(%rdx)
L148:
  cmpb   $0x31,0x2(%rax)
  jne    L182
  addb   $0x20,(%rdx)
L182:
  cmpb   $0x31,0x3(%rax)
  jne    L18
  addb   $0x10,(%rdx)
L18:
  cmpb   $0x31,0x4(%rax)
  jne    L243
  addb   $0x8,(%rdx)
L243:
  cmpb   $0x31,0x5(%rax)
  jne    L178
  addb   $0x4,(%rdx)
L178:
  cmpb   $0x31,0x6(%rax)
  jne    L40
  addb   $0x2,(%rdx)
L40:
  cmpb   $0x31,0x7(%rax)
  jne    L215
  addb   $0x1,(%rdx)
L215:
  add    $0x8,%rax
  add    $0x1,%rdx
  cmp    %rsi,%rax
  jne    L159
  mov    $0x11d,%edi
  lea    0x11(%rsp),%r13
  call   <rs_init_gf@plt>
  xor    %esi,%esi
  mov    %r14d,%edi
  call   <rs_init_code@plt>
  mov    %r12,%rsi
  mov    %ebp,%edi
  mov    %r13,%rdx
  call   <rs_encode@plt>
  xor    %eax,%eax
  call   <rs_free@plt>
  movslq %r14d,%rax
  lea    0xf(%rsp,%rax,1),%r12
  lea    -0x1(%r13,%rax,1),%rbp
  lea    -0x1(%r14),%eax
  sub    %rax,%r12
  nopw   0x0(%rax,%rax,1)
L176:
  movzbl 0x0(%rbp),%esi
  mov    $0x80,%edx
  mov    %rbx,%rdi
  sub    $0x1,%rbp
  call   <qr_diran@plt>
  cmp    %rbp,%r12
  jne    L176
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L105
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L53:
  test   $0x4,%bpl
  jne    L136
  test   %ebp,%ebp
  je     L14
  movb   $0x0,0xb(%rsp)
  test   $0x2,%bpl
  je     L14
  mov    %ebp,%eax
  xor    %edx,%edx
  mov    %dx,-0x2(%r12,%rax,1)
  jmp    L14
L205:
  lea    D4(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%ebp
  call   <concat@plt>
  mov    %rbx,%rdi
  lea    D23(%rip),%r12
  call   <strlen@plt>
  cltd
  shr    $0x1d,%edx
  add    %edx,%eax
  and    $0x7,%eax
  sub    %eax,%edx
  lea    0x8(%rdx),%r14d
  je     L81
  nopl   0x0(%rax)
L56:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  add    $0x1,%ebp
  call   <concat@plt>
  cmp    %ebp,%r14d
  jne    L56
L81:
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    D37(%rip),%rsi
  mov    %eax,%r8d
  mov    %r15d,%eax
  lea    D8(%rip),%r15
  mov    %rsi,%r14
  sub    %r8d,%eax
  lea    0x7(%rax),%r12d
  cmovns %eax,%r12d
  xor    %ebp,%ebp
  sar    $0x3,%r12d
  cmp    $0x7,%eax
  jg     L198
  jmp    L166
  nopl   (%rax)
L202:
  test   $0x1,%bpl
  mov    %r14,%rsi
  cmovne %r15,%rsi
L198:
  mov    %rbx,%rdi
  add    $0x1,%ebp
  call   <concat@plt>
  cmp    %ebp,%r12d
  jg     L202
  jmp    L166
L136:
  mov    %ebp,%eax
  movl   $0x0,0xb(%rsp)
  movl   $0x0,-0x4(%r12,%rax,1)
  jmp    L14
L105:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D23
type_infered: string
name: unpack_data
arguments: label: D4
type_infered: string
name: unpack_data
arguments: label: D37
type_infered: string
name: unpack_data
arguments: label: D8
type_infered: string

tool: D23: 0

tool: D4: 00000

tool: D37: 11101100

tool: D8: 00010001

assistant: ```c
void micro_qr_m2(char binary_data[], int ecc_mode) {
  int i, latch;
  int bits_total, bits_left, remainder;
  int data_codewords, ecc_codewords;
  unsigned char data_blocks[6], ecc_blocks[7];
  latch = 0;
  if (ecc_mode == 1) {
    bits_total = 40;
  }
  if (ecc_mode == 2) {
    bits_total = 32;
  }
  bits_left = bits_total - strlen(binary_data);
  if (bits_left <= 5) {
    for (i = 0; i < bits_left; i++) {
      concat(binary_data, "0");
    }
    latch = 1;
  } else {
    concat(binary_data, "00000");
  }
  if (latch == 0) {
    remainder = 8 - (strlen(binary_data) % 8);
    if (remainder == 8) {
      remainder = 0;
    }
    for (i = 0; i < remainder; i++) {
      concat(binary_data, "0");
    }
    bits_left = bits_total - strlen(binary_data);
    remainder = bits_left / 8;
    for (i = 0; i < remainder; i++) {
      concat(binary_data, i & 1 ? "00010001" : "11101100");
    }
  }
  if (ecc_mode == 1) {
    data_codewords = 5;
    ecc_codewords = 5;
  }
  if (ecc_mode == 2) {
    data_codewords = 4;
    ecc_codewords = 6;
  }
  for (i = 0; i < data_codewords; i++) {
    data_blocks[i] = 0;
    if (binary_data[i * 8] == '1') {
      data_blocks[i] += 0x80;
    }
    if (binary_data[(i * 8) + 1] == '1') {
      data_blocks[i] += 0x40;
    }
    if (binary_data[(i * 8) + 2] == '1') {
      data_blocks[i] += 0x20;
    }
    if (binary_data[(i * 8) + 3] == '1') {
      data_blocks[i] += 0x10;
    }
    if (binary_data[(i * 8) + 4] == '1') {
      data_blocks[i] += 0x08;
    }
    if (binary_data[(i * 8) + 5] == '1') {
      data_blocks[i] += 0x04;
    }
    if (binary_data[(i * 8) + 6] == '1') {
      data_blocks[i] += 0x02;
    }
    if (binary_data[(i * 8) + 7] == '1') {
      data_blocks[i] += 0x01;
    }
  }
  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;
}
```