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

```asm
<set_dims>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    $0x3,%edx
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L54
  mov    -0x8(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  movl   $0x2,(%rax)
  jmp    L42
L54:
  mov    -0x10(%rbp),%rax
  mov    $0x3,%edx
  lea    D26(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L90
  mov    -0x8(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movl   $0x2,(%rax)
  jmp    L42
L90:
  mov    -0x10(%rbp),%rax
  mov    $0x3,%edx
  lea    D57(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L50
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movl   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  movl   $0x2,(%rax)
  jmp    L42
L50:
  mov    -0x10(%rbp),%rax
  mov    $0x3,%edx
  lea    D41(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L100
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movl   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  movl   $0x2,(%rax)
  jmp    L42
L100:
  mov    -0x10(%rbp),%rax
  mov    $0x3,%edx
  lea    D34(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L46
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  movl   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movl   $0x2,(%rax)
  jmp    L42
L46:
  mov    -0x10(%rbp),%rax
  mov    $0x3,%edx
  lea    D42(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L69
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  movl   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  movl   $0x2,(%rax)
  jmp    L42
L69:
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  call   <write_log_comment_disp@plt>
  mov    $0x1,%eax
  jmp    L26
L42:
  mov    $0x0,%eax
L26:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D47
data_type: string
name: extract_symbolic_data
arguments: data_label: D26
data_type: string
name: extract_symbolic_data
arguments: data_label: D57
data_type: string
name: extract_symbolic_data
arguments: data_label: D41
data_type: string
name: extract_symbolic_data
arguments: data_label: D34
data_type: string
name: extract_symbolic_data
arguments: data_label: D42
data_type: string
name: extract_symbolic_data
arguments: data_label: D52
data_type: string

tool: D47: xyz

tool: D26: xzy

tool: D57: yxz

tool: D41: yzx

tool: D34: zxy

tool: D42: zyx

tool: D52: Axis order must be a permutation of xyz.


assistant: ```c
int set_dims(int dim[3], const char *axis_order) {
  if (0 == strncmp(axis_order, "xyz", 3)) {
    dim[0] = 0;
    dim[1] = 1;
    dim[2] = 2;
  } else if (0 == strncmp(axis_order, "xzy", 3)) {
    dim[0] = 0;
    dim[2] = 1;
    dim[1] = 2;
  } else if (0 == strncmp(axis_order, "yxz", 3)) {
    dim[1] = 0;
    dim[0] = 1;
    dim[2] = 2;
  } else if (0 == strncmp(axis_order, "yzx", 3)) {
    dim[1] = 0;
    dim[2] = 1;
    dim[0] = 2;
  } else if (0 == strncmp(axis_order, "zxy", 3)) {
    dim[2] = 0;
    dim[0] = 1;
    dim[1] = 2;
  } else if (0 == strncmp(axis_order, "zyx", 3)) {
    dim[2] = 0;
    dim[1] = 1;
    dim[0] = 2;
  } else {
    write_log_comment_disp("Axis order must be a permutation of xyz.\n");
    return 1;
  }
  return 0;
}
```