user: Demonstrate the C code that generates the assembly output below:

```asm
<Mali_test_reg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %ecx,-0x20(%rbp)
  mov    %r8d,-0x24(%rbp)
  mov    %r9d,-0x28(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <Mali_RdReg@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  je     L55
  mov    -0x14(%rbp),%eax
  shl    $0x1c,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  shl    $0x10,%eax
  add    %eax,%edx
  mov    -0x1c(%rbp),%eax
  lea    (%rdx,%rax,1),%esi
  mov    0x18(%rbp),%rcx
  mov    -0x28(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %rcx,%r8
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printk@plt>
  mov    $0xffffffff,%eax
  jmp    L34
L55:
  cmpl   $0x0,0x10(%rbp)
  jne    L2
  mov    -0x24(%rbp),%ecx
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <Mali_WrReg@plt>
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <Mali_RdReg@plt>
  and    -0x20(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  and    %eax,%edx
  mov    -0x4(%rbp),%eax
  cmp    %eax,%edx
  je     L6
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  and    %eax,%edx
  mov    -0x14(%rbp),%eax
  shl    $0x1c,%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%eax
  shl    $0x10,%eax
  add    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  lea    (%rcx,%rax,1),%esi
  mov    0x18(%rbp),%rcx
  mov    -0x4(%rbp),%eax
  mov    %rcx,%r8
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printk@plt>
  mov    $0xfffffffe,%eax
  jmp    L34
L6:
  mov    -0x24(%rbp),%eax
  and    $0x12345678,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <Mali_WrReg@plt>
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <Mali_RdReg@plt>
  and    -0x20(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x24(%rbp),%eax
  and    $0x12345678,%eax
  and    -0x20(%rbp),%eax
  cmp    %eax,-0x4(%rbp)
  je     L2
  mov    -0x24(%rbp),%eax
  and    $0x12345678,%eax
  and    -0x20(%rbp),%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  shl    $0x1c,%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%eax
  shl    $0x10,%eax
  add    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  lea    (%rcx,%rax,1),%esi
  mov    0x18(%rbp),%rcx
  mov    -0x4(%rbp),%eax
  mov    %rcx,%r8
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printk@plt>
  mov    $0xfffffffe,%eax
  jmp    L34
L2:
  mov    -0x14(%rbp),%eax
  shl    $0x1c,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  shl    $0x10,%eax
  add    %eax,%edx
  mov    -0x1c(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    0x18(%rbp),%rax
  mov    %rax,%rdx
  mov    %ecx,%esi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printk@plt>
  mov    $0x0,%eax
L34:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D38
type_guessed: string
name: extract_symbolic_data
arguments: tag: D32
type_guessed: string
name: extract_symbolic_data
arguments: tag: D23
type_guessed: string

tool: D38: FAILURE: Wrong reset value. Addr: 0x%08x Value: 0x%08x Expected: 0x%08x for %s


tool: D32: FAILURE: Wrong value. Addr: 0x%08x Value: 0x%08x Expected: 0x%08x for %s


tool: D23: Register %08x:  for %s  Success!


assistant: ```c
int Mali_test_reg(int unit, int core, int regnum, int read_mask, int write_mask, int reset_value, int access, char *reg_str) {
  int value = Mali_RdReg(unit, core, regnum);
  if (value != reset_value) {
    printk("FAILURE: Wrong reset value. Addr: 0x%08x Value: 0x%08x Expected: 0x%08x for %s\n", (unit << 28) + (core << 16) + regnum, value, reset_value, reg_str);
    return -1;
  }
  if (access == 0) {
    Mali_WrReg(unit, core, regnum, (0xffffffff & write_mask));
    value = Mali_RdReg(unit, core, regnum) & read_mask;
    if (value != (0xffffffff & write_mask & read_mask)) {
      printk("FAILURE: Wrong value. Addr: 0x%08x Value: 0x%08x Expected: 0x%08x for %s\n", (unit << 28) + (core << 16) + regnum, value, (0xffffffff & write_mask & read_mask), reg_str);
      return -2;
    }
    Mali_WrReg(unit, core, regnum, (0x12345678 & write_mask));
    value = Mali_RdReg(unit, core, regnum) & read_mask;
    if (value != (0x12345678 & write_mask & read_mask)) {
      printk("FAILURE: Wrong value. Addr: 0x%08x Value: 0x%08x Expected: 0x%08x for %s\n", (unit << 28) + (core << 16) + regnum, value, (0x12345678 & write_mask & read_mask), reg_str);
      return -2;
    }
  }
  printk("Register %08x:  for %s  Success!\n", (unit << 28) + (core << 16) + regnum, reg_str);
  return 0;
}
```