user: 请从给定的汇编指令推导出C源代码：

```asm
<compress_row>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    -0x48(%rbp),%rbx
  mov    -0x50(%rbp),%rax
  sub    $0x4,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x58(%rbp),%r12
  jmp    L30
L72:
  mov    %rbx,-0x28(%rbp)
  jmp    L20
L127:
  add    $0x1,%rbx
L20:
  cmp    -0x18(%rbp),%rbx
  ja     L132
  movzbl (%rbx),%eax
  mov    %al,-0x31(%rbp)
  lea    0x1(%rbx),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L127
  lea    0x2(%rbx),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L127
  lea    0x3(%rbx),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  jne    L127
L132:
  cmp    -0x18(%rbp),%rbx
  jbe    L28
  mov    -0x50(%rbp),%rbx
  mov    %rbx,-0x20(%rbp)
  jmp    L74
L28:
  lea    0x4(%rbx),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L58
L69:
  addq   $0x1,-0x20(%rbp)
L58:
  mov    -0x20(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jae    L74
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x31(%rbp)
  je     L69
  jmp    L74
L104:
  mov    %rbx,%rax
  sub    -0x28(%rbp),%rax
  mov    %eax,-0x30(%rbp)
  cmpl   $0x7f,-0x30(%rbp)
  jle    L8
  movl   $0x7f,-0x30(%rbp)
L8:
  mov    -0x30(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  mov    %dl,(%rax)
  jmp    L68
L32:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %r12,%rdx
  lea    0x1(%rdx),%r12
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  subl   $0x1,-0x30(%rbp)
L68:
  cmpl   $0x0,-0x30(%rbp)
  jg     L32
L74:
  cmp    %rbx,-0x28(%rbp)
  jb     L104
  jmp    L113
L59:
  mov    -0x20(%rbp),%rax
  sub    %rbx,%rax
  mov    %eax,-0x2c(%rbp)
  cmpl   $0x7f,-0x2c(%rbp)
  jle    L178
  movl   $0x7f,-0x2c(%rbp)
L178:
  mov    -0x2c(%rbp),%eax
  mov    %eax,%ecx
  mov    $0x1,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  mov    %dl,(%rax)
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  movzbl -0x31(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x2c(%rbp),%eax
  cltq
  add    %rax,%rbx
L113:
  cmp    -0x20(%rbp),%rbx
  jb     L59
L30:
  cmp    -0x50(%rbp),%rbx
  jb     L72
  mov    %r12,%rax
  sub    -0x58(%rbp),%rax
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
int compress_row(char *row, char *end_row, char *compressed) {
  register char *i_exam = row;
  char *stop_exam = end_row - 4;
  register char *cptr = compressed;
  while (i_exam < end_row) {
    char *i_compr = i_exam;
    char *i_next;
    char byte_value;
    while (i_exam <= stop_exam && ((byte_value = *i_exam) != i_exam[1] || byte_value != i_exam[2] || byte_value != i_exam[3]))
      i_exam++;
    if (i_exam > stop_exam)
      i_next = i_exam = end_row;
    else {
      i_next = i_exam + 4;
      while (i_next < end_row && *i_next == byte_value)
        i_next++;
    }
    while (i_compr < i_exam) {
      int count = i_exam - i_compr;
      if (count > 127)
        count = 127;
      *cptr++ = count - 1;
      while (count > 0) {
        *cptr++ = *i_compr++;
        count--;
      }
    }
    while (i_exam < i_next) {
      int count = i_next - i_exam;
      if (count > 127)
        count = 127;
      *cptr++ = 1 - count;
      *cptr++ = byte_value;
      i_exam += count;
    }
  }
  return (cptr - compressed);
}
```