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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    -0x2(%rdi),%eax
  cmp    $0x4,%eax
  ja     L138
  mov    0x8(%rsi),%r13
  movsbl 0x0(%r13),%r12d
  cmp    $0x3f,%r12b
  je     L138
  cmp    $0x68,%r12b
  je     L138
  movabs $0x100000001,%rax
  mov    %edi,%ebx
  mov    %r13,%rdi
  mov    %rax,0x10(%rsp)
  mov    %rax,0x18(%rsp)
  movabs $0x200000002,%rax
  mov    %rax,0x20(%rsp)
  mov    %rax,0x28(%rsp)
  call   <strlen@plt>
  mov    %rax,%r14
  cmp    $0x2,%rax
  ja     L411
  test   %rax,%rax
  je     L604
  mov    %r12d,%edi
  call   <isxdigit@plt>
  test   %eax,%eax
  je     L514
  cmp    $0x2,%r14
  jne    L604
  movsbl 0x1(%r13),%r12d
  mov    %r12d,%edi
  call   <isxdigit@plt>
  test   %eax,%eax
  je     L514
L604:
  lea    0x6d(%rsp),%r12
  lea    0x1(%r14),%ecx
  mov    %r13,%rsi
  mov    %r12,%rdi
  rep movsb %ds:(%rsi),%es:(%rdi)
  cmp    $0x5,%ebx
  je     L288
  cmp    $0x6,%ebx
  je     L114
  movl   $0x19,(%rsp)
  movl   $0x7d0,0x4(%rsp)
  cmp    $0x3,%ebx
  je     L386
  cmp    $0x4,%ebx
  jne    L250
L30:
  mov    0x18(%rbp),%rsi
  lea    0x80(%rsp),%r15
  mov    %r15,%rdi
  call   <strcpy@plt>
  mov    %r15,%rdi
  call   <strlen@plt>
  xor    %edx,%edx
  cmp    $0x6,%rax
  jbe    L178
L481:
  movzbl (%r15,%rdx,1),%ecx
  mov    %edx,%ebx
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  jbe    L177
  cmp    $0x2e,%cl
  jne    L521
L177:
  add    $0x1,%rdx
  cmp    %rax,%rdx
  jne    L481
  lea    0x50(%rsp),%rax
  xor    %r13d,%r13d
  xor    %ebx,%ebx
  xor    %r14d,%r14d
  mov    %rax,0x8(%rsp)
  jmp    L625
L218:
  test   %al,%al
  je     L73
  movslq %r14d,%rsi
  movslq %ebx,%rdi
  add    $0x1,%ebx
  lea    (%rsi,%rsi,4),%rsi
  lea    0xa0(%rsi),%rcx
  lea    (%rsp,%rcx,1),%rsi
  mov    %al,-0x50(%rdi,%rsi,1)
L111:
  mov    %r15,%rdi
  add    $0x1,%r13
  call   <strlen@plt>
  cmp    %rax,%r13
  ja     L33
L625:
  movzbl (%r15,%r13,1),%eax
  cmp    $0x2e,%al
  jne    L218
L73:
  lea    -0x1(%rbx),%eax
  cmp    $0x2,%eax
  ja     L345
  movslq %ebx,%rdx
  movslq %r14d,%rbx
  lea    (%rbx,%rbx,4),%rdi
  lea    0xa0(%rdi),%rax
  add    0x8(%rsp),%rdi
  add    %rsp,%rax
  movb   $0x0,-0x50(%rdx,%rax,1)
  xor    %eax,%eax
  call   <atoi@plt>
  mov    %eax,0x20(%rsp,%rbx,4)
  cmp    $0xff,%eax
  ja     L395
  add    $0x1,%r14d
  xor    %ebx,%ebx
  jmp    L111
L138:
  lea    D200(%rip),%rdi
  call   <puts@plt>
  lea    D313(%rip),%rdi
  call   <puts@plt>
  lea    D404(%rip),%rdi
  call   <puts@plt>
  lea    D160(%rip),%rdi
  call   <puts@plt>
  lea    D529(%rip),%rdi
  call   <puts@plt>
  lea    D366(%rip),%rdi
  call   <puts@plt>
  lea    D94(%rip),%rdi
  call   <puts@plt>
  lea    D303(%rip),%rdi
  call   <puts@plt>
  lea    D370(%rip),%rdi
  call   <puts@plt>
  lea    D185(%rip),%rdi
  call   <puts@plt>
  lea    D485(%rip),%rdi
  call   <puts@plt>
  lea    D236(%rip),%rdi
  call   <puts@plt>
  lea    D386(%rip),%rdi
  call   <puts@plt>
  lea    D411(%rip),%rdi
  call   <puts@plt>
  lea    D508(%rip),%rdi
  call   <puts@plt>
  lea    D271(%rip),%rdi
  call   <puts@plt>
  lea    D26(%rip),%rdi
  call   <puts@plt>
  lea    D254(%rip),%rdi
  call   <puts@plt>
  mov    0x0(%rbp),%rsi
  lea    D289(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%eax
L54:
  mov    0x98(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L613
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L514:
  mov    %r12d,%esi
  lea    D195(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0x3,%eax
  jmp    L54
L386:
  mov    0x10(%rbp),%rsi
  lea    0x70(%rsp),%r14
  mov    %r14,%rdi
  call   <strcpy@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  xor    %edx,%edx
  cmp    $0x6,%rax
  jbe    L469
L79:
  movzbl (%r14,%rdx,1),%ecx
  mov    %edx,%ebx
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  jbe    L539
  cmp    $0x2e,%cl
  jne    L372
L539:
  add    $0x1,%rdx
  cmp    %rdx,%rax
  jne    L79
  xor    %ebx,%ebx
  xor    %r15d,%r15d
  lea    0x30(%rsp),%r13
  xor    %ebp,%ebp
  jmp    L568
L141:
  movslq %ebp,%rdx
  movslq %r15d,%rsi
  add    $0x1,%r15d
  lea    (%rdx,%rdx,4),%rdx
  lea    0xa0(%rdx),%rcx
  lea    (%rsp,%rcx,1),%rdx
  mov    %al,-0x70(%rsi,%rdx,1)
L41:
  mov    %r14,%rdi
  add    $0x1,%rbx
  call   <strlen@plt>
  cmp    %rbx,%rax
  jb     L215
L568:
  movzbl (%r14,%rbx,1),%eax
  cmp    $0x2e,%al
  je     L445
  test   %al,%al
  jne    L141
L445:
  lea    -0x1(%r15),%eax
  cmp    $0x2,%eax
  ja     L31
  movslq %r15d,%rdx
  movslq %ebp,%r15
  lea    (%r15,%r15,4),%rdi
  lea    0xa0(%rdi),%rax
  add    %r13,%rdi
  add    %rsp,%rax
  movb   $0x0,-0x70(%rdx,%rax,1)
  xor    %eax,%eax
  call   <atoi@plt>
  mov    %eax,0x10(%rsp,%r15,4)
  cmp    $0xff,%eax
  ja     L285
  add    $0x1,%ebp
  xor    %r15d,%r15d
  jmp    L41
L411:
  mov    0x20(%rbp),%rsi
  lea    D163(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%eax
  jmp    L54
L250:
  mov    (%rsp),%eax
  mov    %r12,%rsi
  lea    D516(%rip),%rdi
  push   %rax
  mov    0xc(%rsp),%eax
  push   %rax
  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
  xor    %eax,%eax
  mov    0x48(%rsp),%r8d
  mov    0x44(%rsp),%ecx
  mov    0x40(%rsp),%edx
  call   <printf@plt>
  add    $0x30,%rsp
  xor    %eax,%eax
  jmp    L54
L114:
  mov    0x28(%rbp),%r13
  mov    %r13,%rdi
  call   <strlen@plt>
  xor    %edx,%edx
  jmp    L267
L427:
  movsbl 0x0(%r13,%rdx,1),%esi
  add    $0x1,%rdx
  lea    -0x30(%rsi),%ecx
  cmp    $0x9,%ecx
  ja     L593
L267:
  cmp    %rax,%rdx
  jne    L427
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  mov    %eax,(%rsp)
  jmp    L260
L288:
  movl   $0x19,(%rsp)
L260:
  mov    0x20(%rbp),%r14
  mov    %r14,%rdi
  call   <strlen@plt>
  xor    %edx,%edx
  jmp    L253
L352:
  movsbl (%r14,%rdx,1),%esi
  add    $0x1,%rdx
  lea    -0x30(%rsi),%ecx
  cmp    $0x9,%ecx
  ja     L137
L253:
  cmp    %rax,%rdx
  jne    L352
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  mov    %eax,0x4(%rsp)
  jmp    L30
L178:
  mov    %r15,%rsi
  lea    D535(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D544(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r15,%rdi
  call   <strlen@plt>
  lea    D487(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0x6,%eax
  jmp    L54
L521:
  mov    %r15,%rsi
  lea    D23(%rip),%rdi
  xor    %eax,%eax
  xor    %ebp,%ebp
  call   <printf@plt>
  lea    D510(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L102
L277:
  mov    $0x20,%edi
  add    $0x1,%ebp
  call   <putchar@plt>
L102:
  cmp    %ebx,%ebp
  jne    L277
  lea    D432(%rip),%rdi
  call   <puts@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0x7,%eax
  jmp    L54
L137:
  lea    D65(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0x5,%eax
  jmp    L54
L372:
  mov    %r14,%rsi
  lea    D23(%rip),%rdi
  xor    %eax,%eax
  xor    %ebp,%ebp
  call   <printf@plt>
  lea    D510(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L271
L295:
  mov    $0x20,%edi
  add    $0x1,%ebp
  call   <putchar@plt>
L271:
  cmp    %ebx,%ebp
  jne    L295
  lea    D432(%rip),%rdi
  call   <puts@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0xc,%eax
  jmp    L54
L593:
  lea    D483(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0x4,%eax
  jmp    L54
L33:
  cmp    $0x4,%r14d
  je     L386
  mov    %r14d,%esi
  lea    D263(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%eax
  jmp    L54
L215:
  cmp    $0x4,%ebp
  je     L250
  mov    %ebp,%esi
  lea    D263(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0xf,%eax
  jmp    L54
L345:
  lea    0x1(%r14),%esi
  mov    %ebx,%edx
  lea    D176(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0x8,%eax
  jmp    L54
L395:
  mov    %eax,%edx
  mov    %r15,%rsi
  lea    D367(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D10(%rip),%rdi
  call   <puts@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0x9,%eax
  jmp    L54
L469:
  mov    %r14,%rsi
  lea    D535(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D544(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  lea    D487(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0xb,%eax
  jmp    L54
L285:
  mov    %eax,%edx
  mov    %r14,%rsi
  lea    D367(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D10(%rip),%rdi
  call   <puts@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0xe,%eax
  jmp    L54
L31:
  lea    0x1(%rbp),%esi
  mov    %r15d,%edx
  lea    D176(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D396(%rip),%rdi
  call   <puts@plt>
  mov    $0xd,%eax
  jmp    L54
L613:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D200
datatype: string
name: parse_data
arguments: label: D313
datatype: string
name: parse_data
arguments: label: D404
datatype: string
name: parse_data
arguments: label: D160
datatype: string
name: parse_data
arguments: label: D529
datatype: string
name: parse_data
arguments: label: D366
datatype: string
name: parse_data
arguments: label: D94
datatype: string
name: parse_data
arguments: label: D303
datatype: string
name: parse_data
arguments: label: D370
datatype: string
name: parse_data
arguments: label: D185
datatype: string
name: parse_data
arguments: label: D485
datatype: string
name: parse_data
arguments: label: D236
datatype: string
name: parse_data
arguments: label: D386
datatype: string
name: parse_data
arguments: label: D411
datatype: string
name: parse_data
arguments: label: D508
datatype: string
name: parse_data
arguments: label: D271
datatype: string
name: parse_data
arguments: label: D26
datatype: string
name: parse_data
arguments: label: D254
datatype: string
name: parse_data
arguments: label: D289
datatype: string
name: parse_data
arguments: label: D195
datatype: string
name: parse_data
arguments: label: D396
datatype: string
name: parse_data
arguments: label: D163
datatype: string
name: parse_data
arguments: label: D516
datatype: string
name: parse_data
arguments: label: D535
datatype: string
name: parse_data
arguments: label: D544
datatype: string
name: parse_data
arguments: label: D487
datatype: string
name: parse_data
arguments: label: D23
datatype: string
name: parse_data
arguments: label: D510
datatype: string
name: parse_data
arguments: label: D432
datatype: string
name: parse_data
arguments: label: D65
datatype: string
name: parse_data
arguments: label: D483
datatype: string
name: parse_data
arguments: label: D263
datatype: string
name: parse_data
arguments: label: D176
datatype: string
name: parse_data
arguments: label: D367
datatype: string
name: parse_data
arguments: label: D10
datatype: string

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

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

tool: D404:    ii =

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

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

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

tool: D94:       sSeries CLI command output.

tool: D303:    ssssssss = <SA> =

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

tool: D185:    dddddddd = <DA> =

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

tool: D236:    pppp = <SP> =

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

tool: D411:    ssss = <DP> =

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

tool: D271:   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: D26:   Written by Jonathan Natale for Juniper Networks on 19-Feb-11.

tool: D254: Usage:

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


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


tool: D396: Please try again.  Exiting ...

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


tool: D516: 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


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


tool: D544: It has the wrong number of digits

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


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


tool: D510:        

tool: D432: ^

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


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


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


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


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


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

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);
}
```