user: Demonstrate the C code that generates the assembly output below:

```asm
<BLZ_Code>:
  endbr64
  push   %r15
  lea    0xe(%rsi),%eax
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x48,%rsp
  mov    %rdx,0x38(%rsp)
  mov    %esi,%edx
  add    $0x7,%edx
  mov    %esi,0x28(%rsp)
  cmovns %edx,%eax
  mov    %ecx,0x24(%rsp)
  sar    $0x3,%eax
  lea    0xb(%rsi,%rax,1),%edi
  mov    $0x1,%esi
  call   <Memory@plt>
  mov    %ebx,%esi
  movslq %ebx,%rbx
  mov    %r14,%rdi
  lea    (%r14,%rbx,1),%rbp
  mov    %rax,%r15
  call   <BLZ_Invert@plt>
  mov    %rbx,0x10(%rsp)
  cmp    %rbp,%r14
  jae    L583
  mov    %ebx,0x20(%rsp)
  mov    %r14,%rcx
  mov    %r15,%rax
  xor    %r12d,%r12d
  movl   $0x0,0xc(%rsp)
  mov    %r15,0x18(%rsp)
  nopl   0x0(%rax)
L532:
  shr    %r12b
  je     L110
  mov    (%rsp),%rbx
  movzbl (%rbx),%ebx
  add    %ebx,%ebx
  mov    %bl,0xb(%rsp)
  mov    %rax,%rbx
L326:
  mov    %rcx,%rax
  mov    $0x1002,%edx
  sub    %r14,%rax
  cmp    %rdx,%rax
  cmovg  %rdx,%rax
  mov    %eax,%r10d
  cmp    $0x2,%eax
  jbe    L488
  mov    $0x2,%esi
  mov    $0x3,%edx
  nopl   0x0(%rax)
L426:
  mov    %edx,%edi
  mov    %rcx,%r9
  xor    %eax,%eax
  sub    %rdi,%r9
  nopw   0x0(%rax,%rax,1)
L148:
  lea    (%rcx,%rax,1),%rdi
  mov    %eax,%r8d
  cmp    %rdi,%rbp
  je     L7
  cmp    %eax,%edx
  jbe    L7
  movzbl (%r9,%rax,1),%edi
  cmp    %dil,(%rcx,%rax,1)
  jne    L7
  add    $0x1,%rax
  cmp    $0x12,%rax
  jne    L148
  cmp    $0x11,%esi
  ja     L538
  mov    0x24(%rsp),%esi
  test   %esi,%esi
  jne    L350
  add    $0x12,%rcx
  mov    %edx,%r13d
  mov    $0xfffffff0,%eax
L674:
  movzbl 0xb(%rsp),%edx
  mov    (%rsp),%rsi
  mov    %rcx,%r15
  sub    %r14,%r15
  or     $0x1,%edx
  mov    %dl,(%rsi)
  lea    -0x3(%r13),%edx
  shr    $0x8,%edx
  or     %edx,%eax
  mov    %al,(%rbx)
  lea    -0x3(%r13),%eax
  mov    %al,0x1(%rbx)
  lea    0x2(%rbx),%rax
L649:
  mov    0x10(%rsp),%rsi
  mov    %rax,%rbx
  sub    0x18(%rsp),%rbx
  mov    0x20(%rsp),%edi
  lea    (%rbx,%rsi,1),%rdx
  mov    0xc(%rsp),%esi
  sub    %r15,%rdx
  add    %edi,%esi
  mov    %esi,%esi
  cmp    %rsi,%rdx
  jge    L602
  mov    0x28(%rsp),%esi
  mov    %ebx,0xc(%rsp)
  sub    %r15d,%esi
  mov    %esi,0x20(%rsp)
L602:
  cmp    %rbp,%rcx
  jb     L532
  mov    0x18(%rsp),%r15
  cmp    $0x1,%r12b
  je     L226
  mov    (%rsp),%rax
  movzbl (%rax),%eax
  nopl   0x0(%rax,%rax,1)
L105:
  shr    %r12b
  add    %eax,%eax
  cmp    $0x1,%r12b
  jne    L105
  mov    (%rsp),%rsi
  mov    %al,(%rsi)
L226:
  mov    0x28(%rsp),%r12d
  mov    %r14,%rdi
  mov    %ebx,%ebp
  mov    %r12d,%esi
  call   <BLZ_Invert@plt>
  mov    %ebx,%esi
  mov    %r15,%rdi
  call   <BLZ_Invert@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  je     L479
  add    0x20(%rsp),%eax
  lea    0x4(%r12),%edx
  mov    %eax,%r13d
  lea    0x3(%rax),%eax
  and    $0xfffffffc,%eax
  add    $0x8,%eax
  cmp    %eax,%edx
  jae    L278
L479:
  mov    0x10(%rsp),%rcx
  mov    %r14,%rdx
  mov    %r15,%rax
  sub    %r15,%rdx
  add    %r15,%rcx
L172:
  movzbl (%rax,%rdx,1),%esi
  add    $0x1,%rax
  mov    %sil,-0x1(%rax)
  cmp    %rcx,%rax
  jne    L172
  testb  $0x3,0x28(%rsp)
  je     L173
L478:
  movb   $0x0,(%rax)
  add    $0x1,%rax
  mov    %rax,%rdx
  sub    %r15,%rdx
  and    $0x3,%edx
  jne    L478
L173:
  movl   $0x0,(%rax)
  add    $0x4,%rax
L261:
  mov    0x38(%rsp),%rbx
  sub    %r15,%rax
  mov    %eax,(%rbx)
  add    $0x48,%rsp
  mov    %r15,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L7:
  cmp    %esi,%r8d
  jbe    L538
  mov    %edx,%r13d
  mov    %r8d,%esi
L538:
  add    $0x1,%edx
  cmp    %edx,%r10d
  jae    L426
  mov    0x24(%rsp),%edi
  test   %edi,%edi
  je     L100
  mov    %esi,%eax
  mov    %r13d,%edx
  cmp    $0x2,%esi
  jne    L211
L347:
  mov    (%rsp),%rax
  movzbl 0xb(%rsp),%esi
  lea    0x1(%rcx),%rdi
  mov    %rdi,%r15
  mov    %sil,(%rax)
  sub    %r14,%r15
L61:
  movzbl (%rcx),%eax
  mov    %rdi,%rcx
  mov    %al,(%rbx)
  lea    0x1(%rbx),%rax
  jmp    L649
L110:
  movb   $0x0,(%rax)
  lea    0x1(%rax),%rbx
  mov    $0xffffff80,%r12d
  movb   $0x0,0xb(%rsp)
  mov    %rax,(%rsp)
  jmp    L326
L100:
  mov    (%rsp),%rax
  movzbl 0xb(%rsp),%edx
  lea    0x1(%rcx),%rdi
  mov    %rdi,%r15
  mov    %dl,(%rax)
  sub    %r14,%r15
  cmp    $0x2,%esi
  je     L61
  lea    -0x3(%rsi),%eax
  add    %rsi,%rcx
  shl    $0x4,%eax
  jmp    L674
L350:
  mov    $0x12,%esi
L211:
  add    %rax,%rcx
  cmp    %rbp,%rcx
  jb     L571
L69:
  lea    -0x3(%rsi),%eax
  mov    %edx,%r13d
  shl    $0x4,%eax
  jmp    L674
L571:
  mov    %rcx,%rdi
  mov    $0x1002,%r8d
  sub    %r14,%rdi
  cmp    %r8,%rdi
  cmovg  %r8,%rdi
  mov    %edi,%r13d
  cmp    $0x2,%edi
  jbe    L129
  mov    $0x2,%r15d
  mov    $0x3,%r9d
L589:
  mov    %r9d,%r8d
  mov    %rcx,%r11
  xor    %edi,%edi
  sub    %r8,%r11
  nopl   0x0(%rax)
L230:
  lea    (%rcx,%rdi,1),%r8
  mov    %edi,%r10d
  cmp    %r8,%rbp
  je     L537
  cmp    %edi,%r9d
  jbe    L537
  movzbl (%r11,%rdi,1),%r8d
  cmp    %r8b,(%rcx,%rdi,1)
  jne    L537
  add    $0x1,%rdi
  cmp    $0x12,%rdi
  jne    L230
  cmp    $0x11,%r15d
  jbe    L169
L455:
  add    $0x1,%r9d
  cmp    %r9d,%r13d
  jae    L589
  lea    -0x1(%rsi),%r8d
  mov    %r15d,0x2c(%rsp)
  sub    %r8,%rcx
  mov    %rcx,%r15
  mov    %rcx,%rdi
  mov    $0x1002,%ecx
  sub    %r14,%r15
  cmp    %rcx,%r15
  cmovle %r15,%rcx
  mov    %ecx,%r11d
  cmp    $0x2,%ecx
  jbe    L217
L90:
  mov    %rax,0x30(%rsp)
  mov    $0x2,%r13d
  mov    $0x3,%r9d
  mov    %r11d,%eax
L486:
  mov    %r9d,%r8d
  mov    %rdi,%r11
  xor    %ecx,%ecx
  sub    %r8,%r11
  nopl   0x0(%rax)
L242:
  lea    (%rdi,%rcx,1),%r8
  mov    %ecx,%r10d
  cmp    %r8,%rbp
  je     L548
  cmp    %ecx,%r9d
  jbe    L548
  movzbl (%r11,%rcx,1),%r8d
  cmp    %r8b,(%rdi,%rcx,1)
  jne    L548
  add    $0x1,%rcx
  cmp    $0x12,%rcx
  jne    L242
  cmp    $0x11,%r13d
  jbe    L394
L133:
  add    $0x1,%r9d
  cmp    %r9d,%eax
  jae    L486
  cmpl   $0x2,0x2c(%rsp)
  mov    0x30(%rsp),%rax
  lea    -0x1(%rdi),%rcx
  je     L293
  cmp    $0x2,%r13d
  jne    L640
L168:
  mov    0x2c(%rsp),%r8d
  add    %esi,%r8d
  cmp    %r13d,%r8d
  ja     L329
  mov    (%rsp),%rax
  movzbl 0xb(%rsp),%esi
  mov    %edx,%r13d
  mov    %sil,(%rax)
  jmp    L61
  nopl   0x0(%rax)
L537:
  cmp    %r10d,%r15d
  cmovb  %r10d,%r15d
  jmp    L455
L548:
  cmp    %r10d,%r13d
  cmovb  %r10d,%r13d
  jmp    L133
L488:
  mov    0x24(%rsp),%r8d
  test   %r8d,%r8d
  jne    L347
  mov    (%rsp),%rax
  movzbl 0xb(%rsp),%esi
  lea    0x1(%rcx),%rdi
  mov    %rdi,%r15
  mov    %sil,(%rax)
  sub    %r14,%r15
  jmp    L61
L293:
  cmp    $0x2,%r13d
  jne    L27
L329:
  add    %rax,%rcx
  jmp    L69
L278:
  mov    $0x1,%esi
  lea    0xb(%r13),%edi
  call   <Memory@plt>
  mov    0x20(%rsp),%esi
  mov    %r14,%rdx
  mov    %rax,%r12
  sub    %rax,%rdx
  lea    (%rax,%rsi,1),%rcx
  test   %esi,%esi
  je     L116
L241:
  movzbl (%rdx,%rax,1),%edi
  add    $0x1,%rax
  mov    %dil,-0x1(%rax)
  cmp    %rax,%rcx
  jne    L241
L116:
  mov    0xc(%rsp),%eax
  sub    %eax,%ebx
  sub    %ebp,%eax
  add    0x20(%rsp),%eax
L579:
  mov    %ebx,%edx
  movzbl (%r15,%rdx,1),%ecx
  lea    (%rax,%rbx,1),%edx
  add    $0x1,%ebx
  mov    %cl,(%r12,%rdx,1)
  cmp    %ebx,%ebp
  jne    L579
  mov    %r15,%rdi
  mov    %rsi,(%rsp)
  call   <free@plt>
  mov    0xc(%rsp),%eax
  mov    (%rsp),%rsi
  lea    (%rsi,%rax,1),%r14
  mov    0x28(%rsp),%esi
  lea    (%r12,%r14,1),%rax
  sub    %r13d,%esi
  and    $0x3,%r14d
  je     L30
  mov    $0x8,%edx
  sub    %eax,%edx
L60:
  movb   $0xff,(%rax)
  add    $0x1,%rax
  mov    %rax,%rdi
  lea    (%rdx,%rax,1),%ecx
  sub    %r12,%rdi
  and    $0x3,%edi
  jne    L60
  mov    %ecx,%edi
L533:
  mov    0xc(%rsp),%edx
  sub    %ecx,%esi
  add    $0x8,%rax
  mov    %r12,%r15
  mov    %esi,-0x4(%rax)
  add    %ecx,%edx
  mov    %edx,-0x8(%rax)
  mov    %dil,-0x5(%rax)
  jmp    L261
L394:
  cmpl   $0x2,0x2c(%rsp)
  mov    0x30(%rsp),%rax
  lea    -0x1(%rdi),%rcx
  mov    $0x12,%r13d
  jne    L640
L27:
  movl   $0x1,0x2c(%rsp)
L640:
  add    $0x1,%r13d
  jmp    L168
L169:
  lea    -0x1(%rsi),%r8d
  movl   $0x12,0x2c(%rsp)
  sub    %r8,%rcx
  mov    %rcx,%r15
  mov    %rcx,%rdi
  mov    $0x1002,%ecx
  sub    %r14,%r15
  cmp    %rcx,%r15
  cmovle %r15,%rcx
  mov    %ecx,%r11d
  cmp    $0x2,%ecx
  ja     L90
  lea    -0x1(%rdi),%rcx
  jmp    L264
  nopl   0x0(%rax,%rax,1)
L583:
  mov    0x28(%rsp),%esi
  mov    %r14,%rdi
  call   <BLZ_Invert@plt>
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <BLZ_Invert@plt>
  mov    %r15,%rax
  jmp    L173
L30:
  mov    $0x8,%edi
  mov    $0x8,%ecx
  jmp    L533
L129:
  lea    -0x1(%rsi),%r8d
  movl   $0x2,0x2c(%rsp)
  sub    %r8,%rcx
  mov    %rcx,%r15
  mov    %rcx,%rdi
  mov    $0x1002,%ecx
  sub    %r14,%r15
  cmp    %rcx,%r15
  cmovle %r15,%rcx
  mov    %ecx,%r11d
  cmp    $0x2,%ecx
  ja     L90
  lea    -0x1(%rdi),%rcx
  jmp    L329
  xchg   %ax,%ax
L217:
  cmpl   $0x2,0x2c(%rsp)
  lea    -0x1(%rdi),%rcx
  je     L329
L264:
  mov    $0x2,%r13d
  jmp    L168
```

assistant: ```c
char *BLZ_Code(unsigned char *raw_buffer, int raw_len, int *new_len, int best) {
  unsigned char *pak_buffer, *pak, *raw, *raw_end, *flg, *tmp;
  unsigned int pak_len, inc_len, hdr_len, enc_len, len, pos, max;
  unsigned int len_best, pos_best, len_next, pos_next, len_post, pos_post;
  unsigned int pak_tmp, raw_tmp;
  unsigned char mask;
  pak_tmp = 0;
  raw_tmp = raw_len;
  pak_len = raw_len + ((raw_len + 7) / 8) + 11;
  pak_buffer = (unsigned char *)Memory(pak_len, sizeof(char));
  BLZ_Invert(raw_buffer, raw_len);
  pak = pak_buffer;
  raw = raw_buffer;
  raw_end = raw_buffer + raw_len;
  mask = 0;
  while (raw < raw_end) {
    if (!(mask >>= 1)) {
      *(flg = pak) = 0;
      pak++;
      mask = 0x80;
    }
    {
      len_best = 2;
      max = raw - raw_buffer >= 0x1002 ? 0x1002 : raw - raw_buffer;
      for (pos = 3; pos <= max; pos++) {
        for (len = 0; len < 0x12; len++) {
          if (raw + len == raw_end)
            break;
          if (len >= pos)
            break;
          if (*(raw + len) != *(raw + len - pos))
            break;
        }
        if (len > len_best) {
          pos_best = pos;
          if ((len_best = len) == 0x12)
            break;
        }
      }
    };
    if (best) {
      if (len_best > 2) {
        if (raw + len_best < raw_end) {
          raw += len_best;
          {
            len_next = 2;
            max = raw - raw_buffer >= 0x1002 ? 0x1002 : raw - raw_buffer;
            for (pos = 3; pos <= max; pos++) {
              for (len = 0; len < 0x12; len++) {
                if (raw + len == raw_end)
                  break;
                if (len >= pos)
                  break;
                if (*(raw + len) != *(raw + len - pos))
                  break;
              }
              if (len > len_next) {
                pos_next = pos;
                if ((len_next = len) == 0x12)
                  break;
              }
            }
          };
          raw -= len_best - 1;
          {
            len_post = 2;
            max = raw - raw_buffer >= 0x1002 ? 0x1002 : raw - raw_buffer;
            for (pos = 3; pos <= max; pos++) {
              for (len = 0; len < 0x12; len++) {
                if (raw + len == raw_end)
                  break;
                if (len >= pos)
                  break;
                if (*(raw + len) != *(raw + len - pos))
                  break;
              }
              if (len > len_post) {
                pos_post = pos;
                if ((len_post = len) == 0x12)
                  break;
              }
            }
          };
          raw--;
          if (len_next <= 2)
            len_next = 1;
          if (len_post <= 2)
            len_post = 1;
          if (len_best + len_next <= 1 + len_post)
            len_best = 1;
        }
      }
    }
    *flg <<= 1;
    if (len_best > 2) {
      raw += len_best;
      *flg |= 1;
      *pak = ((len_best - (2 + 1)) << 4) | ((pos_best - 3) >> 8);
      pak++;
      *pak = (pos_best - 3) & 0xFF;
      pak++;
    } else {
      *pak = *raw;
      pak++;
      raw++;
    }
    if (pak - pak_buffer + raw_len - (raw - raw_buffer) < pak_tmp + raw_tmp) {
      pak_tmp = pak - pak_buffer;
      raw_tmp = raw_len - (raw - raw_buffer);
    }
  }
  while (mask && (mask != 1)) {
    mask >>= 1;
    *flg <<= 1;
  }
  pak_len = pak - pak_buffer;
  BLZ_Invert(raw_buffer, raw_len);
  BLZ_Invert(pak_buffer, pak_len);
  if (!pak_tmp || (raw_len + 4 < ((pak_tmp + raw_tmp + 3) & -4) + 8)) {
    pak = pak_buffer;
    raw = raw_buffer;
    raw_end = raw_buffer + raw_len;
    while (raw < raw_end) {
      *pak = *raw;
      pak++;
      raw++;
    }
    while ((pak - pak_buffer) & 3) {
      *pak = 0;
      pak++;
    }
    *(unsigned int *)pak = 0;
    pak += 4;
  } else {
    tmp = (unsigned char *)Memory(raw_tmp + pak_tmp + 11, sizeof(char));
    for (len = 0; len < raw_tmp; len++)
      tmp[len] = raw_buffer[len];
    for (len = 0; len < pak_tmp; len++)
      tmp[raw_tmp + len] = pak_buffer[len + pak_len - pak_tmp];
    pak = pak_buffer;
    pak_buffer = tmp;
    free(pak);
    pak = pak_buffer + raw_tmp + pak_tmp;
    enc_len = pak_tmp;
    hdr_len = 8;
    inc_len = raw_len - pak_tmp - raw_tmp;
    while ((pak - pak_buffer) & 3) {
      *pak = 0xFF;
      pak++;
      hdr_len++;
    }
    *(unsigned int *)pak = enc_len + hdr_len;
    pak += 3;
    *pak = hdr_len;
    pak++;
    *(unsigned int *)pak = inc_len - hdr_len;
    pak += 4;
  }
  *new_len = pak - pak_buffer;
  return (pak_buffer);
}
```