user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  lea    -0x44(%rbp),%rsi
  push   %r13
  push   %r12
  push   %rbx
  lea    D13(%rip),%rbx
  mov    %rbx,%rdi
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x44(%rbp),%eax
  test   %eax,%eax
  jle    L158
  lea    -0x3c(%rbp),%rax
  movl   $0x0,-0x54(%rbp)
  mov    %rax,-0x78(%rbp)
  lea    -0x40(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  nopl   0x0(%rax)
L127:
  mov    -0x78(%rbp),%rdx
  mov    -0x70(%rbp),%rsi
  xor    %eax,%eax
  mov    %rsp,-0x60(%rbp)
  lea    D29(%rip),%rdi
  call   <scanf@plt>
  movslq -0x40(%rbp),%rax
  mov    %rsp,%rsi
  mov    %rax,%rcx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rdx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L145
L85:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L85
L145:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L165
  orq    $0x0,-0x8(%rsp,%rdx,1)
L165:
  lea    0x3(%rsp),%r12
  mov    %rsp,%rsi
  mov    %r12,%rdx
  and    $0xfffffffffffffffc,%r12
  shr    $0x2,%rdx
  mov    %rdx,-0x68(%rbp)
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L92
L13:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L13
L92:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L29
L138:
  lea    0x3(%rsp),%r13
  mov    %r13,%rax
  and    $0xfffffffffffffffc,%r13
  shr    $0x2,%rax
  mov    %rax,-0x80(%rbp)
  test   %ecx,%ecx
  jle    L45
  mov    %r12,%r15
  xor    %r14d,%r14d
  nopl   0x0(%rax,%rax,1)
L151:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r14d
  call   <scanf@plt>
  mov    -0x40(%rbp),%eax
  add    $0x4,%r15
  cmp    %r14d,%eax
  jg     L151
  test   %eax,%eax
  jle    L45
  mov    %r13,%r15
  xor    %r14d,%r14d
  nopl   0x0(%rax,%rax,1)
L107:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r14d
  call   <scanf@plt>
  movslq -0x40(%rbp),%rdi
  add    $0x4,%r15
  cmp    %r14d,%edi
  jg     L107
  mov    -0x68(%rbp),%rax
  mov    -0x3c(%rbp),%r9d
  mov    0x0(,%rax,4),%r10d
  mov    -0x80(%rbp),%rax
  mov    0x0(,%rax,4),%ecx
  mov    %r9d,%eax
  cltd
  idiv   %r10d
  imul   %ecx,%eax
  mov    %eax,%r8d
  test   %edi,%edi
  jle    L69
  xor    %esi,%esi
  jmp    L1
  cs nopw 0x0(%rax,%rax,1)
L27:
  mov    (%r12,%rsi,4),%r10d
  mov    0x0(%r13,%rsi,4),%ecx
L1:
  mov    %r9d,%eax
  cltd
  idiv   %r10d
  imul   %ecx,%eax
  cmp    %eax,%r8d
  cmovl  %eax,%r8d
  add    $0x1,%rsi
  cmp    %rsi,%rdi
  jne    L27
L69:
  mov    %r8d,%esi
  lea    D12(%rip),%rdi
  call   <printf@plt>
  addl   $0x1,-0x54(%rbp)
  mov    -0x60(%rbp),%rsp
  mov    -0x54(%rbp),%eax
  cmp    %eax,-0x44(%rbp)
  jg     L127
L158:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L42
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L45:
  mov    -0x3c(%rbp),%eax
  cltd
  idivl  (%r12)
  mov    -0x80(%rbp),%rdx
  imul   0x0(,%rdx,4),%eax
  mov    %eax,%r8d
  jmp    L69
L29:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L138
L42:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D13
type_guessed: string
name: disassemble_data
arguments: label: D29
type_guessed: string
name: disassemble_data
arguments: label: D12
type_guessed: string

tool: D13: %d

tool: D29: %d %d

tool: D12: %d


assistant: ```c
int main(void) {
  int t;
  scanf("%d", &t);
  int term;
  for (term = 0; term < t; term++) {
    int n, k;
    scanf("%d %d", &n, &k);
    int a[n];
    int b[n];
    int i;
    for (i = 0; i < n; i++)
      scanf("%d", a + i);
    for (i = 0; i < n; i++)
      scanf("%d", b + i);
    int max = (k / a[0]) * b[0];
    for (i = 0; i < n; i++) {
      int t;
      t = (k / a[i]) * b[i];
      if (max < t)
        max = t;
    }
    printf("%d\n", max);
  }
}
```