user: Translate the below assembly code into C programming language:

```asm
<do_configure>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%r12
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsp)
  test   %esi,%esi
  cmovns %esi,%eax
  mov    %eax,%ebx
  mov    %eax,%esi
  lea    D63(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %rbp,%rbp
  je     L14
  lea    D92(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L52:
  lea    D17(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rsi
  lea    D83(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  sub    $0x8,%rsp
  lea    0x8(%rsp),%rax
  push   %rax
  mov    %rbp,%r9
  mov    $0x4,%r8d
  mov    $0x0,%ecx
  mov    %ebx,%edx
  mov    $0x4,%esi
  mov    %r12,%rdi
  call   <XNVCTRLStringOperation@plt>
  add    $0x10,%rsp
  test   %eax,%eax
  je     L33
  lea    D39(%rip),%rdi
  call   <puts@plt>
  mov    (%rsp),%rsi
  test   %rsi,%rsi
  lea    D37(%rip),%rax
  cmove  %rax,%rsi
  lea    D74(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    (%rsp),%rdi
  test   %rdi,%rdi
  je     L51
  call   <XFree@plt>
L51:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L11
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L14:
  lea    D94(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D76(%rip),%rbp
  jmp    L52
L33:
  mov    %ebx,%esi
  lea    D5(%rip),%rdi
  call   <printf@plt>
  jmp    L51
L11:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D63
type: string
name: extract_symbolic_data
arguments: tag: D43
type: string
name: extract_symbolic_data
arguments: tag: D92
type: string
name: extract_symbolic_data
arguments: tag: D17
type: string
name: extract_symbolic_data
arguments: tag: D83
type: string
name: extract_symbolic_data
arguments: tag: D39
type: string
name: extract_symbolic_data
arguments: tag: D37
type: string
name: extract_symbolic_data
arguments: tag: D74
type: string
name: extract_symbolic_data
arguments: tag: D94
type: string
name: extract_symbolic_data
arguments: tag: D76
type: string
name: extract_symbolic_data
arguments: tag: D5
type: string

tool: D63: Configuring GVI device %d:



tool: D43: Setting 

tool: D92: custom

tool: D17:  configuration:


tool: D83:   "%s"



tool: D39: Topology:


tool: D37: No streams are configured.

tool: D74:   %s



tool: D94: default

tool: D76: stream=0, link0=jack0.0; stream=1, link0=jack1.0; stream=2, link0=jack2.0; stream=3, link0=jack3.0

tool: D5:   - Failed to configure stream topology of GVI %d.


assistant: ```c
void do_configure(Display *dpy, int use_gvi, char *pIn) {
  Bool ret;
  char *pOut = NULL;
  if (use_gvi < 0) {
    use_gvi = 0;
  }
  printf("Configuring GVI device %d:\n\n", use_gvi);
  printf("Setting ");
  if (!pIn) {
    pIn = "stream=0, link0=jack0.0; "
          "stream=1, link0=jack1.0; "
          "stream=2, link0=jack2.0; "
          "stream=3, link0=jack3.0";
    printf("default");
  } else {
    printf("custom");
  }
  printf(" configuration:\n\n");
  printf("  \"%s\"\n\n", pIn);
  ret = XNVCTRLStringOperation(dpy, 4, use_gvi, 0, 4, pIn, &pOut);
  if (!ret) {
    printf("  - Failed to configure stream topology of GVI %d.\n", use_gvi);
    return;
  }
  printf("Topology:\n\n");
  printf("  %s\n\n", pOut ? pOut : "No streams are configured.");
  if (pOut) {
    XFree(pOut);
    pOut = NULL;
  }
}
```