user: 下面的汇编指令对应的C源代码是什么：

```asm
<grtc_test>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xc8,%rsp
  mov    %edi,-0xe4(%rbp)
  mov    %esi,-0xe8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    $0x1031000,%edi
  mov    $0x0,%eax
  call   <report_device@plt>
  mov    -0xe4(%rbp),%eax
  cltq
  mov    %rax,-0x60(%rbp)
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <report_subtest@plt>
  movl   $0x55,-0xdc(%rbp)
  movl   $0x1,-0xd8(%rbp)
  mov    -0xdc(%rbp),%eax
  shl    $0x18,%eax
  or     -0xd8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rdx,(%rax)
  movl   $0x0,-0xd4(%rbp)
  movl   $0x0,-0xd0(%rbp)
  movl   $0x0,-0xcc(%rbp)
  mov    -0xdc(%rbp),%eax
  shl    $0x18,%eax
  mov    %eax,%edx
  mov    -0xd4(%rbp),%eax
  shl    $0xc,%eax
  or     %eax,%edx
  mov    -0xd0(%rbp),%eax
  shl    $0xb,%eax
  or     %eax,%edx
  mov    -0xcc(%rbp),%eax
  shl    $0xa,%eax
  or     %edx,%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rdx,0x8(%rax)
  movl   $0x0,-0xc8(%rbp)
  mov    -0xc8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rdx,0x10(%rax)
  movl   $0x0,-0xc4(%rbp)
  movl   $0x0,-0xc0(%rbp)
  movl   $0x0,-0xbc(%rbp)
  movl   $0x0,-0xb8(%rbp)
  movl   $0x0,-0xb4(%rbp)
  movl   $0x0,-0xb0(%rbp)
  movl   $0x0,-0xac(%rbp)
  movl   $0x0,-0xa8(%rbp)
  movl   $0x0,-0xa4(%rbp)
  movl   $0x0,-0xa0(%rbp)
  movl   $0x0,-0x9c(%rbp)
  movl   $0x0,-0x98(%rbp)
  movl   $0x0,-0x94(%rbp)
  mov    -0xe8(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x58(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L12:
  cmp    %rdx,%rsp
  je     L270
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L12
L270:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L360
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L360:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    $0xfffffc00,%eax
  and    %rax,-0x48(%rbp)
  addq   $0x400,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  sar    $0xa,%rax
  and    $0x3fffff,%eax
  mov    %eax,-0x90(%rbp)
  mov    -0xe8(%rbp),%eax
  lea    0x3ff(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0xa,%eax
  sub    $0x1,%eax
  and    $0x3ff,%eax
  mov    %eax,-0x8c(%rbp)
  mov    -0x90(%rbp),%eax
  shl    $0xa,%eax
  or     -0x8c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rdx,0x50(%rax)
  movl   $0x0,-0x88(%rbp)
  movl   $0x0,-0x84(%rbp)
  movl   $0x0,-0x80(%rbp)
  movl   $0x0,-0x7c(%rbp)
  movl   $0x0,-0x78(%rbp)
  movl   $0x0,-0x74(%rbp)
  movl   $0x0,-0x70(%rbp)
  movl   $0x0,-0x6c(%rbp)
  movl   $0x1,-0x68(%rbp)
  mov    -0xdc(%rbp),%eax
  shl    $0x18,%eax
  mov    %eax,%edx
  mov    -0x6c(%rbp),%eax
  shl    $0x9,%eax
  or     %edx,%eax
  or     -0x68(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rdx,0x40(%rax)
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <report_subtest@plt>
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <report_subtest@plt>
  nop
L298:
  mov    -0x60(%rbp),%rax
  mov    0xd8(%rax),%rax
  and    $0x40,%eax
  cmp    $0x40,%rax
  jne    L298
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x10010500,%eax
  je     L237
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L237:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xc0000000,%eax
  je     L142
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L142:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x700,%eax
  je     L92
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L92:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x100,%eax
  je     L115
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L115:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x2000300,%eax
  je     L107
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L107:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x4000500,%eax
  je     L526
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L526:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x3700c500,%eax
  je     L62
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L62:
  addq   $0x4,-0x40(%rbp)
  movl   $0x1,-0xd0(%rbp)
  movl   $0x0,-0xcc(%rbp)
  mov    -0xdc(%rbp),%eax
  shl    $0x18,%eax
  mov    %eax,%edx
  mov    -0xd4(%rbp),%eax
  shl    $0xc,%eax
  or     %eax,%edx
  mov    -0xd0(%rbp),%eax
  shl    $0xb,%eax
  or     %eax,%edx
  mov    -0xcc(%rbp),%eax
  shl    $0xa,%eax
  or     %edx,%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rdx,0x8(%rax)
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <report_subtest@plt>
  nop
L318:
  mov    -0x60(%rbp),%rax
  mov    0xd8(%rax),%rax
  and    $0x40,%eax
  cmp    $0x40,%rax
  jne    L318
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x21001,%eax
  je     L541
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L541:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x500c000,%eax
  je     L4
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L4:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1000000,%eax
  je     L501
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L501:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xe000000,%eax
  je     L450
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L450:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1000200,%eax
  je     L70
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L70:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x3000400,%eax
  je     L388
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L388:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x5000600,%eax
  je     L64
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L64:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x7000800,%eax
  je     L529
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L529:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x9000a00,%eax
  je     L407
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L407:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xb000c00,%eax
  je     L598
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L598:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xc7005f00,%eax
  je     L562
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L562:
  addq   $0x4,-0x40(%rbp)
  movl   $0x0,-0xd0(%rbp)
  movl   $0x1,-0xcc(%rbp)
  mov    -0xdc(%rbp),%eax
  shl    $0x18,%eax
  mov    %eax,%edx
  mov    -0xd4(%rbp),%eax
  shl    $0xc,%eax
  or     %eax,%edx
  mov    -0xd0(%rbp),%eax
  shl    $0xb,%eax
  or     %eax,%edx
  mov    -0xcc(%rbp),%eax
  shl    $0xa,%eax
  or     %edx,%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rdx,0x8(%rax)
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <report_subtest@plt>
  nop
L128:
  mov    -0x60(%rbp),%rax
  mov    0xd8(%rax),%rax
  and    $0x40,%eax
  cmp    $0x40,%rax
  jne    L128
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x21001,%eax
  je     L293
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L293:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x500c000,%eax
  je     L23
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L23:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x2000000,%eax
  je     L218
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L218:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x15000000,%eax
  je     L457
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L457:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1000200,%eax
  je     L246
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L246:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x3000400,%eax
  je     L589
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L589:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x5000600,%eax
  je     L546
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L546:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x7000800,%eax
  je     L105
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L105:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x9000a00,%eax
  je     L159
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L159:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xb000c00,%eax
  je     L499
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L499:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xd000e00,%eax
  je     L478
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L478:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xf001000,%eax
  je     L183
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L183:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x11001200,%eax
  je     L364
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L364:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x13007d00,%eax
  je     L355
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L355:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xbc000002,%eax
  je     L361
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L361:
  addq   $0x4,-0x40(%rbp)
  movl   $0x1,-0xd0(%rbp)
  movl   $0x1,-0xcc(%rbp)
  mov    -0xdc(%rbp),%eax
  shl    $0x18,%eax
  mov    %eax,%edx
  mov    -0xd4(%rbp),%eax
  shl    $0xc,%eax
  or     %eax,%edx
  mov    -0xd0(%rbp),%eax
  shl    $0xb,%eax
  or     %eax,%edx
  mov    -0xcc(%rbp),%eax
  shl    $0xa,%eax
  or     %edx,%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rdx,0x8(%rax)
  mov    $0x5,%edi
  mov    $0x0,%eax
  call   <report_subtest@plt>
  nop
L277:
  mov    -0x60(%rbp),%rax
  mov    0xd8(%rax),%rax
  and    $0x40,%eax
  cmp    $0x40,%rax
  jne    L277
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x10010500,%eax
  je     L6
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L6:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xc0000300,%eax
  je     L258
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L258:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1c00,%eax
  je     L256
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L256:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x100,%eax
  je     L516
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L516:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x2000300,%eax
  je     L341
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L341:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x4000500,%eax
  je     L370
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L370:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x6000700,%eax
  je     L322
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L322:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x8000900,%eax
  je     L591
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L591:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xa000b00,%eax
  je     L19
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L19:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xc000d00,%eax
  je     L243
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L243:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xe000f00,%eax
  je     L58
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L58:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x10001100,%eax
  je     L440
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L440:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x12001300,%eax
  je     L392
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L392:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x14001500,%eax
  je     L571
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L571:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x16001700,%eax
  je     L10
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L10:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x18001900,%eax
  je     L582
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L582:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1a004b00,%eax
  je     L33
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L33:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x11000002,%eax
  je     L260
  mov    $0x4,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L260:
  addq   $0x4,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %eax,-0x64(%rbp)
  mov    -0x60(%rbp),%rax
  mov    0x60(%rax),%rdx
  mov    -0x64(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  je     L394
  mov    $0x5,%edi
  mov    $0x0,%eax
  call   <fail@plt>
L394:
  mov    $0x6,%edi
  mov    $0x0,%eax
  call   <report_subtest@plt>
  mov    %rbx,%rsp
  nop
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L540
  call   <__stack_chk_fail@plt>
L540:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
grtc_test(int paddr, int buffersize) {
  report_device(0x01031000);
  struct grtc_reg {
    volatile unsigned long grr;
    volatile unsigned long gcr;
    volatile unsigned long pmr;
    volatile unsigned long sir;
    volatile unsigned long far;
    volatile unsigned long clcwr1;
    volatile unsigned long clcwr2;
    volatile unsigned long phir;
    volatile unsigned long cor;
    volatile unsigned long str;
    volatile unsigned long asr;
    volatile unsigned long rrp;
    volatile unsigned long rwp;
    volatile unsigned long dummy0;
    volatile unsigned long dummy1;
    volatile unsigned long dummy2;
    volatile unsigned long dummy3;
    volatile unsigned long dummy4;
    volatile unsigned long dummy5;
    volatile unsigned long dummy6;
    volatile unsigned long dummy7;
    volatile unsigned long dummy8;
    volatile unsigned long dummy9;
    volatile unsigned long dummy10;
    volatile unsigned long pimsr;
    volatile unsigned long pimr;
    volatile unsigned long pisr;
    volatile unsigned long pir;
    volatile unsigned long imr;
    volatile unsigned long picr;
  };
  struct grtc_reg *ltc = (struct grtc_reg *)(paddr);
  report_subtest(0x0);
  int SEB = 0x55;
  int SRST = 1;
  ltc->grr = (SEB << 24) | (SRST);
  int PSS = 0;
  int NRZM = 0;
  int PSR = 0;
  ltc->gcr = (SEB << 24) | (PSS << 12) | (NRZM << 11) | (PSR << 10);
  int MASK = 0;
  ltc->pmr = MASK;
  int CWTY = 0;
  int VNUM = 0;
  int STAF = 0;
  int CIE = 0;
  int VCI = 0;
  int NRFA = 0;
  int NBLO = 0;
  int LOUT = 0;
  int WAIT = 0;
  int RTMI = 0;
  int FBCO = 0;
  int RTYPE = 0;
  int RVAL = 0;
  volatile long int framememory[buffersize / 4];
  long int framememorybase;
  framememorybase = (long int)&framememory[0];
  framememorybase = framememorybase & 0xFFFFFC00;
  framememorybase = framememorybase + 0x400;
  int BUFST = (framememorybase >> 10) & 0x003FFFFF;
  int RXLEN = (buffersize / 1024 - 1) & 0x3FF;
  ltc->asr = (BUFST << 10) | (RXLEN);
  int PCS = 0;
  int POV = 0;
  int PRBF = 0;
  int PCR = 0;
  int PFAR = 0;
  int PBLO = 0;
  int PRFA = 0;
  int CRST = 0;
  int RE = 1;
  ltc->cor = (SEB << 24) | (CRST << 9) | (RE);
  report_subtest(0x1);
  report_subtest(0x2);
  while ((ltc->pir & 0x40) != 0x40)
    ;
  volatile int *memoryrx;
  memoryrx = (int *)framememorybase;
  if (0x10010500 != *memoryrx)
    fail(1);
  memoryrx++;
  if (0xC0000000 != *memoryrx)
    fail(1);
  memoryrx++;
  if (0x00000700 != *memoryrx)
    fail(1);
  memoryrx++;
  if (0x00000100 != *memoryrx)
    fail(1);
  memoryrx++;
  if (0x02000300 != *memoryrx)
    fail(1);
  memoryrx++;
  if (0x04000500 != *memoryrx)
    fail(1);
  memoryrx++;
  if (0x3700C500 != *memoryrx)
    fail(1);
  memoryrx++;
  NRZM = 1;
  PSR = 0;
  ltc->gcr = (SEB << 24) | (PSS << 12) | (NRZM << 11) | (PSR << 10);
  report_subtest(0x3);
  while ((ltc->pir & 0x40) != 0x40)
    ;
  if (0x00021001 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0x0500C000 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0x01000000 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0x0E000000 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0x01000200 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0x03000400 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0x05000600 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0x07000800 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0x09000A00 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0x0B000C00 != *memoryrx)
    fail(2);
  memoryrx++;
  if (0xC7005F00 != *memoryrx)
    fail(2);
  memoryrx++;
  NRZM = 0;
  PSR = 1;
  ltc->gcr = (SEB << 24) | (PSS << 12) | (NRZM << 11) | (PSR << 10);
  report_subtest(0x4);
  while ((ltc->pir & 0x40) != 0x40)
    ;
  if (0x00021001 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x0500C000 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x02000000 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x15000000 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x01000200 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x03000400 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x05000600 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x07000800 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x09000A00 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x0B000C00 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x0D000E00 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x0F001000 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x11001200 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0x13007D00 != *memoryrx)
    fail(3);
  memoryrx++;
  if (0xBC000002 != *memoryrx)
    fail(3);
  memoryrx++;
  NRZM = 1;
  PSR = 1;
  ltc->gcr = (SEB << 24) | (PSS << 12) | (NRZM << 11) | (PSR << 10);
  report_subtest(0x5);
  while ((ltc->pir & 0x40) != 0x40)
    ;
  if (0x10010500 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0xC0000300 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x00001C00 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x00000100 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x02000300 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x04000500 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x06000700 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x08000900 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x0A000B00 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x0C000D00 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x0E000F00 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x10001100 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x12001300 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x14001500 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x16001700 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x18001900 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x1A004B00 != *memoryrx)
    fail(4);
  memoryrx++;
  if (0x11000002 != *memoryrx)
    fail(4);
  memoryrx++;
  int RXWRPR = memoryrx;
  if (ltc->rwp != RXWRPR)
    fail(5);
  report_subtest(0x6);
}
```