ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Translate the below assembly code into C programming language:

```asm
<packCharacters>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,%edx
  mov    %esi,%eax
  mov    %dl,-0x14(%rbp)
  mov    %al,-0x18(%rbp)
  movsbl -0x14(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  shll   $0x8,-0x4(%rbp)
  movsbl -0x18(%rbp),%eax
  or     %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <displayBits@plt>
  nop
  leave
  ret
```

assistant: ```c
void packCharacters(char c1, char c2) {
  unsigned pack;
  pack = c1;
  pack <<= 8;
  pack |= c2;
  displayBits(pack);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<packCharacters>:
  endbr64
  sub    $0x8,%rsp
  movsbl %dil,%eax
  shl    $0x8,%eax
  movsbl %sil,%edi
  or     %eax,%edi
  call   <displayBits@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void packCharacters(char c1, char c2) {
  unsigned pack;
  pack = c1;
  pack <<= 8;
  pack |= c2;
  displayBits(pack);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<packCharacters>:
  endbr64
  movsbl %dil,%eax
  movsbl %sil,%edi
  shl    $0x8,%eax
  or     %eax,%edi
  jmp    1050 <displayBits@plt>
```

assistant: ```c
void packCharacters(char c1, char c2) {
  unsigned pack;
  pack = c1;
  pack <<= 8;
  pack |= c2;
  displayBits(pack);
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<packCharacters>:
  endbr64
  movsbl %dil,%eax
  movsbl %sil,%edi
  shl    $0x8,%eax
  or     %eax,%edi
  jmp    1050 <displayBits@plt>
```

assistant: ```c
void packCharacters(char c1, char c2) {
  unsigned pack;
  pack = c1;
  pack <<= 8;
  pack |= c2;
  displayBits(pack);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<printUsage>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <printHeader@plt>
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D55
type: string
name: extract_symbolic_data
arguments: label: D13
type: string
name: extract_symbolic_data
arguments: label: D61
type: string
name: extract_symbolic_data
arguments: label: D30
type: string
name: extract_symbolic_data
arguments: label: D26
type: string
name: extract_symbolic_data
arguments: label: D53
type: string
name: extract_symbolic_data
arguments: label: D27
type: string
name: extract_symbolic_data
arguments: label: D4
type: string

tool: D55: options:


tool: D13: --save-program=<file> ,  -p <file>          =   save the chip's program flash to <file>


tool: D61: --save-eeprom=<file> ,   -e <file>          =   save the chip's eeprom(data) flash to <file>


tool: D30: --flash-program=<file> , -f <file>          =   flash the <file> to the chip's program flash


tool: D26: --flash-eeprom=<file> ,  -w <file>          =   flash the <file> to the chip's eeprom(data) flash


tool: D53: --execute                                   =   exit the Boot ROM and execute program flash


tool: D27: --no-verify                                 =   skip verification after flashing (not recommended)


tool: D4: --no-pec                                    =   disable SMBus Packet Error Checking (not recommended)


assistant: ```c
void printUsage() {
  printHeader();
  printf("options:\n");
  printf("--save-program=<file> ,  -p <file>          =   save the chip's program flash to <file>\n");
  printf("--save-eeprom=<file> ,   -e <file>          =   save the chip's eeprom(data) flash to <file>\n");
  printf("--flash-program=<file> , -f <file>          =   flash the <file> to the chip's program flash\n");
  printf("--flash-eeprom=<file> ,  -w <file>          =   flash the <file> to the chip's eeprom(data) flash\n");
  printf("--execute                                   =   exit the Boot ROM and execute program flash\n");
  printf("--no-verify                                 =   skip verification after flashing (not recommended)\n");
  printf("--no-pec                                    =   disable SMBus Packet Error Checking (not recommended)\n");
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<printUsage>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <printHeader@plt>
  lea    D4(%rip),%rdi
  call   <printf@plt>
  lea    D63(%rip),%rdi
  call   <printf@plt>
  lea    D8(%rip),%rdi
  call   <printf@plt>
  lea    D72(%rip),%rdi
  call   <printf@plt>
  lea    D7(%rip),%rdi
  call   <printf@plt>
  lea    D31(%rip),%rdi
  call   <printf@plt>
  lea    D68(%rip),%rdi
  call   <printf@plt>
  lea    D65(%rip),%rdi
  call   <printf@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D4
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D63
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D8
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D72
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D7
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D31
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D68
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D65
type_guessed: string

tool: D4: options:


tool: D63: --save-program=<file> ,  -p <file>          =   save the chip's program flash to <file>


tool: D8: --save-eeprom=<file> ,   -e <file>          =   save the chip's eeprom(data) flash to <file>


tool: D72: --flash-program=<file> , -f <file>          =   flash the <file> to the chip's program flash


tool: D7: --flash-eeprom=<file> ,  -w <file>          =   flash the <file> to the chip's eeprom(data) flash


tool: D31: --execute                                   =   exit the Boot ROM and execute program flash


tool: D68: --no-verify                                 =   skip verification after flashing (not recommended)


tool: D65: --no-pec                                    =   disable SMBus Packet Error Checking (not recommended)


assistant: ```c
void printUsage() {
  printHeader();
  printf("options:\n");
  printf("--save-program=<file> ,  -p <file>          =   save the chip's program flash to <file>\n");
  printf("--save-eeprom=<file> ,   -e <file>          =   save the chip's eeprom(data) flash to <file>\n");
  printf("--flash-program=<file> , -f <file>          =   flash the <file> to the chip's program flash\n");
  printf("--flash-eeprom=<file> ,  -w <file>          =   flash the <file> to the chip's eeprom(data) flash\n");
  printf("--execute                                   =   exit the Boot ROM and execute program flash\n");
  printf("--no-verify                                 =   skip verification after flashing (not recommended)\n");
  printf("--no-pec                                    =   disable SMBus Packet Error Checking (not recommended)\n");
}
```
user: Translate the below assembly code into C programming language:

```asm
<printUsage>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <printHeader@plt>
  lea    D63(%rip),%rdi
  call   <printf@plt>
  lea    D78(%rip),%rdi
  call   <printf@plt>
  lea    D60(%rip),%rdi
  call   <printf@plt>
  lea    D44(%rip),%rdi
  call   <printf@plt>
  lea    D16(%rip),%rdi
  call   <printf@plt>
  lea    D38(%rip),%rdi
  call   <printf@plt>
  lea    D28(%rip),%rdi
  call   <printf@plt>
  lea    D14(%rip),%rdi
  add    $0x8,%rsp
  jmp    1060 <printf@plt>
```

tool_calls: name: parse_data
arguments: data_label: D63
type_guessed: string
name: parse_data
arguments: data_label: D78
type_guessed: string
name: parse_data
arguments: data_label: D60
type_guessed: string
name: parse_data
arguments: data_label: D44
type_guessed: string
name: parse_data
arguments: data_label: D16
type_guessed: string
name: parse_data
arguments: data_label: D38
type_guessed: string
name: parse_data
arguments: data_label: D28
type_guessed: string
name: parse_data
arguments: data_label: D14
type_guessed: string

tool: D63: options:


tool: D78: --save-program=<file> ,  -p <file>          =   save the chip's program flash to <file>


tool: D60: --save-eeprom=<file> ,   -e <file>          =   save the chip's eeprom(data) flash to <file>


tool: D44: --flash-program=<file> , -f <file>          =   flash the <file> to the chip's program flash


tool: D16: --flash-eeprom=<file> ,  -w <file>          =   flash the <file> to the chip's eeprom(data) flash


tool: D38: --execute                                   =   exit the Boot ROM and execute program flash


tool: D28: --no-verify                                 =   skip verification after flashing (not recommended)


tool: D14: --no-pec                                    =   disable SMBus Packet Error Checking (not recommended)


assistant: ```c
void printUsage() {
  printHeader();
  printf("options:\n");
  printf("--save-program=<file> ,  -p <file>          =   save the chip's program flash to <file>\n");
  printf("--save-eeprom=<file> ,   -e <file>          =   save the chip's eeprom(data) flash to <file>\n");
  printf("--flash-program=<file> , -f <file>          =   flash the <file> to the chip's program flash\n");
  printf("--flash-eeprom=<file> ,  -w <file>          =   flash the <file> to the chip's eeprom(data) flash\n");
  printf("--execute                                   =   exit the Boot ROM and execute program flash\n");
  printf("--no-verify                                 =   skip verification after flashing (not recommended)\n");
  printf("--no-pec                                    =   disable SMBus Packet Error Checking (not recommended)\n");
}
```
user: What is the c source code of the assembly code below?

```asm
<printUsage>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <printHeader@plt>
  lea    D78(%rip),%rdi
  call   <printf@plt>
  lea    D10(%rip),%rdi
  call   <printf@plt>
  lea    D64(%rip),%rdi
  call   <printf@plt>
  lea    D27(%rip),%rdi
  call   <printf@plt>
  lea    D72(%rip),%rdi
  call   <printf@plt>
  lea    D54(%rip),%rdi
  call   <printf@plt>
  lea    D22(%rip),%rdi
  call   <printf@plt>
  lea    D6(%rip),%rdi
  add    $0x8,%rsp
  jmp    1060 <printf@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D78
type_infered: string
name: extract_symbolic_data
arguments: data_label: D10
type_infered: string
name: extract_symbolic_data
arguments: data_label: D64
type_infered: string
name: extract_symbolic_data
arguments: data_label: D27
type_infered: string
name: extract_symbolic_data
arguments: data_label: D72
type_infered: string
name: extract_symbolic_data
arguments: data_label: D54
type_infered: string
name: extract_symbolic_data
arguments: data_label: D22
type_infered: string
name: extract_symbolic_data
arguments: data_label: D6
type_infered: string

tool: D78: options:


tool: D10: --save-program=<file> ,  -p <file>          =   save the chip's program flash to <file>


tool: D64: --save-eeprom=<file> ,   -e <file>          =   save the chip's eeprom(data) flash to <file>


tool: D27: --flash-program=<file> , -f <file>          =   flash the <file> to the chip's program flash


tool: D72: --flash-eeprom=<file> ,  -w <file>          =   flash the <file> to the chip's eeprom(data) flash


tool: D54: --execute                                   =   exit the Boot ROM and execute program flash


tool: D22: --no-verify                                 =   skip verification after flashing (not recommended)


tool: D6: --no-pec                                    =   disable SMBus Packet Error Checking (not recommended)


assistant: ```c
void printUsage() {
  printHeader();
  printf("options:\n");
  printf("--save-program=<file> ,  -p <file>          =   save the chip's program flash to <file>\n");
  printf("--save-eeprom=<file> ,   -e <file>          =   save the chip's eeprom(data) flash to <file>\n");
  printf("--flash-program=<file> , -f <file>          =   flash the <file> to the chip's program flash\n");
  printf("--flash-eeprom=<file> ,  -w <file>          =   flash the <file> to the chip's eeprom(data) flash\n");
  printf("--execute                                   =   exit the Boot ROM and execute program flash\n");
  printf("--no-verify                                 =   skip verification after flashing (not recommended)\n");
  printf("--no-pec                                    =   disable SMBus Packet Error Checking (not recommended)\n");
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<prog_q168decision>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,%eax
  mov    %ax,-0x14(%rbp)
  cmpw   $0x0,-0x14(%rbp)
  jns    L3
  movw   $0x0,-0x2(%rbp)
  jmp    L9
L3:
  movw   $0x1,-0x2(%rbp)
L9:
  movzwl -0x2(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
short prog_q168decision(short A) {
  short S;
  if (A < 0)
    S = 0;
  else
    S = 1;
  return S;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<prog_q168decision>:
  endbr64
  mov    %edi,%eax
  not    %eax
  shr    $0xf,%ax
  ret
```

assistant: ```c
short prog_q168decision(short A) {
  short S;
  if (A < 0)
    S = 0;
  else
    S = 1;
  return S;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<prog_q168decision>:
  endbr64
  mov    %edi,%eax
  not    %eax
  shr    $0xf,%ax
  ret
```

assistant: ```c
short prog_q168decision(short A) {
  short S;
  if (A < 0)
    S = 0;
  else
    S = 1;
  return S;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<prog_q168decision>:
  endbr64
  mov    %edi,%eax
  not    %eax
  shr    $0xf,%ax
  ret
```

assistant: ```c
short prog_q168decision(short A) {
  short S;
  if (A < 0)
    S = 0;
  else
    S = 1;
  return S;
}
```
user: What is the c source code of the assembly code below:

```asm
<getTime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,%eax
  mov    %ax,-0x4(%rbp)
  cmpw   $0x0,-0x4(%rbp)
  je     L9
  mov    $0x0,%eax
  call   <getTick@plt>
  imul   $0x12c,%eax,%eax
  sar    $0x8,%eax
  cltq
  jmp    L2
L9:
  mov    $0x0,%eax
  call   <getSubTick@plt>
  movslq %eax,%rdx
  imul   $0x1b4e81b5,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cltq
L2:
  leave
  ret
```

assistant: ```c
unsigned long getTime(unsigned short fromTick) {
  if (fromTick)
    return (getTick() * 300) >> 8;
  else
    return getSubTick() / 300;
}
```
user: Translate the below assembly code into C programming language:

```asm
<getTime>:
  endbr64
  sub    $0x8,%rsp
  test   %di,%di
  je     L16
  mov    $0x0,%eax
  call   <getTick@plt>
  imul   $0x12c,%eax,%eax
  sar    $0x8,%eax
  cltq
L4:
  add    $0x8,%rsp
  ret
L16:
  mov    $0x0,%eax
  call   <getSubTick@plt>
  mov    %eax,%edx
  cltq
  imul   $0x1b4e81b5,%rax,%rax
  sar    $0x25,%rax
  sar    $0x1f,%edx
  sub    %edx,%eax
  cltq
  jmp    L4
```

assistant: ```c
unsigned long getTime(unsigned short fromTick) {
  if (fromTick)
    return (getTick() * 300) >> 8;
  else
    return getSubTick() / 300;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<getTime>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  test   %di,%di
  je     L5
  call   <getTick@plt>
  add    $0x8,%rsp
  imul   $0x12c,%eax,%eax
  sar    $0x8,%eax
  cltq
  ret
  nopl   0x0(%rax)
L5:
  call   <getSubTick@plt>
  add    $0x8,%rsp
  mov    %eax,%edx
  cltq
  imul   $0x1b4e81b5,%rax,%rax
  sar    $0x1f,%edx
  sar    $0x25,%rax
  sub    %edx,%eax
  cltq
  ret
```

assistant: ```c
unsigned long getTime(unsigned short fromTick) {
  if (fromTick)
    return (getTick() * 300) >> 8;
  else
    return getSubTick() / 300;
}
```
user: Translate the below assembly code into C programming language:

```asm
<getTime>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  test   %di,%di
  je     L1
  call   <getTick@plt>
  add    $0x8,%rsp
  imul   $0x12c,%eax,%eax
  sar    $0x8,%eax
  cltq
  ret
  nopl   0x0(%rax)
L1:
  call   <getSubTick@plt>
  add    $0x8,%rsp
  mov    %eax,%edx
  cltq
  imul   $0x1b4e81b5,%rax,%rax
  sar    $0x1f,%edx
  sar    $0x25,%rax
  sub    %edx,%eax
  cltq
  ret
```

assistant: ```c
unsigned long getTime(unsigned short fromTick) {
  if (fromTick)
    return (getTick() * 300) >> 8;
  else
    return getSubTick() / 300;
}
```
user: What is the c source code of the assembly code below?

```asm
<RandomFunc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    $0x16,%edx
  imul   %edx,%eax
  add    $0x1c,%eax
  mov    %al,-0x9(%rbp)
  movzbl -0x9(%rbp),%eax
  movzbl %al,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L29
  movzbl -0x9(%rbp),%eax
  movzbl %al,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L32
  movzbl -0x9(%rbp),%eax
  add    %eax,%eax
  mov    %al,-0x9(%rbp)
  jmp    L18
L32:
  movzbl -0x9(%rbp),%eax
  add    %eax,%eax
  mov    %al,-0x9(%rbp)
  jmp    L18
L29:
  movzbl -0x9(%rbp),%eax
  shr    $0x2,%al
  movzbl %al,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L63
  movzbl -0x9(%rbp),%eax
  movzbl -0x9(%rbp),%edx
  imul   %edx,%eax
  mov    %al,-0x9(%rbp)
  jmp    L18
L63:
  movzbl -0x9(%rbp),%eax
  add    %eax,%eax
  mov    %al,-0x9(%rbp)
L18:
  movzbl -0x9(%rbp),%eax
  lea    -0x52(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %dl,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L53
  call   <__stack_chk_fail@plt>
L53:
  leave
  ret
```

assistant: ```c
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  {
    state[0UL] = (input[0UL] + 914778474UL) * (unsigned char)22;
    if (state[0UL] & (unsigned char)1) {
      if (state[0UL] & (unsigned char)1) {
        state[0UL] += state[0UL];
      } else {
        state[0UL] += state[0UL];
      }
    } else if ((state[0UL] >> (unsigned char)2) & (unsigned char)1) {
      state[0UL] *= state[0UL];
    } else {
      state[0UL] += state[0UL];
    }
    output[0UL] = (state[0UL] + 690137161UL) + (unsigned char)101;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<RandomFunc>:
  endbr64
  mov    $0x16,%edx
  mov    %edx,%eax
  mulb   (%rdi)
  mov    %eax,%edx
  add    $0x1c,%edx
  lea    (%rdx,%rdx,1),%eax
  test   $0x4,%dl
  je     L2
  mov    %edx,%eax
  imul   %edx,%eax
L2:
  sub    $0x52,%eax
  mov    %al,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  {
    state[0UL] = (input[0UL] + 914778474UL) * (unsigned char)22;
    if (state[0UL] & (unsigned char)1) {
      if (state[0UL] & (unsigned char)1) {
        state[0UL] += state[0UL];
      } else {
        state[0UL] += state[0UL];
      }
    } else if ((state[0UL] >> (unsigned char)2) & (unsigned char)1) {
      state[0UL] *= state[0UL];
    } else {
      state[0UL] += state[0UL];
    }
    output[0UL] = (state[0UL] + 690137161UL) + (unsigned char)101;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<RandomFunc>:
  endbr64
  mov    $0x16,%eax
  mulb   (%rdi)
  mov    %eax,%edx
  add    $0x1c,%edx
  lea    (%rdx,%rdx,1),%eax
  test   $0x4,%dl
  je     L6
  mov    %edx,%eax
  imul   %edx,%eax
L6:
  sub    $0x52,%eax
  mov    %al,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  {
    state[0UL] = (input[0UL] + 914778474UL) * (unsigned char)22;
    if (state[0UL] & (unsigned char)1) {
      if (state[0UL] & (unsigned char)1) {
        state[0UL] += state[0UL];
      } else {
        state[0UL] += state[0UL];
      }
    } else if ((state[0UL] >> (unsigned char)2) & (unsigned char)1) {
      state[0UL] *= state[0UL];
    } else {
      state[0UL] += state[0UL];
    }
    output[0UL] = (state[0UL] + 690137161UL) + (unsigned char)101;
  }
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<RandomFunc>:
  endbr64
  mov    $0x16,%eax
  mulb   (%rdi)
  mov    %eax,%edx
  add    $0x1c,%edx
  lea    (%rdx,%rdx,1),%eax
  test   $0x4,%dl
  je     L1
  mov    %edx,%eax
  imul   %edx,%eax
L1:
  sub    $0x52,%eax
  mov    %al,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  {
    state[0UL] = (input[0UL] + 914778474UL) * (unsigned char)22;
    if (state[0UL] & (unsigned char)1) {
      if (state[0UL] & (unsigned char)1) {
        state[0UL] += state[0UL];
      } else {
        state[0UL] += state[0UL];
      }
    } else if ((state[0UL] >> (unsigned char)2) & (unsigned char)1) {
      state[0UL] *= state[0UL];
    } else {
      state[0UL] += state[0UL];
    }
    output[0UL] = (state[0UL] + 690137161UL) + (unsigned char)101;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<sdo_abort_transfer>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  lea    -0x30(%rbp),%rax
  mov    $0x18,%esi
  mov    %rax,%rdi
  call   <bzero@plt>
  mov    -0x38(%rbp),%rax
  add    $0x600,%rax
  mov    %rax,-0x20(%rbp)
  movl   $0x8,-0x30(%rbp)
  mov    -0x28(%rbp),%rbx
  mov    $0x4,%edi
  call   <CS@plt>
  mov    %eax,(%rbx)
  mov    -0x3c(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x4(%rax),%rdx
  movzbl %cl,%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x3c(%rbp),%eax
  movzbl %al,%eax
  mov    %eax,(%rdx)
  mov    -0x48(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x40(%rbp),%eax
  movzbl %al,%eax
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x14(%rax),%rdx
  movzbl %cl,%eax
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x18(%rax),%rdx
  movzbl %cl,%eax
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%eax
  shr    $0x18,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x1c,%rax
  mov    %edx,(%rax)
  sub    $0x8,%rsp
  push   -0x20(%rbp)
  push   -0x28(%rbp)
  push   -0x30(%rbp)
  call   <socketcan_write@plt>
  add    $0x20,%rsp
  mov    $0x0,%eax
  call   <init_timeout@plt>
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L4
  call   <__stack_chk_fail@plt>
L4:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void sdo_abort_transfer(uint8_t node_id, uint16_t index, uint8_t subindex, uint32_t abort_code) {
  struct can_frame frame;
  bzero(&frame, sizeof(frame));
  frame.can_id = 0x600 + node_id;
  frame.can_dlc = 8;
  frame.data[0] = CS(4);
  frame.data[1] = index >> 8 & 0xFF;
  frame.data[2] = index >> 0 & 0xFF;
  frame.data[3] = subindex;
  frame.data[4] = abort_code >> 0 & 0xFF;
  frame.data[5] = abort_code >> 8 & 0xFF;
  frame.data[6] = abort_code >> 16 & 0xFF;
  frame.data[7] = abort_code >> 24 & 0xFF;
  socketcan_write(frame);
  init_timeout();
}
```