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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    -0x2(%rdi),%eax
  cmp    $0x4,%eax
  ja     L364
  mov    %edi,%ebp
  mov    0x8(%rsi),%r14
  movzbl (%r14),%r12d
  cmp    $0x68,%r12b
  je     L364
  cmp    $0x3f,%r12b
  je     L364
  movl   $0x1,0x10(%rsp)
  movl   $0x1,0x14(%rsp)
  movl   $0x1,0x18(%rsp)
  movl   $0x1,0x1c(%rsp)
  movl   $0x2,0x20(%rsp)
  movl   $0x2,0x24(%rsp)
  movl   $0x2,0x28(%rsp)
  movl   $0x2,0x2c(%rsp)
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %rax,%r13
  cmp    $0x2,%rax
  ja     L564
  test   %rax,%rax
  je     L239
  movsbl %r12b,%r12d
  mov    %r12d,%edi
  call   <isxdigit@plt>
  test   %eax,%eax
  je     L575
  cmp    $0x2,%r13
  jne    L239
  movsbl 0x1(%r14),%r12d
  mov    %r12d,%edi
  call   <isxdigit@plt>
  test   %eax,%eax
  je     L575
L239:
  lea    0x6d(%rsp),%rdi
  mov    %r14,%rsi
  call   <strcpy@plt>
  cmp    $0x5,%ebp
  je     L529
  jg     L149
  cmp    $0x3,%ebp
  je     L425
  mov    $0x19,%r14d
  mov    $0x7d0,%r15d
  cmp    $0x4,%ebp
  jne    L447
L57:
  mov    0x18(%rbx),%rsi
  lea    0x80(%rsp),%rbp
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  lea    -0x7(%rax),%rcx
  mov    $0x0,%edx
  cmp    $0x8,%rcx
  jbe    L608
  mov    %rbp,%rsi
  lea    D544(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D194(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rax,%rsi
  lea    D153(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0x6,%eax
  jmp    L27
L364:
  lea    D135(%rip),%rdi
  call   <puts@plt>
  lea    D1(%rip),%rdi
  call   <puts@plt>
  lea    D453(%rip),%rdi
  call   <puts@plt>
  lea    D180(%rip),%rdi
  call   <puts@plt>
  lea    D540(%rip),%rdi
  call   <puts@plt>
  lea    D387(%rip),%rdi
  call   <puts@plt>
  lea    D523(%rip),%rdi
  call   <puts@plt>
  lea    D568(%rip),%rdi
  call   <puts@plt>
  lea    D399(%rip),%rdi
  call   <puts@plt>
  lea    D297(%rip),%rdi
  call   <puts@plt>
  lea    D527(%rip),%rdi
  call   <puts@plt>
  lea    D68(%rip),%rdi
  call   <puts@plt>
  lea    D352(%rip),%rdi
  call   <puts@plt>
  lea    D89(%rip),%rdi
  call   <puts@plt>
  lea    D106(%rip),%rdi
  call   <puts@plt>
  lea    D392(%rip),%rdi
  call   <puts@plt>
  lea    D2(%rip),%rdi
  call   <puts@plt>
  lea    D497(%rip),%rdi
  call   <puts@plt>
  mov    (%rbx),%rsi
  lea    D572(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%eax
L27:
  mov    0x98(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L589
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L564:
  mov    0x20(%rbx),%rsi
  lea    D466(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%eax
  jmp    L27
L575:
  mov    %r12d,%esi
  lea    D116(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0x3,%eax
  jmp    L27
L149:
  mov    0x28(%rbx),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x0,%edx
L509:
  cmp    %rdx,%rax
  je     L208
  movzbl 0x0(%rbp,%rdx,1),%esi
  add    $0x1,%rdx
  movsbl %sil,%ecx
  sub    $0x30,%ecx
  cmp    $0x9,%ecx
  jbe    L509
  movsbl %sil,%esi
  lea    D403(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0x4,%eax
  jmp    L27
L208:
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,%r14d
  jmp    L168
L529:
  mov    $0x19,%r14d
L168:
  mov    0x20(%rbx),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x0,%edx
L293:
  cmp    %rdx,%rax
  je     L444
  movzbl 0x0(%rbp,%rdx,1),%esi
  add    $0x1,%rdx
  movsbl %sil,%ecx
  sub    $0x30,%ecx
  cmp    $0x9,%ecx
  jbe    L293
  movsbl %sil,%esi
  lea    D144(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0x5,%eax
  jmp    L27
L444:
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,%r15d
  jmp    L57
L232:
  mov    $0x20,%edi
  call   <putchar@plt>
  add    $0x1,%ebx
L229:
  cmp    %ebp,%ebx
  jl     L232
  lea    D409(%rip),%rdi
  call   <puts@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0x7,%eax
  jmp    L27
L457:
  add    $0x1,%rdx
  cmp    %rdx,%rax
  je     L219
L608:
  mov    %edx,%ebp
  movzbl 0x80(%rsp,%rdx,1),%ecx
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  jbe    L457
  cmp    $0x2e,%cl
  je     L457
  lea    0x80(%rsp),%rsi
  lea    D507(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D199(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%ebx
  jmp    L229
L219:
  mov    $0x0,%r12d
  mov    $0x0,%ebp
  mov    $0x0,%r13d
  lea    0x50(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L34
L179:
  lea    -0x1(%rbp),%eax
  cmp    $0x2,%eax
  ja     L375
  movslq %ebp,%rdx
  movslq %r13d,%rbp
  imul   $0x5,%rbp,%rdi
  lea    0xa0(%rdi),%rax
  add    %rsp,%rax
  movb   $0x0,-0x50(%rdx,%rax,1)
  add    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,0x20(%rsp,%rbp,4)
  cmp    $0xff,%eax
  ja     L286
  add    $0x1,%r13d
  mov    $0x0,%ebp
L404:
  lea    0x80(%rsp),%rdi
  call   <strlen@plt>
  add    $0x1,%r12
  cmp    %r12,%rax
  jb     L439
L34:
  movzbl 0x80(%rsp,%r12,1),%eax
  cmp    $0x2e,%al
  je     L179
  test   %al,%al
  je     L179
  movslq %ebp,%rcx
  movslq %r13d,%rdx
  imul   $0x5,%rdx,%rdx
  lea    0xa0(%rdx),%rsi
  lea    (%rsp,%rsi,1),%rdx
  mov    %al,-0x50(%rcx,%rdx,1)
  lea    0x1(%rbp),%ebp
  jmp    L404
L375:
  lea    0x1(%r13),%esi
  mov    %ebp,%edx
  lea    D66(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0x8,%eax
  jmp    L27
L286:
  lea    0x80(%rsp),%rsi
  mov    %eax,%edx
  lea    D269(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D350(%rip),%rdi
  call   <puts@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0x9,%eax
  jmp    L27
L439:
  cmp    $0x4,%r13d
  je     L382
  mov    %r13d,%esi
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%eax
  jmp    L27
L425:
  mov    $0x19,%r14d
  mov    $0x7d0,%r15d
L382:
  mov    0x10(%rbx),%rsi
  lea    0x70(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    -0x7(%rax),%rcx
  mov    $0x0,%edx
  cmp    $0x8,%rcx
  jbe    L431
  mov    %rbx,%rsi
  lea    D544(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D194(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rax,%rsi
  lea    D153(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0xb,%eax
  jmp    L27
L586:
  mov    $0x20,%edi
  call   <putchar@plt>
  add    $0x1,%ebp
L94:
  cmp    %ebx,%ebp
  jl     L586
  lea    D409(%rip),%rdi
  call   <puts@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0xc,%eax
  jmp    L27
L443:
  add    $0x1,%rdx
  cmp    %rdx,%rax
  je     L236
L431:
  mov    %edx,%ebx
  movzbl 0x70(%rsp,%rdx,1),%ecx
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  jbe    L443
  cmp    $0x2e,%cl
  je     L443
  lea    0x70(%rsp),%rsi
  lea    D507(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D199(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%ebp
  jmp    L94
L236:
  mov    $0x0,%ebp
  mov    $0x0,%ebx
  mov    $0x0,%r12d
  lea    0x30(%rsp),%r13
  jmp    L320
L368:
  lea    -0x1(%rbx),%eax
  cmp    $0x2,%eax
  ja     L260
  movslq %ebx,%rdx
  movslq %r12d,%rbx
  imul   $0x5,%rbx,%rdi
  lea    0xa0(%rdi),%rax
  add    %rsp,%rax
  movb   $0x0,-0x70(%rdx,%rax,1)
  add    %r13,%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,0x10(%rsp,%rbx,4)
  cmp    $0xff,%eax
  ja     L390
  add    $0x1,%r12d
  mov    $0x0,%ebx
L449:
  lea    0x70(%rsp),%rdi
  call   <strlen@plt>
  add    $0x1,%rbp
  cmp    %rbp,%rax
  jb     L140
L320:
  movzbl 0x70(%rsp,%rbp,1),%eax
  cmp    $0x2e,%al
  je     L368
  test   %al,%al
  je     L368
  movslq %ebx,%rcx
  movslq %r12d,%rdx
  imul   $0x5,%rdx,%rdx
  lea    0xa0(%rdx),%rsi
  lea    (%rsp,%rsi,1),%rdx
  mov    %al,-0x70(%rcx,%rdx,1)
  lea    0x1(%rbx),%ebx
  jmp    L449
L260:
  lea    0x1(%r12),%esi
  mov    %ebx,%edx
  lea    D66(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0xd,%eax
  jmp    L27
L390:
  lea    0x70(%rsp),%rsi
  mov    %eax,%edx
  lea    D269(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D350(%rip),%rdi
  call   <puts@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0xe,%eax
  jmp    L27
L140:
  cmp    $0x4,%r12d
  jne    L479
L447:
  lea    0x6d(%rsp),%rsi
  push   %r14
  push   %r15
  mov    0x3c(%rsp),%eax
  push   %rax
  mov    0x40(%rsp),%eax
  push   %rax
  mov    0x44(%rsp),%eax
  push   %rax
  mov    0x48(%rsp),%eax
  push   %rax
  mov    0x4c(%rsp),%r9d
  mov    0x48(%rsp),%r8d
  mov    0x44(%rsp),%ecx
  mov    0x40(%rsp),%edx
  lea    D90(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x30,%rsp
  mov    $0x0,%eax
  jmp    L27
L479:
  mov    %r12d,%esi
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D188(%rip),%rdi
  call   <puts@plt>
  mov    $0xf,%eax
  jmp    L27
L589:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D544
datatype: string
name: extract_symbolic_data
arguments: data_tag: D194
datatype: string
name: extract_symbolic_data
arguments: data_tag: D153
datatype: string
name: extract_symbolic_data
arguments: data_tag: D188
datatype: string
name: extract_symbolic_data
arguments: data_tag: D135
datatype: string
name: extract_symbolic_data
arguments: data_tag: D1
datatype: string
name: extract_symbolic_data
arguments: data_tag: D453
datatype: string
name: extract_symbolic_data
arguments: data_tag: D180
datatype: string
name: extract_symbolic_data
arguments: data_tag: D540
datatype: string
name: extract_symbolic_data
arguments: data_tag: D387
datatype: string
name: extract_symbolic_data
arguments: data_tag: D523
datatype: string
name: extract_symbolic_data
arguments: data_tag: D568
datatype: string
name: extract_symbolic_data
arguments: data_tag: D399
datatype: string
name: extract_symbolic_data
arguments: data_tag: D297
datatype: string
name: extract_symbolic_data
arguments: data_tag: D527
datatype: string
name: extract_symbolic_data
arguments: data_tag: D68
datatype: string
name: extract_symbolic_data
arguments: data_tag: D352
datatype: string
name: extract_symbolic_data
arguments: data_tag: D89
datatype: string
name: extract_symbolic_data
arguments: data_tag: D106
datatype: string
name: extract_symbolic_data
arguments: data_tag: D392
datatype: string
name: extract_symbolic_data
arguments: data_tag: D2
datatype: string
name: extract_symbolic_data
arguments: data_tag: D497
datatype: string
name: extract_symbolic_data
arguments: data_tag: D572
datatype: string
name: extract_symbolic_data
arguments: data_tag: D466
datatype: string
name: extract_symbolic_data
arguments: data_tag: D116
datatype: string
name: extract_symbolic_data
arguments: data_tag: D403
datatype: string
name: extract_symbolic_data
arguments: data_tag: D144
datatype: string
name: extract_symbolic_data
arguments: data_tag: D409
datatype: string
name: extract_symbolic_data
arguments: data_tag: D507
datatype: string
name: extract_symbolic_data
arguments: data_tag: D199
datatype: string
name: extract_symbolic_data
arguments: data_tag: D66
datatype: string
name: extract_symbolic_data
arguments: data_tag: D269
datatype: string
name: extract_symbolic_data
arguments: data_tag: D350
datatype: string
name: extract_symbolic_data
arguments: data_tag: D43
datatype: string
name: extract_symbolic_data
arguments: data_tag: D90
datatype: string

tool: D544: Sorry, %s is not a valid IP address in hex.


tool: D194: It has the wrong number of digits

tool: D153:  (%d, expected between 7 and 15).


tool: D188: Please try again.  Exiting ...

tool: D135:   This C program generates the following eSeries LM-10 shell command:

tool: D1:    camClassFind 0x80000000,0xii0600ss,0xssssssdd,0x800000dd,0xddddpppp,0xPPPP8000

tool: D453:    ii =

tool: D180:     <classifierEngineIndex> from the "showPolicy <policyId>" eSeries SRP shell command output;

tool: D540:      <policyId> is the last hex number on the "Policy <inPolicy>..." line from the "showPolicyIds" eSeries SRP shell command output;

tool: D387:      <inPolicy> is the last word from the "ip policy input <inPolicy>" line in the "show configuration interface <interFaceTyp> <interfaceNumber>"

tool: D523:       sSeries CLI command output.

tool: D568:    ssssssss = <SA> =

tool: D399:     source ip address (default is 1.1.1.1 = 0x01010101)

tool: D297:    dddddddd = <DA> =

tool: D527:     destination ip address (default is 2.2.2.2 = 0x02020202)

tool: D68:    pppp = <SP> =

tool: D352:     source port (default is 2000 = 0x07D0 = ephemeral)

tool: D89:    ssss = <DP> =

tool: D106:     destination port (default is 25 = 0x19 = SMTP)

tool: D392:   Refer to 2011-0111-0591, KA<tbd> and/or the "http://www-int.juniper.net/customerservice/jtac/techdocs/ERX/docs/junose_shell_command_reference.pdf" doc

tool: D2:   Written by Jonathan Natale for Juniper Networks on 19-Feb-11.

tool: D497: Usage:

tool: D572:  %s <classifierEngineIndex (hex, without 0x)> [<SA (dotted decimal)> [<DA (dotted decimal)> [<SP (decimal)> [<DP (decimal)>]]]]


tool: D466: Sorry, %s is too long (should be less then 3 chars).


tool: D116: Sorry, %c is not a valid hex digit.


tool: D403: Sorry, %c is not a valid dec digit.


tool: D144: Sorry, %s is not a valid dec digit.


tool: D409: ^

tool: D507: Sorry, %s is not a valid IP address in dotted decimal.


tool: D199:        

tool: D66: Sorry, octet #%d has the wrong number of digits (%d).


tool: D269: Sorry, %s contains an invalid IP octet (%d).


tool: D350: It must be >= 0 and <= 255.

tool: D43: Sorry, wrong number of octets (%d, expected 4)


tool: D90: camClassFind 0x80000000,0x%s0600%02.2X,0x%02.2X%02.2X%02.2X%02.2X,0x800000%02.2X,0x%02.2X%02.2X%04.4X,0x%X8000


assistant: ```c
int main(int argc, char **argv) {
  int i, j, k;
  char indexString[3];
  char srcIpAddrInDottedDecimalString[16];
  char srcIpAddrOctetString[4][5];
  int srcIpAddrOctetNum[4];
  long int srcIpAddr;
  char dstIpAddrInDottedDecimalString[16];
  char dstIpAddrOctetString[4][5];
  int dstIpAddrOctetNum[4];
  long int dstIpAddr;
  char srcPortString[6];
  int srcPortNum;
  char dstPortString[6];
  int dstPortNum;
  char testChar;
  if (argc < 2 || argc > 6 || argv[1][0] == '?' || argv[1][0] == 'h') {
    printf("  This C program generates the following eSeries LM-10 shell command:\n");
    printf("   camClassFind 0x80000000,0xii0600ss,0xssssssdd,0x800000dd,0xddddpppp,0xPPPP8000\n");
    printf("   ii =\n");
    printf("    <classifierEngineIndex> from the \"showPolicy <policyId>\" eSeries SRP shell command output;\n");
    printf("     <policyId> is the last hex number on the \"Policy <inPolicy>...\" line from the \"showPolicyIds\" eSeries SRP shell command output;\n");
    printf("     <inPolicy> is the last word from the \"ip policy input <inPolicy>\" line in the \"show configuration interface <interFaceTyp> <interfaceNumber>\"\n");
    printf("      sSeries CLI command output.\n");
    printf("   ssssssss = <SA> =\n");
    printf("    source ip address (default is 1.1.1.1 = 0x01010101)\n");
    printf("   dddddddd = <DA> =\n");
    printf("    destination ip address (default is 2.2.2.2 = 0x02020202)\n");
    printf("   pppp = <SP> =\n");
    printf("    source port (default is 2000 = 0x07D0 = ephemeral)\n");
    printf("   ssss = <DP> =\n");
    printf("    destination port (default is 25 = 0x19 = SMTP)\n");
    printf("  Refer to 2011-0111-0591, KA<tbd> and/or the \"http://www-int.juniper.net/customerservice/jtac/techdocs/ERX/docs/junose_shell_command_reference.pdf\" doc\n");
    printf("  Written by Jonathan Natale for Juniper Networks on 19-Feb-11.\n");
    printf("Usage:\n");
    printf(" %s <classifierEngineIndex (hex, without 0x)> [<SA (dotted decimal)> [<DA (dotted decimal)> [<SP (decimal)> [<DP (decimal)>]]]]\n", argv[0]);
    return (1);
  }
  for (i = 0; i < 4; i++) {
    srcIpAddrOctetNum[i] = 1;
  }
  for (i = 0; i < 4; i++) {
    dstIpAddrOctetNum[i] = 2;
  }
  srcPortNum = 2000;
  dstPortNum = 25;
  if (strlen(argv[1]) > 2) {
    printf("Sorry, %s is too long (should be less then 3 chars).\n", argv[i]);
    printf("Please try again.  Exiting ...\n");
    return (2);
  }
  for (i = 0; i < strlen(argv[1]); i++) {
    if (!isxdigit(argv[1][i])) {
      printf("Sorry, %c is not a valid hex digit.\n", argv[1][i]);
      printf("Please try again.  Exiting ...\n");
      return (3);
    }
  }
  strcpy(indexString, argv[1]);
  switch (argc) {
  case 6: {
    for (i = 0; i < strlen(argv[5]); i++) {
      if (!isdigit(argv[5][i])) {
        printf("Sorry, %c is not a valid dec digit.\n", argv[5][i]);
        printf("Please try again.  Exiting ...\n");
        return (4);
      }
    }
    dstPortNum = atoi(argv[5]);
  }
  case 5: {
    for (i = 0; i < strlen(argv[4]); i++) {
      if (!isdigit(argv[4][i])) {
        printf("Sorry, %s is not a valid dec digit.\n", argv[4][i]);
        printf("Please try again.  Exiting ...\n");
        return (5);
      }
    }
    srcPortNum = atoi(argv[4]);
  }
  case 4: {
    strcpy(dstIpAddrInDottedDecimalString, argv[3]);
    if ((strlen(dstIpAddrInDottedDecimalString) > 15) || (strlen(dstIpAddrInDottedDecimalString) < 7)) {
      printf("Sorry, %s is not a valid IP address in hex.\n", dstIpAddrInDottedDecimalString);
      printf("It has the wrong number of digits");
      printf(" (%d, expected between 7 and 15).\n", strlen(dstIpAddrInDottedDecimalString));
      printf("Please try again.  Exiting ...\n");
      return (6);
    }
    for (i = 0; i < strlen(dstIpAddrInDottedDecimalString); i++) {
      if (!isdigit(dstIpAddrInDottedDecimalString[i]) && dstIpAddrInDottedDecimalString[i] != '.') {
        printf("Sorry, %s is not a valid IP address in dotted decimal.\n", dstIpAddrInDottedDecimalString);
        printf("       ");
        for (j = 0; j < i; j++) {
          printf(" ");
        }
        printf("^\n");
        printf("Please try again.  Exiting ...\n");
        return (7);
      }
    }
    i = 0;
    k = 0;
    for (j = 0; j <= strlen(dstIpAddrInDottedDecimalString); j++) {
      if (dstIpAddrInDottedDecimalString[j] != '.' && dstIpAddrInDottedDecimalString[j] != '\0') {
        dstIpAddrOctetString[i][k++] = dstIpAddrInDottedDecimalString[j];
      } else {
        if (k < 1 || k > 3) {
          printf("Sorry, octet #%d has the wrong number of digits (%d).\n", i + 1, k);
          printf("Please try again.  Exiting ...\n");
          return (8);
        }
        dstIpAddrOctetString[i][k] = '\0';
        dstIpAddrOctetNum[i] = atoi(dstIpAddrOctetString[i]);
        if (dstIpAddrOctetNum[i] < 0 || dstIpAddrOctetNum[i] > 255) {
          printf("Sorry, %s contains an invalid IP octet (%d).\n", dstIpAddrInDottedDecimalString, dstIpAddrOctetNum[i]);
          printf("It must be >= 0 and <= 255.\n");
          printf("Please try again.  Exiting ...\n");
          return (9);
        }
        i++;
        k = 0;
      }
    }
    if (i != 4) {
      printf("Sorry, wrong number of octets (%d, expected 4)\n", i);
      printf("Please try again.  Exiting ...\n");
      return (10);
    }
    dstIpAddr = 0;
    for (i = 0; i < 3; i++) {
      dstIpAddr = dstIpAddrOctetNum[i] | dstIpAddr;
      dstIpAddr = dstIpAddr << 8;
    }
    dstIpAddr = dstIpAddrOctetNum[i] | dstIpAddr;
  }
  case 3: {
    strcpy(srcIpAddrInDottedDecimalString, argv[2]);
    if ((strlen(srcIpAddrInDottedDecimalString) > 15) || (strlen(srcIpAddrInDottedDecimalString) < 7)) {
      printf("Sorry, %s is not a valid IP address in hex.\n", srcIpAddrInDottedDecimalString);
      printf("It has the wrong number of digits");
      printf(" (%d, expected between 7 and 15).\n", strlen(srcIpAddrInDottedDecimalString));
      printf("Please try again.  Exiting ...\n");
      return (11);
    }
    for (i = 0; i < strlen(srcIpAddrInDottedDecimalString); i++) {
      if (!isdigit(srcIpAddrInDottedDecimalString[i]) && srcIpAddrInDottedDecimalString[i] != '.') {
        printf("Sorry, %s is not a valid IP address in dotted decimal.\n", srcIpAddrInDottedDecimalString);
        printf("       ");
        for (j = 0; j < i; j++) {
          printf(" ");
        }
        printf("^\n");
        printf("Please try again.  Exiting ...\n");
        return (12);
      }
    }
    i = 0;
    k = 0;
    for (j = 0; j <= strlen(srcIpAddrInDottedDecimalString); j++) {
      if (srcIpAddrInDottedDecimalString[j] != '.' && srcIpAddrInDottedDecimalString[j] != '\0') {
        srcIpAddrOctetString[i][k++] = srcIpAddrInDottedDecimalString[j];
      } else {
        if (k < 1 || k > 3) {
          printf("Sorry, octet #%d has the wrong number of digits (%d).\n", i + 1, k);
          printf("Please try again.  Exiting ...\n");
          return (13);
        }
        srcIpAddrOctetString[i][k] = '\0';
        srcIpAddrOctetNum[i] = atoi(srcIpAddrOctetString[i]);
        if (srcIpAddrOctetNum[i] < 0 || srcIpAddrOctetNum[i] > 255) {
          printf("Sorry, %s contains an invalid IP octet (%d).\n", srcIpAddrInDottedDecimalString, srcIpAddrOctetNum[i]);
          printf("It must be >= 0 and <= 255.\n");
          printf("Please try again.  Exiting ...\n");
          return (14);
        }
        i++;
        k = 0;
      }
    }
    if (i != 4) {
      printf("Sorry, wrong number of octets (%d, expected 4)\n", i);
      printf("Please try again.  Exiting ...\n");
      return (15);
    }
    srcIpAddr = 0;
    for (i = 0; i < 3; i++) {
      srcIpAddr = srcIpAddrOctetNum[i] | srcIpAddr;
      srcIpAddr = srcIpAddr << 8;
    }
    srcIpAddr = srcIpAddrOctetNum[i] | srcIpAddr;
  }
  }
  printf("camClassFind 0x80000000,0x%s0600%02.2X,0x%02.2X%02.2X%02.2X%02.2X,0x800000%02.2X,0x%02.2X%02.2X%04.4X,0x%X8000\n", indexString, srcIpAddrOctetNum[0], srcIpAddrOctetNum[1], srcIpAddrOctetNum[2], srcIpAddrOctetNum[3], dstIpAddrOctetNum[0], dstIpAddrOctetNum[1], dstIpAddrOctetNum[2], dstIpAddrOctetNum[3], srcPortNum, dstPortNum);
  return (0);
}
```