ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<scalar_product>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  movss  %xmm0,-0x1c(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L39
L2:
  movl   $0x0,-0x4(%rbp)
  jmp    L38
L22:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  -0x1c(%rbp),%xmm0
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  cvttss2si %xmm0,%edx
  mov    -0x4(%rbp),%eax
  cltq
  mov    %edx,(%rcx,%rax,4)
  addl   $0x1,-0x4(%rbp)
L38:
  cmpl   $0x2,-0x4(%rbp)
  jle    L22
  addl   $0x1,-0x8(%rbp)
L39:
  cmpl   $0x2,-0x8(%rbp)
  jle    L2
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void scalar_product(int mat[3][3], float factor) {
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++)
      mat[i][j] = (int)(mat[i][j] * factor);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<scalar_product>:
  endbr64
  lea    0xc(%rdi),%rdx
  add    $0x30,%rdi
  jmp    L17
L15:
  add    $0xc,%rdx
  cmp    %rdi,%rdx
  je     L18
L17:
  lea    -0xc(%rdx),%rax
L31:
  pxor   %xmm1,%xmm1
  cvtsi2ssl (%rax),%xmm1
  mulss  %xmm0,%xmm1
  cvttss2si %xmm1,%ecx
  mov    %ecx,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L31
  jmp    L15
L18:
  ret
```

assistant: ```c
void scalar_product(int mat[3][3], float factor) {
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++)
      mat[i][j] = (int)(mat[i][j] * factor);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<scalar_product>:
  endbr64
  lea    0xc(%rdi),%rdx
  add    $0x30,%rdi
L8:
  lea    -0xc(%rdx),%rax
L11:
  pxor   %xmm1,%xmm1
  add    $0x4,%rax
  cvtsi2ssl -0x4(%rax),%xmm1
  mulss  %xmm0,%xmm1
  cvttss2si %xmm1,%ecx
  mov    %ecx,-0x4(%rax)
  cmp    %rax,%rdx
  jne    L11
  add    $0xc,%rdx
  cmp    %rdi,%rdx
  jne    L8
  ret
```

assistant: ```c
void scalar_product(int mat[3][3], float factor) {
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++)
      mat[i][j] = (int)(mat[i][j] * factor);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<scalar_product>:
  endbr64
  movaps %xmm0,%xmm3
  movaps %xmm0,%xmm4
  movq   0x8(%rdi),%xmm0
  movq   (%rdi),%xmm2
  shufps $0xe0,%xmm4,%xmm4
  cvtdq2ps %xmm0,%xmm0
  mulps  %xmm4,%xmm0
  cvtdq2ps %xmm2,%xmm2
  mulps  %xmm4,%xmm2
  cvttps2dq %xmm0,%xmm1
  movq   0x10(%rdi),%xmm0
  movq   %xmm1,0x8(%rdi)
  cvttps2dq %xmm2,%xmm2
  movq   %xmm2,(%rdi)
  cvtdq2ps %xmm0,%xmm0
  mulps  %xmm4,%xmm0
  cvttps2dq %xmm0,%xmm0
  movq   %xmm0,0x10(%rdi)
  movq   0x18(%rdi),%xmm0
  cvtdq2ps %xmm0,%xmm0
  mulps  %xmm4,%xmm0
  cvttps2dq %xmm0,%xmm0
  movq   %xmm0,0x18(%rdi)
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x20(%rdi),%xmm0
  mulss  %xmm3,%xmm0
  cvttss2si %xmm0,%edx
  mov    %edx,0x20(%rdi)
  ret
```

assistant: ```c
void scalar_product(int mat[3][3], float factor) {
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++)
      mat[i][j] = (int)(mat[i][j] * factor);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<reduction>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x110,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x110(%rbp),%rax
  lea    D9(%rip),%rdx
  mov    $0x21,%ecx
  mov    %rax,%rdi
  mov    %rdx,%rsi
  rep movsq %ds:(%rsi),%es:(%rdi)
  lea    -0x110(%rbp),%rax
  mov    $0x21,%esi
  mov    %rax,%rdi
  call   <buildString@plt>
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

assistant: ```c
char *reduction() {
  char *string[33] = {"__global__ void TODO:kernel_name(float *in, float *out, unsigned int num_elms) {",
                      "",
                      "	int GlobalID = blockIdx.x * blockDim.x + threadIdx.x;",
                      "	int stride = gridDim.x * blockDim.x;",
                      "",
                      "	extern __shared__ float reduction_share[];",
                      "	float thread_sum = 0.0;",
                      "",
                      "	int idx = GlobalID;",
                      "",
                      "	while( idx < num_elms ){",
                      "		thread_sum += in[idx];",
                      "		idx = idx + stride;",
                      "	}",
                      "",
                      "	reduction_share[threadIdx.x] = thread_sum;",
                      "	__syncthreads();",
                      "",
                      "	int num_threads_on = blockDim.x / 2;",
                      "",
                      "	while(num_threads_on > 0) {",
                      "",
                      "		if(threadIdx.x < num_threads_on) {",
                      "			reduction_share[threadIdx.x] += reduction_share[threadIdx.x + num_threads_on];",
                      "		}",
                      "",
                      "		num_threads_on = num_threads_on / 2;",
                      "		__syncthreads();",
                      "	}",
                      "",
                      "	if(threadIdx.x == 0)",
                      "		out[blockIdx.x] = reduction_share[0];",
                      "}"};
  return buildString(string, 33);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<reduction>:
  endbr64
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  lea    D5(%rip),%rsi
  mov    $0x21,%ecx
  rep movsq %ds:(%rsi),%es:(%rdi)
  mov    %rsp,%rdi
  mov    $0x21,%esi
  call   <buildString@plt>
  mov    0x108(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L9
  add    $0x118,%rsp
  ret
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *reduction() {
  char *string[33] = {"__global__ void TODO:kernel_name(float *in, float *out, unsigned int num_elms) {",
                      "",
                      "	int GlobalID = blockIdx.x * blockDim.x + threadIdx.x;",
                      "	int stride = gridDim.x * blockDim.x;",
                      "",
                      "	extern __shared__ float reduction_share[];",
                      "	float thread_sum = 0.0;",
                      "",
                      "	int idx = GlobalID;",
                      "",
                      "	while( idx < num_elms ){",
                      "		thread_sum += in[idx];",
                      "		idx = idx + stride;",
                      "	}",
                      "",
                      "	reduction_share[threadIdx.x] = thread_sum;",
                      "	__syncthreads();",
                      "",
                      "	int num_threads_on = blockDim.x / 2;",
                      "",
                      "	while(num_threads_on > 0) {",
                      "",
                      "		if(threadIdx.x < num_threads_on) {",
                      "			reduction_share[threadIdx.x] += reduction_share[threadIdx.x + num_threads_on];",
                      "		}",
                      "",
                      "		num_threads_on = num_threads_on / 2;",
                      "		__syncthreads();",
                      "	}",
                      "",
                      "	if(threadIdx.x == 0)",
                      "		out[blockIdx.x] = reduction_share[0];",
                      "}"};
  return buildString(string, 33);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<reduction>:
  endbr64
  sub    $0x118,%rsp
  lea    D2(%rip),%rsi
  mov    $0x21,%ecx
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  rep movsq %ds:(%rsi),%es:(%rdi)
  mov    %rsp,%rdi
  mov    $0x21,%esi
  call   <buildString@plt>
  mov    0x108(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L6
  add    $0x118,%rsp
  ret
L6:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *reduction() {
  char *string[33] = {"__global__ void TODO:kernel_name(float *in, float *out, unsigned int num_elms) {",
                      "",
                      "	int GlobalID = blockIdx.x * blockDim.x + threadIdx.x;",
                      "	int stride = gridDim.x * blockDim.x;",
                      "",
                      "	extern __shared__ float reduction_share[];",
                      "	float thread_sum = 0.0;",
                      "",
                      "	int idx = GlobalID;",
                      "",
                      "	while( idx < num_elms ){",
                      "		thread_sum += in[idx];",
                      "		idx = idx + stride;",
                      "	}",
                      "",
                      "	reduction_share[threadIdx.x] = thread_sum;",
                      "	__syncthreads();",
                      "",
                      "	int num_threads_on = blockDim.x / 2;",
                      "",
                      "	while(num_threads_on > 0) {",
                      "",
                      "		if(threadIdx.x < num_threads_on) {",
                      "			reduction_share[threadIdx.x] += reduction_share[threadIdx.x + num_threads_on];",
                      "		}",
                      "",
                      "		num_threads_on = num_threads_on / 2;",
                      "		__syncthreads();",
                      "	}",
                      "",
                      "	if(threadIdx.x == 0)",
                      "		out[blockIdx.x] = reduction_share[0];",
                      "}"};
  return buildString(string, 33);
}
```
user: Translate the below assembly code into C programming language:

```asm
<reduction>:
  endbr64
  sub    $0x118,%rsp
  lea    D8(%rip),%rsi
  mov    $0x21,%ecx
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  rep movsq %ds:(%rsi),%es:(%rdi)
  mov    %rsp,%rdi
  mov    $0x21,%esi
  call   <buildString@plt>
  mov    0x108(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L7
  add    $0x118,%rsp
  ret
L7:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *reduction() {
  char *string[33] = {"__global__ void TODO:kernel_name(float *in, float *out, unsigned int num_elms) {",
                      "",
                      "	int GlobalID = blockIdx.x * blockDim.x + threadIdx.x;",
                      "	int stride = gridDim.x * blockDim.x;",
                      "",
                      "	extern __shared__ float reduction_share[];",
                      "	float thread_sum = 0.0;",
                      "",
                      "	int idx = GlobalID;",
                      "",
                      "	while( idx < num_elms ){",
                      "		thread_sum += in[idx];",
                      "		idx = idx + stride;",
                      "	}",
                      "",
                      "	reduction_share[threadIdx.x] = thread_sum;",
                      "	__syncthreads();",
                      "",
                      "	int num_threads_on = blockDim.x / 2;",
                      "",
                      "	while(num_threads_on > 0) {",
                      "",
                      "		if(threadIdx.x < num_threads_on) {",
                      "			reduction_share[threadIdx.x] += reduction_share[threadIdx.x + num_threads_on];",
                      "		}",
                      "",
                      "		num_threads_on = num_threads_on / 2;",
                      "		__syncthreads();",
                      "	}",
                      "",
                      "	if(threadIdx.x == 0)",
                      "		out[blockIdx.x] = reduction_share[0];",
                      "}"};
  return buildString(string, 33);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<make_char>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,%eax
  mov    %edx,-0x20(%rbp)
  mov    %ecx,-0x24(%rbp)
  mov    %r8d,-0x28(%rbp)
  mov    %al,-0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jle    L27
  mov    $0x0,%eax
  call   <panic_buffer_overflow@plt>
L27:
  cmpl   $0x0,-0x20(%rbp)
  jg     L56
  movl   $0x1,-0x20(%rbp)
L56:
  cmpl   $0x0,-0x24(%rbp)
  je     L8
  mov    -0x18(%rbp),%rax
  movzbl -0x1c(%rbp),%edx
  mov    %dl,(%rax)
  movl   $0x1,-0x4(%rbp)
  jmp    L73
L35:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x20,(%rax)
  addl   $0x1,-0x4(%rbp)
L73:
  mov    -0x4(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L35
  jmp    L0
L8:
  movl   $0x0,-0x4(%rbp)
  jmp    L77
L16:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x20,(%rax)
  addl   $0x1,-0x4(%rbp)
L77:
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x4(%rbp)
  jl     L16
  mov    -0x20(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x1c(%rbp),%eax
  mov    %al,(%rdx)
L0:
  mov    -0x20(%rbp),%eax
  leave
  ret
```

assistant: ```c
int make_char(char *to, char from, int length, int ladjust, int max_buf) {
  int i;
  if (length > max_buf) {
    panic_buffer_overflow();
  }
  if (length < 1) {
    length = 1;
  }
  if (ladjust) {
    *to = from;
    for (i = 1; i < length; i++) {
      to[i] = ' ';
    }
  } else {
    for (i = 0; i < length - 1; i++) {
      to[i] = ' ';
    }
    to[length - 1] = from;
  }
  return length;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<make_char>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r12d
  mov    %edx,%ebp
  mov    %ecx,%r13d
  cmp    %r8d,%edx
  jg     L6
L34:
  test   %ebp,%ebp
  mov    $0x1,%edx
  cmovg  %ebp,%edx
  test   %r13d,%r13d
  jne    L62
  cmp    $0x1,%ebp
  jle    L42
  mov    %rbx,%rax
  lea    -0x2(%rdx),%ecx
  lea    0x1(%rbx,%rcx,1),%rcx
L22:
  movb   $0x20,(%rax)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L22
L42:
  movslq %edx,%rax
  mov    %r12b,-0x1(%rbx,%rax,1)
L69:
  mov    %edx,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L6:
  mov    $0x0,%eax
  call   <panic_buffer_overflow@plt>
  jmp    L34
L62:
  mov    %r12b,(%rbx)
  cmp    $0x1,%ebp
  jle    L69
  mov    $0x1,%eax
L29:
  movb   $0x20,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L29
  jmp    L69
```

assistant: ```c
int make_char(char *to, char from, int length, int ladjust, int max_buf) {
  int i;
  if (length > max_buf) {
    panic_buffer_overflow();
  }
  if (length < 1) {
    length = 1;
  }
  if (ladjust) {
    *to = from;
    for (i = 1; i < length; i++) {
      to[i] = ' ';
    }
  } else {
    for (i = 0; i < length - 1; i++) {
      to[i] = ' ';
    }
    to[length - 1] = from;
  }
  return length;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<make_char>:
  endbr64
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %edx,%ebx
  cmp    %r8d,%edx
  jg     L30
L17:
  test   %ebx,%ebx
  mov    $0x1,%r12d
  cmovg  %ebx,%r12d
  test   %r14d,%r14d
  jne    L45
  cmp    $0x1,%ebx
  jle    L29
  lea    -0x2(%r12),%edx
  mov    $0x20,%esi
  mov    %rbp,%rdi
  add    $0x1,%rdx
  call   <memset@plt>
L29:
  movslq %r12d,%rax
  mov    %r13b,-0x1(%rbp,%rax,1)
L32:
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L45:
  mov    %r13b,0x0(%rbp)
  cmp    $0x1,%ebx
  jle    L32
  lea    -0x2(%r12),%edx
  lea    0x1(%rbp),%rdi
  mov    $0x20,%esi
  add    $0x1,%rdx
  call   <memset@plt>
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L30:
  xor    %eax,%eax
  call   <panic_buffer_overflow@plt>
  jmp    L17
```

assistant: ```c
int make_char(char *to, char from, int length, int ladjust, int max_buf) {
  int i;
  if (length > max_buf) {
    panic_buffer_overflow();
  }
  if (length < 1) {
    length = 1;
  }
  if (ladjust) {
    *to = from;
    for (i = 1; i < length; i++) {
      to[i] = ' ';
    }
  } else {
    for (i = 0; i < length - 1; i++) {
      to[i] = ' ';
    }
    to[length - 1] = from;
  }
  return length;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<make_char>:
  endbr64
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %edx,%ebx
  cmp    %r8d,%edx
  jg     L22
L28:
  test   %ebx,%ebx
  mov    $0x1,%r12d
  cmovg  %ebx,%r12d
  test   %r14d,%r14d
  jne    L17
  cmp    $0x1,%ebx
  jle    L46
  lea    -0x2(%r12),%edx
  mov    $0x20,%esi
  mov    %rbp,%rdi
  add    $0x1,%rdx
  call   <memset@plt>
L46:
  movslq %r12d,%rax
  mov    %r13b,-0x1(%rbp,%rax,1)
L44:
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L17:
  mov    %r13b,0x0(%rbp)
  cmp    $0x1,%ebx
  jle    L44
  lea    -0x2(%r12),%edx
  lea    0x1(%rbp),%rdi
  mov    $0x20,%esi
  add    $0x1,%rdx
  call   <memset@plt>
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L22:
  xor    %eax,%eax
  call   <panic_buffer_overflow@plt>
  jmp    L28
```

assistant: ```c
int make_char(char *to, char from, int length, int ladjust, int max_buf) {
  int i;
  if (length > max_buf) {
    panic_buffer_overflow();
  }
  if (length < 1) {
    length = 1;
  }
  if (ladjust) {
    *to = from;
    for (i = 1; i < length; i++) {
      to[i] = ' ';
    }
  } else {
    for (i = 0; i < length - 1; i++) {
      to[i] = ' ';
    }
    to[length - 1] = from;
  }
  return length;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<is_valid_a_band_channel>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  movl   $0x1,-0x4(%rbp)
  cmpl   $0xa5,-0x14(%rbp)
  jg     L120
  cmpl   $0x68,-0x14(%rbp)
  jge    L4
  cmpl   $0x24,-0x14(%rbp)
  jg     L14
  cmpl   $0x10,-0x14(%rbp)
  jge    L135
  jmp    L120
L4:
  mov    -0x14(%rbp),%eax
  sub    $0x68,%eax
  movabs $0x2222211111111111,%rdx
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  and    $0x1,%eax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  jne    L23
  jmp    L120
L24:
  mov    -0x14(%rbp),%eax
  sub    $0x26,%eax
  movabs $0x4000000004444555,%rdx
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  and    $0x1,%eax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  jne    L23
  jmp    L120
L135:
  mov    -0x14(%rbp),%eax
  movabs $0x1400010000,%rdx
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  and    $0x1,%eax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  jne    L23
  jmp    L120
L14:
  cmpl   $0x64,-0x14(%rbp)
  jg     L120
  cmpl   $0x26,-0x14(%rbp)
  jge    L24
L120:
  movl   $0x0,-0x4(%rbp)
  jmp    L37
L23:
  nop
L37:
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int is_valid_a_band_channel(int channel) {
  int ret = 1;
  switch (channel) {
  case 16:
  case 34:
  case 36:
  case 38:
  case 40:
  case 42:
  case 44:
  case 46:
  case 48:
  case 52:
  case 56:
  case 60:
  case 64:
  case 100:
  case 104:
  case 108:
  case 112:
  case 116:
  case 120:
  case 124:
  case 128:
  case 132:
  case 136:
  case 140:
  case 144:
  case 149:
  case 153:
  case 157:
  case 161:
  case 165:
    break;
  default:
    ret = 0;
    break;
  }
  return ret;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<is_valid_a_band_channel>:
  endbr64
  mov    %edi,%ecx
  mov    $0x0,%eax
  cmp    $0xa5,%edi
  jg     L17
  cmp    $0x67,%edi
  jg     L20
  cmp    $0x24,%edi
  jle    L35
  sub    $0x26,%ecx
  movabs $0x4000000004444555,%rdx
  shr    %cl,%rdx
  mov    %edx,%eax
  and    $0x1,%eax
  mov    %eax,%edx
  cmp    $0x3f,%ecx
  mov    $0x0,%eax
  cmovb  %edx,%eax
L17:
  ret
L35:
  cmp    $0xf,%edi
  jg     L15
  ret
L20:
  sub    $0x68,%ecx
  movabs $0x2222211111111111,%rax
  shr    %cl,%rax
  and    $0x1,%eax
  ret
L15:
  movabs $0x1400010000,%rax
  shr    %cl,%rax
  and    $0x1,%eax
  ret
```

assistant: ```c
int is_valid_a_band_channel(int channel) {
  int ret = 1;
  switch (channel) {
  case 16:
  case 34:
  case 36:
  case 38:
  case 40:
  case 42:
  case 44:
  case 46:
  case 48:
  case 52:
  case 56:
  case 60:
  case 64:
  case 100:
  case 104:
  case 108:
  case 112:
  case 116:
  case 120:
  case 124:
  case 128:
  case 132:
  case 136:
  case 140:
  case 144:
  case 149:
  case 153:
  case 157:
  case 161:
  case 165:
    break;
  default:
    ret = 0;
    break;
  }
  return ret;
}
```
user: What is the c source code of the assembly code below:

```asm
<is_valid_a_band_channel>:
  endbr64
  mov    %edi,%ecx
  xor    %eax,%eax
  cmp    $0xa5,%edi
  jg     L35
  cmp    $0x67,%edi
  jg     L30
  cmp    $0x24,%edi
  jle    L7
  sub    $0x26,%ecx
  cmp    $0x3e,%ecx
  ja     L35
  movabs $0x4000000004444555,%rax
  shr    %cl,%rax
  and    $0x1,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L7:
  cmp    $0xf,%edi
  jg     L26
L35:
  ret
  xchg   %ax,%ax
L26:
  movabs $0x1400010000,%rax
  shr    %cl,%rax
  and    $0x1,%eax
  ret
  nopl   0x0(%rax)
L30:
  movabs $0x2222211111111111,%rax
  sub    $0x68,%ecx
  shr    %cl,%rax
  and    $0x1,%eax
  ret
```

assistant: ```c
int is_valid_a_band_channel(int channel) {
  int ret = 1;
  switch (channel) {
  case 16:
  case 34:
  case 36:
  case 38:
  case 40:
  case 42:
  case 44:
  case 46:
  case 48:
  case 52:
  case 56:
  case 60:
  case 64:
  case 100:
  case 104:
  case 108:
  case 112:
  case 116:
  case 120:
  case 124:
  case 128:
  case 132:
  case 136:
  case 140:
  case 144:
  case 149:
  case 153:
  case 157:
  case 161:
  case 165:
    break;
  default:
    ret = 0;
    break;
  }
  return ret;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<is_valid_a_band_channel>:
  endbr64
  mov    %edi,%ecx
  xor    %eax,%eax
  cmp    $0xa5,%edi
  jg     L6
  cmp    $0x67,%edi
  jg     L32
  cmp    $0x24,%edi
  jle    L11
  sub    $0x26,%ecx
  cmp    $0x3e,%ecx
  ja     L6
  movabs $0x4000000004444555,%rax
  shr    %cl,%rax
  and    $0x1,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L11:
  cmp    $0xf,%edi
  jg     L45
L6:
  ret
  xchg   %ax,%ax
L45:
  movabs $0x1400010000,%rax
  shr    %cl,%rax
  and    $0x1,%eax
  ret
  nopl   0x0(%rax)
L32:
  movabs $0x2222211111111111,%rax
  sub    $0x68,%ecx
  shr    %cl,%rax
  and    $0x1,%eax
  ret
```

assistant: ```c
int is_valid_a_band_channel(int channel) {
  int ret = 1;
  switch (channel) {
  case 16:
  case 34:
  case 36:
  case 38:
  case 40:
  case 42:
  case 44:
  case 46:
  case 48:
  case 52:
  case 56:
  case 60:
  case 64:
  case 100:
  case 104:
  case 108:
  case 112:
  case 116:
  case 120:
  case 124:
  case 128:
  case 132:
  case 136:
  case 140:
  case 144:
  case 149:
  case 153:
  case 157:
  case 161:
  case 165:
    break;
  default:
    ret = 0;
    break;
  }
  return ret;
}
```