user: Please show me the C implementation that matches the assembly code listed below:

```asm
<JTAG_ShiftIRState>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    $0xa,%edi
  push   %rbp
  push   %rbx
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0xe,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0xa,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0xe,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0x8,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0xc,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0x8,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0xc,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  lea    -0x1(%rax),%r13d
  test   %r13d,%r13d
  jle    L9
  sub    $0x2,%eax
  mov    %r12,%r14
  lea    0x1(%r12,%rax,1),%rbp
  nopl   0x0(%rax,%rax,1)
L5:
  xor    %ebx,%ebx
  cmpb   $0x31,(%r14)
  sete   %bl
  add    $0x1,%r14
  shl    $0x3,%ebx
  mov    %ebx,%edi
  or     $0x4,%ebx
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    %ebx,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  cmp    %r14,%rbp
  jne    L5
  movslq %r13d,%r13
  add    %r13,%r12
L9:
  xor    %ebx,%ebx
  cmpb   $0x31,(%r12)
  sete   %bl
  shl    $0x3,%ebx
  mov    %ebx,%edi
  or     $0x2,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    %ebx,%edi
  or     $0x6,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0xa,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0xe,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0x8,%edi
  call   <JTAG_SET@plt>
  xor    %eax,%eax
  call   <JTAG_DELAY@plt>
  mov    $0xc,%edi
  call   <JTAG_SET@plt>
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1080 <JTAG_DELAY@plt>
```

assistant: ```c
void JTAG_ShiftIRState(char *wrIR) {
  int size, i, tdi;
  JTAG_SET((1 << 3) | (1 << 1) | 0);
  JTAG_DELAY();
  JTAG_SET((1 << 3) | (1 << 1) | (1 << 2));
  JTAG_DELAY();
  JTAG_SET((1 << 3) | (1 << 1) | 0);
  JTAG_DELAY();
  JTAG_SET((1 << 3) | (1 << 1) | (1 << 2));
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | 0);
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | (1 << 2));
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | 0);
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | (1 << 2));
  JTAG_DELAY();
  size = strlen(wrIR);
  for (i = 0; i < (size - 1); i++) {
    tdi = (wrIR[i] == '1') ? (1 << 3) : 0;
    JTAG_SET(tdi | 0 | 0);
    JTAG_DELAY();
    JTAG_SET(tdi | 0 | (1 << 2));
    JTAG_DELAY();
  }
  tdi = (wrIR[i] == '1') ? (1 << 3) : 0;
  JTAG_SET(tdi | (1 << 1) | 0);
  JTAG_DELAY();
  JTAG_SET(tdi | (1 << 1) | (1 << 2));
  JTAG_DELAY();
  JTAG_SET((1 << 3) | (1 << 1) | 0);
  JTAG_DELAY();
  JTAG_SET((1 << 3) | (1 << 1) | (1 << 2));
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | 0);
  JTAG_DELAY();
  JTAG_SET((1 << 3) | 0 | (1 << 2));
  JTAG_DELAY();
}
```