user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<jam_jtag_irscan>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x1,-0x8(%rbp)
  cmpl   $0x2,-0x14(%rbp)
  je     L103
  cmpl   $0x2,-0x14(%rbp)
  jg     L74
  cmpl   $0x0,-0x14(%rbp)
  je     L104
  cmpl   $0x1,-0x14(%rbp)
  je     L94
  jmp    L74
L104:
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <jam_jtag_io@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <jam_jtag_io@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <jam_jtag_io@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <jam_jtag_io@plt>
  jmp    L2
L94:
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <jam_jtag_io@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <jam_jtag_io@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <jam_jtag_io@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <jam_jtag_io@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <jam_jtag_io@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <jam_jtag_io@plt>
  jmp    L2
L103:
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <jam_jtag_io@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <jam_jtag_io@plt>
  jmp    L2
L74:
  movl   $0x0,-0x8(%rbp)
L2:
  cmpl   $0x0,-0x8(%rbp)
  je     L125
  movl   $0x0,-0xc(%rbp)
  jmp    L4
L91:
  cmpq   $0x0,-0x28(%rbp)
  setne  %al
  movzbl %al,%edx
  mov    -0xc(%rbp),%eax
  sar    $0x3,%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%esi
  mov    -0xc(%rbp),%eax
  and    $0x7,%eax
  mov    $0x1,%edi
  mov    %eax,%ecx
  shl    %cl,%edi
  mov    %edi,%eax
  and    %esi,%eax
  movsbl %al,%ecx
  mov    -0x18(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <jam_jtag_io@plt>
  mov    %eax,-0x4(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  je     L77
  cmpl   $0x0,-0x4(%rbp)
  je     L135
  mov    -0xc(%rbp),%eax
  sar    $0x3,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0xc(%rbp),%eax
  and    $0x7,%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  mov    %eax,%esi
  mov    -0xc(%rbp),%eax
  sar    $0x3,%eax
  movslq %eax,%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  or     %esi,%edx
  mov    %dl,(%rax)
  jmp    L77
L135:
  mov    -0xc(%rbp),%eax
  sar    $0x3,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %eax,%esi
  mov    -0xc(%rbp),%eax
  and    $0x7,%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  mov    %esi,%ecx
  and    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sar    $0x3,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L77:
  addl   $0x1,-0xc(%rbp)
L4:
  mov    -0xc(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L91
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <jam_jtag_io@plt>
L125:
  mov    -0x8(%rbp),%eax
  leave
  ret
```

assistant: ```c
int jam_jtag_irscan(int start_state, int count, char *tdi, char *tdo) {
  int i = 0;
  int tdo_bit = 0;
  int status = 1;
  switch (start_state) {
  case 0:
    jam_jtag_io(1, 0, 0);
    jam_jtag_io(1, 0, 0);
    jam_jtag_io(0, 0, 0);
    jam_jtag_io(0, 0, 0);
    break;
  case 1:
    jam_jtag_io(1, 0, 0);
    jam_jtag_io(1, 0, 0);
    jam_jtag_io(1, 0, 0);
    jam_jtag_io(1, 0, 0);
    jam_jtag_io(0, 0, 0);
    jam_jtag_io(0, 0, 0);
    break;
  case 2:
    jam_jtag_io(1, 0, 0);
    jam_jtag_io(0, 0, 0);
    break;
  default:
    status = 0;
  }
  if (status) {
    for (i = 0; i < count; i++) {
      tdo_bit = jam_jtag_io((i == count - 1), tdi[i >> 3] & (1 << (i & 7)), (tdo != (0)));
      if (tdo != (0)) {
        if (tdo_bit) {
          tdo[i >> 3] |= (1 << (i & 7));
        } else {
          tdo[i >> 3] &= ~(unsigned int)(1 << (i & 7));
        }
      }
    }
    jam_jtag_io(0, 0, 0);
  }
  return (status);
}
```