user: Demonstrate the C code that generates the assembly output below:

```asm
<sc_strerror>:
  endbr64
  sub    $0x2f8,%rsp
  lea    D52(%rip),%rsi
  lea    D140(%rip),%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x2e8(%rsp)
  lea    D623(%rip),%rax
  mov    %rsi,0x130(%rsp)
  lea    D578(%rip),%rsi
  lea    D48(%rip),%rdx
  mov    %rcx,0x138(%rsp)
  lea    D162(%rip),%rcx
  mov    %rsi,0x140(%rsp)
  lea    D422(%rip),%rsi
  mov    %rcx,0x148(%rsp)
  lea    D582(%rip),%rcx
  mov    %rsi,0x150(%rsp)
  lea    D652(%rip),%rsi
  mov    %rdx,0x158(%rsp)
  lea    D118(%rip),%rdx
  mov    %rcx,0x160(%rsp)
  lea    D475(%rip),%rcx
  mov    %rsi,0x168(%rsp)
  lea    D443(%rip),%rsi
  mov    %rdx,0x170(%rsp)
  lea    D288(%rip),%rdx
  mov    %rcx,0x178(%rsp)
  lea    D321(%rip),%rcx
  mov    %rsi,0x180(%rsp)
  lea    D145(%rip),%rsi
  mov    %rdx,0x188(%rsp)
  lea    D715(%rip),%rdx
  mov    %rcx,0x190(%rsp)
  lea    D530(%rip),%rcx
  mov    %rsi,0x240(%rsp)
  lea    D856(%rip),%rsi
  mov    %rdx,0x248(%rsp)
  lea    D466(%rip),%rdx
  mov    %rcx,0x250(%rsp)
  lea    D775(%rip),%rcx
  mov    %rsi,0x258(%rsp)
  lea    D743(%rip),%rsi
  mov    %rdx,0x260(%rsp)
  lea    D273(%rip),%rdx
  mov    %rax,0x110(%rsp)
  lea    D560(%rip),%rax
  mov    %rcx,0x268(%rsp)
  lea    D442(%rip),%rcx
  mov    %rsi,0x270(%rsp)
  lea    D747(%rip),%rsi
  mov    %rdx,0x278(%rsp)
  lea    D34(%rip),%rdx
  mov    %rax,0x118(%rsp)
  lea    D794(%rip),%rax
  mov    %rcx,0x280(%rsp)
  lea    D401(%rip),%rcx
  mov    %rsi,0x288(%rsp)
  lea    D225(%rip),%rsi
  mov    %rdx,0x290(%rsp)
  lea    D254(%rip),%rdx
  mov    %rax,0x120(%rsp)
  mov    %rax,0x128(%rsp)
  mov    %rcx,0x298(%rsp)
  lea    D411(%rip),%rcx
  mov    %rsi,0x2a0(%rsp)
  lea    D233(%rip),%rsi
  mov    %rdx,0x2a8(%rsp)
  lea    D271(%rip),%rdx
  mov    %rcx,0x2b0(%rsp)
  lea    D388(%rip),%rcx
  mov    %rsi,0x2b8(%rsp)
  lea    D546(%rip),%rsi
  mov    %rdx,0x2c0(%rsp)
  lea    D708(%rip),%rdx
  mov    %rcx,0x2c8(%rsp)
  lea    D164(%rip),%rcx
  mov    %rsi,0x2d0(%rsp)
  lea    D197(%rip),%rsi
  mov    %rdx,0x2d8(%rsp)
  lea    D452(%rip),%rdx
  mov    %rcx,0x2e0(%rsp)
  lea    D609(%rip),%rcx
  mov    %rsi,0x10(%rsp)
  lea    D813(%rip),%rsi
  mov    %rdx,0x28(%rsp)
  lea    D754(%rip),%rdx
  mov    %rcx,0x30(%rsp)
  lea    D579(%rip),%rcx
  mov    %rsi,0x38(%rsp)
  lea    D711(%rip),%rsi
  mov    %rdx,0x1a0(%rsp)
  lea    D601(%rip),%rdx
  mov    %rcx,0x1a8(%rsp)
  lea    D477(%rip),%rcx
  mov    %rsi,0x1b0(%rsp)
  lea    D744(%rip),%rsi
  mov    %rdx,0x1b8(%rsp)
  lea    D404(%rip),%rdx
  mov    %rcx,0x1c0(%rsp)
  lea    D653(%rip),%rcx
  mov    %rsi,0x1c8(%rsp)
  lea    D33(%rip),%rsi
  mov    %rdx,0x1d0(%rsp)
  lea    D730(%rip),%rdx
  mov    %rcx,0x1d8(%rsp)
  lea    D576(%rip),%rcx
  mov    %rsi,0x1e0(%rsp)
  lea    D865(%rip),%rsi
  mov    %rdx,0x1e8(%rsp)
  lea    D358(%rip),%rdx
  mov    %rcx,0x1f0(%rsp)
  lea    D344(%rip),%rcx
  mov    %rsi,0x1f8(%rsp)
  lea    D428(%rip),%rsi
  mov    %rdx,0x200(%rsp)
  lea    D518(%rip),%rdx
  mov    %rcx,0x208(%rsp)
  lea    D490(%rip),%rcx
  mov    %rsi,0x210(%rsp)
  lea    D458(%rip),%rsi
  mov    %rdx,0x218(%rsp)
  lea    D87(%rip),%rdx
  mov    %rax,0x18(%rsp)
  mov    %rax,0x20(%rsp)
  mov    %rcx,0x220(%rsp)
  lea    D302(%rip),%rcx
  mov    %rsi,0x228(%rsp)
  lea    D281(%rip),%rsi
  mov    %rdx,0x230(%rsp)
  lea    D507(%rip),%rdx
  mov    %rax,0x78(%rsp)
  lea    D439(%rip),%rax
  mov    %rax,0x80(%rsp)
  lea    D176(%rip),%rax
  mov    %rax,0x88(%rsp)
  lea    D337(%rip),%rax
  mov    %rax,0x90(%rsp)
  lea    D853(%rip),%rax
  mov    %rax,0xa0(%rsp)
  lea    D159(%rip),%rax
  mov    %rax,0xa8(%rsp)
  lea    D851(%rip),%rax
  mov    %rax,0xb0(%rsp)
  lea    D310(%rip),%rax
  mov    %rax,0xb8(%rsp)
  lea    D816(%rip),%rax
  mov    %rax,0xc0(%rsp)
  lea    D784(%rip),%rax
  mov    %rax,0xc8(%rsp)
  lea    D804(%rip),%rax
  mov    %rax,0xd0(%rsp)
  lea    D725(%rip),%rax
  mov    %rax,0xd8(%rsp)
  lea    D402(%rip),%rax
  mov    %rax,0xe0(%rsp)
  lea    D210(%rip),%rax
  mov    %rax,0xe8(%rsp)
  lea    D806(%rip),%rax
  mov    %rax,0xf0(%rsp)
  lea    D60(%rip),%rax
  mov    %rcx,0x40(%rsp)
  lea    D592(%rip),%rcx
  mov    %rdx,0x50(%rsp)
  lea    D516(%rip),%rdx
  mov    %rax,0xf8(%rsp)
  lea    D61(%rip),%rax
  mov    %rsi,0x48(%rsp)
  lea    D240(%rip),%rsi
  mov    %rcx,0x58(%rsp)
  lea    D765(%rip),%rcx
  mov    %rdx,0x68(%rsp)
  lea    D413(%rip),%rdx
  mov    %rax,0x100(%rsp)
  lea    D301(%rip),%rax
  mov    %rax,0x8(%rsp)
  lea    D805(%rip),%rax
  mov    %rsi,0x60(%rsp)
  mov    %rcx,0x70(%rsp)
  mov    %rdx,(%rsp)
  test   %edi,%edi
  je     L33
  mov    %edi,%eax
  neg    %eax
  cmovns %eax,%edi
  cmp    $0x76b,%edi
  jle    L88
  mov    $0x76c,%eax
  mov    $0x2,%edx
  mov    %rsp,%rcx
L137:
  sub    %eax,%edi
  lea    D413(%rip),%rax
  cmp    %edi,%edx
  jle    L33
  movslq %edi,%rdi
  mov    (%rcx,%rdi,8),%rax
L33:
  mov    0x2e8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L66
  add    $0x2f8,%rsp
  ret
L88:
  cmp    $0x63f,%edi
  jg     L72
  cmp    $0x5db,%edi
  jg     L42
  cmp    $0x577,%edi
  jg     L145
  cmp    $0x513,%edi
  jg     L159
  cmp    $0x4af,%edi
  jg     L105
  mov    %rdx,%rax
  cmp    $0x44b,%edi
  jle    L33
  mov    $0x44c,%eax
  mov    $0x11,%edx
  lea    0x110(%rsp),%rcx
  jmp    L137
  nopw   0x0(%rax,%rax,1)
L72:
  mov    $0x640,%eax
  mov    $0xd,%edx
  lea    0xa0(%rsp),%rcx
  jmp    L137
  nop
L42:
  mov    $0x5dc,%eax
  mov    $0xb,%edx
  lea    0x40(%rsp),%rcx
  jmp    L137
  nopl   0x0(%rax)
L145:
  mov    $0x578,%eax
  mov    $0x13,%edx
  lea    0x1a0(%rsp),%rcx
  jmp    L137
  nop
L159:
  mov    $0x514,%eax
  mov    $0x6,%edx
  lea    0x10(%rsp),%rcx
  jmp    L137
  nopl   0x0(%rax)
L105:
  mov    $0x4b0,%eax
  mov    $0x15,%edx
  lea    0x240(%rsp),%rcx
  jmp    L137
L66:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D52
type_guessed: string
name: retrieve_data
arguments: data_tag: D140
type_guessed: string
name: retrieve_data
arguments: data_tag: D623
type_guessed: string
name: retrieve_data
arguments: data_tag: D578
type_guessed: string
name: retrieve_data
arguments: data_tag: D48
type_guessed: string
name: retrieve_data
arguments: data_tag: D162
type_guessed: string
name: retrieve_data
arguments: data_tag: D422
type_guessed: string
name: retrieve_data
arguments: data_tag: D582
type_guessed: string
name: retrieve_data
arguments: data_tag: D652
type_guessed: string
name: retrieve_data
arguments: data_tag: D118
type_guessed: string
name: retrieve_data
arguments: data_tag: D475
type_guessed: string
name: retrieve_data
arguments: data_tag: D443
type_guessed: string
name: retrieve_data
arguments: data_tag: D288
type_guessed: string
name: retrieve_data
arguments: data_tag: D321
type_guessed: string
name: retrieve_data
arguments: data_tag: D145
type_guessed: string
name: retrieve_data
arguments: data_tag: D715
type_guessed: string
name: retrieve_data
arguments: data_tag: D530
type_guessed: string
name: retrieve_data
arguments: data_tag: D856
type_guessed: string
name: retrieve_data
arguments: data_tag: D466
type_guessed: string
name: retrieve_data
arguments: data_tag: D775
type_guessed: string
name: retrieve_data
arguments: data_tag: D743
type_guessed: string
name: retrieve_data
arguments: data_tag: D273
type_guessed: string
name: retrieve_data
arguments: data_tag: D560
type_guessed: string
name: retrieve_data
arguments: data_tag: D442
type_guessed: string
name: retrieve_data
arguments: data_tag: D747
type_guessed: string
name: retrieve_data
arguments: data_tag: D34
type_guessed: string
name: retrieve_data
arguments: data_tag: D794
type_guessed: string
name: retrieve_data
arguments: data_tag: D401
type_guessed: string
name: retrieve_data
arguments: data_tag: D225
type_guessed: string
name: retrieve_data
arguments: data_tag: D254
type_guessed: string
name: retrieve_data
arguments: data_tag: D411
type_guessed: string
name: retrieve_data
arguments: data_tag: D233
type_guessed: string
name: retrieve_data
arguments: data_tag: D271
type_guessed: string
name: retrieve_data
arguments: data_tag: D388
type_guessed: string
name: retrieve_data
arguments: data_tag: D546
type_guessed: string
name: retrieve_data
arguments: data_tag: D708
type_guessed: string
name: retrieve_data
arguments: data_tag: D164
type_guessed: string
name: retrieve_data
arguments: data_tag: D197
type_guessed: string
name: retrieve_data
arguments: data_tag: D452
type_guessed: string
name: retrieve_data
arguments: data_tag: D609
type_guessed: string
name: retrieve_data
arguments: data_tag: D813
type_guessed: string
name: retrieve_data
arguments: data_tag: D754
type_guessed: string
name: retrieve_data
arguments: data_tag: D579
type_guessed: string
name: retrieve_data
arguments: data_tag: D711
type_guessed: string
name: retrieve_data
arguments: data_tag: D601
type_guessed: string
name: retrieve_data
arguments: data_tag: D477
type_guessed: string
name: retrieve_data
arguments: data_tag: D744
type_guessed: string
name: retrieve_data
arguments: data_tag: D404
type_guessed: string
name: retrieve_data
arguments: data_tag: D653
type_guessed: string
name: retrieve_data
arguments: data_tag: D33
type_guessed: string
name: retrieve_data
arguments: data_tag: D730
type_guessed: string
name: retrieve_data
arguments: data_tag: D576
type_guessed: string
name: retrieve_data
arguments: data_tag: D865
type_guessed: string
name: retrieve_data
arguments: data_tag: D358
type_guessed: string
name: retrieve_data
arguments: data_tag: D344
type_guessed: string
name: retrieve_data
arguments: data_tag: D428
type_guessed: string
name: retrieve_data
arguments: data_tag: D518
type_guessed: string
name: retrieve_data
arguments: data_tag: D490
type_guessed: string
name: retrieve_data
arguments: data_tag: D458
type_guessed: string
name: retrieve_data
arguments: data_tag: D87
type_guessed: string
name: retrieve_data
arguments: data_tag: D302
type_guessed: string
name: retrieve_data
arguments: data_tag: D281
type_guessed: string
name: retrieve_data
arguments: data_tag: D507
type_guessed: string
name: retrieve_data
arguments: data_tag: D439
type_guessed: string
name: retrieve_data
arguments: data_tag: D176
type_guessed: string
name: retrieve_data
arguments: data_tag: D337
type_guessed: string
name: retrieve_data
arguments: data_tag: D853
type_guessed: string
name: retrieve_data
arguments: data_tag: D159
type_guessed: string
name: retrieve_data
arguments: data_tag: D851
type_guessed: string
name: retrieve_data
arguments: data_tag: D310
type_guessed: string
name: retrieve_data
arguments: data_tag: D816
type_guessed: string
name: retrieve_data
arguments: data_tag: D784
type_guessed: string
name: retrieve_data
arguments: data_tag: D804
type_guessed: string
name: retrieve_data
arguments: data_tag: D725
type_guessed: string
name: retrieve_data
arguments: data_tag: D402
type_guessed: string
name: retrieve_data
arguments: data_tag: D210
type_guessed: string
name: retrieve_data
arguments: data_tag: D806
type_guessed: string
name: retrieve_data
arguments: data_tag: D60
type_guessed: string
name: retrieve_data
arguments: data_tag: D592
type_guessed: string
name: retrieve_data
arguments: data_tag: D516
type_guessed: string
name: retrieve_data
arguments: data_tag: D61
type_guessed: string
name: retrieve_data
arguments: data_tag: D240
type_guessed: string
name: retrieve_data
arguments: data_tag: D765
type_guessed: string
name: retrieve_data
arguments: data_tag: D413
type_guessed: string
name: retrieve_data
arguments: data_tag: D301
type_guessed: string
name: retrieve_data
arguments: data_tag: D805
type_guessed: string

tool: D52: Card not present

tool: D140: Card removed

tool: D623: Generic reader error

tool: D578: Card reset

tool: D48: Input operation cancelled by user

tool: D162: Transmit failed

tool: D422: Timed out while waiting for user input

tool: D582: The two PINs did not match

tool: D652: Message too long (keypad)

tool: D118: Timeout while waiting for event from card reader

tool: D475: Unresponsive card (correctly inserted?)

tool: D443: Reader detached

tool: D288: Reader reattached

tool: D321: Reader in use by another application

tool: D145: Card command failed

tool: D715: File not found

tool: D530: Record not found

tool: D856: Unsupported CLA byte in APDU

tool: D466: Unsupported INS byte in APDU

tool: D775: Incorrect parameters in APDU

tool: D743: Wrong length

tool: D273: Card memory failure

tool: D560: No readers found

tool: D442: Card does not support the requested operation

tool: D747: Not allowed

tool: D34: Card is invalid or cannot be handled

tool: D794: UNUSED

tool: D401: Security status not satisfied

tool: D225: Authentication method blocked

tool: D254: Unknown data received from card

tool: D411: PIN code or key incorrect

tool: D233: File already exists

tool: D271: Data object not found

tool: D388: Not enough memory on card

tool: D546: Part of returned data may be corrupted

tool: D708: End of file/record reached before reading Le bytes

tool: D164: Reference data not usable

tool: D197: Invalid arguments

tool: D452: Buffer too small

tool: D609: Invalid PIN length

tool: D813: Invalid data

tool: D754: Internal error

tool: D579: Invalid ASN.1 object

tool: D711: Required ASN.1 object not found

tool: D601: Premature end of ASN.1 stream

tool: D477: Out of memory

tool: D744: Too many objects

tool: D404: Object not valid

tool: D653: Requested object not found

tool: D33: Not supported

tool: D730: Passphrase required

tool: D576: Inconsistent configuration

tool: D865: Decryption failed

tool: D358: Wrong padding

tool: D344: Unsupported card

tool: D428: Unable to load external module

tool: D518: EF offset too large

tool: D490: Not implemented

tool: D458: Invalid Simple TLV object

tool: D87: Premature end of Simple TLV stream

tool: D302: Generic PKCS#15 initialization error

tool: D281: Syntax error

tool: D507: Inconsistent or incomplete PKCS#15 profile

tool: D439: File template not found

tool: D176: Invalid PIN reference

tool: D337: File too small

tool: D853: Generic Secure Messaging error

tool: D159: Data enciphering error

tool: D851: Invalid secure messaging level

tool: D310: No session keys

tool: D816: Invalid session keys

tool: D784: Secure Messaging not initialized

tool: D804: Cannot authenticate card

tool: D725: Random generation error

tool: D402: Secure messaging keyset not found

tool: D210: IFD data missing

tool: D806: SM not applied

tool: D60: SM session already active

tool: D592: Key length/algorithm not supported by card

tool: D516: Non unique object ID

tool: D61: Invalid checksum

tool: D240: No default (transport) key available

tool: D765: Unable to load key and certificate(s) from file

tool: D413: Unknown error

tool: D301: PKCS#15 compatible smart card not found

tool: D805: Success

assistant: ```c
const char *sc_strerror(int error) {
  const char *rdr_errors[] = {"Generic reader error", "No readers found", "UNUSED", "UNUSED", "Card not present", "Card removed", "Card reset", "Transmit failed", "Timed out while waiting for user input", "Input operation cancelled by user", "The two PINs did not match", "Message too long (keypad)", "Timeout while waiting for event from card reader", "Unresponsive card (correctly inserted?)", "Reader detached", "Reader reattached", "Reader in use by another application"};
  const int rdr_base = - -1100;
  const char *card_errors[] = {"Card command failed", "File not found", "Record not found", "Unsupported CLA byte in APDU", "Unsupported INS byte in APDU", "Incorrect parameters in APDU", "Wrong length", "Card memory failure", "Card does not support the requested operation", "Not allowed", "Card is invalid or cannot be handled", "Security status not satisfied", "Authentication method blocked", "Unknown data received from card", "PIN code or key incorrect", "File already exists", "Data object not found", "Not enough memory on card", "Part of returned data may be corrupted", "End of file/record reached before reading Le bytes", "Reference data not usable"};
  const int card_base = - -1200;
  const char *arg_errors[] = {
      "Invalid arguments", "UNUSED", "UNUSED", "Buffer too small", "Invalid PIN length", "Invalid data",
  };
  const int arg_base = - -1300;
  const char *int_errors[] = {
      "Internal error", "Invalid ASN.1 object", "Required ASN.1 object not found", "Premature end of ASN.1 stream", "Out of memory", "Too many objects", "Object not valid", "Requested object not found", "Not supported", "Passphrase required", "Inconsistent configuration", "Decryption failed", "Wrong padding", "Unsupported card", "Unable to load external module", "EF offset too large", "Not implemented", "Invalid Simple TLV object", "Premature end of Simple TLV stream",
  };
  const int int_base = - -1400;
  const char *p15i_errors[] = {
      "Generic PKCS#15 initialization error", "Syntax error", "Inconsistent or incomplete PKCS#15 profile", "Key length/algorithm not supported by card", "No default (transport) key available", "Non unique object ID", "Unable to load key and certificate(s) from file", "UNUSED", "File template not found", "Invalid PIN reference", "File too small",
  };
  const int p15i_base = - -1500;
  const char *sm_errors[] = {"Generic Secure Messaging error", "Data enciphering error", "Invalid secure messaging level", "No session keys", "Invalid session keys", "Secure Messaging not initialized", "Cannot authenticate card", "Random generation error", "Secure messaging keyset not found", "IFD data missing", "SM not applied", "SM session already active", "Invalid checksum"};
  const int sm_base = - -1600;
  const char *misc_errors[] = {
      "Unknown error",
      "PKCS#15 compatible smart card not found",
  };
  const int misc_base = - -1900;
  const char *no_errors = "Success";
  const char **errors = NULL;
  int count = 0, err_base = 0;
  if (!error)
    return no_errors;
  if (error < 0)
    error = -error;
  if (error >= misc_base) {
    errors = misc_errors;
    count = (sizeof(misc_errors) / (sizeof((misc_errors)[0])));
    err_base = misc_base;
  } else if (error >= sm_base) {
    errors = sm_errors;
    count = (sizeof(sm_errors) / (sizeof((sm_errors)[0])));
    err_base = sm_base;
  } else if (error >= p15i_base) {
    errors = p15i_errors;
    count = (sizeof(p15i_errors) / (sizeof((p15i_errors)[0])));
    err_base = p15i_base;
  } else if (error >= int_base) {
    errors = int_errors;
    count = (sizeof(int_errors) / (sizeof((int_errors)[0])));
    err_base = int_base;
  } else if (error >= arg_base) {
    errors = arg_errors;
    count = (sizeof(arg_errors) / (sizeof((arg_errors)[0])));
    err_base = arg_base;
  } else if (error >= card_base) {
    errors = card_errors;
    count = (sizeof(card_errors) / (sizeof((card_errors)[0])));
    err_base = card_base;
  } else if (error >= rdr_base) {
    errors = rdr_errors;
    count = (sizeof(rdr_errors) / (sizeof((rdr_errors)[0])));
    err_base = rdr_base;
  }
  error -= err_base;
  if (error >= count || count == 0)
    return misc_errors[0];
  return errors[error];
}
```