ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xf68,%rsp
  lea    D33(%rip),%r12
  xor    %ebx,%ebx
  mov    %r12,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x1f58(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rsi
  movl   $0x0,(%rsp)
  lea    0x10(%rsp),%rbp
  movl   $0x0,0x4(%rsp)
  call   <scanf@plt>
  mov    (%rsp),%edx
  test   %edx,%edx
  jle    L48
  nopl   0x0(%rax,%rax,1)
L33:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <scanf@plt>
  add    $0x4,%rbp
  cmp    %ebx,(%rsp)
  jg     L33
L48:
  lea    0x4(%rsp),%rsi
  lea    D3(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  jle    L11
  lea    0xfb0(%rsp),%rbp
  xor    %r12d,%r12d
  lea    0xc(%rsp),%r14
  mov    %rbp,%r15
  lea    0x8(%rsp),%r13
  lea    0x10(%rsp),%rbx
  nopl   (%rax)
L43:
  movl   $0x0,(%r15)
  mov    %r14,%rdx
  mov    %r13,%rsi
  xor    %eax,%eax
  lea    D23(%rip),%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%edx
  mov    0xc(%rsp),%esi
  cmp    %esi,%edx
  jg     L52
  mov    %esi,%ecx
  movslq %edx,%rdi
  sub    %edx,%ecx
  lea    -0x4(%rbx,%rdi,4),%rax
  lea    (%rcx,%rdi,1),%rdx
  lea    (%rbx,%rdx,4),%rcx
  xor    %edx,%edx
  nopl   (%rax)
L12:
  add    (%rax),%edx
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L12
  add    $0x1,%esi
  mov    %edx,(%r15)
  mov    %esi,0x8(%rsp)
L52:
  mov    0x4(%rsp),%eax
  add    $0x1,%r12d
  add    $0x4,%r15
  cmp    %r12d,%eax
  jg     L43
  test   %eax,%eax
  jle    L11
  xor    %ebx,%ebx
  lea    D36(%rip),%r12
  nopl   0x0(%rax,%rax,1)
L40:
  mov    0x0(%rbp,%rbx,4),%esi
  mov    %r12,%rdi
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %ebx,0x4(%rsp)
  jg     L40
L11:
  mov    0x1f58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L83
  add    $0x1f68,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L83:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D33
type_guessed: string
name: disassemble_data
arguments: data_tag: D3
type_guessed: string
name: disassemble_data
arguments: data_tag: D23
type_guessed: string
name: disassemble_data
arguments: data_tag: D36
type_guessed: string

tool: D33: %d 

tool: D3: %d

tool: D23: %d %d

tool: D36: %d


assistant: ```c
int main() {
  int liczbaPudelek = 0, liczbaPrzedzialow = 0, i, poczPrzedzialu, koniecPrzedzialu;
  int pudelka[1000], przedzialy[1000];
  scanf("%d ", &liczbaPudelek);
  for (i = 0; i < liczbaPudelek; i++) {
    scanf("%d ", &pudelka[i]);
  }
  scanf("%d", &liczbaPrzedzialow);
  for (i = 0; i < liczbaPrzedzialow; i++) {
    przedzialy[i] = 0;
    scanf("%d %d", &poczPrzedzialu, &koniecPrzedzialu);
    for (poczPrzedzialu; poczPrzedzialu <= koniecPrzedzialu; poczPrzedzialu++) {
      przedzialy[i] += pudelka[poczPrzedzialu - 1];
    }
  }
  for (i = 0; i < liczbaPrzedzialow; i++) {
    printf("%d\n", przedzialy[i]);
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<strupper>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  jmp    L14
L9:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  addq   $0x1,-0x8(%rbp)
L14:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L9
  nop
  nop
  leave
  ret
```

assistant: ```c
void strupper(s) char *s;
{
  while (*s) {
    *s = (char)toupper(*s);
    s++;
  }
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<strupper>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  movzbl (%rdi),%edi
  test   %dil,%dil
  je     L12
L5:
  movsbl %dil,%edi
  call   <toupper@plt>
  mov    %al,(%rbx)
  add    $0x1,%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  jne    L5
L12:
  pop    %rbx
  ret
```

assistant: ```c
void strupper(s) char *s;
{
  while (*s) {
    *s = (char)toupper(*s);
    s++;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<strupper>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  movsbl (%rdi),%edi
  test   %dil,%dil
  je     L11
L14:
  call   <toupper@plt>
  add    $0x1,%rbx
  mov    %al,-0x1(%rbx)
  movsbl (%rbx),%edi
  test   %dil,%dil
  jne    L14
L11:
  pop    %rbx
  ret
```

assistant: ```c
void strupper(s) char *s;
{
  while (*s) {
    *s = (char)toupper(*s);
    s++;
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<strupper>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  movsbl (%rdi),%edi
  test   %dil,%dil
  je     L15
L19:
  call   <toupper@plt>
  add    $0x1,%rbx
  mov    %al,-0x1(%rbx)
  movsbl (%rbx),%edi
  test   %dil,%dil
  jne    L19
L15:
  pop    %rbx
  ret
```

assistant: ```c
void strupper(s) char *s;
{
  while (*s) {
    *s = (char)toupper(*s);
    s++;
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<multiply214>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x38(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  mov    -0x44(%rbp),%edx
  movslq %edx,%rcx
  sub    $0x1,%rcx
  mov    %rcx,-0x30(%rbp)
  movslq %edx,%rcx
  mov    %rcx,%r12
  mov    $0x0,%r13d
  mov    -0x44(%rbp),%ecx
  movslq %ecx,%rsi
  sub    $0x1,%rsi
  mov    %rsi,-0x28(%rbp)
  movslq %ecx,%rsi
  mov    %rsi,%r10
  mov    $0x0,%r11d
  movl   $0x0,-0x40(%rbp)
  jmp    L38
L13:
  movl   $0x0,-0x3c(%rbp)
  jmp    L10
L23:
  mov    -0x40(%rbp),%esi
  movslq %esi,%rdi
  movslq %eax,%rsi
  imul   %rdi,%rsi
  lea    0x0(,%rsi,4),%rdi
  mov    -0x50(%rbp),%rsi
  add    %rsi,%rdi
  mov    -0x3c(%rbp),%esi
  movslq %esi,%rsi
  mov    (%rdi,%rsi,4),%esi
  imul   -0x48(%rbp),%esi
  mov    %esi,%r9d
  mov    -0x40(%rbp),%esi
  movslq %esi,%rdi
  movslq %edx,%rsi
  imul   %rdi,%rsi
  lea    0x0(,%rsi,4),%rdi
  mov    -0x58(%rbp),%rsi
  add    %rsi,%rdi
  mov    -0x3c(%rbp),%esi
  movslq %esi,%rsi
  mov    (%rdi,%rsi,4),%r8d
  mov    -0x40(%rbp),%esi
  movslq %esi,%rdi
  movslq %ecx,%rsi
  imul   %rdi,%rsi
  lea    0x0(,%rsi,4),%rdi
  mov    -0x60(%rbp),%rsi
  add    %rsi,%rdi
  add    %r9d,%r8d
  mov    -0x3c(%rbp),%esi
  movslq %esi,%rsi
  mov    %r8d,(%rdi,%rsi,4)
  addl   $0x1,-0x3c(%rbp)
L10:
  mov    -0x3c(%rbp),%esi
  cmp    -0x44(%rbp),%esi
  jl     L23
  addl   $0x1,-0x40(%rbp)
L38:
  mov    -0x40(%rbp),%esi
  cmp    -0x44(%rbp),%esi
  jl     L13
  nop
  nop
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void multiply214(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<multiply214>:
  endbr64
  test   %edi,%edi
  jle    L21
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  mov    %esi,%r10d
  movslq %edi,%r12
  shl    $0x2,%r12
  mov    %rdx,%rbp
  mov    $0x0,%r13d
  mov    %edi,%r11d
L2:
  mov    %rbp,%r9
  mov    %rcx,%rdi
  mov    %r8,%rsi
  mov    $0x0,%eax
L12:
  mov    %r10d,%edx
  imul   (%r9,%rax,4),%edx
  add    (%rdi,%rax,4),%edx
  mov    %edx,(%rsi,%rax,4)
  add    $0x1,%rax
  cmp    %rax,%r11
  jne    L12
  add    $0x1,%r13d
  add    %r12,%rbp
  add    %r12,%rcx
  add    %r12,%r8
  cmp    %r13d,%ebx
  jne    L2
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L21:
  ret
```

assistant: ```c
void multiply214(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<multiply214>:
  endbr64
  test   %edi,%edi
  jle    L9
  movslq %edi,%r10
  push   %rbx
  mov    %esi,%r9d
  xor    %r11d,%r11d
  lea    0x0(,%r10,4),%rbx
  nopw   0x0(%rax,%rax,1)
L18:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L26:
  mov    (%rdx,%rax,4),%esi
  imul   %r9d,%esi
  add    (%rcx,%rax,4),%esi
  mov    %esi,(%r8,%rax,4)
  add    $0x1,%rax
  cmp    %r10,%rax
  jne    L26
  add    $0x1,%r11d
  add    %rbx,%rdx
  add    %rbx,%rcx
  add    %rbx,%r8
  cmp    %r11d,%edi
  jne    L18
  pop    %rbx
  ret
L9:
  ret
```

assistant: ```c
void multiply214(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<multiply214>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  movslq %edi,%rbp
  push   %rbx
  test   %ebp,%ebp
  jle    L43
  mov    %rbp,%r11
  mov    %esi,%ebx
  lea    0x4(%rdx),%r10
  mov    %r8,%rax
  mov    %r11d,%edx
  mov    %r11d,%esi
  lea    0x4(%rcx),%r9
  shl    $0x2,%rbp
  and    $0xfffffffc,%esi
  shr    $0x2,%edx
  movd   %ebx,%xmm4
  xor    %r12d,%r12d
  lea    0x1(%rsi),%ecx
  lea    0x2(%rsi),%edi
  mov    %esi,-0x24(%rsp)
  movslq %esi,%r13
  lea    -0x1(%rdx),%r8d
  mov    %r11d,%esi
  lea    -0x1(%r11),%edx
  mov    %ecx,-0x20(%rsp)
  pshufd $0x0,%xmm4,%xmm2
  mov    %edi,-0x1c(%rsp)
  add    $0x1,%r8
  movslq %ecx,%r14
  mov    %edx,-0x28(%rsp)
  movdqa %xmm2,%xmm3
  shl    $0x4,%r8
  movslq %edi,%r15
  mov    %rsi,-0x10(%rsp)
  psrlq  $0x20,%xmm3
  nopl   (%rax)
L40:
  mov    %rax,%rdx
  lea    -0x4(%r10),%rcx
  lea    -0x4(%r9),%rsi
  sub    %r10,%rdx
  cmp    $0x8,%rdx
  mov    %rax,%rdx
  seta   %dil
  sub    %r9,%rdx
  cmp    $0x8,%rdx
  seta   %dl
  test   %dl,%dil
  je     L80
  xor    %edx,%edx
  cmpl   $0x2,-0x28(%rsp)
  jbe    L80
  nopl   0x0(%rax)
L74:
  movdqu (%rcx,%rdx,1),%xmm0
  movdqu (%rcx,%rdx,1),%xmm1
  psrlq  $0x20,%xmm0
  pmuludq %xmm2,%xmm1
  pmuludq %xmm3,%xmm0
  pshufd $0x8,%xmm1,%xmm1
  pshufd $0x8,%xmm0,%xmm0
  punpckldq %xmm0,%xmm1
  movdqu (%rsi,%rdx,1),%xmm0
  paddd  %xmm1,%xmm0
  movups %xmm0,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %r8,%rdx
  jne    L74
  cmp    -0x24(%rsp),%r11d
  je     L45
  mov    (%rcx,%r13,4),%edx
  imul   %ebx,%edx
  add    (%rsi,%r13,4),%edx
  mov    %edx,(%rax,%r13,4)
  cmp    -0x20(%rsp),%r11d
  jle    L45
  mov    (%rcx,%r14,4),%edx
  imul   %ebx,%edx
  add    (%rsi,%r14,4),%edx
  mov    %edx,(%rax,%r14,4)
  cmp    -0x1c(%rsp),%r11d
  jle    L45
  mov    (%rcx,%r15,4),%edx
  imul   %ebx,%edx
  add    (%rsi,%r15,4),%edx
  mov    %edx,(%rax,%r15,4)
L45:
  add    $0x1,%r12d
  add    %rbp,%rax
  add    %rbp,%r10
  add    %rbp,%r9
  cmp    %r12d,%r11d
  jne    L40
L43:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L80:
  mov    %r8,-0x18(%rsp)
  mov    -0x10(%rsp),%r8
  xor    %edx,%edx
  nopl   0x0(%rax)
L48:
  mov    (%rcx,%rdx,4),%edi
  imul   %ebx,%edi
  add    (%rsi,%rdx,4),%edi
  mov    %edi,(%rax,%rdx,4)
  add    $0x1,%rdx
  cmp    %rdx,%r8
  jne    L48
  mov    -0x18(%rsp),%r8
  jmp    L45
```

assistant: ```c
void multiply214(int n, int a, int tab1[n][n], int tab2[n][n], int tab3[n][n]) {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      tab3[i][j] = a * tab1[i][j] + tab2[i][j];
    }
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<dup_imatrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %eax,-0x18(%rbp)
  jmp    L34
L13:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %eax,-0x14(%rbp)
  jmp    L11
L37:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
L11:
  mov    -0x14(%rbp),%eax
  cltq
  cmp    %rax,-0x48(%rbp)
  jge    L37
  addl   $0x1,-0x18(%rbp)
L34:
  mov    -0x18(%rbp),%eax
  cltq
  cmp    %rax,-0x38(%rbp)
  jge    L13
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void dup_imatrix(int **X, long nrl, long nrh, long ncl, long nch, int **Y) {
  int i, j;
  int *Xi, *Yi;
  for (i = nrl; i <= nrh; i++) {
    Xi = X[i];
    Yi = Y[i];
    for (j = ncl; j <= nch; j++) {
      Yi[j] = Xi[j];
    }
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<dup_imatrix>:
  endbr64
  mov    %rcx,%rax
  movslq %esi,%rcx
  cmp    %rcx,%rdx
  jl     L4
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r11
  mov    %r8,%rbx
  lea    0x0(,%rcx,8),%r10
  lea    0x8(,%rdx,8),%r12
  movslq %eax,%rbp
  shl    $0x2,%rbp
  lea    0x4(,%r8,4),%rdi
  movslq %eax,%r8
L32:
  mov    (%r11,%r10,1),%rcx
  mov    (%r9,%r10,1),%rsi
  cmp    %r8,%rbx
  jl     L36
  mov    %rbp,%rax
L14:
  mov    (%rcx,%rax,1),%edx
  mov    %edx,(%rsi,%rax,1)
  add    $0x4,%rax
  cmp    %rdi,%rax
  jne    L14
L36:
  add    $0x8,%r10
  cmp    %r12,%r10
  jne    L32
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L4:
  ret
```

assistant: ```c
void dup_imatrix(int **X, long nrl, long nrh, long ncl, long nch, int **Y) {
  int i, j;
  int *Xi, *Yi;
  for (i = nrl; i <= nrh; i++) {
    Xi = X[i];
    Yi = Y[i];
    for (j = ncl; j <= nch; j++) {
      Yi[j] = Xi[j];
    }
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<dup_imatrix>:
  endbr64
  movslq %esi,%r10
  cmp    %r10,%rdx
  jl     L30
  movslq %ecx,%r11
  push   %r12
  shl    $0x3,%r10
  lea    0x8(,%rdx,8),%r12
  push   %rbp
  lea    0x0(,%r11,4),%rbp
  push   %rbx
  mov    %rdi,%rbx
  lea    0x4(,%r8,4),%rdi
  nopw   0x0(%rax,%rax,1)
L8:
  mov    (%rbx,%r10,1),%rsi
  mov    (%r9,%r10,1),%rcx
  mov    %rbp,%rax
  cmp    %r11,%r8
  jl     L16
  nopl   0x0(%rax,%rax,1)
L5:
  mov    (%rsi,%rax,1),%edx
  mov    %edx,(%rcx,%rax,1)
  add    $0x4,%rax
  cmp    %rdi,%rax
  jne    L5
L16:
  add    $0x8,%r10
  cmp    %r10,%r12
  jne    L8
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L30:
  ret
```

assistant: ```c
void dup_imatrix(int **X, long nrl, long nrh, long ncl, long nch, int **Y) {
  int i, j;
  int *Xi, *Yi;
  for (i = nrl; i <= nrh; i++) {
    Xi = X[i];
    Yi = Y[i];
    for (j = ncl; j <= nch; j++) {
      Yi[j] = Xi[j];
    }
  }
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<dup_imatrix>:
  endbr64
  movslq %esi,%rsi
  cmp    %rsi,%rdx
  jl     L27
  push   %r15
  mov    %rcx,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %r8,%rbp
  movslq %ecx,%r8
  push   %rbx
  cmp    %r8,%rbp
  jl     L70
  mov    %rdi,%rbx
  lea    0x8(,%rdx,8),%rdi
  mov    %r9,%r13
  shl    $0x3,%rsi
  mov    %rdi,-0x38(%rsp)
  mov    %rbp,%rdi
  lea    0x4(,%rbp,4),%r9
  sub    %r8,%rdi
  shl    $0x2,%r8
  lea    0x4(%r8),%rcx
  mov    %rdi,-0x30(%rsp)
  mov    %rcx,-0x40(%rsp)
  lea    0x1(%rdi),%rcx
  mov    %rcx,%r11
  mov    %rcx,-0x28(%rsp)
  and    $0xfffffffffffffffc,%rcx
  add    %ecx,%eax
  mov    %rcx,-0x20(%rsp)
  shr    $0x2,%r11
  movslq %eax,%r12
  lea    0x1(%rax),%edx
  add    $0x2,%eax
  shl    $0x4,%r11
  movslq %edx,%rcx
  cltq
  shl    $0x2,%r12
  mov    %rcx,-0x18(%rsp)
  lea    0x0(,%rcx,4),%r14
  lea    0x0(,%rax,4),%r15
  mov    %rax,-0x10(%rsp)
  xchg   %ax,%ax
L83:
  mov    0x0(%r13,%rsi,1),%r10
  mov    -0x40(%rsp),%rax
  mov    (%rbx,%rsi,1),%rcx
  lea    (%r10,%r8,1),%rdx
  lea    (%rcx,%rax,1),%rdi
  mov    %rdx,%rax
  sub    %rdi,%rax
  cmp    $0x8,%rax
  jbe    L44
  cmpq   $0x2,-0x30(%rsp)
  jbe    L44
  lea    (%rcx,%r8,1),%rdi
  xor    %eax,%eax
L56:
  movdqu (%rdi,%rax,1),%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%r11
  jne    L56
  mov    -0x20(%rsp),%rdi
  cmp    %rdi,-0x28(%rsp)
  je     L90
  mov    (%rcx,%r12,1),%eax
  mov    %eax,(%r10,%r12,1)
  cmp    -0x18(%rsp),%rbp
  jl     L90
  mov    (%rcx,%r14,1),%eax
  mov    %eax,(%r10,%r14,1)
  cmp    -0x10(%rsp),%rbp
  jl     L90
  mov    (%rcx,%r15,1),%eax
  mov    %eax,(%r10,%r15,1)
L90:
  add    $0x8,%rsi
  cmp    -0x38(%rsp),%rsi
  jne    L83
L70:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L44:
  mov    %r8,%rax
  nopl   0x0(%rax,%rax,1)
L86:
  mov    (%rcx,%rax,1),%edx
  mov    %edx,(%r10,%rax,1)
  add    $0x4,%rax
  cmp    %r9,%rax
  jne    L86
  jmp    L90
L27:
  ret
```

assistant: ```c
void dup_imatrix(int **X, long nrl, long nrh, long ncl, long nch, int **Y) {
  int i, j;
  int *Xi, *Yi;
  for (i = nrl; i <= nrh; i++) {
    Xi = X[i];
    Yi = Y[i];
    for (j = ncl; j <= nch; j++) {
      Yi[j] = Xi[j];
    }
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<USBDevEndpointStallClear>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  mov    %esi,%ebp
  mov    %edx,%r12d
  cmp    $0x40050000,%edi
  sete   %dil
  movzbl %dil,%edi
  call   <ASSERT@plt>
  mov    %ebp,%eax
  and    $0xffffffef,%eax
  je     L41
  cmp    $0x70,%ebp
  jg     L5
  cmp    $0x3f,%ebp
  jle    L6
  lea    -0x40(%rbp),%eax
  movabs $0x1000100010001,%rdx
  bt     %rax,%rdx
  jb     L66
L5:
  mov    $0x0,%edi
  call   <ASSERT@plt>
  test   $0xffffdfff,%r12d
  sete   %dil
  movzbl %dil,%edi
  call   <ASSERT@plt>
  jmp    L71
L6:
  cmp    $0x20,%eax
  jne    L5
L66:
  mov    $0x1,%edi
  call   <ASSERT@plt>
  test   $0xffffdfff,%r12d
  sete   %dil
  movzbl %dil,%edi
  call   <ASSERT@plt>
L71:
  cmp    $0x2000,%r12d
  je     L10
  lea    0x106(%rbx,%rbp,1),%eax
  cltq
  mov    (%rax),%edx
  and    $0xffffff9f,%edx
  mov    %edx,(%rax)
  mov    (%rax),%edx
  or     $0x80,%dl
  mov    %edx,(%rax)
  jmp    L13
L41:
  mov    $0x1,%edi
  call   <ASSERT@plt>
  test   $0xffffdfff,%r12d
  sete   %dil
  movzbl %dil,%edi
  call   <ASSERT@plt>
  test   %ebp,%ebp
  jne    L71
  add    $0x102,%ebx
  movslq %ebx,%rbx
  mov    (%rbx),%eax
  and    $0xfffffffb,%eax
  mov    %eax,(%rbx)
L13:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L10:
  lea    0x102(%rbx,%rbp,1),%eax
  cltq
  mov    (%rax),%edx
  and    $0xffffffcf,%edx
  mov    %edx,(%rax)
  mov    (%rax),%edx
  or     $0x40,%edx
  mov    %edx,(%rax)
  jmp    L13
```

assistant: ```c
void USBDevEndpointStallClear(uint32_t ui32Base, uint32_t ui32Endpoint, uint32_t ui32Flags) {
  ASSERT(ui32Base == 0x40050000);
  ASSERT((ui32Endpoint == 0x00000000) || (ui32Endpoint == 0x00000010) || (ui32Endpoint == 0x00000020) || (ui32Endpoint == 0x00000030) || (ui32Endpoint == 0x00000040) || (ui32Endpoint == 0x00000050) || (ui32Endpoint == 0x00000060) || (ui32Endpoint == 0x00000070));
  ASSERT((ui32Flags & ~(0x00002000 | 0x00000000)) == 0);
  if (ui32Endpoint == 0x00000000) {
    (*((volatile uint8_t *)(ui32Base + 0x00000102))) &= ~0x00000004;
  } else if (ui32Flags == 0x00002000) {
    (*((volatile uint8_t *)(ui32Base + 0x00000112 + (ui32Endpoint - 0x10)))) &= ~(0x00000010 | 0x00000020);
    (*((volatile uint8_t *)(ui32Base + 0x00000112 + (ui32Endpoint - 0x10)))) |= 0x00000040;
  } else {
    (*((volatile uint8_t *)(ui32Base + 0x00000116 + (ui32Endpoint - 0x10)))) &= ~(0x00000020 | 0x00000040);
    (*((volatile uint8_t *)(ui32Base + 0x00000116 + (ui32Endpoint - 0x10)))) |= 0x00000080;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<USBDevEndpointStallClear>:
  endbr64
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x8,%rsp
  cmp    $0x40050000,%edi
  sete   %dil
  xor    %r13d,%r13d
  movzbl %dil,%edi
  call   <ASSERT@plt>
  test   $0xffffdfff,%r12d
  mov    %ebx,%eax
  sete   %r13b
  and    $0xffffffef,%eax
  je     L26
  cmp    $0x70,%ebx
  jg     L41
  cmp    $0x3f,%ebx
  jle    L19
  movabs $0x1000100010001,%rdi
  lea    -0x40(%rbx),%ecx
  shr    %cl,%rdi
  and    $0x1,%edi
L56:
  call   <ASSERT@plt>
  mov    %r13d,%edi
  call   <ASSERT@plt>
L21:
  sub    $0x10,%ebx
  cmp    $0x2000,%r12d
  je     L47
  lea    0x116(%rbx,%rbp,1),%eax
  cltq
  mov    (%rax),%edx
  and    $0xffffff9f,%edx
  mov    %edx,(%rax)
  mov    (%rax),%edx
  or     $0x80,%dl
  mov    %edx,(%rax)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L19:
  xor    %edi,%edi
  cmp    $0x20,%eax
  sete   %dil
  jmp    L56
  nopl   0x0(%rax,%rax,1)
L26:
  mov    $0x1,%edi
  call   <ASSERT@plt>
  mov    %r13d,%edi
  call   <ASSERT@plt>
  test   %ebx,%ebx
  jne    L21
  add    $0x102,%ebp
  movslq %ebp,%rbp
  mov    0x0(%rbp),%eax
  and    $0xfffffffb,%eax
  mov    %eax,0x0(%rbp)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L47:
  lea    0x112(%rbx,%rbp,1),%eax
  cltq
  mov    (%rax),%edx
  and    $0xffffffcf,%edx
  mov    %edx,(%rax)
  mov    (%rax),%edx
  or     $0x40,%edx
  mov    %edx,(%rax)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L41:
  xor    %edi,%edi
  jmp    L56
```

assistant: ```c
void USBDevEndpointStallClear(uint32_t ui32Base, uint32_t ui32Endpoint, uint32_t ui32Flags) {
  ASSERT(ui32Base == 0x40050000);
  ASSERT((ui32Endpoint == 0x00000000) || (ui32Endpoint == 0x00000010) || (ui32Endpoint == 0x00000020) || (ui32Endpoint == 0x00000030) || (ui32Endpoint == 0x00000040) || (ui32Endpoint == 0x00000050) || (ui32Endpoint == 0x00000060) || (ui32Endpoint == 0x00000070));
  ASSERT((ui32Flags & ~(0x00002000 | 0x00000000)) == 0);
  if (ui32Endpoint == 0x00000000) {
    (*((volatile uint8_t *)(ui32Base + 0x00000102))) &= ~0x00000004;
  } else if (ui32Flags == 0x00002000) {
    (*((volatile uint8_t *)(ui32Base + 0x00000112 + (ui32Endpoint - 0x10)))) &= ~(0x00000010 | 0x00000020);
    (*((volatile uint8_t *)(ui32Base + 0x00000112 + (ui32Endpoint - 0x10)))) |= 0x00000040;
  } else {
    (*((volatile uint8_t *)(ui32Base + 0x00000116 + (ui32Endpoint - 0x10)))) &= ~(0x00000020 | 0x00000040);
    (*((volatile uint8_t *)(ui32Base + 0x00000116 + (ui32Endpoint - 0x10)))) |= 0x00000080;
  }
}
```