user: Please show me the C implementation that matches the assembly code listed below:

```asm
<colour_to_pscolor>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  mov    %rdx,%rdi
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %esi,%ebx
  lea    D179(%rip),%rsi
  call   <strcpy@plt>
  and    $0x80,%r12d
  jne    L168
  cmp    $0x6,%ebx
  ja     L78
  lea    D203(%rip),%rdx
  movslq (%rdx,%rbx,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
L168:
  cmp    $0x6,%ebx
  ja     L68
  lea    D135(%rip),%rdx
  movslq (%rdx,%rbx,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
  lea    D62(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
L71:
  pop    %rbx
  mov    %rbp,%rdi
  lea    D75(%rip),%rsi
  pop    %rbp
  pop    %r12
  jmp    1070 <strcat@plt>
  nopw   0x0(%rax,%rax,1)
  lea    D77(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
L23:
  pop    %rbx
  mov    %rbp,%rdi
  lea    D185(%rip),%rsi
  pop    %rbp
  pop    %r12
  jmp    1070 <strcat@plt>
  nopw   0x0(%rax,%rax,1)
  lea    D181(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L23
  nopl   0x0(%rax)
  lea    D134(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L23
  nopl   0x0(%rax)
  lea    D38(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L23
  nopl   0x0(%rax)
  lea    D175(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L23
  nopl   0x0(%rax)
  lea    D190(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L23
  nopl   0x0(%rax)
  lea    D189(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L23
  nopl   0x0(%rax)
  lea    D119(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L71
  nopl   0x0(%rax)
  lea    D166(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L71
  nopl   0x0(%rax)
  lea    D130(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L71
  nopl   0x0(%rax)
  lea    D156(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L71
  nopl   0x0(%rax)
  lea    D195(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L71
  nopl   0x0(%rax)
  lea    D180(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L71
L78:
  lea    D165(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L23
L68:
  lea    D100(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L71
```

tool_calls: name: retrieve_data
arguments: tag: D179
type: string
name: retrieve_data
arguments: tag: D62
type: string
name: retrieve_data
arguments: tag: D75
type: string
name: retrieve_data
arguments: tag: D77
type: string
name: retrieve_data
arguments: tag: D185
type: string
name: retrieve_data
arguments: tag: D181
type: string
name: retrieve_data
arguments: tag: D134
type: string
name: retrieve_data
arguments: tag: D38
type: string
name: retrieve_data
arguments: tag: D175
type: string
name: retrieve_data
arguments: tag: D190
type: string
name: retrieve_data
arguments: tag: D189
type: string
name: retrieve_data
arguments: tag: D119
type: string
name: retrieve_data
arguments: tag: D166
type: string
name: retrieve_data
arguments: tag: D130
type: string
name: retrieve_data
arguments: tag: D156
type: string
name: retrieve_data
arguments: tag: D195
type: string
name: retrieve_data
arguments: tag: D180
type: string
name: retrieve_data
arguments: tag: D165
type: string
name: retrieve_data
arguments: tag: D100
type: string

tool: 

tool: D62: 0.00 0.00 1.00 0.00

tool: D75:  setcmykcolor

tool: D77: 0.00 1.00 0.00

tool: D185:  setrgbcolor

tool: D181: 1.00 1.00 1.00

tool: D134: 0.00 1.00 1.00

tool: D38: 0.00 0.00 1.00

tool: D175: 1.00 0.00 1.00

tool: D190: 1.00 0.00 0.00

tool: D189: 1.00 1.00 0.00

tool: D119: 1.00 0.00 1.00 0.00

tool: D166: 0.00 0.00 0.00 0.00

tool: D130: 1.00 0.00 0.00 0.00

tool: D156: 1.00 1.00 0.00 0.00

tool: D195: 0.00 1.00 0.00 0.00

tool: D180: 0.00 1.00 1.00 0.00

tool: D165: 0.00 0.00 0.00

tool: D100: 0.00 0.00 0.00 1.00

assistant: ```c
void colour_to_pscolor(int option, int colour, char *output) {
  strcpy(output, "");
  if ((option & 128) == 0) {
    switch (colour) {
    case 0:
      strcat(output, "1.00 1.00 1.00");
      break;
    case 1:
      strcat(output, "0.00 1.00 1.00");
      break;
    case 2:
      strcat(output, "0.00 0.00 1.00");
      break;
    case 3:
      strcat(output, "1.00 0.00 1.00");
      break;
    case 4:
      strcat(output, "1.00 0.00 0.00");
      break;
    case 5:
      strcat(output, "1.00 1.00 0.00");
      break;
    case 6:
      strcat(output, "0.00 1.00 0.00");
      break;
    default:
      strcat(output, "0.00 0.00 0.00");
      break;
    }
    strcat(output, " setrgbcolor");
  } else {
    switch (colour) {
    case 0:
      strcat(output, "0.00 0.00 0.00 0.00");
      break;
    case 1:
      strcat(output, "1.00 0.00 0.00 0.00");
      break;
    case 2:
      strcat(output, "1.00 1.00 0.00 0.00");
      break;
    case 3:
      strcat(output, "0.00 1.00 0.00 0.00");
      break;
    case 4:
      strcat(output, "0.00 1.00 1.00 0.00");
      break;
    case 5:
      strcat(output, "0.00 0.00 1.00 0.00");
      break;
    case 6:
      strcat(output, "1.00 0.00 1.00 0.00");
      break;
    default:
      strcat(output, "0.00 0.00 0.00 1.00");
      break;
    }
    strcat(output, " setcmykcolor");
  }
}
```