ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码：

```asm
<generate_filename>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%rbp
  mov    %rsi,(%rsp)
  mov    %edx,%r12d
  movss  %xmm0,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,0x1c(%rsp)
  lea    0x1c(%rsp),%rdi
  call   <localtime@plt>
  test   %rax,%rax
  je     L16
  mov    %rax,%rcx
  lea    0x20(%rsp),%rdi
  lea    D17(%rip),%rdx
  mov    $0x10,%esi
  call   <strftime@plt>
  mov    $0x1,%ebx
  lea    0x20(%rsp),%r15
  lea    D9(%rip),%r14
  lea    D36(%rip),%r13
L9:
  mov    %ebx,%eax
  add    $0x1,%ebx
  sub    $0x8,%rsp
  push   %rax
  movss  0x1c(%rsp),%xmm0
  mov    %r12d,%r9d
  mov    $0x1,%r8d
  mov    %r15,%rcx
  mov    0x10(%rsp),%rdx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jne    L9
L21:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L35
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L16:
  lea    D34(%rip),%rdi
  call   <perror@plt>
  jmp    L21
L35:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D17
type_infered: string
name: parse_data
arguments: label: D9
type_infered: string
name: parse_data
arguments: label: D36
type_infered: string
name: parse_data
arguments: label: D34
type_infered: string

tool: D17: %Y.%m.%d

tool: D9: %s/%s-Results-Ping6_%d_%d_%f-%d.txt

tool: D36: r

tool: D34: localtime

assistant: ```c
void generate_filename(char *filename, const char *results_dir_name, int runs_per_test, float interval) {
  time_t today;
  struct tm *tmp = NULL;
  char timestr[16];
  FILE *test = NULL;
  int count = 1;
  today = time(NULL);
  tmp = localtime(&today);
  if (tmp == NULL) {
    perror("localtime");
    return;
  }
  strftime(timestr, 16, "%Y.%m.%d", tmp);
  do {
    sprintf(filename, "%s/%s-Results-Ping6_%d_%d_%f-%d.txt", results_dir_name, timestr, 1, runs_per_test, interval, count++);
  } while ((test = fopen(filename, "r")) != NULL);
  if (test != NULL) {
    fclose(test);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<generate_filename>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  xor    %edi,%edi
  sub    $0x48,%rsp
  movss  %xmm0,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <time@plt>
  lea    0x1c(%rsp),%rdi
  mov    %eax,0x1c(%rsp)
  call   <localtime@plt>
  test   %rax,%rax
  je     L9
  lea    0x20(%rsp),%r13
  mov    %rax,%rcx
  mov    $0x10,%esi
  mov    $0x1,%r14d
  lea    D23(%rip),%rdx
  mov    %r13,%rdi
  lea    D13(%rip),%r15
  call   <strftime@plt>
  nopl   0x0(%rax,%rax,1)
L15:
  sub    $0x8,%rsp
  mov    %r14d,%eax
  mov    %r13,%rcx
  mov    %rbp,%rdx
  push   %rax
  movss  0x1c(%rsp),%xmm0
  mov    %r12d,%r9d
  mov    $0x1,%r8d
  mov    %r15,%rsi
  mov    %rbx,%rdi
  add    $0x1,%r14d
  call   <sprintf@plt>
  lea    D3(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  pop    %rdx
  pop    %rcx
  test   %rax,%rax
  jne    L15
L26:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L31
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L9:
  lea    D12(%rip),%rdi
  call   <perror@plt>
  jmp    L26
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D23
type_infered: string
name: parse_data
arguments: tag: D13
type_infered: string
name: parse_data
arguments: tag: D3
type_infered: string
name: parse_data
arguments: tag: D12
type_infered: string

tool: D23: %Y.%m.%d

tool: D13: %s/%s-Results-Ping6_%d_%d_%f-%d.txt

tool: D3: r

tool: D12: localtime

assistant: ```c
void generate_filename(char *filename, const char *results_dir_name, int runs_per_test, float interval) {
  time_t today;
  struct tm *tmp = NULL;
  char timestr[16];
  FILE *test = NULL;
  int count = 1;
  today = time(NULL);
  tmp = localtime(&today);
  if (tmp == NULL) {
    perror("localtime");
    return;
  }
  strftime(timestr, 16, "%Y.%m.%d", tmp);
  do {
    sprintf(filename, "%s/%s-Results-Ping6_%d_%d_%f-%d.txt", results_dir_name, timestr, 1, runs_per_test, interval, count++);
  } while ((test = fopen(filename, "r")) != NULL);
  if (test != NULL) {
    fclose(test);
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<generate_filename>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  xor    %edi,%edi
  sub    $0x48,%rsp
  movss  %xmm0,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <time@plt>
  lea    0x1c(%rsp),%rdi
  mov    %eax,0x1c(%rsp)
  call   <localtime@plt>
  test   %rax,%rax
  je     L32
  lea    0x20(%rsp),%r13
  mov    %rax,%rcx
  mov    $0x10,%esi
  mov    $0x1,%r14d
  lea    D30(%rip),%rdx
  mov    %r13,%rdi
  lea    D15(%rip),%r15
  call   <strftime@plt>
  nopl   0x0(%rax,%rax,1)
L34:
  sub    $0x8,%rsp
  mov    %r14d,%eax
  mov    %r13,%rcx
  mov    %rbp,%rdx
  push   %rax
  movss  0x1c(%rsp),%xmm0
  mov    %r12d,%r9d
  mov    $0x1,%r8d
  mov    %r15,%rsi
  mov    %rbx,%rdi
  add    $0x1,%r14d
  call   <sprintf@plt>
  lea    D20(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  pop    %rdx
  pop    %rcx
  test   %rax,%rax
  jne    L34
L27:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L31
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L32:
  lea    D24(%rip),%rdi
  call   <perror@plt>
  jmp    L27
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D30
type_infered: string
name: read_data
arguments: tag: D15
type_infered: string
name: read_data
arguments: tag: D20
type_infered: string
name: read_data
arguments: tag: D24
type_infered: string

tool: D30: %Y.%m.%d

tool: D15: %s/%s-Results-Ping6_%d_%d_%f-%d.txt

tool: D20: r

tool: D24: localtime

assistant: ```c
void generate_filename(char *filename, const char *results_dir_name, int runs_per_test, float interval) {
  time_t today;
  struct tm *tmp = NULL;
  char timestr[16];
  FILE *test = NULL;
  int count = 1;
  today = time(NULL);
  tmp = localtime(&today);
  if (tmp == NULL) {
    perror("localtime");
    return;
  }
  strftime(timestr, 16, "%Y.%m.%d", tmp);
  do {
    sprintf(filename, "%s/%s-Results-Ping6_%d_%d_%f-%d.txt", results_dir_name, timestr, 1, runs_per_test, interval, count++);
  } while ((test = fopen(filename, "r")) != NULL);
  if (test != NULL) {
    fclose(test);
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x13,-0x1c(%rbp)
  movabs $0x4d204e41544c5553,%rax
  mov    %rax,-0x17(%rbp)
  movl   $0x4f524241,-0xf(%rbp)
  movw   $0x4b55,-0xb(%rbp)
  movb   $0x0,-0x9(%rbp)
  mov    $0x13,%esi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D20(%rip),%rax
  mov    %rax,%rsi
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x17(%rbp),%rax
  mov    %rax,%rsi
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x63,-0x1c(%rbp)
  lea    -0x17(%rbp),%rax
  lea    D78(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x17(%rbp),%rax
  mov    %rax,%rsi
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D25
type_guessed: string
name: disassemble_data
arguments: tag: D20
type_guessed: string
name: disassemble_data
arguments: tag: D65
type_guessed: string
name: disassemble_data
arguments: tag: D34
type_guessed: string
name: disassemble_data
arguments: tag: D52
type_guessed: string
name: disassemble_data
arguments: tag: D78
type_guessed: string

tool: D25: Age %d 


tool: D20: SULTAN MABROUK

tool: D65: Name %s 


tool: D34: Age %d


tool: D52: Name %s


tool: D78: Badr

assistant: ```c
int main() {
  int age = 19;
  char name[] = "SULTAN MABROUK";
  printf("Age %d \n", 19);
  printf("Name %s \n", "SULTAN MABROUK");
  printf("Age %d\n", age);
  printf("Name %s\n", name);
  age = 99;
  strcpy(name, "Badr");
  printf("Age %d\n", age);
  printf("Name %s\n", name);
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movabs $0x4d204e41544c5553,%rax
  mov    %rax,0x9(%rsp)
  movl   $0x4f524241,0x11(%rsp)
  movw   $0x4b55,0x15(%rsp)
  movb   $0x0,0x17(%rsp)
  mov    $0x13,%esi
  lea    D56(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D57(%rip),%rsi
  lea    D40(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x13,%esi
  lea    D3(%rip),%r12
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x9(%rsp),%rbx
  mov    %rbx,%rsi
  lea    D24(%rip),%rbp
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D33(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    $0x63,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  mov    $0x0,%eax
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D56
type: string
name: unpack_data
arguments: data_tag: D57
type: string
name: unpack_data
arguments: data_tag: D40
type: string
name: unpack_data
arguments: data_tag: D3
type: string
name: unpack_data
arguments: data_tag: D24
type: string
name: unpack_data
arguments: data_tag: D33
type: string

tool: D56: Age %d 


tool: D57: SULTAN MABROUK

tool: D40: Name %s 


tool: D3: Age %d


tool: D24: Name %s


tool: D33: Badr

assistant: ```c
int main() {
  int age = 19;
  char name[] = "SULTAN MABROUK";
  printf("Age %d \n", 19);
  printf("Name %s \n", "SULTAN MABROUK");
  printf("Age %d\n", age);
  printf("Name %s\n", name);
  age = 99;
  strcpy(name, "Badr");
  printf("Age %d\n", age);
  printf("Name %s\n", name);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %r13
  mov    $0x13,%esi
  lea    D26(%rip),%rdi
  lea    D35(%rip),%r13
  push   %r12
  lea    D2(%rip),%r12
  push   %rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  movabs $0x4d204e41544c5553,%rax
  movl   $0x4f524241,0x11(%rsp)
  lea    0x9(%rsp),%rbp
  movb   $0x0,0x17(%rsp)
  mov    %rax,0x9(%rsp)
  mov    $0x4b55,%eax
  mov    %ax,0x15(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    D33(%rip),%rsi
  lea    D10(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x13,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D30(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x63,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D26
data_type: string
name: parse_data
arguments: data_tag: D35
data_type: string
name: parse_data
arguments: data_tag: D2
data_type: string
name: parse_data
arguments: data_tag: D33
data_type: string
name: parse_data
arguments: data_tag: D10
data_type: string
name: parse_data
arguments: data_tag: D30
data_type: string

tool: D26: Age %d 


tool: D35: Age %d


tool: D2: Name %s


tool: D33: SULTAN MABROUK

tool: D10: Name %s 


tool: D30: Badr

assistant: ```c
int main() {
  int age = 19;
  char name[] = "SULTAN MABROUK";
  printf("Age %d \n", 19);
  printf("Name %s \n", "SULTAN MABROUK");
  printf("Age %d\n", age);
  printf("Name %s\n", name);
  age = 99;
  strcpy(name, "Badr");
  printf("Age %d\n", age);
  printf("Name %s\n", name);
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r13
  mov    $0x13,%esi
  lea    D26(%rip),%rdi
  lea    D5(%rip),%r13
  push   %r12
  lea    D2(%rip),%r12
  push   %rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  movabs $0x4d204e41544c5553,%rax
  movl   $0x4f524241,0x11(%rsp)
  lea    0x9(%rsp),%rbp
  movb   $0x0,0x17(%rsp)
  mov    %rax,0x9(%rsp)
  mov    $0x4b55,%eax
  mov    %ax,0x15(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    D11(%rip),%rsi
  lea    D30(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x13,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D23(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x63,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D26
data_type: string
name: parse_data
arguments: data_label: D5
data_type: string
name: parse_data
arguments: data_label: D2
data_type: string
name: parse_data
arguments: data_label: D11
data_type: string
name: parse_data
arguments: data_label: D30
data_type: string
name: parse_data
arguments: data_label: D23
data_type: string

tool: D26: Age %d 


tool: D5: Age %d


tool: D2: Name %s


tool: D11: SULTAN MABROUK

tool: D30: Name %s 


tool: D23: Badr

assistant: ```c
int main() {
  int age = 19;
  char name[] = "SULTAN MABROUK";
  printf("Age %d \n", 19);
  printf("Name %s \n", "SULTAN MABROUK");
  printf("Age %d\n", age);
  printf("Name %s\n", name);
  age = 99;
  strcpy(name, "Badr");
  printf("Age %d\n", age);
  printf("Name %s\n", name);
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<vminu2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  movzwl %ax,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  movzwl %ax,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  mov    $0x0,%ax
  mov    %eax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  mov    $0x0,%ax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  or     -0x4(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  leave
  ret
```

assistant: ```c
unsigned int vminu2(unsigned int a, unsigned int b) {
  unsigned int r, s;
  unsigned int t, u;
  r = a & 0x0000ffff;
  s = b & 0x0000ffff;
  t = min(r, s);
  r = a & 0xffff0000;
  s = b & 0xffff0000;
  u = min(r, s);
  r = t | u;
  return r;
}
```
user: Translate the below assembly code into C programming language:

```asm
<vminu2>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  mov    %esi,%ebp
  movzwl %si,%esi
  movzwl %di,%edi
  call   <min@plt>
  mov    %eax,%r12d
  mov    %ebp,%esi
  mov    $0x0,%si
  mov    $0x0,%bx
  mov    %ebx,%edi
  call   <min@plt>
  or     %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
unsigned int vminu2(unsigned int a, unsigned int b) {
  unsigned int r, s;
  unsigned int t, u;
  r = a & 0x0000ffff;
  s = b & 0x0000ffff;
  t = min(r, s);
  r = a & 0xffff0000;
  s = b & 0xffff0000;
  u = min(r, s);
  r = t | u;
  return r;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<vminu2>:
  endbr64
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  movzwl %si,%esi
  push   %rbx
  mov    %edi,%ebx
  movzwl %di,%edi
  xor    %bx,%bx
  call   <min@plt>
  mov    %ebp,%esi
  mov    %ebx,%edi
  xor    %si,%si
  mov    %eax,%r12d
  call   <min@plt>
  pop    %rbx
  pop    %rbp
  or     %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
unsigned int vminu2(unsigned int a, unsigned int b) {
  unsigned int r, s;
  unsigned int t, u;
  r = a & 0x0000ffff;
  s = b & 0x0000ffff;
  t = min(r, s);
  r = a & 0xffff0000;
  s = b & 0xffff0000;
  u = min(r, s);
  r = t | u;
  return r;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<vminu2>:
  endbr64
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  movzwl %si,%esi
  push   %rbx
  mov    %edi,%ebx
  movzwl %di,%edi
  xor    %bx,%bx
  call   <min@plt>
  mov    %ebp,%esi
  mov    %ebx,%edi
  xor    %si,%si
  mov    %eax,%r12d
  call   <min@plt>
  pop    %rbx
  pop    %rbp
  or     %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
unsigned int vminu2(unsigned int a, unsigned int b) {
  unsigned int r, s;
  unsigned int t, u;
  r = a & 0x0000ffff;
  s = b & 0x0000ffff;
  t = min(r, s);
  r = a & 0xffff0000;
  s = b & 0xffff0000;
  u = min(r, s);
  r = t | u;
  return r;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<alc850_update_jacks>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <is_shared_surrout@plt>
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  je     L92
  mov    $0x20,%edx
  jmp    L83
L92:
  mov    $0x10,%edx
L83:
  mov    -0x18(%rbp),%rax
  mov    %edx,%ecx
  mov    $0x30,%edx
  mov    $0x7a,%esi
  mov    %rax,%rdi
  call   <snd_ac97_update_bits@plt>
  cmpl   $0x0,-0x8(%rbp)
  je     L67
  mov    $0x2000,%edx
  jmp    L8
L67:
  mov    $0x0,%edx
L8:
  mov    -0x18(%rbp),%rax
  mov    %edx,%ecx
  mov    $0x7000,%edx
  mov    $0x76,%esi
  mov    %rax,%rdi
  call   <snd_ac97_update_bits@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <is_shared_clfeout@plt>
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  je     L43
  mov    $0x1000,%edx
  jmp    L41
L43:
  mov    $0x2000,%edx
L41:
  mov    -0x18(%rbp),%rax
  mov    %edx,%ecx
  mov    $0x3000,%edx
  mov    $0x7a,%esi
  mov    %rax,%rdi
  call   <snd_ac97_update_bits@plt>
  cmpl   $0x0,-0x8(%rbp)
  je     L56
  mov    $0x50,%edx
  jmp    L60
L56:
  mov    $0x10,%edx
L60:
  mov    -0x18(%rbp),%rax
  mov    %edx,%ecx
  mov    $0x70,%edx
  mov    $0x76,%esi
  mov    %rax,%rdi
  call   <snd_ac97_update_bits@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <alc850_is_aux_back_surround@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  je     L46
  mov    $0x400,%edx
  jmp    L49
L46:
  mov    $0x0,%edx
L49:
  mov    -0x18(%rbp),%rax
  mov    %edx,%ecx
  mov    $0x400,%edx
  mov    $0x6a,%esi
  mov    %rax,%rdi
  call   <snd_ac97_update_bits@plt>
  nop
  leave
  ret
```

assistant: ```c
void alc850_update_jacks(struct snd_ac97 *ac97) {
  int shared;
  int aux_is_back_surround;
  shared = is_shared_surrout(ac97);
  snd_ac97_update_bits(ac97, 0x7a, (1 << 4) | (1 << 5), shared ? (1 << 5) : (1 << 4));
  snd_ac97_update_bits(ac97, 0x76, 7 << 12, shared ? (2 << 12) : (0 << 12));
  shared = is_shared_clfeout(ac97);
  snd_ac97_update_bits(ac97, 0x7a, (1 << 12) | (1 << 13), shared ? (1 << 12) : (1 << 13));
  snd_ac97_update_bits(ac97, 0x76, 7 << 4, shared ? (5 << 4) : (1 << 4));
  aux_is_back_surround = alc850_is_aux_back_surround(ac97);
  snd_ac97_update_bits(ac97, 0x6a, 1 << 10, aux_is_back_surround ? (1 << 10) : (0 << 10));
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<alc850_update_jacks>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  call   <is_shared_surrout@plt>
  mov    %eax,%ebp
  cmp    $0x1,%eax
  sbb    %ecx,%ecx
  and    $0xfffffff0,%ecx
  add    $0x20,%ecx
  mov    $0x30,%edx
  mov    $0x7a,%esi
  mov    %rbx,%rdi
  call   <snd_ac97_update_bits@plt>
  test   %ebp,%ebp
  setne  %cl
  movzbl %cl,%ecx
  shl    $0xd,%ecx
  mov    $0x7000,%edx
  mov    $0x76,%esi
  mov    %rbx,%rdi
  call   <snd_ac97_update_bits@plt>
  mov    %rbx,%rdi
  call   <is_shared_clfeout@plt>
  test   %eax,%eax
  jne    L17
  mov    $0x2000,%ecx
  mov    $0x3000,%edx
  mov    $0x7a,%esi
  mov    %rbx,%rdi
  call   <snd_ac97_update_bits@plt>
  mov    $0x10,%ecx
  jmp    L0
L17:
  mov    $0x1000,%ecx
  mov    $0x3000,%edx
  mov    $0x7a,%esi
  mov    %rbx,%rdi
  call   <snd_ac97_update_bits@plt>
  mov    $0x50,%ecx
L0:
  mov    $0x70,%edx
  mov    $0x76,%esi
  mov    %rbx,%rdi
  call   <snd_ac97_update_bits@plt>
  mov    %rbx,%rdi
  call   <alc850_is_aux_back_surround@plt>
  test   %eax,%eax
  setne  %cl
  movzbl %cl,%ecx
  shl    $0xa,%ecx
  mov    $0x400,%edx
  mov    $0x6a,%esi
  mov    %rbx,%rdi
  call   <snd_ac97_update_bits@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void alc850_update_jacks(struct snd_ac97 *ac97) {
  int shared;
  int aux_is_back_surround;
  shared = is_shared_surrout(ac97);
  snd_ac97_update_bits(ac97, 0x7a, (1 << 4) | (1 << 5), shared ? (1 << 5) : (1 << 4));
  snd_ac97_update_bits(ac97, 0x76, 7 << 12, shared ? (2 << 12) : (0 << 12));
  shared = is_shared_clfeout(ac97);
  snd_ac97_update_bits(ac97, 0x7a, (1 << 12) | (1 << 13), shared ? (1 << 12) : (1 << 13));
  snd_ac97_update_bits(ac97, 0x76, 7 << 4, shared ? (5 << 4) : (1 << 4));
  aux_is_back_surround = alc850_is_aux_back_surround(ac97);
  snd_ac97_update_bits(ac97, 0x6a, 1 << 10, aux_is_back_surround ? (1 << 10) : (0 << 10));
}
```