ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movl   $0x18,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  sub    $0x9,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  cltd
  idivl  -0x8(%rbp)
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jle    L23
  movl   $0x8,-0xc(%rbp)
  jmp    L46
L23:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L1
  movl   $0x6,-0x8(%rbp)
  jmp    L46
L1:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jle    L59
  movl   $0x9,-0x4(%rbp)
  jmp    L46
L59:
  mov    -0x8(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
L46:
  mov    $0x0,%eax
  pop    %rbp
  ret
```

assistant: ```c
int main() {
  int a, b, c;
  a = 6 * 4;
  b = a * 3 - 9;
  c = a / b;
  if (a > b) {
    a = 8;
  } else if (a < c) {
    b = 6;
  } else if (b > c) {
    c = 9;
  } else {
    a = b + c;
  }
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<main>:
  endbr64
  mov    $0x0,%eax
  ret
```

assistant: ```c
int main() {
  int a, b, c;
  a = 6 * 4;
  b = a * 3 - 9;
  c = a / b;
  if (a > b) {
    a = 8;
  } else if (a < c) {
    b = 6;
  } else if (b > c) {
    c = 9;
  } else {
    a = b + c;
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  xor    %eax,%eax
  ret
```

assistant: ```c
int main() {
  int a, b, c;
  a = 6 * 4;
  b = a * 3 - 9;
  c = a / b;
  if (a > b) {
    a = 8;
  } else if (a < c) {
    b = 6;
  } else if (b > c) {
    c = 9;
  } else {
    a = b + c;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<strplustospace>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  mov    %rdi,-0x10(%rbp)
  mov    $0x0,%ebx
  jmp    L29
L12:
  movslq %ebx,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L5
  movslq %ebx,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x20,(%rax)
L5:
  add    $0x1,%ebx
L29:
  movslq %ebx,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L12
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void strplustospace(char *str) {
  register int x;
  for (x = 0; str[x]; x++)
    if (str[x] == '+')
      str[x] = ' ';
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<strplustospace>:
  endbr64
  movzbl (%rdi),%eax
  test   %al,%al
  jne    L21
L11:
  ret
L18:
  add    $0x1,%rdi
  movzbl (%rdi),%eax
  test   %al,%al
  je     L11
L21:
  cmp    $0x2b,%al
  jne    L18
  movb   $0x20,(%rdi)
  jmp    L18
```

assistant: ```c
void strplustospace(char *str) {
  register int x;
  for (x = 0; str[x]; x++)
    if (str[x] == '+')
      str[x] = ' ';
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<strplustospace>:
  endbr64
  jmp    L13
  cs nopw 0x0(%rax,%rax,1)
L18:
  cmp    $0x2b,%al
  jne    L0
  movb   $0x20,(%rdi)
L0:
  add    $0x1,%rdi
L13:
  movzbl (%rdi),%eax
  test   %al,%al
  jne    L18
  ret
```

assistant: ```c
void strplustospace(char *str) {
  register int x;
  for (x = 0; str[x]; x++)
    if (str[x] == '+')
      str[x] = ' ';
}
```
user: Translate the below assembly code into C programming language:

```asm
<strplustospace>:
  endbr64
  jmp    L2
  cs nopw 0x0(%rax,%rax,1)
L34:
  add    $0x1,%rdi
L2:
  movzbl (%rdi),%eax
  test   %al,%al
  je     L5
L32:
  cmp    $0x2b,%al
  jne    L34
  movb   $0x20,(%rdi)
  movzbl 0x1(%rdi),%eax
  add    $0x1,%rdi
  test   %al,%al
  jne    L32
  ret
  nop
L5:
  ret
```

assistant: ```c
void strplustospace(char *str) {
  register int x;
  for (x = 0; str[x]; x++)
    if (str[x] == '+')
      str[x] = ' ';
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<pow_handler>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <write_src@plt>
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <write_src@plt>
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <write_src@plt>
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <write_src@plt>
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <write_src@plt>
  nop
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: tag: D30
type_infered: string
name: parse_data
arguments: tag: D25
type_infered: string
name: parse_data
arguments: tag: D11
type_infered: string
name: parse_data
arguments: tag: D2
type_infered: string
name: parse_data
arguments: tag: D40
type_infered: string

tool: D30: {


tool: D25: imm_t pow = POP();


tool: D11: imm_t base = POP();


tool: D2: PUSH(eval_exp(base, pow));


tool: D40: }


assistant: ```c
void pow_handler(void) {
  write_src("{\n");
  write_src("imm_t pow = POP();\n");
  write_src("imm_t base = POP();\n");
  write_src("PUSH(eval_exp(base, pow));\n");
  write_src("}\n");
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<pow_handler>:
  endbr64
  sub    $0x8,%rsp
  lea    D34(%rip),%rdi
  call   <write_src@plt>
  lea    D2(%rip),%rdi
  call   <write_src@plt>
  lea    D15(%rip),%rdi
  call   <write_src@plt>
  lea    D42(%rip),%rdi
  call   <write_src@plt>
  lea    D20(%rip),%rdi
  call   <write_src@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D34
data_type: string
name: extract_symbolic_data
arguments: label: D2
data_type: string
name: extract_symbolic_data
arguments: label: D15
data_type: string
name: extract_symbolic_data
arguments: label: D42
data_type: string
name: extract_symbolic_data
arguments: label: D20
data_type: string

tool: D34: {


tool: D2: imm_t pow = POP();


tool: D15: imm_t base = POP();


tool: D42: PUSH(eval_exp(base, pow));


tool: D20: }


assistant: ```c
void pow_handler(void) {
  write_src("{\n");
  write_src("imm_t pow = POP();\n");
  write_src("imm_t base = POP();\n");
  write_src("PUSH(eval_exp(base, pow));\n");
  write_src("}\n");
}
```
user: What is the c source code of the assembly code below:

```asm
<pow_handler>:
  endbr64
  sub    $0x8,%rsp
  lea    D4(%rip),%rdi
  call   <write_src@plt>
  lea    D3(%rip),%rdi
  call   <write_src@plt>
  lea    D34(%rip),%rdi
  call   <write_src@plt>
  lea    D16(%rip),%rdi
  call   <write_src@plt>
  lea    D19(%rip),%rdi
  add    $0x8,%rsp
  jmp    1050 <write_src@plt>
```

tool_calls: name: parse_data
arguments: data_label: D4
type_guessed: string
name: parse_data
arguments: data_label: D3
type_guessed: string
name: parse_data
arguments: data_label: D34
type_guessed: string
name: parse_data
arguments: data_label: D16
type_guessed: string
name: parse_data
arguments: data_label: D19
type_guessed: string

tool: D4: {


tool: D3: imm_t pow = POP();


tool: D34: imm_t base = POP();


tool: D16: PUSH(eval_exp(base, pow));


tool: D19: }


assistant: ```c
void pow_handler(void) {
  write_src("{\n");
  write_src("imm_t pow = POP();\n");
  write_src("imm_t base = POP();\n");
  write_src("PUSH(eval_exp(base, pow));\n");
  write_src("}\n");
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<pow_handler>:
  endbr64
  sub    $0x8,%rsp
  lea    D12(%rip),%rdi
  call   <write_src@plt>
  lea    D30(%rip),%rdi
  call   <write_src@plt>
  lea    D33(%rip),%rdi
  call   <write_src@plt>
  lea    D4(%rip),%rdi
  call   <write_src@plt>
  lea    D34(%rip),%rdi
  add    $0x8,%rsp
  jmp    1050 <write_src@plt>
```

tool_calls: name: read_data
arguments: label: D12
type: string
name: read_data
arguments: label: D30
type: string
name: read_data
arguments: label: D33
type: string
name: read_data
arguments: label: D4
type: string
name: read_data
arguments: label: D34
type: string

tool: D12: {


tool: D30: imm_t pow = POP();


tool: D33: imm_t base = POP();


tool: D4: PUSH(eval_exp(base, pow));


tool: D34: }


assistant: ```c
void pow_handler(void) {
  write_src("{\n");
  write_src("imm_t pow = POP();\n");
  write_src("imm_t base = POP();\n");
  write_src("PUSH(eval_exp(base, pow));\n");
  write_src("}\n");
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x40(%rbp),%rax
  mov    %rax,%rsi
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x20(%rbp),%rdx
  lea    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L19
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L22
L19:
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L22:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L28
  call   <__stack_chk_fail@plt>
L28:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D56
type_guessed: string
name: retrieve_data
arguments: tag: D30
type_guessed: string
name: retrieve_data
arguments: tag: D22
type_guessed: string
name: retrieve_data
arguments: tag: D43
type_guessed: string
name: retrieve_data
arguments: tag: D42
type_guessed: string

tool: D56: Enter first string: 	

tool: D30: %s

tool: D22: Enter second string 	

tool: D43: Entered strings are equal.


tool: D42: Entered strings are not equal.


assistant: ```c
int main() {
  char string1[20];
  char string2[20];
  printf("Enter first string: \t");
  scanf("%s", string1);
  printf("Enter second string \t");
  scanf("%s", string2);
  if (strcmp(string1, string2) == 0)
    printf("Entered strings are equal.\n");
  else
    printf("Entered strings are not equal.\n");
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    %rsp,%rbx
  mov    %rbx,%rsi
  lea    D15(%rip),%r12
  mov    %r12,%rdi
  call   <scanf@plt>
  lea    D47(%rip),%rdi
  call   <printf@plt>
  lea    0x20(%rsp),%rbp
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L15
  lea    D10(%rip),%rdi
  call   <printf@plt>
L4:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  mov    $0x0,%eax
  add    $0x40,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L15:
  lea    D41(%rip),%rdi
  call   <printf@plt>
  jmp    L4
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D8
type: string
name: read_data
arguments: label: D15
type: string
name: read_data
arguments: label: D47
type: string
name: read_data
arguments: label: D10
type: string
name: read_data
arguments: label: D41
type: string

tool: D8: Enter first string: 	

tool: D15: %s

tool: D47: Enter second string 	

tool: D10: Entered strings are equal.


tool: D41: Entered strings are not equal.


assistant: ```c
int main() {
  char string1[20];
  char string2[20];
  printf("Enter first string: \t");
  scanf("%s", string1);
  printf("Enter second string \t");
  scanf("%s", string2);
  if (strcmp(string1, string2) == 0)
    printf("Entered strings are equal.\n");
  else
    printf("Entered strings are not equal.\n");
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r13
  lea    D22(%rip),%rdi
  lea    D6(%rip),%r13
  push   %r12
  push   %rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  lea    0x20(%rsp),%r12
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  lea    D38(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L17
  lea    D14(%rip),%rdi
  call   <printf@plt>
L11:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x40,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L17:
  lea    D19(%rip),%rdi
  call   <printf@plt>
  jmp    L11
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D22
type_guessed: string
name: disassemble_data
arguments: label: D6
type_guessed: string
name: disassemble_data
arguments: label: D38
type_guessed: string
name: disassemble_data
arguments: label: D14
type_guessed: string
name: disassemble_data
arguments: label: D19
type_guessed: string

tool: D22: Enter first string: 	

tool: D6: %s

tool: D38: Enter second string 	

tool: D14: Entered strings are equal.


tool: D19: Entered strings are not equal.


assistant: ```c
int main() {
  char string1[20];
  char string2[20];
  printf("Enter first string: \t");
  scanf("%s", string1);
  printf("Enter second string \t");
  scanf("%s", string2);
  if (strcmp(string1, string2) == 0)
    printf("Entered strings are equal.\n");
  else
    printf("Entered strings are not equal.\n");
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r13
  lea    D22(%rip),%rdi
  lea    D16(%rip),%r13
  push   %r12
  push   %rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  lea    0x20(%rsp),%r12
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  lea    D6(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L21
  lea    D26(%rip),%rdi
  call   <printf@plt>
L15:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  add    $0x40,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L21:
  lea    D29(%rip),%rdi
  call   <printf@plt>
  jmp    L15
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D22
type: string
name: parse_data
arguments: label: D16
type: string
name: parse_data
arguments: label: D6
type: string
name: parse_data
arguments: label: D26
type: string
name: parse_data
arguments: label: D29
type: string

tool: D22: Enter first string: 	

tool: D16: %s

tool: D6: Enter second string 	

tool: D26: Entered strings are equal.


tool: D29: Entered strings are not equal.


assistant: ```c
int main() {
  char string1[20];
  char string2[20];
  printf("Enter first string: \t");
  scanf("%s", string1);
  printf("Enter second string \t");
  scanf("%s", string2);
  if (strcmp(string1, string2) == 0)
    printf("Entered strings are equal.\n");
  else
    printf("Entered strings are not equal.\n");
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L10
L8:
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L10:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L8
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int main(int argc, char *argv[], char *env[]) {
  int i = 0;
  while (env[i])
    puts(env[i++]);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<main>:
  endbr64
  mov    (%rdx),%rdi
  test   %rdi,%rdi
  je     L7
  push   %rbx
  lea    0x8(%rdx),%rbx
L16:
  call   <puts@plt>
  add    $0x8,%rbx
  mov    -0x8(%rbx),%rdi
  test   %rdi,%rdi
  jne    L16
  mov    $0x0,%eax
  pop    %rbx
  ret
L7:
  mov    $0x0,%eax
  ret
```

assistant: ```c
int main(int argc, char *argv[], char *env[]) {
  int i = 0;
  while (env[i])
    puts(env[i++]);
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  mov    (%rdx),%rdi
  test   %rdi,%rdi
  je     L11
  push   %rbx
  lea    0x8(%rdx),%rbx
  nopl   0x0(%rax)
L12:
  call   <puts@plt>
  mov    (%rbx),%rdi
  add    $0x8,%rbx
  test   %rdi,%rdi
  jne    L12
  xor    %eax,%eax
  pop    %rbx
  ret
L11:
  xor    %eax,%eax
  ret
```

assistant: ```c
int main(int argc, char *argv[], char *env[]) {
  int i = 0;
  while (env[i])
    puts(env[i++]);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<main>:
  endbr64
  mov    (%rdx),%rdi
  test   %rdi,%rdi
  je     L18
  push   %rbx
  lea    0x8(%rdx),%rbx
  nopl   0x0(%rax)
L9:
  call   <puts@plt>
  mov    (%rbx),%rdi
  add    $0x8,%rbx
  test   %rdi,%rdi
  jne    L9
  xor    %eax,%eax
  pop    %rbx
  ret
L18:
  xor    %eax,%eax
  ret
```

assistant: ```c
int main(int argc, char *argv[], char *env[]) {
  int i = 0;
  while (env[i])
    puts(env[i++]);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<baud_from_num>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  cmpl   $0x119400,-0x4(%rbp)
  je     L226
  cmpl   $0x119400,-0x4(%rbp)
  jg     L174
  cmpl   $0xf4240,-0x4(%rbp)
  je     L245
  cmpl   $0xf4240,-0x4(%rbp)
  jg     L174
  cmpl   $0xe1000,-0x4(%rbp)
  je     L295
  cmpl   $0xe1000,-0x4(%rbp)
  jg     L174
  cmpl   $0x8ca00,-0x4(%rbp)
  je     L299
  cmpl   $0x8ca00,-0x4(%rbp)
  jg     L174
  cmpl   $0x7a120,-0x4(%rbp)
  je     L279
  cmpl   $0x7a120,-0x4(%rbp)
  jg     L174
  cmpl   $0x70800,-0x4(%rbp)
  je     L222
  cmpl   $0x70800,-0x4(%rbp)
  jg     L174
  cmpl   $0x38400,-0x4(%rbp)
  je     L255
  cmpl   $0x38400,-0x4(%rbp)
  jg     L174
  cmpl   $0x1c200,-0x4(%rbp)
  je     L348
  cmpl   $0x1c200,-0x4(%rbp)
  jg     L174
  cmpl   $0xe100,-0x4(%rbp)
  je     L93
  cmpl   $0xe100,-0x4(%rbp)
  jg     L174
  cmpl   $0x9600,-0x4(%rbp)
  je     L264
  cmpl   $0x9600,-0x4(%rbp)
  jg     L174
  cmpl   $0x2580,-0x4(%rbp)
  je     L219
  cmpl   $0x4b00,-0x4(%rbp)
  je     L3
  jmp    L174
L219:
  mov    D6(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L3:
  mov    D37(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L264:
  mov    D85(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L93:
  mov    D116(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L348:
  mov    D41(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L255:
  mov    D4(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L222:
  mov    D54(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L279:
  mov    D67(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L299:
  mov    D38(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L295:
  mov    D82(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L245:
  mov    D94(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L226:
  mov    D88(%rip),%rax
  mov    (%rax),%eax
  jmp    L63
L174:
  mov    $0xffffffff,%eax
L63:
  pop    %rbp
  ret
```

assistant: ```c
int baud_from_num(int baud_num) {
  switch (baud_num) {
  case 9600:
    return B9600;
  case 19200:
    return B19200;
  case 38400:
    return B38400;
  case 57600:
    return B57600;
  case 115200:
    return B115200;
  case 230400:
    return B230400;
  case 460800:
    return B460800;
  case 500000:
    return B500000;
  case 576000:
    return B576000;
  case 921600:
    return B921600;
  case 1000000:
    return B1000000;
  case 1152000:
    return B1152000;
  }
  return -1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<baud_from_num>:
  endbr64
  cmp    $0x70800,%edi
  je     L50
  jg     L26
  cmp    $0xe100,%edi
  je     L6
  jg     L61
  cmp    $0x4b00,%edi
  je     L58
  cmp    $0x9600,%edi
  jne    L107
  mov    D115(%rip),%rax
  mov    (%rax),%eax
  ret
L107:
  cmp    $0x2580,%edi
  jne    L103
  mov    D59(%rip),%rax
  mov    (%rax),%eax
  ret
L103:
  mov    $0xffffffff,%eax
  ret
L61:
  cmp    $0x1c200,%edi
  je     L129
  cmp    $0x38400,%edi
  jne    L127
  mov    D71(%rip),%rax
  mov    (%rax),%eax
  ret
L127:
  mov    $0xffffffff,%eax
  ret
L26:
  cmp    $0xe1000,%edi
  je     L1
  jle    L37
  cmp    $0xf4240,%edi
  je     L128
  cmp    $0x119400,%edi
  jne    L119
  mov    D40(%rip),%rax
  mov    (%rax),%eax
  ret
L37:
  cmp    $0x7a120,%edi
  je     L80
  cmp    $0x8ca00,%edi
  jne    L91
  mov    D39(%rip),%rax
  mov    (%rax),%eax
  ret
L91:
  mov    $0xffffffff,%eax
  ret
L119:
  mov    $0xffffffff,%eax
  ret
L58:
  mov    D72(%rip),%rax
  mov    (%rax),%eax
  ret
L6:
  mov    D82(%rip),%rax
  mov    (%rax),%eax
  ret
L129:
  mov    D69(%rip),%rax
  mov    (%rax),%eax
  ret
L50:
  mov    D118(%rip),%rax
  mov    (%rax),%eax
  ret
L80:
  mov    D38(%rip),%rax
  mov    (%rax),%eax
  ret
L1:
  mov    D30(%rip),%rax
  mov    (%rax),%eax
  ret
L128:
  mov    D67(%rip),%rax
  mov    (%rax),%eax
  ret
```

assistant: ```c
int baud_from_num(int baud_num) {
  switch (baud_num) {
  case 9600:
    return B9600;
  case 19200:
    return B19200;
  case 38400:
    return B38400;
  case 57600:
    return B57600;
  case 115200:
    return B115200;
  case 230400:
    return B230400;
  case 460800:
    return B460800;
  case 500000:
    return B500000;
  case 576000:
    return B576000;
  case 921600:
    return B921600;
  case 1000000:
    return B1000000;
  case 1152000:
    return B1152000;
  }
  return -1;
}
```
user: What is the c source code of the assembly code below:

```asm
<baud_from_num>:
  endbr64
  cmp    $0x70800,%edi
  je     L7
  jg     L147
  cmp    $0xe100,%edi
  je     L2
  jg     L20
  cmp    $0x4b00,%edi
  je     L13
  cmp    $0x9600,%edi
  jne    L111
  mov    D94(%rip),%rax
  mov    (%rax),%eax
  ret
  xchg   %ax,%ax
L147:
  cmp    $0xe1000,%edi
  je     L119
  jle    L135
  cmp    $0xf4240,%edi
  je     L62
  cmp    $0x119400,%edi
  jne    L77
  mov    D103(%rip),%rax
  mov    (%rax),%eax
  ret
L111:
  cmp    $0x2580,%edi
  jne    L77
  mov    D17(%rip),%rax
  mov    (%rax),%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L20:
  cmp    $0x1c200,%edi
  je     L3
  cmp    $0x38400,%edi
  jne    L77
  mov    D35(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L135:
  cmp    $0x7a120,%edi
  je     L145
  cmp    $0x8ca00,%edi
  jne    L77
  mov    D36(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L7:
  mov    D101(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L2:
  mov    D2(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L13:
  mov    D29(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L119:
  mov    D6(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L62:
  mov    D13(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L3:
  mov    D79(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L145:
  mov    D80(%rip),%rax
  mov    (%rax),%eax
  ret
L77:
  or     $0xffffffff,%eax
  ret
```

assistant: ```c
int baud_from_num(int baud_num) {
  switch (baud_num) {
  case 9600:
    return B9600;
  case 19200:
    return B19200;
  case 38400:
    return B38400;
  case 57600:
    return B57600;
  case 115200:
    return B115200;
  case 230400:
    return B230400;
  case 460800:
    return B460800;
  case 500000:
    return B500000;
  case 576000:
    return B576000;
  case 921600:
    return B921600;
  case 1000000:
    return B1000000;
  case 1152000:
    return B1152000;
  }
  return -1;
}
```