// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/n2kd/main.c
// Function: verifyStdin
static void verifyStdin(void)
{
  int     i      = 0;
  size_t  remain = sizeof(stream[0].buffer) - 1;
  ssize_t r;
  char   *line_end;

  for (;;)
  {
    r = read(stream[i].fd, stream[i].buffer + stream[i].len, remain);
    if (r > 0)
    {
      stream[i].len += r;
      stream[i].buffer[stream[i].len] = '\0';
      line_end                        = strchr(stream[i].buffer, '\n');
      if (line_end != NULL)
      {
        if (strstr(stream[i].buffer, "\"version\":") == NULL || strstr(stream[i].buffer, "\"showLookupValues\":true") == NULL)
        {
          logAbort("Standard input must be piped from `analyzer` in `-json -nv` mode\n");
        }
        remain = stream[i].buffer + stream[i].len - (line_end + 1);
        memcpy(stream[i].buffer, line_end + 1, remain);
        stream[i].len = remain;
        break;
      }
    }
    else
    {
      logAbort("Cannot read from piped input from `analyzer`\n");
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movq $0x7fff, -0x10(%rbp)    # imm = 0x7FFF
movslq -0x4(%rbp), %rcx
leaq 0xdfae(%rip), %rax      # 0x115a0
imulq $0x8038, %rcx, %rcx     # imm = 0x8038
addq %rcx, %rax
movl (%rax), %edi
movslq -0x4(%rbp), %rax
leaq 0xdf97(%rip), %rsi      # 0x115a0
imulq $0x8038, %rax, %rax     # imm = 0x8038
addq %rax, %rsi
addq $0x18, %rsi
movslq -0x4(%rbp), %rcx
leaq 0xdf7e(%rip), %rax      # 0x115a0
imulq $0x8038, %rcx, %rcx     # imm = 0x8038
addq %rcx, %rax
addq 0x8030(%rax), %rsi
movq -0x10(%rbp), %rdx
callq 0x21c0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jle 0x37d0
movq -0x18(%rbp), %rcx
movslq -0x4(%rbp), %rdx
leaq 0xdf46(%rip), %rax      # 0x115a0
imulq $0x8038, %rdx, %rdx     # imm = 0x8038
addq %rdx, %rax
addq 0x8030(%rax), %rcx
movq %rcx, 0x8030(%rax)
movslq -0x4(%rbp), %rcx
leaq 0xdf23(%rip), %rax      # 0x115a0
imulq $0x8038, %rcx, %rcx     # imm = 0x8038
addq %rcx, %rax
movslq -0x4(%rbp), %rdx
leaq 0xdf0e(%rip), %rcx      # 0x115a0
imulq $0x8038, %rdx, %rdx     # imm = 0x8038
addq %rdx, %rcx
movq 0x8030(%rcx), %rcx
movb $0x0, 0x18(%rax,%rcx)
movslq -0x4(%rbp), %rax
leaq 0xdeed(%rip), %rdi      # 0x115a0
imulq $0x8038, %rax, %rax     # imm = 0x8038
addq %rax, %rdi
addq $0x18, %rdi
movl $0xa, %esi
callq 0x2110
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x37ce
movslq -0x4(%rbp), %rax
leaq 0xdebb(%rip), %rdi      # 0x115a0
imulq $0x8038, %rax, %rax     # imm = 0x8038
addq %rax, %rdi
addq $0x18, %rdi
leaq 0x956e(%rip), %rsi      # 0xcc68
callq 0x2380
cmpq $0x0, %rax
je 0x3730
movslq -0x4(%rbp), %rax
leaq 0xde90(%rip), %rdi      # 0x115a0
imulq $0x8038, %rax, %rax     # imm = 0x8038
addq %rax, %rdi
addq $0x18, %rdi
leaq 0x954e(%rip), %rsi      # 0xcc73
callq 0x2380
cmpq $0x0, %rax
jne 0x373e
leaq 0x9554(%rip), %rdi      # 0xcc8b
movb $0x0, %al
callq 0x9c40
movslq -0x4(%rbp), %rcx
leaq 0xde57(%rip), %rax      # 0x115a0
imulq $0x8038, %rcx, %rcx     # imm = 0x8038
addq %rcx, %rax
addq $0x18, %rax
movslq -0x4(%rbp), %rdx
leaq 0xde3e(%rip), %rcx      # 0x115a0
imulq $0x8038, %rdx, %rdx     # imm = 0x8038
addq %rdx, %rcx
addq 0x8030(%rcx), %rax
movq -0x20(%rbp), %rcx
addq $0x1, %rcx
subq %rcx, %rax
movq %rax, -0x10(%rbp)
movslq -0x4(%rbp), %rax
leaq 0xde13(%rip), %rdi      # 0x115a0
imulq $0x8038, %rax, %rax     # imm = 0x8038
addq %rax, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
callq 0x2220
movq -0x10(%rbp), %rcx
movslq -0x4(%rbp), %rdx
leaq 0xdde5(%rip), %rax      # 0x115a0
imulq $0x8038, %rdx, %rdx     # imm = 0x8038
addq %rdx, %rax
movq %rcx, 0x8030(%rax)
jmp 0x37e3
jmp 0x37de
leaq 0x94f6(%rip), %rdi      # 0xcccd
movb $0x0, %al
callq 0x9c40
jmp 0x35e7
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)