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

```asm
<_iSelProcessDirEF>:
  endbr64
  push   %r15
  movzbl %dil,%r15d
  mov    $0xff,%ecx
  mov    $0x1,%edx
  push   %r14
  mov    %r15d,%esi
  mov    $0x1,%edi
  lea    D7(%rip),%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x168,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x158(%rsp)
  xor    %eax,%eax
  lea    0x50(%rsp),%r12
  lea    0x46(%rsp),%rbp
  call   <vPushApduPrepare@plt>
  lea    0x2f(%rsp),%rax
  movb   $0x1,0xf(%rsp)
  mov    %rax,0x10(%rsp)
  lea    0x38(%rsp),%rax
  mov    %rax,0x18(%rsp)
L46:
  movzbl 0xf(%rsp),%esi
  mov    0x10(%rsp),%rdx
  mov    %r12,%rcx
  mov    %r15d,%edi
  call   <uiEmvCmdRdRec@plt>
  mov    %eax,%ebx
  cmp    $0x1,%eax
  je     L97
  cmp    $0x6a83,%eax
  je     L16
  test   %eax,%eax
  jne    L100
  lea    D12(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  movzbl 0x2f(%rsp),%esi
  mov    %rbp,%rcx
  xor    %edx,%edx
  mov    0x18(%rsp),%r8
  mov    %r12,%rdi
  call   <iTlvSearchObj@plt>
  and    $0xfffffffd,%eax
  cmp    $0xffffd8ec,%eax
  je     L117
  lea    0x30(%rsp),%r13
  jmp    L94
  nopw   0x0(%rax,%rax,1)
L84:
  cmp    $0xffffd8ec,%eax
  je     L107
  mov    0x30(%rsp),%rdi
  movzbl %al,%esi
  call   <_iSelProcessTlvObj61@plt>
  test   %eax,%eax
  js     L45
  add    $0x1,%ebx
L94:
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  movzbl 0x2f(%rsp),%esi
  mov    %r13,%r8
  mov    %rbp,%rcx
  mov    %ebx,%edx
  mov    %r12,%rdi
  call   <iTlvSearchObj@plt>
  cmp    $0xffffd8ee,%eax
  jne    L84
L117:
  mov    $0xffffd4fc,%eax
L45:
  mov    0x158(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L125
  add    $0x168,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L107:
  addb   $0x1,0xf(%rsp)
  jmp    L46
L16:
  cmpb   $0x1,0xf(%rsp)
  mov    $0xffffd4fe,%eax
  mov    $0x0,%edx
  cmovne %edx,%eax
  jmp    L45
L97:
  mov    $0xffffd507,%eax
  jmp    L45
L100:
  mov    $0xffffd506,%eax
  jmp    L45
L125:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D7
datatype: string
name: unpack_data
arguments: data_tag: D12
datatype: string

tool: D7: pa

tool: D12: p

assistant: ```c
int _iSelProcessDirEF(unsigned char ucSFI) {
  unsigned char sRec[254];
  unsigned char ucRecNo;
  unsigned char ucRecLen;
  unsigned int uiIndex;
  unsigned char *psTlvObj61, ucTlvObj61Len;
  unsigned char *p;
  unsigned char sTagRoute[10];
  unsigned int uiRet;
  int iRet;
  vPushApduPrepare(1, ucSFI, 1, 255);
  for (ucRecNo = 1;; ucRecNo++) {
    uiRet = uiEmvCmdRdRec(ucSFI, ucRecNo, &ucRecLen, sRec);
    if (uiRet == 1)
      return (-11001);
    if (uiRet == 0x6a83) {
      if (ucRecNo == 1)
        return (-11010);
      return (0);
    }
    if (uiRet)
      return (-11002);
    strcpy(sTagRoute, "\x70");
    iRet = iTlvSearchObj(sRec, (int)ucRecLen, 0, sTagRoute, &p);
    if (iRet == -10002)
      return (-11012);
    if (iRet == -10004)
      return (-11012);
    for (uiIndex = 0;; uiIndex++) {
      strcpy(sTagRoute, "\x70"
                        "\x61");
      iRet = iTlvSearchObj(sRec, (int)ucRecLen, uiIndex, sTagRoute, &psTlvObj61);
      if (iRet == -10002)
        return (-11012);
      if (iRet == -10004)
        break;
      ucTlvObj61Len = (unsigned char)iRet;
      iRet = _iSelProcessTlvObj61(psTlvObj61, ucTlvObj61Len);
      if (iRet < 0)
        return (iRet);
    }
  }
  return (0);
}
```