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

```asm
<main>:
  endbr64
  push   %r13
  lea    D48(%rip),%rdi
  lea    D57(%rip),%r13
  push   %r12
  push   %rbp
  lea    D32(%rip),%rbp
  push   %rbx
  mov    $0xf,%ebx
  sub    $0x8,%rsp
  call   <puts@plt>
  xor    %eax,%eax
  call   <propulsion_ifce_open@plt>
  test   %eax,%eax
  js     L53
  nopl   0x0(%rax)
L25:
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    $0xfffffe0c,%ecx
  mov    $0xfffffe0c,%edx
  mov    $0x320,%esi
  mov    $0x320,%edi
  call   <propulsion_ifce_fire@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L16
  mov    $0x1,%edi
  call   <sleep@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  mov    $0x64,%ecx
  mov    $0x64,%edx
  mov    $0xfffffce0,%esi
  mov    $0xfffffce0,%edi
  call   <propulsion_ifce_fire@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L16
  mov    $0x1,%edi
  call   <sleep@plt>
  sub    $0x1,%ebx
  jne    L25
  lea    D46(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <propulsion_ifce_close@plt>
L39:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L16:
  mov    %r12d,%esi
  lea    D54(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L39
L53:
  mov    %eax,%esi
  lea    D30(%rip),%rdi
  xor    %eax,%eax
  mov    $0x63,%r12d
  call   <printf@plt>
  jmp    L39
```

tool_calls: name: retrieve_data
arguments: label: D48
datatype: string
name: retrieve_data
arguments: label: D57
datatype: string
name: retrieve_data
arguments: label: D32
datatype: string
name: retrieve_data
arguments: label: D46
datatype: string
name: retrieve_data
arguments: label: D54
datatype: string
name: retrieve_data
arguments: label: D30
datatype: string

tool: D48: propulsion_ifce: opening thruster devices...

tool: D57: propulsion_ifce.main: firing thrusters...-800, -800, 100, 100

tool: D32: propulsion_ifce.main: firing thrusters...800, 800, -500, -500

tool: D46: propulsion_ifce.main: closing thruster device...

tool: D54: propulsion_ifce.main: error firing thrusters.  %8.8X


tool: D30: propulsion_ifce.main: error while opening... %8X


assistant: ```c
int main(int argc, const char *argv[]) {
  int fd;
  int rc = 0;
  int i;
  printf("propulsion_ifce"
         ": opening thruster devices...\n");
  fd = propulsion_ifce_open();
  if (fd < 0) {
    printf("propulsion_ifce"
           ".main: "
           "error while opening... %8X\n",
           fd);
    return 99;
  }
  for (i = 0; i < 15; i++) {
    printf("propulsion_ifce"
           ".main: "
           "firing thrusters...800, 800, -500, -500\n");
    rc = propulsion_ifce_fire(800, 800, -500, -500);
    if (rc) {
      printf("propulsion_ifce"
             ".main: "
             "error firing thrusters.  %8.8X\n",
             rc);
      return rc;
    }
    sleep(1);
    printf("propulsion_ifce"
           ".main: "
           "firing thrusters...-800, -800, 100, 100\n");
    rc = propulsion_ifce_fire(-800, -800, 100, 100);
    if (rc) {
      printf("propulsion_ifce"
             ".main: "
             "error firing thrusters.  %8.8X\n",
             rc);
      return rc;
    }
    sleep(1);
  }
  printf("propulsion_ifce"
         ".main: "
         "closing thruster device...\n");
  propulsion_ifce_close();
  return rc;
}
```