user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<wireworld>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r15
  mov    %rdi,0x18(%rsp)
  mov    %esi,%ebx
  mov    %edx,%r14d
  mov    %edx,0xc(%rsp)
  call   <copy_world@plt>
  mov    %rax,0x10(%rsp)
  test   %r14d,%r14d
  jle    L62
  mov    %rax,%r10
  mov    %r15,%rcx
  mov    $0x0,%r11d
  lea    -0x1(%r14),%r15d
  lea    -0x1(%rbx),%ebp
  jmp    L252
L308:
  cmp    $0x1,%esi
  je     L52
  cmp    $0x2,%esi
  je     L155
  cmp    $0x3,%esi
  je     L183
L156:
  add    $0x1,%edx
  cmp    %edx,%ebx
  je     L263
L288:
  mov    %rcx,%r9
  mov    (%rcx),%rdi
  mov    %rax,%r8
  add    $0x4,%rax
  mov    (%rdi,%rax,1),%esi
  test   %esi,%esi
  jne    L308
  mov    (%r10),%rsi
  movl   $0x0,(%rsi,%rax,1)
  jmp    L156
L52:
  test   %edx,%edx
  setg   %r12b
  test   %r11d,%r11d
  jle    L35
  test   %r12b,%r12b
  je     L35
  mov    -0x8(%rcx),%rsi
  cmpl   $0x2,(%rsi,%r8,1)
  sete   %sil
  movzbl %sil,%esi
L123:
  mov    -0x8(%r9),%r14
  cmpl   $0x2,(%r14,%rax,1)
  sete   %r13b
  movzbl %r13b,%r13d
  add    %r13d,%esi
  mov    %ebp,%r13d
  cmp    %edx,%ebp
  jle    L39
  cmpl   $0x2,0x8(%r14,%r8,1)
  jne    L44
  add    $0x1,%esi
  jmp    L44
L35:
  mov    $0x0,%esi
  test   %r11d,%r11d
  jg     L123
L44:
  test   %edx,%edx
  jle    L160
  cmpl   $0x2,(%rdi,%r8,1)
  je     L132
L227:
  mov    %ebp,%r13d
  cmp    %edx,%ebp
  jle    L29
L125:
  cmpl   $0x2,0x8(%rdi,%r8,1)
  je     L37
L29:
  cmp    %r11d,%r15d
  setg   %dil
  test   %r12b,%r12b
  je     L365
  test   %dil,%dil
  je     L365
  mov    0x8(%r9),%r12
  cmpl   $0x2,(%r12,%r8,1)
  sete   %r12b
  movzbl %r12b,%r12d
  add    %r12d,%esi
L25:
  mov    0x8(%r9),%r9
  cmpl   $0x2,(%r9,%rax,1)
  sete   %r12b
  movzbl %r12b,%r12d
  add    %r12d,%esi
  cmp    %edx,%r13d
  jle    L122
  test   %dil,%dil
  je     L122
  cmpl   $0x2,0x8(%r9,%r8,1)
  jne    L122
  add    $0x1,%esi
  jmp    L122
L37:
  add    $0x1,%esi
  jmp    L29
L155:
  mov    (%r10),%rsi
  movl   $0x3,(%rsi,%rax,1)
  jmp    L156
L183:
  mov    (%r10),%rsi
  movl   $0x1,(%rsi,%rax,1)
  jmp    L156
L263:
  add    $0x1,%r11d
  add    $0x8,%r10
  add    $0x8,%rcx
  cmp    %r11d,0xc(%rsp)
  je     L62
L252:
  mov    $0xfffffffffffffffc,%rax
  mov    $0x0,%edx
  test   %ebx,%ebx
  jg     L288
  jmp    L263
L314:
  cmp    %r11d,%r15d
  setg   %dil
L365:
  test   %dil,%dil
  jne    L25
L122:
  sub    $0x1,%esi
  cmp    $0x1,%esi
  ja     L156
  mov    (%r10),%rsi
  movl   $0x2,(%rsi,%rax,1)
  jmp    L156
L39:
  test   %edx,%edx
  jle    L314
  cmpl   $0x2,(%rdi,%r8,1)
  jne    L29
L132:
  add    $0x1,%esi
  jmp    L227
L160:
  mov    %ebp,%r13d
  cmp    %edx,%ebp
  jg     L125
  cmp    %r11d,%r15d
  setg   %dil
  jmp    L365
L62:
  mov    0xc(%rsp),%edx
  mov    %ebx,%esi
  mov    0x18(%rsp),%rdi
  call   <free_world@plt>
  mov    0x10(%rsp),%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int **wireworld(int **world, int SIZE_X, int SIZE_Y) {
  int **newWorld = copy_world(world, SIZE_X, SIZE_Y);
  int i;
  int j;
  for (i = 0; i < SIZE_Y; i++) {
    for (j = 0; j < SIZE_X; j++) {
      if (world[i][j] == 0)
        newWorld[i][j] = 0;
      else if (world[i][j] == 1) {
        int sum = 0;
        if (i > 0 && j > 0 && world[i - 1][j - 1] == 2)
          sum++;
        if (i > 0 && world[i - 1][j] == 2)
          sum++;
        if (i > 0 && j < SIZE_X - 1 && world[i - 1][j + 1] == 2)
          sum++;
        if (j > 0 && world[i][j - 1] == 2)
          sum++;
        if (j < SIZE_X - 1 && world[i][j + 1] == 2)
          sum++;
        if (i < SIZE_Y - 1 && j > 0 && world[i + 1][j - 1] == 2)
          sum++;
        if (i < SIZE_Y - 1 && world[i + 1][j] == 2)
          sum++;
        if (i < SIZE_Y - 1 && j < SIZE_X - 1 && world[i + 1][j + 1] == 2)
          sum++;
        if (sum == 1 || sum == 2)
          newWorld[i][j] = 2;
      } else if (world[i][j] == 2)
        newWorld[i][j] = 3;
      else if (world[i][j] == 3)
        newWorld[i][j] = 1;
    }
  }
  free_world(world, SIZE_X, SIZE_Y);
  return newWorld;
}
```