user: Converte this assembly snippet into its equivalent C code:

```asm
<uInIpv6Format32>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  movsbl (%rdi),%edi
  mov    %rcx,0x8(%rsp)
  mov    %r8,(%rsp)
  test   %dil,%dil
  je     L504
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %r9,%r14
  xor    %ebx,%ebx
  lea    0x1(%rbp),%r15
  jmp    L77
  nopl   0x0(%rax,%rax,1)
L151:
  call   <isxdigit@plt>
  test   %eax,%eax
  je     L463
  movsbl (%r15),%edi
  add    $0x1,%r15
  test   %dil,%dil
  je     L484
L77:
  cmp    $0x3a,%dil
  jne    L151
  movsbl (%r15),%edi
  add    $0x1,%r15
  add    $0x1,%ebx
  test   %dil,%dil
  jne    L77
L484:
  cmp    $0x8,%ebx
  ja     L111
  lea    D54(%rip),%rdx
  movslq (%rdx,%rbx,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  push   0x60(%rsp)
  mov    %r14,%r8
  mov    %r12,%rdx
  mov    %rbp,%rdi
  push   0x60(%rsp)
  lea    D83(%rip),%rsi
  xor    %eax,%eax
  mov    0x10(%rsp),%rbx
  mov    0x60(%rsp),%r9
  mov    %rbx,%rcx
  call   <sscanf@plt>
  pop    %r9
  pop    %r10
  cmp    $0x6,%eax
  je     L323
  push   0x60(%rsp)
  mov    %r14,%r8
  mov    %rbp,%rdi
  mov    %r13,%rcx
  push   0x60(%rsp)
  mov    %r12,%rdx
  lea    D119(%rip),%rsi
  xor    %eax,%eax
  mov    0x60(%rsp),%r9
  call   <sscanf@plt>
  pop    %rdi
  pop    %r8
  cmp    $0x6,%eax
  je     L323
  push   0x60(%rsp)
  mov    %r13,%rcx
  lea    D5(%rip),%rsi
  xor    %eax,%eax
  push   0x60(%rsp)
  mov    %r12,%rdx
  mov    %rbp,%rdi
  mov    0x18(%rsp),%r15
  mov    0x60(%rsp),%r9
  mov    %r15,%r8
  call   <sscanf@plt>
  pop    %rcx
  pop    %rsi
  cmp    $0x6,%eax
  je     L323
  push   0x60(%rsp)
  mov    %r12,%rdx
  mov    %rbx,%r9
  mov    %r15,%r8
  push   0x60(%rsp)
  mov    %r13,%rcx
  lea    D437(%rip),%rsi
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <sscanf@plt>
  pop    %r11
  pop    %rdx
  cmp    $0x6,%eax
  je     L323
  push   0x60(%rsp)
  mov    %rbx,%r9
  mov    %r15,%r8
  mov    %r13,%rcx
  push   %r14
  mov    %r12,%rdx
  lea    D270(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <sscanf@plt>
  pop    %r9
  pop    %r10
  cmp    $0x6,%eax
  je     L323
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x2,%edx
  lea    D223(%rip),%rsi
  lea    -0x2(%rax,%rbp,1),%edi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L441
  lea    D81(%rip),%rdi
  call   <puts@plt>
  nop
L463:
  xor    %eax,%eax
L343:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L504:
  lea    D12(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
  sub    $0x8,%rsp
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rdi
  push   0x60(%rsp)
  lea    D413(%rip),%rsi
  xor    %eax,%eax
  push   0x60(%rsp)
  push   %r14
  mov    0x20(%rsp),%r9
  mov    0x28(%rsp),%r8
  call   <sscanf@plt>
  add    $0x20,%rsp
  cmp    $0x7,%eax
  jne    L202
L323:
  sub    $0x8,%rsp
  lea    D214(%rip),%rdi
  mov    0x68(%rsp),%rax
  mov    (%rax),%eax
  push   %rax
  mov    0x68(%rsp),%rax
  mov    (%rax),%eax
  push   %rax
  mov    0x68(%rsp),%rax
  mov    (%rax),%eax
  push   %rax
  mov    0x20(%rsp),%rax
  mov    (%r14),%r9d
  mov    0x0(%r13),%edx
  mov    (%rax),%r8d
  mov    0x28(%rsp),%rax
  mov    (%r12),%esi
  mov    (%rax),%ecx
  xor    %eax,%eax
  call   <printf@plt>
  add    $0x20,%rsp
  mov    $0x1,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  mov    0x60(%rsp),%rcx
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    %rbp,%rdi
  lea    D156(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x2,%eax
  je     L323
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x2,%edx
  lea    D223(%rip),%rsi
  lea    -0x2(%rax,%rbp,1),%edi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L86
  lea    D205(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
  mov    0x60(%rsp),%r8
  mov    0x58(%rsp),%rcx
  xor    %eax,%eax
  mov    %r12,%rdx
  lea    D91(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x3,%eax
  je     L323
  mov    0x60(%rsp),%r8
  xor    %eax,%eax
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    D461(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x3,%eax
  je     L323
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x2,%edx
  lea    D223(%rip),%rsi
  lea    -0x2(%rax,%rbp,1),%edi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L291
  lea    D459(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
  mov    0x60(%rsp),%r9
  mov    0x58(%rsp),%r8
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    0x50(%rsp),%rcx
  lea    D110(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x4,%eax
  je     L323
  mov    0x60(%rsp),%r9
  mov    0x58(%rsp),%r8
  xor    %eax,%eax
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    D204(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x4,%eax
  je     L323
  mov    0x60(%rsp),%r9
  mov    0x8(%rsp),%r8
  xor    %eax,%eax
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    D35(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x4,%eax
  je     L323
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x2,%edx
  lea    D223(%rip),%rsi
  lea    -0x2(%rax,%rbp,1),%edi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L328
  lea    D484(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
  nopw   0x0(%rax,%rax,1)
  sub    $0x8,%rsp
  mov    %rbp,%rdi
  mov    %r14,%rcx
  mov    %r12,%rdx
  push   0x68(%rsp)
  mov    0x68(%rsp),%r9
  lea    D9(%rip),%rsi
  xor    %eax,%eax
  mov    0x60(%rsp),%r8
  call   <sscanf@plt>
  pop    %rdi
  pop    %r8
  cmp    $0x5,%eax
  je     L323
  sub    $0x8,%rsp
  mov    %r13,%rcx
  lea    D453(%rip),%rsi
  xor    %eax,%eax
  push   0x68(%rsp)
  mov    0x68(%rsp),%r9
  mov    %r12,%rdx
  mov    %rbp,%rdi
  mov    0x60(%rsp),%r8
  call   <sscanf@plt>
  pop    %rcx
  pop    %rsi
  cmp    $0x5,%eax
  je     L323
  sub    $0x8,%rsp
  mov    %r12,%rdx
  mov    %r13,%rcx
  mov    %rbp,%rdi
  push   0x68(%rsp)
  mov    0x18(%rsp),%rbx
  lea    D212(%rip),%rsi
  xor    %eax,%eax
  mov    0x68(%rsp),%r9
  mov    %rbx,%r8
  call   <sscanf@plt>
  pop    %r15
  pop    %rdx
  cmp    $0x5,%eax
  je     L323
  sub    $0x8,%rsp
  mov    %rbx,%r8
  mov    %r13,%rcx
  mov    %r12,%rdx
  push   0x68(%rsp)
  mov    0x10(%rsp),%r9
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D323(%rip),%rsi
  call   <sscanf@plt>
  pop    %r11
  pop    %rbx
  cmp    $0x5,%eax
  je     L323
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x2,%edx
  lea    D223(%rip),%rsi
  lea    -0x2(%rax,%rbp,1),%edi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L69
  lea    D17(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
  nopl   0x0(%rax)
  sub    $0x8,%rsp
  mov    %r14,%r9
  mov    %r12,%rdx
  mov    %rbp,%rdi
  push   0x68(%rsp)
  lea    D268(%rip),%rsi
  xor    %eax,%eax
  push   0x68(%rsp)
  push   0x68(%rsp)
  mov    0x20(%rsp),%rbx
  mov    0x28(%rsp),%r15
  mov    %rbx,%r8
  mov    %r15,%rcx
  call   <sscanf@plt>
  add    $0x20,%rsp
  cmp    $0x7,%eax
  je     L323
  sub    $0x8,%rsp
  mov    %r14,%r9
  mov    %rbx,%r8
  mov    %r13,%rcx
  push   0x68(%rsp)
  mov    %r12,%rdx
  lea    D310(%rip),%rsi
  xor    %eax,%eax
  push   0x68(%rsp)
  mov    %rbp,%rdi
  push   0x68(%rsp)
  call   <sscanf@plt>
  add    $0x20,%rsp
  cmp    $0x7,%eax
  je     L323
  sub    $0x8,%rsp
  mov    %r14,%r9
  mov    %r15,%r8
  mov    %r13,%rcx
  push   0x68(%rsp)
  mov    %r12,%rdx
  lea    D131(%rip),%rsi
  xor    %eax,%eax
  push   0x68(%rsp)
  mov    %rbp,%rdi
  push   0x68(%rsp)
  call   <sscanf@plt>
  add    $0x20,%rsp
  cmp    $0x7,%eax
  je     L323
  sub    $0x8,%rsp
  mov    %rbx,%r9
  mov    %r15,%r8
  mov    %r13,%rcx
  push   0x68(%rsp)
  mov    %r12,%rdx
  lea    D257(%rip),%rsi
  xor    %eax,%eax
  push   0x68(%rsp)
  mov    %rbp,%rdi
  push   0x68(%rsp)
  call   <sscanf@plt>
  add    $0x20,%rsp
  cmp    $0x7,%eax
  je     L323
  sub    $0x8,%rsp
  mov    %rbx,%r9
  mov    %r15,%r8
  mov    %r13,%rcx
  push   0x68(%rsp)
  mov    %r12,%rdx
  lea    D184(%rip),%rsi
  xor    %eax,%eax
  push   0x68(%rsp)
  mov    %rbp,%rdi
  push   %r14
  call   <sscanf@plt>
  add    $0x20,%rsp
  cmp    $0x7,%eax
  je     L323
  sub    $0x8,%rsp
  mov    %rbx,%r9
  mov    %r15,%r8
  mov    %r13,%rcx
  push   0x68(%rsp)
  mov    %r12,%rdx
  lea    D481(%rip),%rsi
  xor    %eax,%eax
  push   0x60(%rsp)
  mov    %rbp,%rdi
  push   %r14
  call   <sscanf@plt>
  add    $0x20,%rsp
  cmp    $0x7,%eax
  je     L323
  push   0x60(%rsp)
  mov    %rbx,%r9
  mov    %r15,%r8
  mov    %r13,%rcx
  push   0x60(%rsp)
  mov    %r12,%rdx
  lea    D378(%rip),%rsi
  xor    %eax,%eax
  push   0x60(%rsp)
  mov    %rbp,%rdi
  push   %r14
  call   <sscanf@plt>
  add    $0x20,%rsp
  cmp    $0x8,%eax
  je     L323
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x2,%edx
  lea    D223(%rip),%rsi
  lea    -0x2(%rax,%rbp,1),%edi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L222
  lea    D142(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
  nopw   0x0(%rax,%rax,1)
L111:
  lea    D324(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
L202:
  lea    D120(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
L86:
  mov    %r12,%rdx
  lea    D330(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L323
  lea    D29(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
L291:
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    D249(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x2,%eax
  je     L323
  lea    D28(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
L328:
  mov    0x8(%rsp),%r8
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rdi
  lea    D500(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x3,%eax
  je     L323
  lea    D467(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
L69:
  mov    (%rsp),%r9
  mov    0x8(%rsp),%r8
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    D182(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x4,%eax
  je     L323
  lea    D104(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
L441:
  push   %rsi
  mov    %rbp,%rdi
  mov    %r13,%rcx
  mov    %r12,%rdx
  push   %r14
  mov    0x10(%rsp),%r9
  lea    D60(%rip),%rsi
  mov    0x18(%rsp),%r8
  call   <sscanf@plt>
  pop    %rdi
  pop    %r8
  cmp    $0x5,%eax
  je     L323
  lea    D200(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
L222:
  push   0x50(%rsp)
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rdi
  push   %r14
  lea    D93(%rip),%rsi
  mov    0x10(%rsp),%r9
  mov    0x18(%rsp),%r8
  call   <sscanf@plt>
  pop    %rdx
  pop    %rcx
  cmp    $0x6,%eax
  je     L323
  lea    D496(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L343
```

tool_calls: name: read_data
arguments: data_label: D83
type_infered: string
name: read_data
arguments: data_label: D119
type_infered: string
name: read_data
arguments: data_label: D5
type_infered: string
name: read_data
arguments: data_label: D437
type_infered: string
name: read_data
arguments: data_label: D270
type_infered: string
name: read_data
arguments: data_label: D223
type_infered: string
name: read_data
arguments: data_label: D81
type_infered: string
name: read_data
arguments: data_label: D12
type_infered: string
name: read_data
arguments: data_label: D413
type_infered: string
name: read_data
arguments: data_label: D214
type_infered: string
name: read_data
arguments: data_label: D156
type_infered: string
name: read_data
arguments: data_label: D205
type_infered: string
name: read_data
arguments: data_label: D91
type_infered: string
name: read_data
arguments: data_label: D461
type_infered: string
name: read_data
arguments: data_label: D459
type_infered: string
name: read_data
arguments: data_label: D110
type_infered: string
name: read_data
arguments: data_label: D204
type_infered: string
name: read_data
arguments: data_label: D35
type_infered: string
name: read_data
arguments: data_label: D484
type_infered: string
name: read_data
arguments: data_label: D9
type_infered: string
name: read_data
arguments: data_label: D453
type_infered: string
name: read_data
arguments: data_label: D212
type_infered: string
name: read_data
arguments: data_label: D323
type_infered: string
name: read_data
arguments: data_label: D17
type_infered: string
name: read_data
arguments: data_label: D268
type_infered: string
name: read_data
arguments: data_label: D310
type_infered: string
name: read_data
arguments: data_label: D131
type_infered: string
name: read_data
arguments: data_label: D257
type_infered: string
name: read_data
arguments: data_label: D184
type_infered: string
name: read_data
arguments: data_label: D481
type_infered: string
name: read_data
arguments: data_label: D378
type_infered: string
name: read_data
arguments: data_label: D142
type_infered: string
name: read_data
arguments: data_label: D324
type_infered: string
name: read_data
arguments: data_label: D120
type_infered: string
name: read_data
arguments: data_label: D330
type_infered: string
name: read_data
arguments: data_label: D29
type_infered: string
name: read_data
arguments: data_label: D249
type_infered: string
name: read_data
arguments: data_label: D28
type_infered: string
name: read_data
arguments: data_label: D500
type_infered: string
name: read_data
arguments: data_label: D467
type_infered: string
name: read_data
arguments: data_label: D182
type_infered: string
name: read_data
arguments: data_label: D104
type_infered: string
name: read_data
arguments: data_label: D60
type_infered: string
name: read_data
arguments: data_label: D200
type_infered: string
name: read_data
arguments: data_label: D93
type_infered: string
name: read_data
arguments: data_label: D496
type_infered: string

tool: D83: %x::%x:%x:%x:%x:%x

tool: D119: %x:%x::%x:%x:%x:%x

tool: D5: %x:%x:%x::%x:%x:%x

tool: D437: %x:%x:%x:%x::%x:%x

tool: D270: %x:%x:%x:%x:%x::%x

tool: D223: ::

tool: D81: err 6b

tool: D12: err 1

tool: D413: %x:%x:%x:%x:%x:%x:%x::

tool: D214: uInIpv6Format32: %x:%x:%x:%x:%x:%x:%x:%x


tool: D156: %x::%x

tool: D205: err 2b

tool: D91: %x::%x:%x

tool: D461: %x:%x::%x

tool: D459: err 3b

tool: D110: %x::%x:%x:%x

tool: D204: %x:%x::%x:%x

tool: D35: %x:%x:%x::%x

tool: D484: err 4b

tool: D9: %x::%x:%x:%x:%x

tool: D453: %x:%x::%x:%x:%x

tool: D212: %x:%x:%x::%x:%x

tool: D323: %x:%x:%x:%x::%x

tool: D17: err 5b

tool: D268: %x::%x:%x:%x:%x:%x:%x

tool: D310: %x:%x::%x:%x:%x:%x:%x

tool: D131: %x:%x:%x::%x:%x:%x:%x

tool: D257: %x:%x:%x:%x::%x:%x:%x

tool: D184: %x:%x:%x:%x:%x::%x:%x

tool: D481: %x:%x:%x:%x:%x:%x::%x

tool: D378: %x:%x:%x:%x:%x:%x:%x:%x

tool: D142: err 7b

tool: D324: err default

tool: D120: err 8

tool: D330: %x::

tool: D29: err 2a

tool: D249: %x:%x::

tool: D28: err 3a

tool: D500: %x:%x:%x::

tool: D467: err 4a

tool: D182: %x:%x:%x:%x::

tool: D104: err 5a

tool: D60: %x:%x:%x:%x:%x::

tool: D200: err 6a

tool: D93: %x:%x:%x:%x:%x:%x::

tool: D496: err 7a

assistant: ```c
unsigned uInIpv6Format32(const char *cIPv6, unsigned *h1, unsigned *h2, unsigned *h3, unsigned *h4, unsigned *h5, unsigned *h6, unsigned *h7, unsigned *h8) {
  register int i;
  unsigned uColonCount = 0;
  unsigned uRead = 0;
  for (i = 0; cIPv6[i]; i++) {
    if (cIPv6[i] == ':')
      uColonCount++;
    if (cIPv6[i] != ':' && !isxdigit(cIPv6[i]))
      return (0);
  }
  switch (uColonCount) {
  case 0:
  case 1:
    printf("err 1\n");
    return (0);
    break;
  case 2:
    uRead = sscanf(cIPv6, "%x::%x", h1, h8);
    if (uRead != 2 && !strncmp(cIPv6 + strlen(cIPv6) - 2, "::", 2)) {
      uRead = sscanf(cIPv6, "%x::", h1);
      if (uRead != 1) {
        printf("err 2a\n");
        return (0);
      }
    } else if (uRead != 2) {
      printf("err 2b\n");
      return (0);
    }
    break;
  case 3:
    uRead = sscanf(cIPv6, "%x::%x:%x", h1, h7, h8);
    if (uRead != 3) {
      uRead = sscanf(cIPv6, "%x:%x::%x", h1, h2, h8);
      if (uRead != 3 && !strncmp(cIPv6 + strlen(cIPv6) - 2, "::", 2)) {
        uRead = sscanf(cIPv6, "%x:%x::", h1, h2);
        if (uRead != 2) {
          printf("err 3a\n");
          return (0);
        }
      } else if (uRead != 3) {
        printf("err 3b\n");
        return (0);
      }
    }
    break;
  case 4:
    uRead = sscanf(cIPv6, "%x::%x:%x:%x", h1, h6, h7, h8);
    if (uRead != 4) {
      uRead = sscanf(cIPv6, "%x:%x::%x:%x", h1, h2, h7, h8);
      if (uRead != 4) {
        uRead = sscanf(cIPv6, "%x:%x:%x::%x", h1, h2, h3, h8);
        if (uRead != 4 && !strncmp(cIPv6 + strlen(cIPv6) - 2, "::", 2)) {
          uRead = sscanf(cIPv6, "%x:%x:%x::", h1, h2, h3);
          if (uRead != 3) {
            printf("err 4a\n");
            return (0);
          }
        } else if (uRead != 4) {
          printf("err 4b\n");
          return (0);
        }
      }
    }
    break;
  case 5:
    uRead = sscanf(cIPv6, "%x::%x:%x:%x:%x", h1, h5, h6, h7, h8);
    if (uRead != 5) {
      uRead = sscanf(cIPv6, "%x:%x::%x:%x:%x", h1, h2, h6, h7, h8);
      if (uRead != 5) {
        uRead = sscanf(cIPv6, "%x:%x:%x::%x:%x", h1, h2, h3, h7, h8);
        if (uRead != 5) {
          uRead = sscanf(cIPv6, "%x:%x:%x:%x::%x", h1, h2, h3, h4, h8);
          if (uRead != 5 && !strncmp(cIPv6 + strlen(cIPv6) - 2, "::", 2)) {
            uRead = sscanf(cIPv6, "%x:%x:%x:%x::", h1, h2, h3, h4);
            if (uRead != 4) {
              printf("err 5a\n");
              return (0);
            }
          } else if (uRead != 5) {
            printf("err 5b\n");
            return (0);
          }
        }
      }
    }
    break;
  case 6:
    uRead = sscanf(cIPv6, "%x::%x:%x:%x:%x:%x", h1, h4, h5, h6, h7, h8);
    if (uRead != 6) {
      uRead = sscanf(cIPv6, "%x:%x::%x:%x:%x:%x", h1, h2, h5, h6, h7, h8);
      if (uRead != 6) {
        uRead = sscanf(cIPv6, "%x:%x:%x::%x:%x:%x", h1, h2, h3, h6, h7, h8);
        if (uRead != 6) {
          uRead = sscanf(cIPv6, "%x:%x:%x:%x::%x:%x", h1, h2, h3, h4, h7, h8);
          if (uRead != 6) {
            uRead = sscanf(cIPv6, "%x:%x:%x:%x:%x::%x", h1, h2, h3, h4, h5, h8);
            if (uRead != 6 && !strncmp(cIPv6 + strlen(cIPv6) - 2, "::", 2)) {
              uRead = sscanf(cIPv6, "%x:%x:%x:%x:%x::", h1, h2, h3, h4, h5);
              if (uRead != 5) {
                printf("err 6a\n");
                return (0);
              }
            } else if (uRead != 6) {
              printf("err 6b\n");
              return (0);
            }
          }
        }
      }
    }
    break;
  case 7:
    uRead = sscanf(cIPv6, "%x::%x:%x:%x:%x:%x:%x", h1, h3, h4, h5, h6, h7, h8);
    if (uRead != 7) {
      uRead = sscanf(cIPv6, "%x:%x::%x:%x:%x:%x:%x", h1, h2, h4, h5, h6, h7, h8);
      if (uRead != 7) {
        uRead = sscanf(cIPv6, "%x:%x:%x::%x:%x:%x:%x", h1, h2, h3, h5, h6, h7, h8);
        if (uRead != 7) {
          uRead = sscanf(cIPv6, "%x:%x:%x:%x::%x:%x:%x", h1, h2, h3, h4, h6, h7, h8);
          if (uRead != 7) {
            uRead = sscanf(cIPv6, "%x:%x:%x:%x:%x::%x:%x", h1, h2, h3, h4, h5, h7, h8);
            if (uRead != 7) {
              uRead = sscanf(cIPv6, "%x:%x:%x:%x:%x:%x::%x", h1, h2, h3, h4, h5, h6, h8);
              if (uRead != 7) {
                uRead = sscanf(cIPv6, "%x:%x:%x:%x:%x:%x:%x:%x", h1, h2, h3, h4, h5, h6, h7, h8);
                if (uRead != 8 && !strncmp(cIPv6 + strlen(cIPv6) - 2, "::", 2)) {
                  uRead = sscanf(cIPv6, "%x:%x:%x:%x:%x:%x::", h1, h2, h3, h4, h5, h6);
                  if (uRead != 6) {
                    printf("err 7a\n");
                    return (0);
                  }
                } else if (uRead != 8) {
                  printf("err 7b\n");
                  return (0);
                }
              }
            }
          }
        }
      }
    }
    break;
  case 8:
    uRead = sscanf(cIPv6, "%x:%x:%x:%x:%x:%x:%x::", h1, h2, h3, h4, h5, h6, h7);
    if (uRead != 7) {
      printf("err 8\n");
      return (0);
    }
    break;
  default:
    printf("err default\n");
    return (0);
  }
  printf("uInIpv6Format32: %x:%x:%x:%x:%x:%x:%x:%x\n", *h1, *h2, *h3, *h4, *h5, *h6, *h7, *h8);
  return (1);
}
```