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

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edi,%ebx
  lea    D138(%rip),%rdi
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  lea    D132(%rip),%rdi
  call   <puts@plt>
  lea    D129(%rip),%rdi
  call   <puts@plt>
  lea    D109(%rip),%rdi
  call   <puts@plt>
  cmp    $0x2,%ebx
  je     L18
  lea    D16(%rip),%rdi
  call   <puts@plt>
  lea    D72(%rip),%rdi
  call   <puts@plt>
L38:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L35
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L18:
  mov    0x8(%rbp),%rsi
  lea    D136(%rip),%rdi
  xor    %eax,%eax
  xor    %ebx,%ebx
  xor    %r12d,%r12d
  call   <printf@plt>
  mov    0x8(%rbp),%rdi
  jmp    L42
  nopw   0x0(%rax,%rax,1)
L10:
  mov    0x8(%rbp),%rdi
  movsbl (%rdi,%rbx,1),%eax
  add    $0x1,%rbx
  add    %eax,%r12d
L42:
  call   <strlen@plt>
  cmp    %ebx,%eax
  jg     L10
  cmp    $0x4f4,%r12d
  je     L47
  lea    D10(%rip),%rdi
  call   <puts@plt>
  lea    D74(%rip),%rdi
  call   <puts@plt>
  jmp    L38
L47:
  lea    D126(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D48(%rip),%rdi
  call   <puts@plt>
  lea    D75(%rip),%rdi
  call   <puts@plt>
  lea    D68(%rip),%rdi
  call   <puts@plt>
  mov    %rsp,%rdi
  call   <uname@plt>
  mov    0x18(%rsp),%r8
  mov    (%rsp),%rsi
  xor    %eax,%eax
  mov    0x10(%rsp),%rcx
  mov    0x8(%rsp),%rdx
  lea    D56(%rip),%rdi
  call   <printf@plt>
  jmp    L38
L35:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D138
type_infered: string
name: retrieve_data
arguments: label: D132
type_infered: string
name: retrieve_data
arguments: label: D129
type_infered: string
name: retrieve_data
arguments: label: D109
type_infered: string
name: retrieve_data
arguments: label: D16
type_infered: string
name: retrieve_data
arguments: label: D72
type_infered: string
name: retrieve_data
arguments: label: D136
type_infered: string
name: retrieve_data
arguments: label: D10
type_infered: string
name: retrieve_data
arguments: label: D74
type_infered: string
name: retrieve_data
arguments: label: D126
type_infered: string
name: retrieve_data
arguments: label: D48
type_infered: string
name: retrieve_data
arguments: label: D75
type_infered: string
name: retrieve_data
arguments: label: D68
type_infered: string
name: retrieve_data
arguments: label: D56
type_infered: string

tool: D138: Welcome to the iOS Reverse Engineering Level 3! 

tool: D132: Created by GeoSn0w (@FCE365)


tool: D129: The challenge is to hack this application so that you can use it without any serial number and obtain the flag! 


tool: D109: **************** START **************** 


tool: D16: This application requires a serial number to work! You can validate it with <key>

tool: D72: Or you can do what hackers do the best...

tool: D136: Preparing to check access key: %s


tool: D10: The serial number is not correct!

tool: D74: The application is locked!

tool: D126: Welcome! F.C.E. 365 Tool v36.1

tool: D48: Blimey! You're not a good man! You've hacked the app!
 

tool: D75: Flag: 0x038948FFFF83--DS 

tool: D68: System Identity:

tool: D56: %s Release %s (Version %s) on %s


assistant: ```c
int main(int argc, char *argv[]) {
  printf("Welcome to the iOS Reverse Engineering Level 3! \n");
  printf("Created by GeoSn0w (@FCE365)\n\n");
  printf("The challenge is to hack this application so that you can use it without any serial number and obtain the flag! \n\n");
  printf("**************** START **************** \n\n");
  if (argc == 2) {
    printf("Preparing to check access key: %s\n", argv[1]);
    int hex = 0;
    for (int access = 0; access < strlen(argv[1]); access++) {
      hex += (int)argv[1][access];
    }
    if (hex == 1268) {
      printf("Welcome! F.C.E. 365 Tool v36.1\n");
      printf("\n");
      printf("Blimey! You're not a good man! You've hacked the app!\n \n");
      printf("Flag: 0x038948FFFF83--DS \n");
      printf("System Identity:\n");
      struct utsname u;
      uname(&u);
      printf("%s Release %s (Version %s) on %s\n", u.sysname, u.release, u.version, u.machine);
      return 0;
    } else {
      printf("The serial number is not correct!\n");
      printf("The application is locked!\n");
    }
  } else {
    printf("This application requires a serial number to work! You can validate it with <key>\n");
    printf("Or you can do what hackers do the best...\n");
  }
  return 0;
}
```