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

```asm
<img_rle_compact>:
  endbr64
  push   %r15
  mov    %rdx,%r10
  mov    %ecx,%edx
  mov    %rdi,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x1,%esi
  sete   %cl
  cmp    $0x1,%edx
  sete   %dil
  test   %cl,%cl
  je     L495
  test   %dil,%dil
  je     L495
  movslq %r8d,%r8
  mov    %r10,%rdx
  lea    (%rax,%r8,1),%r11
L979:
  cmp    %r11,%rax
  jae    L918
  nopl   0x0(%rax,%rax,1)
L1397:
  lea    0x2(%rax),%rcx
  mov    %rax,%r12
  mov    %rcx,%rbx
  cmp    %rcx,%r11
  ja     L487
  jmp    L1368
  nopl   0x0(%rax)
L179:
  lea    0x1(%rcx),%rbx
  cmp    %rbx,%r11
  je     L812
  mov    %rbx,%rcx
L487:
  movzbl -0x1(%rcx),%esi
  cmp    %sil,-0x2(%rcx)
  jne    L179
  cmp    (%rcx),%sil
  jne    L179
  lea    -0x2(%rcx),%r12
  mov    %rcx,%rbx
  mov    %r12d,%r9d
  sub    %eax,%r9d
  nopl   0x0(%rax)
L1329:
  test   %r9d,%r9d
  je     L1368
L44:
  mov    $0x7e,%esi
  lea    0x1(%rdx),%rbp
  cmp    %esi,%r9d
  cmovle %r9d,%esi
  movzwl %si,%ecx
  lea    -0x1(%rsi),%r13d
  sub    %ecx,%r9d
  mov    %esi,%ecx
  or     $0xffffff80,%ecx
  mov    %cl,(%rdx)
  test   %si,%si
  je     L1007
  mov    %rdx,%rcx
  sub    %rax,%rcx
  cmp    $0xe,%rcx
  jbe    L147
  cmp    $0x6,%r13w
  jbe    L147
  cmp    $0xe,%r13w
  jbe    L221
  lea    -0x10(%rsi),%r8d
  xor    %ecx,%ecx
  xor    %edi,%edi
  shr    $0x4,%r8w
  add    $0x1,%r8d
  nopw   0x0(%rax,%rax,1)
L1097:
  movdqu (%rax,%rcx,1),%xmm3
  add    $0x1,%edi
  movups %xmm3,0x1(%rdx,%rcx,1)
  add    $0x10,%rcx
  cmp    %di,%r8w
  ja     L1097
  shl    $0x4,%r8d
  movzwl %r8w,%r15d
  sub    %r8d,%r13d
  lea    (%rax,%r15,1),%rdi
  lea    0x0(%rbp,%r15,1),%rcx
  cmp    %r8w,%si
  je     L969
  mov    %esi,%r14d
  sub    %r8d,%r14d
  lea    -0x1(%r14),%r8d
  cmp    $0x6,%r8w
  jbe    L999
L992:
  mov    (%rax,%r15,1),%r8
  mov    %r8,0x1(%rdx,%r15,1)
  mov    %r14d,%edx
  mov    %r14,%r8
  and    $0xfff8,%r8d
  and    $0xfffffff8,%edx
  add    %r8,%rdi
  add    %r8,%rcx
  sub    %edx,%r13d
  cmp    %dx,%r14w
  je     L969
L999:
  movzbl (%rdi),%edx
  mov    %dl,(%rcx)
  test   %r13w,%r13w
  je     L969
  movzbl 0x1(%rdi),%edx
  mov    %dl,0x1(%rcx)
  cmp    $0x1,%r13w
  je     L969
  movzbl 0x2(%rdi),%edx
  mov    %dl,0x2(%rcx)
  cmp    $0x2,%r13w
  je     L969
  movzbl 0x3(%rdi),%edx
  mov    %dl,0x3(%rcx)
  cmp    $0x3,%r13w
  je     L969
  movzbl 0x4(%rdi),%edx
  mov    %dl,0x4(%rcx)
  cmp    $0x4,%r13w
  je     L969
  movzbl 0x5(%rdi),%edx
  mov    %dl,0x5(%rcx)
  cmp    $0x5,%r13w
  je     L969
  movzbl 0x6(%rdi),%edx
  mov    %dl,0x6(%rcx)
L969:
  movzwl %si,%esi
L1223:
  add    %rsi,%rax
  lea    0x0(%rbp,%rsi,1),%rdx
  test   %r9d,%r9d
  jne    L44
L1368:
  lea    -0x1(%rbx),%rax
  movzbl -0x2(%rbx),%r8d
  cmp    %rax,%r11
  ja     L1182
  jmp    L1009
  nopl   (%rax)
L363:
  add    $0x1,%rax
  cmp    %rax,%r11
  jbe    L1009
L1182:
  cmp    (%rax),%r8b
  je     L363
  mov    %rax,%rcx
  sub    %r12,%rcx
  mov    %ecx,%esi
  test   %ecx,%ecx
  je     L979
  nopw   0x0(%rax,%rax,1)
L321:
  mov    $0x7e,%ecx
  cmp    %ecx,%esi
  cmovle %esi,%ecx
  add    $0x2,%rdx
  mov    %cl,-0x2(%rdx)
  movzwl %cx,%edi
  mov    %r8b,-0x1(%rdx)
  sub    %edi,%esi
  jne    L321
  cmp    %r11,%rax
  jb     L1397
L918:
  movb   $0x0,(%rdx)
  lea    0x1(%rdx),%rax
  sub    %r10d,%eax
L1354:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L495:
  cmp    $0x2,%edx
  sete   %r9b
  test   %cl,%cl
  je     L811
  test   %r9b,%r9b
  je     L811
  movslq %r8d,%r8
  mov    %r10,%rdx
  lea    (%rax,%r8,1),%r13
  cmp    %r13,%rax
  jae    L477
  pxor   %xmm1,%xmm1
L1508:
  lea    0x2(%rax),%rcx
  mov    %rax,%r14
  mov    %rcx,%rbp
  cmp    %rcx,%r13
  ja     L864
  jmp    L411
  nopl   0x0(%rax)
L1074:
  lea    0x1(%rcx),%rbp
  cmp    %rbp,%r13
  je     L694
  mov    %rbp,%rcx
L864:
  movzbl -0x1(%rcx),%esi
  cmp    %sil,-0x2(%rcx)
  jne    L1074
  cmp    (%rcx),%sil
  jne    L1074
  lea    -0x2(%rcx),%r14
  mov    %rcx,%rbp
  mov    %r14d,%ebx
  sub    %eax,%ebx
  nopl   0x0(%rax,%rax,1)
L60:
  test   %ebx,%ebx
  je     L411
L63:
  mov    $0x7e,%r8d
  lea    0x2(%rdx),%r12
  cmp    %r8d,%ebx
  cmovle %ebx,%r8d
  movzwl %r8w,%ecx
  lea    -0x1(%r8),%r9d
  sub    %ecx,%ebx
  mov    %r8d,%ecx
  or     $0x80,%cl
  mov    %cx,(%rdx)
  test   %r8w,%r8w
  je     L1457
  movzwl %r8w,%r11d
  lea    0x2(%rdx,%r11,2),%rcx
  lea    (%rax,%r11,1),%rsi
  cmp    %rcx,%rax
  setae  %cl
  cmp    %rsi,%r12
  setae  %sil
  or     %sil,%cl
  je     L223
  cmp    $0xe,%r9w
  jbe    L223
  lea    -0x10(%r8),%edi
  xor    %ecx,%ecx
  xor    %esi,%esi
  shr    $0x4,%di
  add    $0x1,%edi
  nopl   0x0(%rax,%rax,1)
L693:
  movdqu (%rax,%rcx,1),%xmm0
  add    $0x1,%esi
  movdqa %xmm0,%xmm2
  punpckhbw %xmm1,%xmm0
  punpcklbw %xmm1,%xmm2
  movups %xmm0,0x12(%rdx,%rcx,2)
  movups %xmm2,0x2(%rdx,%rcx,2)
  add    $0x10,%rcx
  cmp    %si,%di
  ja     L693
  shl    $0x4,%edi
  movzwl %di,%edx
  sub    %edi,%r9d
  lea    (%rax,%rdx,1),%rcx
  lea    (%r12,%rdx,2),%rdx
  cmp    %di,%r8w
  je     L424
  movzbl (%rcx),%esi
  mov    %si,(%rdx)
  test   %r9w,%r9w
  je     L424
  movzbl 0x1(%rcx),%esi
  mov    %si,0x2(%rdx)
  cmp    $0x1,%r9w
  je     L424
  movzbl 0x2(%rcx),%esi
  mov    %si,0x4(%rdx)
  cmp    $0x2,%r9w
  je     L424
  movzbl 0x3(%rcx),%esi
  mov    %si,0x6(%rdx)
  cmp    $0x3,%r9w
  je     L424
  movzbl 0x4(%rcx),%esi
  mov    %si,0x8(%rdx)
  cmp    $0x4,%r9w
  je     L424
  movzbl 0x5(%rcx),%esi
  mov    %si,0xa(%rdx)
  cmp    $0x5,%r9w
  je     L424
  movzbl 0x6(%rcx),%esi
  mov    %si,0xc(%rdx)
  cmp    $0x6,%r9w
  je     L424
  movzbl 0x7(%rcx),%esi
  mov    %si,0xe(%rdx)
  cmp    $0x7,%r9w
  je     L424
  movzbl 0x8(%rcx),%esi
  mov    %si,0x10(%rdx)
  cmp    $0x8,%r9w
  je     L424
  movzbl 0x9(%rcx),%esi
  mov    %si,0x12(%rdx)
  cmp    $0x9,%r9w
  je     L424
  movzbl 0xa(%rcx),%esi
  mov    %si,0x14(%rdx)
  cmp    $0xa,%r9w
  je     L424
  movzbl 0xb(%rcx),%esi
  mov    %si,0x16(%rdx)
  cmp    $0xb,%r9w
  je     L424
  movzbl 0xc(%rcx),%esi
  mov    %si,0x18(%rdx)
  cmp    $0xc,%r9w
  je     L424
  movzbl 0xd(%rcx),%esi
  mov    %si,0x1a(%rdx)
  cmp    $0xd,%r9w
  je     L424
  movzbl 0xe(%rcx),%ecx
  mov    %cx,0x1c(%rdx)
  nopl   0x0(%rax)
L424:
  add    %r11,%rax
  lea    (%r12,%r11,2),%rdx
  test   %ebx,%ebx
  jne    L63
L411:
  movzbl -0x2(%rbp),%r8d
  lea    -0x1(%rbp),%rax
  mov    %r8d,%ecx
  cmp    %rax,%r13
  ja     L511
  jmp    L393
  nopl   (%rax)
L672:
  add    $0x1,%rax
  cmp    %rax,%r13
  jbe    L393
L511:
  cmp    (%rax),%cl
  je     L672
  mov    %rax,%rcx
  sub    %r14,%rcx
  mov    %ecx,%esi
  test   %ecx,%ecx
  je     L194
  nopl   (%rax)
L64:
  mov    $0x7e,%ecx
  cmp    %ecx,%esi
  cmovle %esi,%ecx
  add    $0x4,%rdx
  mov    %cx,-0x4(%rdx)
  movzwl %cx,%edi
  mov    %r8w,-0x2(%rdx)
  sub    %edi,%esi
  jne    L64
L194:
  cmp    %r13,%rax
  jb     L1508
L477:
  xor    %ecx,%ecx
  lea    0x2(%rdx),%rax
  mov    %cx,(%rdx)
  sub    %r10,%rax
  sar    %rax
L858:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L811:
  cmp    $0x2,%esi
  sete   %cl
  test   %dil,%dil
  je     L698
  test   %cl,%cl
  je     L698
  movslq %r8d,%r8
  mov    %r10,%rcx
  lea    (%rax,%r8,2),%r13
  cmp    %r13,%rax
  jae    L1503
  movdqa D2(%rip),%xmm2
L1035:
  lea    0x4(%rax),%rdx
  mov    %rax,%r14
  mov    %rdx,%rbp
  cmp    %rdx,%r13
  ja     L915
  jmp    L309
  nopl   0x0(%rax,%rax,1)
L1534:
  lea    0x2(%rdx),%rbp
  cmp    %rbp,%r13
  jbe    L579
  mov    %rbp,%rdx
L915:
  movzwl -0x2(%rdx),%esi
  cmp    %si,-0x4(%rdx)
  jne    L1534
  cmp    (%rdx),%si
  jne    L1534
  lea    -0x4(%rdx),%r14
  mov    %rdx,%rbp
  mov    %r14,%rbx
  sub    %rax,%rbx
  sar    %rbx
  nop
L1125:
  test   %ebx,%ebx
  je     L309
L1272:
  mov    $0x7e,%r8d
  lea    0x1(%rcx),%r12
  cmp    %r8d,%ebx
  cmovle %ebx,%r8d
  movzwl %r8w,%edx
  lea    -0x1(%r8),%r9d
  sub    %edx,%ebx
  mov    %r8d,%edx
  or     $0xffffff80,%edx
  mov    %dl,(%rcx)
  test   %r8w,%r8w
  je     L830
  movzwl %r8w,%r11d
  lea    0x1(%rcx,%r11,1),%rdx
  lea    (%rax,%r11,2),%rsi
  cmp    %rdx,%rax
  setae  %dl
  cmp    %rsi,%r12
  setae  %sil
  or     %sil,%dl
  je     L1120
  cmp    $0xe,%r9w
  jbe    L1120
  lea    -0x10(%r8),%edi
  xor    %edx,%edx
  xor    %esi,%esi
  shr    $0x4,%di
  add    $0x1,%edi
  nopw   0x0(%rax,%rax,1)
L163:
  movdqu (%rax,%rdx,2),%xmm0
  movdqu 0x10(%rax,%rdx,2),%xmm1
  add    $0x1,%esi
  pand   %xmm2,%xmm0
  pand   %xmm2,%xmm1
  packuswb %xmm1,%xmm0
  movups %xmm0,0x1(%rcx,%rdx,1)
  add    $0x10,%rdx
  cmp    %si,%di
  ja     L163
  shl    $0x4,%edi
  movzwl %di,%edx
  sub    %edi,%r9d
  lea    (%rax,%rdx,2),%rcx
  add    %r12,%rdx
  cmp    %r8w,%di
  je     L465
  movzwl (%rcx),%esi
  mov    %sil,(%rdx)
  test   %r9w,%r9w
  je     L465
  movzwl 0x2(%rcx),%esi
  mov    %sil,0x1(%rdx)
  cmp    $0x1,%r9w
  je     L465
  movzwl 0x4(%rcx),%esi
  mov    %sil,0x2(%rdx)
  cmp    $0x2,%r9w
  je     L465
  movzwl 0x6(%rcx),%esi
  mov    %sil,0x3(%rdx)
  cmp    $0x3,%r9w
  je     L465
  movzwl 0x8(%rcx),%esi
  mov    %sil,0x4(%rdx)
  cmp    $0x4,%r9w
  je     L465
  movzwl 0xa(%rcx),%esi
  mov    %sil,0x5(%rdx)
  cmp    $0x5,%r9w
  je     L465
  movzwl 0xc(%rcx),%esi
  mov    %sil,0x6(%rdx)
  cmp    $0x6,%r9w
  je     L465
  movzwl 0xe(%rcx),%esi
  mov    %sil,0x7(%rdx)
  cmp    $0x7,%r9w
  je     L465
  movzwl 0x10(%rcx),%esi
  mov    %sil,0x8(%rdx)
  cmp    $0x8,%r9w
  je     L465
  movzwl 0x12(%rcx),%esi
  mov    %sil,0x9(%rdx)
  cmp    $0x9,%r9w
  je     L465
  movzwl 0x14(%rcx),%esi
  mov    %sil,0xa(%rdx)
  cmp    $0xa,%r9w
  je     L465
  movzwl 0x16(%rcx),%esi
  mov    %sil,0xb(%rdx)
  cmp    $0xb,%r9w
  je     L465
  movzwl 0x18(%rcx),%esi
  mov    %sil,0xc(%rdx)
  cmp    $0xc,%r9w
  je     L465
  movzwl 0x1a(%rcx),%esi
  mov    %sil,0xd(%rdx)
  cmp    $0xd,%r9w
  je     L465
  movzwl 0x1c(%rcx),%ecx
  mov    %cl,0xe(%rdx)
  nopl   0x0(%rax,%rax,1)
L465:
  lea    (%rax,%r11,2),%rax
  lea    (%r12,%r11,1),%rcx
  test   %ebx,%ebx
  jne    L1272
L309:
  lea    -0x2(%rbp),%rax
  movzwl -0x4(%rbp),%edx
  cmp    %rax,%r13
  ja     L394
  jmp    L951
  nopw   0x0(%rax,%rax,1)
L266:
  add    $0x2,%rax
  cmp    %rax,%r13
  jbe    L951
L394:
  cmp    %dx,(%rax)
  je     L266
  mov    %rax,%rdi
  sub    %r14,%rdi
  sar    %rdi
  mov    %edi,%esi
  test   %edi,%edi
  je     L1201
L905:
  mov    %edx,%r8d
  nopl   0x0(%rax)
L138:
  mov    $0x7e,%edx
  cmp    %edx,%esi
  cmovle %esi,%edx
  add    $0x2,%rcx
  mov    %dl,-0x2(%rcx)
  movzwl %dx,%edi
  mov    %r8b,-0x1(%rcx)
  sub    %edi,%esi
  jne    L138
L1201:
  cmp    %r13,%rax
  jb     L1035
L1503:
  movb   $0x0,(%rcx)
  lea    0x1(%rcx),%rax
  add    $0x8,%rsp
  pop    %rbx
  sub    %r10d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L698:
  test   %r9b,%r9b
  je     L415
  test   %cl,%cl
  je     L415
  movslq %r8d,%r8
  mov    %r10,%rcx
  lea    (%rax,%r8,2),%rbx
L149:
  cmp    %rbx,%rax
  jae    L520
  lea    0x4(%rax),%rdx
  mov    %rax,%r12
  mov    %rdx,%r11
  cmp    %rdx,%rbx
  ja     L908
  jmp    L689
  cs nopw 0x0(%rax,%rax,1)
L543:
  lea    0x2(%rdx),%r11
  cmp    %r11,%rbx
  jbe    L1052
  mov    %r11,%rdx
L908:
  movzwl -0x2(%rdx),%esi
  cmp    %si,-0x4(%rdx)
  jne    L543
  cmp    (%rdx),%si
  jne    L543
  lea    -0x4(%rdx),%r12
  mov    %rdx,%r11
  mov    %r12,%r9
  sub    %rax,%r9
  sar    %r9
  nop
L1132:
  test   %r9d,%r9d
  je     L689
L299:
  mov    $0x7e,%edi
  lea    0x2(%rcx),%rbp
  cmp    %edi,%r9d
  cmovle %r9d,%edi
  movzwl %di,%edx
  lea    -0x1(%rdi),%r13d
  sub    %edx,%r9d
  mov    %edi,%edx
  or     $0x80,%dl
  mov    %dx,(%rcx)
  test   %di,%di
  je     L719
  mov    %rcx,%rdx
  sub    %rax,%rdx
  cmp    $0xc,%rdx
  jbe    L1008
  cmp    $0x2,%r13w
  jbe    L1008
  cmp    $0x6,%r13w
  jbe    L756
  lea    -0x8(%rdi),%r8d
  xor    %edx,%edx
  xor    %esi,%esi
  shr    $0x3,%r8w
  add    $0x1,%r8d
  nopl   0x0(%rax,%rax,1)
L807:
  movdqu (%rax,%rdx,1),%xmm4
  add    $0x1,%esi
  movups %xmm4,0x2(%rcx,%rdx,1)
  add    $0x10,%rdx
  cmp    %si,%r8w
  ja     L807
  shl    $0x3,%r8d
  movzwl %r8w,%r15d
  sub    %r8d,%r13d
  lea    (%r15,%r15,1),%rdx
  lea    (%rax,%rdx,1),%r14
  add    %rbp,%rdx
  cmp    %r8w,%di
  je     L1338
  mov    %edi,%esi
  sub    %r8d,%esi
  lea    -0x1(%rsi),%r8d
  cmp    $0x2,%r8w
  jbe    L458
L607:
  mov    (%rax,%r15,2),%r8
  mov    %r8,0x2(%rcx,%r15,2)
  mov    %rsi,%rcx
  mov    %esi,%r15d
  movzwl %di,%r8d
  and    $0xfffc,%ecx
  and    $0xfffffffc,%r15d
  add    %rcx,%rcx
  sub    %r15d,%r13d
  add    %rcx,%r14
  add    %rcx,%rdx
  cmp    %r15w,%si
  je     L351
L458:
  movzwl (%r14),%ecx
  mov    %cx,(%rdx)
  test   %r13w,%r13w
  je     L1338
  movzwl 0x2(%r14),%ecx
  mov    %cx,0x2(%rdx)
  cmp    $0x1,%r13w
  je     L1338
  movzwl 0x4(%r14),%ecx
  mov    %cx,0x4(%rdx)
L1338:
  movzwl %di,%r8d
L351:
  add    %r8,%r8
  add    %r8,%rax
  lea    0x0(%rbp,%r8,1),%rcx
  test   %r9d,%r9d
  jne    L299
L689:
  lea    -0x2(%r11),%rax
  movzwl -0x4(%r11),%r8d
  cmp    %rax,%rbx
  ja     L1251
  jmp    L304
  nopl   0x0(%rax,%rax,1)
L1500:
  add    $0x2,%rax
  cmp    %rax,%rbx
  jbe    L304
L1251:
  cmp    %r8w,(%rax)
  je     L1500
  mov    %rax,%rdx
  sub    %r12,%rdx
  sar    %rdx
  mov    %edx,%esi
  test   %edx,%edx
  je     L149
  xchg   %ax,%ax
L1119:
  mov    $0x7e,%edx
  cmp    %edx,%esi
  cmovle %esi,%edx
  add    $0x4,%rcx
  mov    %dx,-0x4(%rcx)
  movzwl %dx,%edi
  mov    %r8w,-0x2(%rcx)
  sub    %edi,%esi
  jne    L1119
  jmp    L149
  nopl   0x0(%rax,%rax,1)
L147:
  movzwl %si,%esi
  xor    %ecx,%ecx
  nopl   (%rax)
L834:
  movzbl (%rax,%rcx,1),%edi
  mov    %dil,0x1(%rdx,%rcx,1)
  add    $0x1,%rcx
  cmp    %rcx,%rsi
  jne    L834
  jmp    L1223
  nopw   0x0(%rax,%rax,1)
L1007:
  mov    %rbp,%rdx
  jmp    L1329
L812:
  lea    -0x1(%rcx),%r12
  mov    %r12d,%r9d
  sub    %eax,%r9d
  jmp    L1329
L221:
  mov    %rax,%rdi
  mov    %rbp,%rcx
  mov    %esi,%r14d
  xor    %r15d,%r15d
  jmp    L992
L1009:
  mov    %rax,%rcx
  sub    %r12,%rcx
  mov    %ecx,%esi
  test   %ecx,%ecx
  jne    L321
  lea    0x1(%rdx),%rax
  movb   $0x0,(%rdx)
  sub    %r10d,%eax
  jmp    L1354
L415:
  lea    D5(%rip),%rdi
  call   <i_errhdlr@plt>
  xor    %eax,%eax
  jmp    L858
  nopw   0x0(%rax,%rax,1)
L223:
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L6:
  movzbl (%rax,%rcx,1),%esi
  mov    %si,0x2(%rdx,%rcx,2)
  add    $0x1,%rcx
  cmp    %rcx,%r11
  jne    L6
  jmp    L424
  nop
L1008:
  movzwl %di,%r8d
  xor    %edx,%edx
  lea    (%r8,%r8,1),%rdi
  nopw   0x0(%rax,%rax,1)
L863:
  movzwl (%rax,%rdx,1),%esi
  mov    %si,0x2(%rcx,%rdx,1)
  add    $0x2,%rdx
  cmp    %rdi,%rdx
  jne    L863
  jmp    L351
L1120:
  xor    %edx,%edx
  nopl   0x0(%rax)
L1319:
  movzwl (%rax,%rdx,2),%esi
  mov    %sil,0x1(%rcx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdx,%r11
  jne    L1319
  jmp    L465
L1457:
  mov    %r12,%rdx
  jmp    L60
L719:
  mov    %rbp,%rcx
  jmp    L1132
L694:
  lea    -0x1(%rcx),%r14
  mov    %r14d,%ebx
  sub    %eax,%ebx
  jmp    L60
L1052:
  lea    -0x2(%rdx),%r12
  mov    %r12,%r9
  sub    %rax,%r9
  sar    %r9
  jmp    L1132
L830:
  mov    %r12,%rcx
  jmp    L1125
L393:
  mov    %rax,%rcx
  sub    %r14,%rcx
  mov    %ecx,%esi
  test   %ecx,%ecx
  jne    L64
  jmp    L477
L756:
  mov    %edi,%esi
  mov    %rbp,%rdx
  mov    %rax,%r14
  xor    %r15d,%r15d
  jmp    L607
L579:
  lea    -0x2(%rdx),%r14
  mov    %r14,%rbx
  sub    %rax,%rbx
  sar    %rbx
  jmp    L1125
L304:
  mov    %rax,%rdx
  sub    %r12,%rdx
  sar    %rdx
  mov    %edx,%esi
  test   %edx,%edx
  jne    L1119
L520:
  xor    %eax,%eax
  mov    %ax,(%rcx)
  lea    0x2(%rcx),%rax
  add    $0x8,%rsp
  sub    %r10,%rax
  pop    %rbx
  pop    %rbp
  sar    %rax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L951:
  mov    %rax,%rdi
  sub    %r14,%rdi
  sar    %rdi
  mov    %edi,%esi
  test   %edi,%edi
  jne    L905
  jmp    L1503
```

tool_calls: name: read_data
arguments: tag: D2
type: byte[16]
name: read_data
arguments: tag: D5
type: string

tool: {"D2": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

tool: D5: rle_compact: bad bpp: %d %d


assistant: ```c
int img_rle_compact(unsigned short *expbuf, int ibpp, unsigned short *rlebuf, int obpp, int cnt) {
  if (ibpp == 1 && obpp == 1) {
    register unsigned char *iptr = (unsigned char *)expbuf;
    register unsigned char *ibufend = iptr + cnt;
    register unsigned char *sptr;
    register unsigned char *optr = (unsigned char *)rlebuf;
    register unsigned short todo, cc;
    register int count;
    while (iptr < ibufend) {
      sptr = iptr;
      iptr += 2;
      while ((iptr < ibufend) && ((iptr[-2] != iptr[-1]) || (iptr[-1] != iptr[0])))
        iptr++;
      iptr -= 2;
      count = iptr - sptr;
      while (count) {
        todo = count > 126 ? 126 : count;
        count -= todo;
        *optr++ = 0x80 | todo;
        while (todo--)
          *optr++ = *sptr++;
      }
      sptr = iptr;
      cc = *iptr++;
      while ((iptr < ibufend) && (*iptr == cc))
        iptr++;
      count = iptr - sptr;
      while (count) {
        todo = count > 126 ? 126 : count;
        count -= todo;
        *optr++ = todo;
        *optr++ = cc;
      }
    }
    *optr++ = 0;
    ;
    return optr - (unsigned char *)rlebuf;
  } else if (ibpp == 1 && obpp == 2) {
    register unsigned char *iptr = (unsigned char *)expbuf;
    register unsigned char *ibufend = iptr + cnt;
    register unsigned char *sptr;
    register unsigned short *optr = rlebuf;
    register unsigned short todo, cc;
    register int count;
    while (iptr < ibufend) {
      sptr = iptr;
      iptr += 2;
      while ((iptr < ibufend) && ((iptr[-2] != iptr[-1]) || (iptr[-1] != iptr[0])))
        iptr++;
      iptr -= 2;
      count = iptr - sptr;
      while (count) {
        todo = count > 126 ? 126 : count;
        count -= todo;
        *optr++ = 0x80 | todo;
        while (todo--)
          *optr++ = *sptr++;
      }
      sptr = iptr;
      cc = *iptr++;
      while ((iptr < ibufend) && (*iptr == cc))
        iptr++;
      count = iptr - sptr;
      while (count) {
        todo = count > 126 ? 126 : count;
        count -= todo;
        *optr++ = todo;
        *optr++ = cc;
      }
    }
    *optr++ = 0;
    ;
    return optr - rlebuf;
  } else if (ibpp == 2 && obpp == 1) {
    register unsigned short *iptr = expbuf;
    register unsigned short *ibufend = iptr + cnt;
    register unsigned short *sptr;
    register unsigned char *optr = (unsigned char *)rlebuf;
    register unsigned short todo, cc;
    register int count;
    while (iptr < ibufend) {
      sptr = iptr;
      iptr += 2;
      while ((iptr < ibufend) && ((iptr[-2] != iptr[-1]) || (iptr[-1] != iptr[0])))
        iptr++;
      iptr -= 2;
      count = iptr - sptr;
      while (count) {
        todo = count > 126 ? 126 : count;
        count -= todo;
        *optr++ = 0x80 | todo;
        while (todo--)
          *optr++ = *sptr++;
      }
      sptr = iptr;
      cc = *iptr++;
      while ((iptr < ibufend) && (*iptr == cc))
        iptr++;
      count = iptr - sptr;
      while (count) {
        todo = count > 126 ? 126 : count;
        count -= todo;
        *optr++ = todo;
        *optr++ = cc;
      }
    }
    *optr++ = 0;
    ;
    return optr - (unsigned char *)rlebuf;
  } else if (ibpp == 2 && obpp == 2) {
    register unsigned short *iptr = expbuf;
    register unsigned short *ibufend = iptr + cnt;
    register unsigned short *sptr;
    register unsigned short *optr = rlebuf;
    register unsigned short todo, cc;
    register int count;
    while (iptr < ibufend) {
      sptr = iptr;
      iptr += 2;
      while ((iptr < ibufend) && ((iptr[-2] != iptr[-1]) || (iptr[-1] != iptr[0])))
        iptr++;
      iptr -= 2;
      count = iptr - sptr;
      while (count) {
        todo = count > 126 ? 126 : count;
        count -= todo;
        *optr++ = 0x80 | todo;
        while (todo--)
          *optr++ = *sptr++;
      }
      sptr = iptr;
      cc = *iptr++;
      while ((iptr < ibufend) && (*iptr == cc))
        iptr++;
      count = iptr - sptr;
      while (count) {
        todo = count > 126 ? 126 : count;
        count -= todo;
        *optr++ = todo;
        *optr++ = cc;
      }
    }
    *optr++ = 0;
    ;
    return optr - rlebuf;
  } else {
    i_errhdlr("rle_compact: bad bpp: %d %d\n", ibpp, obpp);
    return 0;
  }
}
```