user: 请将以下的汇编代码转换成C语言代码:

```asm
<genMaps>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x140,%rsp
  mov    %edi,-0x134(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D187(%rip),%rax
  mov    %rax,-0x130(%rbp)
  lea    D78(%rip),%rax
  mov    %rax,-0x128(%rbp)
  lea    D237(%rip),%rax
  mov    %rax,-0x120(%rbp)
  lea    D308(%rip),%rax
  mov    %rax,-0x118(%rbp)
  lea    D107(%rip),%rax
  mov    %rax,-0x110(%rbp)
  lea    D175(%rip),%rax
  mov    %rax,-0x108(%rbp)
  lea    D281(%rip),%rax
  mov    %rax,-0x100(%rbp)
  lea    D156(%rip),%rax
  mov    %rax,-0xf8(%rbp)
  lea    D122(%rip),%rax
  mov    %rax,-0xf0(%rbp)
  lea    D12(%rip),%rax
  mov    %rax,-0xe0(%rbp)
  lea    D58(%rip),%rax
  mov    %rax,-0xd8(%rbp)
  lea    D163(%rip),%rax
  mov    %rax,-0xd0(%rbp)
  lea    D260(%rip),%rax
  mov    %rax,-0xc8(%rbp)
  lea    D275(%rip),%rax
  mov    %rax,-0xc0(%rbp)
  lea    D316(%rip),%rax
  mov    %rax,-0xb8(%rbp)
  lea    D148(%rip),%rax
  mov    %rax,-0xb0(%rbp)
  lea    D107(%rip),%rax
  mov    %rax,-0xa8(%rbp)
  lea    D175(%rip),%rax
  mov    %rax,-0xa0(%rbp)
  lea    D281(%rip),%rax
  mov    %rax,-0x98(%rbp)
  lea    D156(%rip),%rax
  mov    %rax,-0x90(%rbp)
  lea    D122(%rip),%rax
  mov    %rax,-0x88(%rbp)
  lea    D230(%rip),%rax
  mov    %rax,-0x80(%rbp)
  lea    D154(%rip),%rax
  mov    %rax,-0x78(%rbp)
  lea    D259(%rip),%rax
  mov    %rax,-0x70(%rbp)
  lea    D163(%rip),%rax
  mov    %rax,-0x68(%rbp)
  lea    D242(%rip),%rax
  mov    %rax,-0x60(%rbp)
  lea    D260(%rip),%rax
  mov    %rax,-0x58(%rbp)
  lea    D275(%rip),%rax
  mov    %rax,-0x50(%rbp)
  lea    D52(%rip),%rax
  mov    %rax,-0x48(%rbp)
  lea    D96(%rip),%rax
  mov    %rax,-0x40(%rbp)
  lea    D107(%rip),%rax
  mov    %rax,-0x38(%rbp)
  lea    D175(%rip),%rax
  mov    %rax,-0x30(%rbp)
  lea    D281(%rip),%rax
  mov    %rax,-0x28(%rbp)
  lea    D156(%rip),%rax
  mov    %rax,-0x20(%rbp)
  lea    D122(%rip),%rax
  mov    %rax,-0x18(%rbp)
  cmpl   $0x3,-0x134(%rbp)
  je     L43
  cmpl   $0x3,-0x134(%rbp)
  jg     L41
  cmpl   $0x1,-0x134(%rbp)
  je     L18
  cmpl   $0x2,-0x134(%rbp)
  je     L80
  jmp    L41
L18:
  lea    -0x130(%rbp),%rax
  mov    $0x9,%esi
  mov    %rax,%rdi
  call   <buildString@plt>
  jmp    L6
L80:
  lea    -0xe0(%rbp),%rax
  mov    $0xc,%esi
  mov    %rax,%rdi
  call   <buildString@plt>
  jmp    L6
L43:
  lea    -0x80(%rbp),%rax
  mov    $0xe,%esi
  mov    %rax,%rdi
  call   <buildString@plt>
  jmp    L6
L41:
  lea    D205(%rip),%rax
L6:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L60
  call   <__stack_chk_fail@plt>
L60:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D187
type_guessed: string
name: extract_symbolic_data
arguments: tag: D78
type_guessed: string
name: extract_symbolic_data
arguments: tag: D237
type_guessed: string
name: extract_symbolic_data
arguments: tag: D308
type_guessed: string
name: extract_symbolic_data
arguments: tag: D107
type_guessed: string
name: extract_symbolic_data
arguments: tag: D175
type_guessed: string
name: extract_symbolic_data
arguments: tag: D281
type_guessed: string
name: extract_symbolic_data
arguments: tag: D156
type_guessed: string
name: extract_symbolic_data
arguments: tag: D122
type_guessed: string
name: extract_symbolic_data
arguments: tag: D12
type_guessed: string
name: extract_symbolic_data
arguments: tag: D58
type_guessed: string
name: extract_symbolic_data
arguments: tag: D163
type_guessed: string
name: extract_symbolic_data
arguments: tag: D260
type_guessed: string
name: extract_symbolic_data
arguments: tag: D275
type_guessed: string
name: extract_symbolic_data
arguments: tag: D316
type_guessed: string
name: extract_symbolic_data
arguments: tag: D148
type_guessed: string
name: extract_symbolic_data
arguments: tag: D230
type_guessed: string
name: extract_symbolic_data
arguments: tag: D154
type_guessed: string
name: extract_symbolic_data
arguments: tag: D259
type_guessed: string
name: extract_symbolic_data
arguments: tag: D242
type_guessed: string
name: extract_symbolic_data
arguments: tag: D52
type_guessed: string
name: extract_symbolic_data
arguments: tag: D96
type_guessed: string
name: extract_symbolic_data
arguments: tag: D205
type_guessed: string

tool: D187: int NumThreadsPerBlock = blockDim.x;

tool: D78: int GlobalID_1D = blockIdx.x * blockDim.x + threadIdx.x;

tool: D237: int stride = gridDim.x * NumThreadsPerBlock;

tool: D308: int idx = GlobalID_1D;

tool: 

tool: D175: while( idx < num_elms){

tool: D281: 	c[idx] = a[idx] + b[idx];

tool: D156: 	idx += stride;

tool: D122: }

tool: D12: int NumThreadsPerBlock = blockDim.x * blockDim.y;

tool: D58: int globalID_2D = blockIdx.y * gridDim.x * NumThreadsPerBlock

tool: D163: 		+ blockIdx.x * NumThreadsPerBlock

tool: D260: 		+ threadIdx.y * blockDim.x

tool: D275: 		+ threadIdx.x;

tool: D316: int stride = gridDim.x * gridDim.y * NumThreadsPerBlock;

tool: D148: int idx = globalID_2D;

tool: D230: int NumThreadsPerBlock = blockDim.x * blockDim.y * blockDim.z;

tool: D154: int globalID_3D =  blockIdx.z * gridDim.x * gridDim.y * NumThreadsPerBlock

tool: D259: 		+ blockIdx.y * gridDim.x * NumThreadsPerBlock

tool: D242: 		+ threadIdx.z * blockDim.x * blockDim.y

tool: D52: int stride = gridDim.x * gridDim.y * gridDim.z * NumThreadsPerBlock;

tool: D96: int idx = globalID_3D;

tool: D205: Invalid dimension!


assistant: ```c
char *genMaps(int dimension) {
  char *oneD_to_oneD[9] = {"int NumThreadsPerBlock = blockDim.x;", "int GlobalID_1D = blockIdx.x * blockDim.x + threadIdx.x;", "int stride = gridDim.x * NumThreadsPerBlock;", "int idx = GlobalID_1D;", "", "while( idx < num_elms){", "	c[idx] = a[idx] + b[idx];", "	idx += stride;", "}"};
  char *twoD_to_oneD[12] = {"int NumThreadsPerBlock = blockDim.x * blockDim.y;", "int globalID_2D = blockIdx.y * gridDim.x * NumThreadsPerBlock", "		+ blockIdx.x * NumThreadsPerBlock", "		+ threadIdx.y * blockDim.x", "		+ threadIdx.x;", "int stride = gridDim.x * gridDim.y * NumThreadsPerBlock;", "int idx = globalID_2D;", "", "while( idx < num_elms){", "	c[idx] = a[idx] + b[idx];", "	idx += stride;", "}"};
  char *threeD_to_oneD[14] = {"int NumThreadsPerBlock = blockDim.x * blockDim.y * blockDim.z;", "int globalID_3D =  blockIdx.z * gridDim.x * gridDim.y * NumThreadsPerBlock", "		+ blockIdx.y * gridDim.x * NumThreadsPerBlock", "		+ blockIdx.x * NumThreadsPerBlock", "		+ threadIdx.z * blockDim.x * blockDim.y", "		+ threadIdx.y * blockDim.x", "		+ threadIdx.x;", "int stride = gridDim.x * gridDim.y * gridDim.z * NumThreadsPerBlock;", "int idx = globalID_3D;", "", "while( idx < num_elms){", "	c[idx] = a[idx] + b[idx];", "	idx += stride;", "}"};
  switch (dimension) {
  case 1:
    return buildString(oneD_to_oneD, 9);
  case 2:
    return buildString(twoD_to_oneD, 12);
  case 3:
    return buildString(threeD_to_oneD, 14);
  default:
    return "Invalid dimension!\n";
  }
}
```