user: Converte this assembly snippet into its equivalent C code:

```asm
<clErrNo2Str>:
  endbr64
  sub    $0x338,%rsp
  mov    %edi,%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x328(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    $0x64,%ecx
  rep stos %rax,%es:(%rdi)
  lea    D295(%rip),%rax
  mov    %rax,(%rsp)
  lea    D435(%rip),%rax
  mov    %rax,0x8(%rsp)
  lea    D103(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D296(%rip),%rax
  mov    %rax,0x18(%rsp)
  lea    D76(%rip),%rax
  mov    %rax,0x20(%rsp)
  lea    D227(%rip),%rax
  mov    %rax,0x28(%rsp)
  lea    D16(%rip),%rax
  mov    %rax,0x30(%rsp)
  lea    D548(%rip),%rax
  mov    %rax,0x38(%rsp)
  lea    D312(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    D469(%rip),%rax
  mov    %rax,0x48(%rsp)
  lea    D154(%rip),%rax
  mov    %rax,0x50(%rsp)
  lea    D87(%rip),%rax
  mov    %rax,0x58(%rsp)
  lea    D487(%rip),%rax
  mov    %rax,0x60(%rsp)
  lea    D66(%rip),%rax
  mov    %rax,0x68(%rsp)
  lea    D372(%rip),%rax
  mov    %rax,0x70(%rsp)
  lea    D451(%rip),%rax
  mov    %rax,0x78(%rsp)
  lea    D390(%rip),%rax
  mov    %rax,0x80(%rsp)
  lea    D262(%rip),%rax
  mov    %rax,0x88(%rsp)
  lea    D448(%rip),%rax
  mov    %rax,0x90(%rsp)
  lea    D439(%rip),%rax
  mov    %rax,0x98(%rsp)
  lea    D92(%rip),%rax
  mov    %rax,0xa0(%rsp)
  mov    %rax,0xa8(%rsp)
  mov    %rax,0xb0(%rsp)
  mov    %rax,0xb8(%rsp)
  mov    %rax,0xc0(%rsp)
  mov    %rax,0xc8(%rsp)
  mov    %rax,0xd0(%rsp)
  mov    %rax,0xd8(%rsp)
  mov    %rax,0xe0(%rsp)
  mov    %rax,0xe8(%rsp)
  lea    D573(%rip),%rax
  mov    %rax,0xf0(%rsp)
  lea    D203(%rip),%rax
  mov    %rax,0xf8(%rsp)
  lea    D293(%rip),%rax
  mov    %rax,0x100(%rsp)
  lea    D592(%rip),%rax
  mov    %rax,0x108(%rsp)
  lea    D123(%rip),%rax
  mov    %rax,0x110(%rsp)
  lea    D42(%rip),%rax
  mov    %rax,0x118(%rsp)
  lea    D381(%rip),%rax
  mov    %rax,0x120(%rsp)
  lea    D520(%rip),%rax
  mov    %rax,0x128(%rsp)
  lea    D195(%rip),%rax
  mov    %rax,0x130(%rsp)
  lea    D529(%rip),%rax
  mov    %rax,0x138(%rsp)
  lea    D204(%rip),%rax
  mov    %rax,0x140(%rsp)
  lea    D570(%rip),%rax
  mov    %rax,0x148(%rsp)
  lea    D69(%rip),%rax
  mov    %rax,0x150(%rsp)
  lea    D417(%rip),%rax
  mov    %rax,0x158(%rsp)
  lea    D14(%rip),%rax
  mov    %rax,0x160(%rsp)
  lea    D297(%rip),%rax
  mov    %rax,0x168(%rsp)
  lea    D91(%rip),%rax
  mov    %rax,0x170(%rsp)
  lea    D56(%rip),%rax
  mov    %rax,0x178(%rsp)
  lea    D61(%rip),%rax
  mov    %rax,0x180(%rsp)
  lea    D402(%rip),%rax
  mov    %rax,0x188(%rsp)
  lea    D409(%rip),%rax
  mov    %rax,0x190(%rsp)
  lea    D364(%rip),%rax
  mov    %rax,0x198(%rsp)
  lea    D564(%rip),%rax
  mov    %rax,0x1a0(%rsp)
  lea    D225(%rip),%rax
  mov    %rax,0x1a8(%rsp)
  lea    D111(%rip),%rax
  mov    %rax,0x1b0(%rsp)
  lea    D242(%rip),%rax
  mov    %rax,0x1b8(%rsp)
  lea    D167(%rip),%rax
  mov    %rax,0x1c0(%rsp)
  lea    D140(%rip),%rax
  mov    %rax,0x1c8(%rsp)
  lea    D344(%rip),%rax
  mov    %rax,0x1d0(%rsp)
  lea    D139(%rip),%rax
  mov    %rax,0x1d8(%rsp)
  lea    D583(%rip),%rax
  mov    %rax,0x1e0(%rsp)
  lea    D196(%rip),%rax
  mov    %rax,0x1e8(%rsp)
  lea    D407(%rip),%rax
  mov    %rax,0x1f0(%rsp)
  lea    D115(%rip),%rax
  mov    %rax,0x1f8(%rsp)
  lea    D438(%rip),%rax
  mov    %rax,0x200(%rsp)
  lea    D43(%rip),%rax
  mov    %rax,0x208(%rsp)
  lea    D444(%rip),%rax
  mov    %rax,0x210(%rsp)
  lea    D236(%rip),%rax
  mov    %rax,0x218(%rsp)
  lea    D457(%rip),%rax
  mov    %rax,0x220(%rsp)
  neg    %edx
  movslq %edx,%rdx
  mov    (%rsp,%rdx,8),%rax
  mov    0x328(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L0
  add    $0x338,%rsp
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D295
data_type: string
name: read_data
arguments: label: D435
data_type: string
name: read_data
arguments: label: D103
data_type: string
name: read_data
arguments: label: D296
data_type: string
name: read_data
arguments: label: D76
data_type: string
name: read_data
arguments: label: D227
data_type: string
name: read_data
arguments: label: D16
data_type: string
name: read_data
arguments: label: D548
data_type: string
name: read_data
arguments: label: D312
data_type: string
name: read_data
arguments: label: D469
data_type: string
name: read_data
arguments: label: D154
data_type: string
name: read_data
arguments: label: D87
data_type: string
name: read_data
arguments: label: D487
data_type: string
name: read_data
arguments: label: D66
data_type: string
name: read_data
arguments: label: D372
data_type: string
name: read_data
arguments: label: D451
data_type: string
name: read_data
arguments: label: D390
data_type: string
name: read_data
arguments: label: D262
data_type: string
name: read_data
arguments: label: D448
data_type: string
name: read_data
arguments: label: D439
data_type: string
name: read_data
arguments: label: D92
data_type: string
name: read_data
arguments: label: D573
data_type: string
name: read_data
arguments: label: D203
data_type: string
name: read_data
arguments: label: D293
data_type: string
name: read_data
arguments: label: D592
data_type: string
name: read_data
arguments: label: D123
data_type: string
name: read_data
arguments: label: D42
data_type: string
name: read_data
arguments: label: D381
data_type: string
name: read_data
arguments: label: D520
data_type: string
name: read_data
arguments: label: D195
data_type: string
name: read_data
arguments: label: D529
data_type: string
name: read_data
arguments: label: D204
data_type: string
name: read_data
arguments: label: D570
data_type: string
name: read_data
arguments: label: D69
data_type: string
name: read_data
arguments: label: D417
data_type: string
name: read_data
arguments: label: D14
data_type: string
name: read_data
arguments: label: D297
data_type: string
name: read_data
arguments: label: D91
data_type: string
name: read_data
arguments: label: D56
data_type: string
name: read_data
arguments: label: D61
data_type: string
name: read_data
arguments: label: D402
data_type: string
name: read_data
arguments: label: D409
data_type: string
name: read_data
arguments: label: D364
data_type: string
name: read_data
arguments: label: D564
data_type: string
name: read_data
arguments: label: D225
data_type: string
name: read_data
arguments: label: D111
data_type: string
name: read_data
arguments: label: D242
data_type: string
name: read_data
arguments: label: D167
data_type: string
name: read_data
arguments: label: D140
data_type: string
name: read_data
arguments: label: D344
data_type: string
name: read_data
arguments: label: D139
data_type: string
name: read_data
arguments: label: D583
data_type: string
name: read_data
arguments: label: D196
data_type: string
name: read_data
arguments: label: D407
data_type: string
name: read_data
arguments: label: D115
data_type: string
name: read_data
arguments: label: D438
data_type: string
name: read_data
arguments: label: D43
data_type: string
name: read_data
arguments: label: D444
data_type: string
name: read_data
arguments: label: D236
data_type: string
name: read_data
arguments: label: D457
data_type: string

tool: D295: CL_SUCCESS

tool: D435: CL_DEVICE_NOT_FOUND

tool: D103: CL_DEVICE_NOT_AVAILABLE

tool: D296: CL_COMPILER_NOT_AVAILABLE

tool: D76: CL_MEM_OBJECT_ALLOCATION_FAILURE

tool: D227: CL_OUT_OF_RESOURCES

tool: D16: CL_OUT_OF_HOST_MEMORY

tool: D548: CL_PROFILING_INFO_NOT_AVAILABLE

tool: D312: CL_MEM_COPY_OVERLAP

tool: D469: CL_IMAGE_FORMAT_MISMATCH

tool: D154: CL_IMAGE_FORMAT_NOT_SUPPORTED

tool: D87: CL_BUILD_PROGRAM_FAILURE

tool: D487: CL_MAP_FAILURE

tool: D66: CL_MISALIGNED_SUB_BUFFER_OFFSET

tool: D372: CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST

tool: D451: CL_COMPILE_PROGRAM_FAILURE

tool: D390: CL_LINKER_NOT_AVAILABLE

tool: D262: CL_LINK_PROGRAM_FAILURE

tool: D448: CL_DEVICE_PARTITION_FAILED

tool: D439: CL_KERNEL_ARG_INFO_NOT_AVAILABLE

tool: D92: CL_UNDEFINE_ERROR

tool: D573: CL_INVALID_VALUE

tool: D203: CL_INVALID_DEVICE_TYPE

tool: D293: CL_INVALID_PLATFORM

tool: D592: CL_INVALID_DEVICE

tool: D123: CL_INVALID_CONTEXT

tool: D42: CL_INVALID_QUEUE_PROPERTIES

tool: D381: CL_INVALID_COMMAND_QUEUE

tool: D520: CL_INVALID_HOST_PTR

tool: D195: CL_INVALID_MEM_OBJECT

tool: D529: CL_INVALID_IMAGE_FORMAT_DESCRIPTOR

tool: D204: CL_INVALID_IMAGE_SIZE

tool: D570: CL_INVALID_SAMPLER

tool: D69: CL_INVALID_BINARY

tool: D417: CL_INVALID_BUILD_OPTIONS

tool: D14: CL_INVALID_PROGRAM

tool: D297: CL_INVALID_PROGRAM_EXECUTABLE

tool: D91: CL_INVALID_KERNEL_NAME

tool: D56: CL_INVALID_KERNEL_DEFINITION

tool: D61: CL_INVALID_KERNEL

tool: D402: CL_INVALID_ARG_INDEX

tool: D409: CL_INVALID_ARG_VALUE

tool: D364: CL_INVALID_ARG_SIZE

tool: D564: CL_INVALID_KERNEL_ARGS

tool: D225: CL_INVALID_WORK_DIMENSION

tool: D111: CL_INVALID_WORK_GROUP_SIZE

tool: D242: CL_INVALID_WORK_ITEM_SIZE

tool: D167: CL_INVALID_GLOBAL_OFFSET

tool: D140: CL_INVALID_EVENT_WAIT_LIST

tool: D344: CL_INVALID_EVENT

tool: D139: CL_INVALID_OPERATION

tool: D583: CL_INVALID_GL_OBJECT

tool: D196: CL_INVALID_BUFFER_SIZE

tool: D407: CL_INVALID_MIP_LEVEL

tool: D115: CL_INVALID_GLOBAL_WORK_SIZE

tool: D438: CL_INVALID_PROPERTY

tool: D43: CL_INVALID_IMAGE_DESCRIPTOR

tool: D444: CL_INVALID_COMPILER_OPTIONS

tool: D236: CL_INVALID_LINKER_OPTIONS

tool: D457: CL_INVALID_DEVICE_PARTITION_COUNT

assistant: ```c
char *clErrNo2Str(int n) {
  char *clErrString[100] = {
      "CL_SUCCESS", "CL_DEVICE_NOT_FOUND", "CL_DEVICE_NOT_AVAILABLE", "CL_COMPILER_NOT_AVAILABLE", "CL_MEM_OBJECT_ALLOCATION_FAILURE", "CL_OUT_OF_RESOURCES", "CL_OUT_OF_HOST_MEMORY", "CL_PROFILING_INFO_NOT_AVAILABLE", "CL_MEM_COPY_OVERLAP", "CL_IMAGE_FORMAT_MISMATCH", "CL_IMAGE_FORMAT_NOT_SUPPORTED", "CL_BUILD_PROGRAM_FAILURE", "CL_MAP_FAILURE", "CL_MISALIGNED_SUB_BUFFER_OFFSET", "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST", "CL_COMPILE_PROGRAM_FAILURE", "CL_LINKER_NOT_AVAILABLE", "CL_LINK_PROGRAM_FAILURE", "CL_DEVICE_PARTITION_FAILED", "CL_KERNEL_ARG_INFO_NOT_AVAILABLE", "CL_UNDEFINE_ERROR", "CL_UNDEFINE_ERROR", "CL_UNDEFINE_ERROR", "CL_UNDEFINE_ERROR", "CL_UNDEFINE_ERROR", "CL_UNDEFINE_ERROR", "CL_UNDEFINE_ERROR", "CL_UNDEFINE_ERROR", "CL_UNDEFINE_ERROR", "CL_UNDEFINE_ERROR", "CL_INVALID_VALUE", "CL_INVALID_DEVICE_TYPE", "CL_INVALID_PLATFORM", "CL_INVALID_DEVICE", "CL_INVALID_CONTEXT", "CL_INVALID_QUEUE_PROPERTIES", "CL_INVALID_COMMAND_QUEUE", "CL_INVALID_HOST_PTR", "CL_INVALID_MEM_OBJECT", "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR", "CL_INVALID_IMAGE_SIZE", "CL_INVALID_SAMPLER", "CL_INVALID_BINARY", "CL_INVALID_BUILD_OPTIONS", "CL_INVALID_PROGRAM", "CL_INVALID_PROGRAM_EXECUTABLE", "CL_INVALID_KERNEL_NAME", "CL_INVALID_KERNEL_DEFINITION", "CL_INVALID_KERNEL", "CL_INVALID_ARG_INDEX", "CL_INVALID_ARG_VALUE", "CL_INVALID_ARG_SIZE", "CL_INVALID_KERNEL_ARGS", "CL_INVALID_WORK_DIMENSION", "CL_INVALID_WORK_GROUP_SIZE", "CL_INVALID_WORK_ITEM_SIZE", "CL_INVALID_GLOBAL_OFFSET", "CL_INVALID_EVENT_WAIT_LIST", "CL_INVALID_EVENT", "CL_INVALID_OPERATION", "CL_INVALID_GL_OBJECT", "CL_INVALID_BUFFER_SIZE", "CL_INVALID_MIP_LEVEL", "CL_INVALID_GLOBAL_WORK_SIZE", "CL_INVALID_PROPERTY", "CL_INVALID_IMAGE_DESCRIPTOR", "CL_INVALID_COMPILER_OPTIONS", "CL_INVALID_LINKER_OPTIONS", "CL_INVALID_DEVICE_PARTITION_COUNT",
  };
  return clErrString[-(n)];
}
```