user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<video_all_stat_to_line_stat>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    -0x38(%rbp),%eax
  and    $0x4,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x38(%rbp),%eax
  and    $0x100,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x38(%rbp),%eax
  and    $0x200,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x38(%rbp),%eax
  and    $0x10,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x38(%rbp),%eax
  and    $0x40,%eax
  test   %eax,%eax
  je     L3
  cmpl   $0x0,-0x10(%rbp)
  jne    L3
  mov    $0x1,%eax
  jmp    L130
L3:
  mov    $0x0,%eax
L130:
  mov    %eax,-0x30(%rbp)
  mov    -0x38(%rbp),%eax
  sar    $0x3,%eax
  and    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x38(%rbp),%eax
  sar    %eax
  and    $0x1,%eax
  mov    %eax,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  mov    -0x38(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L63
  movl   $0x4,-0x14(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L127
L63:
  cmpl   $0xbf,-0x34(%rbp)
  jle    L69
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L127
L69:
  mov    -0x38(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L158
  cmpl   $0x9f,-0x34(%rbp)
  jle    L123
  cmpl   $0x0,-0x4(%rbp)
  je     L123
L158:
  movl   $0x1,-0x14(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    -0x38(%rbp),%eax
  sar    $0x12,%eax
  and    $0x1,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x38(%rbp),%eax
  sar    $0xe,%eax
  and    $0xf,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x38(%rbp),%eax
  sar    $0xa,%eax
  and    $0xf,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x38(%rbp),%eax
  sar    $0x13,%eax
  and    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  je     L127
  movl   $0x0,-0x18(%rbp)
  jmp    L127
L123:
  cmpl   $0x0,-0x28(%rbp)
  je     L25
  cmpl   $0x0,-0x8(%rbp)
  jne    L25
  mov    $0x1,%eax
  jmp    L150
L25:
  mov    $0x0,%eax
L150:
  mov    %eax,-0x28(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  je     L113
  mov    -0x38(%rbp),%eax
  sar    $0x5,%eax
  and    $0x1,%eax
  or     %eax,-0x2c(%rbp)
  movl   $0x3,-0x14(%rbp)
  jmp    L127
L113:
  movl   $0x2,-0x14(%rbp)
L127:
  mov    -0x20(%rbp),%eax
  shl    $0xc,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  shl    $0x8,%eax
  add    %eax,%edx
  mov    -0x24(%rbp),%eax
  shl    $0x7,%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  shl    $0x4,%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%eax
  shl    $0x3,%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  shl    $0x2,%eax
  add    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  pop    %rbp
  ret
```

assistant: ```c
int video_all_stat_to_line_stat(int line, int new_all_stat) {
  int page, color, dbl;
  int st80, hires, annunc3, mix_t_gr;
  int altchar, text_color, bg_color, flash_state;
  int mode;
  st80 = new_all_stat & (1 << (2));
  hires = new_all_stat & (1 << (8));
  annunc3 = new_all_stat & (1 << (9));
  mix_t_gr = new_all_stat & (1 << (4));
  page = (((1) >= (31 - 6) + 1) ? ((new_all_stat) >> (31 - (31 - 6))) : (((new_all_stat) >> (31 - (31 - 6))) & ((1 << (1)) - 1))) && !st80;
  color = (((1) >= (31 - 3) + 1) ? ((new_all_stat) >> (31 - (31 - 3))) : (((new_all_stat) >> (31 - (31 - 3))) & ((1 << (1)) - 1)));
  dbl = (((1) >= (31 - 1) + 1) ? ((new_all_stat) >> (31 - (31 - 1))) : (((new_all_stat) >> (31 - (31 - 1))) & ((1 << (1)) - 1)));
  altchar = 0;
  text_color = 0;
  bg_color = 0;
  flash_state = 0;
  if (new_all_stat & (1 << (7))) {
    mode = 4;
    page = 0;
    dbl = 0;
    color = 0;
  } else {
    if (line >= 192) {
      mode = 0;
      page = 0;
      dbl = 0;
      color = 0;
    } else if ((new_all_stat & (1 << (0))) || (line >= 160 && mix_t_gr)) {
      mode = 1;
      color = 0;
      altchar = (((1) >= (31 - 18) + 1) ? ((new_all_stat) >> (31 - (31 - 18))) : (((new_all_stat) >> (31 - (31 - 18))) & ((1 << (1)) - 1)));
      text_color = (((4) >= (31 - 14) + 1) ? ((new_all_stat) >> (31 - (31 - 14))) : (((new_all_stat) >> (31 - (31 - 14))) & ((1 << (4)) - 1)));
      bg_color = (((4) >= (31 - 10) + 1) ? ((new_all_stat) >> (31 - (31 - 10))) : (((new_all_stat) >> (31 - (31 - 10))) & ((1 << (4)) - 1)));
      flash_state = (((1) >= (31 - 19) + 1) ? ((new_all_stat) >> (31 - (31 - 19))) : (((new_all_stat) >> (31 - (31 - 19))) & ((1 << (1)) - 1)));
      if (altchar) {
        flash_state = 0;
      }
    } else {
      dbl = dbl && !annunc3;
      if (hires) {
        color = color | (((1) >= (31 - 5) + 1) ? ((new_all_stat) >> (31 - (31 - 5))) : (((new_all_stat) >> (31 - (31 - 5))) & ((1 << (1)) - 1)));
        mode = 3;
      } else {
        mode = 2;
      }
    }
  }
  return ((text_color << 12) + (bg_color << 8) + (altchar << 7) + (mode << 4) + (flash_state << 3) + (page << 2) + (color << 1) + dbl);
}
```