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

```asm
<main>:
  endbr64
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  movabs $0x3030353831343034,%rax
  movabs $0x3330363936373230,%rdx
  mov    %rax,(%rsp)
  mov    %rdx,0x8(%rsp)
  movb   $0x0,0x10(%rsp)
  movabs $0x3035303639363731,%rax
  movabs $0x3036393637323030,%rdx
  mov    %rax,0x40(%rsp)
  mov    %rdx,0x48(%rsp)
  movb   $0x0,0x50(%rsp)
  lea    0xa0(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    %rsp,%rdi
  mov    $0x2,%esi
  call   <pinValidationData@plt>
  test   %eax,%eax
  jne    L153
  lea    0x40(%rsp),%rsi
  lea    0x20(%rsp),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L80
  lea    0x40(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0x2,%esi
  lea    D36(%rip),%rdi
  call   <printf@plt>
  jmp    L96
L80:
  lea    0x40(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0x2,%esi
  lea    D57(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L96
L153:
  lea    0xa0(%rsp),%rdx
  mov    %eax,%esi
  lea    D42(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L96:
  movabs $0x3732303030353831,%rax
  movabs $0x3036393637363936,%rdx
  mov    %rax,0x60(%rsp)
  mov    %rdx,0x68(%rsp)
  movb   $0x0,0x70(%rsp)
  lea    0xa0(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    %rsp,%rdi
  mov    $0xc,%esi
  call   <pinValidationData@plt>
  test   %eax,%eax
  jne    L110
  lea    0x60(%rsp),%rsi
  lea    0x20(%rsp),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L59
  lea    0x60(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0xc,%esi
  lea    D81(%rip),%rdi
  call   <printf@plt>
  jmp    L15
L59:
  lea    0x60(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0xc,%esi
  lea    D0(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L15
L110:
  lea    0xa0(%rsp),%rdx
  mov    %eax,%esi
  lea    D40(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L15:
  movabs $0x3035383036393637,%rax
  movabs $0x3036393637323030,%rdx
  mov    %rax,0x80(%rsp)
  mov    %rdx,0x88(%rsp)
  movb   $0x0,0x90(%rsp)
  lea    0xa0(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    %rsp,%rdi
  mov    $0x1,%esi
  call   <pinValidationData@plt>
  test   %eax,%eax
  jne    L5
  lea    0x80(%rsp),%rsi
  lea    0x20(%rsp),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L130
  lea    0x80(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0x1,%esi
  lea    D14(%rip),%rdi
  call   <printf@plt>
  jmp    L76
L130:
  lea    0x80(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0x1,%esi
  lea    D99(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L76
L5:
  lea    0xa0(%rsp),%rdx
  mov    %eax,%esi
  lea    D21(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L76:
  lea    0xa0(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    %rsp,%rdi
  mov    $0xd,%esi
  call   <pinValidationData@plt>
  test   %eax,%eax
  jne    L45
  lea    0x80(%rsp),%rsi
  lea    0x20(%rsp),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L168
  lea    0x80(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0xd,%esi
  lea    D58(%rip),%rdi
  call   <printf@plt>
  jmp    L142
L168:
  lea    0x80(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    $0xd,%esi
  lea    D58(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L142
L45:
  lea    0xa0(%rsp),%rdx
  mov    $0xd,%esi
  lea    D51(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L142:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L65
  mov    $0x0,%eax
  add    $0x118,%rsp
  ret
L65:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D36
type: string
name: retrieve_data
arguments: data_tag: D57
type: string
name: retrieve_data
arguments: data_tag: D42
type: string
name: retrieve_data
arguments: data_tag: D81
type: string
name: retrieve_data
arguments: data_tag: D0
type: string
name: retrieve_data
arguments: data_tag: D40
type: string
name: retrieve_data
arguments: data_tag: D14
type: string
name: retrieve_data
arguments: data_tag: D99
type: string
name: retrieve_data
arguments: data_tag: D21
type: string
name: retrieve_data
arguments: data_tag: D58
type: string
name: retrieve_data
arguments: data_tag: D51
type: string

tool: D36: main.pinValidationData.1 OK position %2d - %s %s 


tool: D57: main.pinValidationData.1 KO position %2d - %s %s 


tool: D42: main.pinValidationData.1 KO %2d %s 


tool: D81: main.pinValidationData.2 OK position %2d - %s %s 


tool: D0: main.pinValidationData.2 KO position %2d - %s %s 


tool: D40: main.pinValidationData.2 KO %2d %s 


tool: D14: main.pinValidationData.3 OK position %2d - %s %s 


tool: D99: main.pinValidationData.3 KO position %2d - %s %s 


tool: D21: main.pinValidationData.3 KO %2d %s 


tool: D58: main.pinValidationData.4 KO position %2d - %s %s 


tool: D51: main.pinValidationData.4 OK position %2d - %s 


assistant: ```c
int main(int argc, char *argv[]) {
  unsigned char pan[] = "4041850002769603";
  char errstatus[100 + 1];
  int k = 0;
  unsigned char pinvaldat[8 * 2 + 1];
  unsigned char result[] = "1769605000276960";
  int pos = 2;
  k = pinValidationData(pan, pos, pinvaldat, errstatus);
  if (k == 0) {
    if (strcmp((const char *)pinvaldat, (const char *)result) == 0) {
      printf("main.pinValidationData.1 OK position %2d - %s %s \n", pos, pinvaldat, result);
    } else {
      printf("main.pinValidationData.1 KO position %2d - %s %s \n", pos, pinvaldat, result);
    }
  } else {
    printf("main.pinValidationData.1 KO %2d %s \n", k, errstatus);
  }
  unsigned char result2[] = "1850002769676960";
  pos = 12;
  k = pinValidationData(pan, pos, pinvaldat, errstatus);
  if (k == 0) {
    if (strcmp((const char *)pinvaldat, (const char *)result2) == 0) {
      printf("main.pinValidationData.2 OK position %2d - %s %s \n", pos, pinvaldat, result2);
    } else {
      printf("main.pinValidationData.2 KO position %2d - %s %s \n", pos, pinvaldat, result2);
    }
  } else {
    printf("main.pinValidationData.2 KO %2d %s \n", k, errstatus);
  }
  unsigned char result3[] = "7696085000276960";
  pos = 1;
  k = pinValidationData(pan, pos, pinvaldat, errstatus);
  if (k == 0) {
    if (strcmp((const char *)pinvaldat, (const char *)result3) == 0) {
      printf("main.pinValidationData.3 OK position %2d - %s %s \n", pos, pinvaldat, result3);
    } else {
      printf("main.pinValidationData.3 KO position %2d - %s %s \n", pos, pinvaldat, result3);
    }
  } else {
    printf("main.pinValidationData.3 KO %2d %s \n", k, errstatus);
  }
  pos = 13;
  k = pinValidationData(pan, pos, pinvaldat, errstatus);
  if (k == 0) {
    if (strcmp((const char *)pinvaldat, (const char *)result3) == 0) {
      printf("main.pinValidationData.4 KO position %2d - %s %s \n", pos, pinvaldat, result3);
    } else {
      printf("main.pinValidationData.4 KO position %2d - %s %s \n", pos, pinvaldat, result3);
    }
  } else {
    printf("main.pinValidationData.4 OK position %2d - %s \n", pos, errstatus);
  }
  return 0;
}
```