user: Converte this assembly snippet into its equivalent C code:

```asm
<test_row_xy2d>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x10,%edi
  call   <row_xy2d@plt>
  mov    %eax,%edx
  lea    D53(%rip),%rax
  test   %edx,%edx
  je     L51
L48:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L82
  add    $0x18,%rsp
  ret
L51:
  mov    $0xf,%edx
  mov    $0x0,%esi
  mov    $0x10,%edi
  call   <row_xy2d@plt>
  mov    %eax,%edx
  lea    D94(%rip),%rax
  cmp    $0xff,%edx
  jne    L48
  mov    $0x10,%edx
  mov    $0x0,%esi
  mov    $0x10,%edi
  call   <row_xy2d@plt>
  mov    %eax,%edx
  lea    D91(%rip),%rax
  cmp    $0x100,%edx
  jne    L48
  mov    $0x1f,%edx
  mov    $0x0,%esi
  mov    $0x10,%edi
  call   <row_xy2d@plt>
  mov    %eax,%edx
  lea    D14(%rip),%rax
  cmp    $0x1ff,%edx
  jne    L48
  mov    $0x0,%edx
  mov    $0x1,%esi
  mov    $0x10,%edi
  call   <row_xy2d@plt>
  mov    %eax,%edx
  lea    D20(%rip),%rax
  cmp    $0x3,%edx
  jne    L48
  lea    0x4(%rsp),%rcx
  mov    %rsp,%rdx
  mov    $0x0,%esi
  mov    $0x10,%edi
  call   <row_d2xy@plt>
  lea    D71(%rip),%rax
  mov    (%rsp),%edx
  or     0x4(%rsp),%edx
  jne    L48
  lea    0x4(%rsp),%rcx
  mov    %rsp,%rdx
  mov    $0xff,%esi
  mov    $0x10,%edi
  call   <row_d2xy@plt>
  lea    D69(%rip),%rax
  cmpl   $0x0,(%rsp)
  jne    L48
  cmpl   $0xf,0x4(%rsp)
  jne    L48
  lea    0x4(%rsp),%rcx
  mov    %rsp,%rdx
  mov    $0x100,%esi
  mov    $0x10,%edi
  call   <row_d2xy@plt>
  lea    D90(%rip),%rax
  cmpl   $0x0,(%rsp)
  jne    L48
  cmpl   $0x10,0x4(%rsp)
  jne    L48
  lea    0x4(%rsp),%rcx
  mov    %rsp,%rdx
  mov    $0x1ff,%esi
  mov    $0x10,%edi
  call   <row_d2xy@plt>
  lea    D45(%rip),%rax
  cmpl   $0x0,(%rsp)
  jne    L48
  cmpl   $0x1f,0x4(%rsp)
  jne    L48
  lea    0x4(%rsp),%rcx
  mov    %rsp,%rdx
  mov    $0x3,%esi
  mov    $0x10,%edi
  call   <row_d2xy@plt>
  lea    D88(%rip),%rax
  cmpl   $0x1,(%rsp)
  jne    L48
  cmpl   $0x0,0x4(%rsp)
  mov    $0x0,%edx
  cmove  %rdx,%rax
  jmp    L48
L82:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D53
datatype: string
name: disassemble_data
arguments: label: D94
datatype: string
name: disassemble_data
arguments: label: D91
datatype: string
name: disassemble_data
arguments: label: D14
datatype: string
name: disassemble_data
arguments: label: D20
datatype: string
name: disassemble_data
arguments: label: D71
datatype: string
name: disassemble_data
arguments: label: D69
datatype: string
name: disassemble_data
arguments: label: D90
datatype: string
name: disassemble_data
arguments: label: D45
datatype: string
name: disassemble_data
arguments: label: D88
datatype: string

tool: D53: row_xy2d(16, 0, 0) != 0

tool: D94: row_xy2d(16, 0, 15) != 255

tool: D91: row_xy2d(16, 0, 16) != 255

tool: D14: row_xy2d(16, 0, 31) != 255

tool: D20: row_xy2d(16, 1, 0) != 0

tool: D71: row_d2xy(16, 0, x, y) -> (0, 0)

tool: D69: row_d2xy(16, 255, x, y) -> (0,15)

tool: D90: row_d2xy(16, 256, x, y) -> (0,16)

tool: D45: row_d2xy(16, 511, x, y) -> (0,31)

tool: D88: row_d2xy(16, 3, x, y) -> (1, 0)

assistant: ```c
char *test_row_xy2d() {
  do {
    if (!(row_xy2d(16, 0, 0) == 0))
      return "row_xy2d(16, 0, 0) != 0";
  } while (0);
  do {
    if (!(row_xy2d(16, 0, 15) == 255))
      return "row_xy2d(16, 0, 15) != 255";
  } while (0);
  do {
    if (!(row_xy2d(16, 0, 16) == 256))
      return "row_xy2d(16, 0, 16) != 255";
  } while (0);
  do {
    if (!(row_xy2d(16, 0, 31) == 511))
      return "row_xy2d(16, 0, 31) != 255";
  } while (0);
  do {
    if (!(row_xy2d(16, 1, 0) == 3))
      return "row_xy2d(16, 1, 0) != 0";
  } while (0);
  int x, y;
  row_d2xy(16, 0, &x, &y);
  do {
    if (!(x == 0 && y == 0))
      return "row_d2xy(16, 0, x, y) -> (0, 0)";
  } while (0);
  row_d2xy(16, 255, &x, &y);
  do {
    if (!(x == 0 && y == 15))
      return "row_d2xy(16, 255, x, y) -> (0,15)";
  } while (0);
  row_d2xy(16, 256, &x, &y);
  do {
    if (!(x == 0 && y == 16))
      return "row_d2xy(16, 256, x, y) -> (0,16)";
  } while (0);
  row_d2xy(16, 511, &x, &y);
  do {
    if (!(x == 0 && y == 31))
      return "row_d2xy(16, 511, x, y) -> (0,31)";
  } while (0);
  row_d2xy(16, 3, &x, &y);
  do {
    if (!(x == 1 && y == 0))
      return "row_d2xy(16, 3, x, y) -> (1, 0)";
  } while (0);
  return 0;
}
```