user: Demonstrate the C code that generates the assembly output below:

```asm
<help>:
  endbr64
  push   %r13
  mov    %rdi,%r13
  lea    D28(%rip),%rdi
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  call   <strcmp@plt>
  test   %eax,%eax
  je     L3
  mov    %rbp,%rsi
  lea    D27(%rip),%rdi
  call   <strcmp@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L36
  mov    %rbp,%rsi
  lea    D265(%rip),%rdi
  call   <strcmp@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L16
  lea    D133(%rip),%rdi
  call   <puts@plt>
  lea    D211(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D217(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D125(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rsi
  lea    D278(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13,%rsi
  lea    D94(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13,%rsi
  lea    D121(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D153(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rsi
  lea    D36(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D120(%rip),%rdi
  call   <puts@plt>
  lea    D100(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rsi
  lea    D273(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D134(%rip),%rdi
  call   <puts@plt>
  lea    D15(%rip),%rdi
  call   <puts@plt>
  lea    D252(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
L17:
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L3:
  lea    D133(%rip),%rdi
  mov    %eax,%r12d
  call   <puts@plt>
  lea    D155(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rsi
  lea    D187(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r13,%rsi
  lea    D189(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L36:
  lea    D133(%rip),%rdi
  call   <puts@plt>
  lea    D41(%rip),%rdi
  call   <puts@plt>
  lea    D286(%rip),%rdi
  call   <puts@plt>
  lea    D130(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rsi
  lea    D44(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13,%rsi
  lea    D48(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13,%rsi
  lea    D161(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L16:
  mov    $0xffffffff,%r12d
  jmp    L17
```

tool_calls: name: parse_data
arguments: data_label: D28
data_type: string
name: parse_data
arguments: data_label: D27
data_type: string
name: parse_data
arguments: data_label: D265
data_type: string
name: parse_data
arguments: data_label: D133
data_type: string
name: parse_data
arguments: data_label: D211
data_type: string
name: parse_data
arguments: data_label: D217
data_type: string
name: parse_data
arguments: data_label: D125
data_type: string
name: parse_data
arguments: data_label: D278
data_type: string
name: parse_data
arguments: data_label: D94
data_type: string
name: parse_data
arguments: data_label: D121
data_type: string
name: parse_data
arguments: data_label: D153
data_type: string
name: parse_data
arguments: data_label: D36
data_type: string
name: parse_data
arguments: data_label: D120
data_type: string
name: parse_data
arguments: data_label: D100
data_type: string
name: parse_data
arguments: data_label: D273
data_type: string
name: parse_data
arguments: data_label: D134
data_type: string
name: parse_data
arguments: data_label: D15
data_type: string
name: parse_data
arguments: data_label: D252
data_type: string
name: parse_data
arguments: data_label: D155
data_type: string
name: parse_data
arguments: data_label: D187
data_type: string
name: parse_data
arguments: data_label: D189
data_type: string
name: parse_data
arguments: data_label: D41
data_type: string
name: parse_data
arguments: data_label: D286
data_type: string
name: parse_data
arguments: data_label: D130
data_type: string
name: parse_data
arguments: data_label: D44
data_type: string
name: parse_data
arguments: data_label: D48
data_type: string
name: parse_data
arguments: data_label: D161
data_type: string

tool: D28: analyze

tool: D27: decrypt

tool: D265: info

tool: D133: 


tool: D211: To decrypt an SRTP audio stream you need the key material that was used to encrypt it. 

tool: D217: Get it from a SIP trace or from a log file. 

tool: D125: The key material is a 40 byte character string, for example CXL0YTLiYrsKYDAsxAJKTWqQaBg1PQhUH9iFwPAp.

tool: D278: You also need the SSRC value of the SRTP audio stream. One way of doing this is by running %s analyze.






tool: D94: For a G.711 RTP stream (PCMU or PCMA) %s creates a .wav file that can be played directly.




tool: D121: For a G.722 RTP stream %s creates a RAW file with .g722 extension. Use ffmpeg to convert:


tool: D153: ffmpeg -i file.g722 file.wav



tool: D36: For a SILK 8KHz RTP stream %s creates a SILK SDK file with .bin extension. To convert use:


tool: D120: decoder.exe file-SILK8000.bin help.pcm -Fs_API 8000

tool: D100: ffmpeg.exe -f s16le -ar 8000 -i help.pcm out.wav



tool: D273: For a SILK 16KHz RTP stream %s creates a SILK SDK file with .bin extension. To convert use:


tool: D134: decoder.exe file-SILK16000.bin help.pcm -Fs_API 16000

tool: D15: ffmpeg.exe -f s16le -ar 16000 -i help.pcm out.wav




tool: D252: Codecs other than G.711, G.722, SILK/8000 and SILK/16000 are not supported.

tool: D155: Provide a pcap file as second argument.

tool: D187: %s will try to find RTP media streams in the pcap file and display some info including the SSRC value.


tool: D189: Example:
%s analyze file.pcap


tool: D41: Provide the SSRC value of the SRTP stream to decrypt as second argument in Hex notation with leading 0x.

tool: D286: Provide the key material to be used for decryption as third argument as 40 character base64 value.

tool: D130: Provide the pcap file that contains the SRTP stream as fourth argument.


tool: D44: %s will create an output file that contains the decrypted audio data.


tool: D48: For further information run %s help info.



tool: D161: Example:
%s decrypt 0x72c4827b CXL0YTLiYrsKYDAsxAJKTWqQaBg1PQhUH9iFwPAp file.pcap


assistant: ```c
int help(const char *filename, const char *helpselection) {
  if (!strcmp("analyze", helpselection)) {
    printf("\n\n");
    printf("Provide a pcap file as second argument.\n");
    printf("%s will try to find RTP media streams in the pcap file and display some info including the SSRC value.\n", filename);
    printf("\n");
    printf("Example:\n%s analyze file.pcap\n", filename);
    printf("\n");
    return 0;
  }
  if (!strcmp("decrypt", helpselection)) {
    printf("\n\n");
    printf("Provide the SSRC value of the SRTP stream to decrypt as second argument in Hex notation with leading 0x.\n");
    printf("Provide the key material to be used for decryption as third argument as 40 character base64 value.\n");
    printf("Provide the pcap file that contains the SRTP stream as fourth argument.\n\n");
    printf("%s will create an output file that contains the decrypted audio data.\n", filename);
    printf("For further information run %s help info.\n\n", filename);
    printf("Example:\n%s decrypt 0x72c4827b CXL0YTLiYrsKYDAsxAJKTWqQaBg1PQhUH9iFwPAp file.pcap\n", filename);
    printf("\n");
    return 0;
  }
  if (!strcmp("info", helpselection)) {
    printf("\n\n");
    printf("To decrypt an SRTP audio stream you need the key material that was used to encrypt it. ");
    printf("Get it from a SIP trace or from a log file. ");
    printf("The key material is a 40 byte character string, for example CXL0YTLiYrsKYDAsxAJKTWqQaBg1PQhUH9iFwPAp.\n");
    printf("You also need the SSRC value of the SRTP audio stream. One way of doing this is by running %s analyze.\n\n\n\n\n", filename);
    printf("For a G.711 RTP stream (PCMU or PCMA) %s creates a .wav file that can be played directly.\n\n\n", filename);
    printf("For a G.722 RTP stream %s creates a RAW file with .g722 extension. Use ffmpeg to convert:\n", filename);
    printf("ffmpeg -i file.g722 file.wav\n\n\n");
    printf("For a SILK 8KHz RTP stream %s creates a SILK SDK file with .bin extension. To convert use:\n", filename);
    printf("decoder.exe file-SILK8000.bin help.pcm -Fs_API 8000\n");
    printf("ffmpeg.exe -f s16le -ar 8000 -i help.pcm out.wav\n\n\n");
    printf("For a SILK 16KHz RTP stream %s creates a SILK SDK file with .bin extension. To convert use:\n", filename);
    printf("decoder.exe file-SILK16000.bin help.pcm -Fs_API 16000\n");
    printf("ffmpeg.exe -f s16le -ar 16000 -i help.pcm out.wav\n\n\n\n");
    printf("Codecs other than G.711, G.722, SILK/8000 and SILK/16000 are not supported.\n");
    printf("\n");
    return 0;
  }
  return -1;
}
```