LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/theovosse[P]llgen/lang.c
// Function: rustLanguageStartFunctionDeclaration
static void rustLanguageStartFunctionDeclaration(FILE* f, const char* functionName, const char* type) {
    if (globalIndent == 0) {
        fprintf(f, "    ");
        globalIndent = 1;
    }
    fprintf(f, "fn %s(&mut self", functionName);
    returnType = type;
    nrFunctionParameters = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x91b0(%rip), %r12      # 0x18af0
cmpl $0x0, (%r12)
jne 0xf964
leaq 0x2d3f(%rip), %rdi      # 0x1268d
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
callq 0x3210
movl $0x1, (%r12)
leaq 0x2f44(%rip), %rsi      # 0x128af
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3150
movq %rbx, 0xb3b9(%rip)      # 0x1ad38
movl $0x1, 0xb397(%rip)      # 0x1ad20
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/theovosse[P]llgen/lang.c
// Function: rustLanguageParameterDeclarationName
static void rustLanguageParameterDeclarationName(FILE* f, const char* str, int nrSpaces) {
    if (nrFunctionParameters > 0) {
        fputc(',', f);
    }
    spaces(f, nrSpaces, nrFunctionParameters > 0? 1: 0);
    fputs(str, f);
    fputc(':', f);
    nrFunctionParameters++;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0xb378(%rip)      # 0x1ad20
jle 0xf9c3
pushq $0x2c
popq %rdi
movq %rbx, %rsi
callq 0x3120
xorl %edx, %edx
cmpl $0x0, 0xb362(%rip)      # 0x1ad20
setg %dl
jmp 0xf9c5
xorl %edx, %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xfb83
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3110
pushq $0x3a
popq %rdi
movq %rbx, %rsi
callq 0x3120
incl 0xb335(%rip)            # 0x1ad20
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/theovosse[P]llgen/lang.c
// Function: spaces
static void spaces(FILE* f, int nrSpaces, int minNrSpaces) {
    if (nrSpaces < minNrSpaces) {
        nrSpaces = minNrSpaces;
    }
    for (int i = 0; i < nrSpaces; i++) {
        fputc(' ', f);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl %esi, %edx
cmovgl %edx, %esi
xorl %r14d, %r14d
testl %esi, %esi
cmovgl %esi, %r14d
pushq $0x20
popq %rbp
subl $0x1, %r14d
jb 0xfbad
movl %ebp, %edi
movq %rbx, %rsi
callq 0x3120
jmp 0xfb9b
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/openshmem-org[P]openshmem-examples/c/bar.c
// Function: main
int
main()
{
    int me, npes;
    int i;

    for (i = 0; i < SHMEM_BARRIER_SYNC_SIZE; i += 1) {
        pSync[i] = SHMEM_SYNC_VALUE;
    }

    shmem_init();
    me = shmem_my_pe();
    npes = shmem_n_pes();

    if (me == 0) {
        shmem_int_p(&x, 4, 1);
    }

    shmem_barrier(0, 0, npes, pSync);

    printf("%d: x = %d\n", me, x);

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
orq $-0x1, 0x2ec9(%rip)     # 0x4070
callq 0x1090
callq 0x1080
movl %eax, %ebx
callq 0x1060
movl %eax, %ebp
testl %ebx, %ebx
jne 0x11d0
leaq 0x2e9b(%rip), %rdi      # 0x4060
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x1040
leaq 0x2e99(%rip), %rcx      # 0x4070
xorl %edi, %edi
xorl %esi, %esi
movl %ebp, %edx
callq 0x1050
movl 0x2e78(%rip), %edx      # 0x4060
leaq 0xe15(%rip), %rdi       # 0x2004
movl %ebx, %esi
xorl %eax, %eax
callq 0x1030
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-exec.c
// Function: timeout
static void timeout(int sig) {
  struct timeval t;
  _u32 i;

  if (timeout_done) return;

  gettimeofday(&t,0);
  
  i = (t.tv_sec - start_time.tv_sec) * 1000 + (t.tv_usec - start_time.tv_usec) / 1000;
  
  if (i > time_limit) exitflags |= EXITF_TIMEOUT; else {
    i = (t.tv_sec - last_time.tv_sec) * 1000 + (t.tv_usec - last_time.tv_usec) / 1000;
      if (i > stuck_limit) exitflags |= EXITF_STUCK; else return;
  }  

  timeout_done = 1;

#ifdef DEBUG_TRACE
    printf("[bunny-exec] Execution timed out (diff = %u), orig_pid = %u, shmreg->lock = %u...\n",
           i, orig_pid, shmreg->lock);
#endif /* DEBUG_TRACE */

  /* Just let report_kids() take its course, it's safer than calling non-reentrant code
     from here. */

  if (orig_pid > 0) kill(orig_pid,SIGKILL);
  
}

// Assembly:
cmpb $0x0, 0x305c(%rip)      # 0x5199
jne 0x21da
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1200
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movl 0x2ffe(%rip), %eax      # 0x5160
movl %esi, %edx
subl %eax, %edx
imull $0x3e8, %edx, %r8d      # imm = 0x3E8
movq %rcx, %rax
subq 0x2ff1(%rip), %rax      # 0x5168
movl $0x3e8, %edi            # imm = 0x3E8
cqto
idivq %rdi
addl %r8d, %eax
movb $0x1, %dl
cmpl %eax, 0x2fc4(%rip)      # 0x5150
leaq 0x10(%rsp), %rsp
popq %rbx
jb 0x21bb
subl 0x2fd6(%rip), %esi      # 0x5170
imull $0x3e8, %esi, %esi      # imm = 0x3E8
subq 0x2fd1(%rip), %rcx      # 0x5178
movq %rcx, %rax
cqto
idivq %rdi
addl %esi, %eax
movb $0x4, %dl
cmpl %eax, 0x2f9b(%rip)      # 0x5154
jae 0x21da
orb %dl, 0x2fd9(%rip)       # 0x519a
movb $0x1, 0x2fd1(%rip)      # 0x5199
movl 0x2fce(%rip), %edi      # 0x519c
testl %edi, %edi
jle 0x21da
pushq $0x9
popq %rsi
jmp 0x11a0
retq
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-exec.c
// Function: handle_kill
static void handle_kill(int sig) {
  _u32 i;

#ifdef DEBUG_TRACE
  printf("[bunny-exec] Received signal %u.\n",sig);
#endif /* DEBUG_TRACE */
  
  shmctl(shmid, IPC_RMID, 0);
  
  if (orig_pid > 0) kill(orig_pid,SIGKILL);
  for (i=0;i<proc_cnt;i++) 
    if (procs[i].pid) kill(procs[i].pid,SIGKILL);

  exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x2fa2(%rip), %edi      # 0x5188
xorl %esi, %esi
xorl %edx, %edx
callq 0x10c0
movl 0x2fa7(%rip), %edi      # 0x519c
testl %edi, %edi
jle 0x2201
pushq $0x9
popq %rsi
callq 0x11a0
movl 0x2f99(%rip), %eax      # 0x51a0
xorl %r14d, %r14d
pushq $0x9
popq %rbx
xorl %r15d, %r15d
movl %eax, %ecx
cmpq %rcx, %r15
jae 0x223c
movq 0x2f8a(%rip), %rcx      # 0x51a8
movl (%rcx,%r14), %edi
testl %edi, %edi
je 0x2233
movl %ebx, %esi
callq 0x11a0
movl 0x2f6d(%rip), %eax      # 0x51a0
incq %r15
addq $0x40, %r14
jmp 0x2210
pushq $0x1
popq %rdi
callq 0x1130
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-exec.c
// Function: read_shm
static _u8 read_shm(void* ptr, _u32 siz) {
  _s32 avail;

  /* Races here are OK, because the amount of data to be read can only increase
     with time. */

  do {
    avail = shmreg->write_off - shmreg->read_off;
    if (avail < 0) avail += shmreg->length;
    if (avail >= siz) break;
    if (report_kids()) return 1;
    sched_yield();
  } while (1);

  do {
    while (shmreg->lock)
      if (report_kids()) return 1; else sched_yield();
    atomic_inc(&shmreg->lock);
    if (shmreg->lock == 1) break;
    atomic_dec(&shmreg->lock);
    if (shmreg->lock < 0 || shmreg->lock > 1)
      fatal("SHM spinlock state corrupted (up at %d)",shmreg->lock);
  } while (1);

  if (shmreg->read_off + siz >= shmreg->length) {
    _u32 copy1 = shmreg->length - shmreg->read_off, siz2 = siz - copy1;
    memcpy(ptr, (void*) shmreg->data + shmreg->read_off, copy1);
    ptr += copy1;
    memcpy(ptr, (void*) shmreg->data, siz2);
  } else
    memcpy(ptr, (void*) shmreg->data + shmreg->read_off, siz);

  shmreg->read_off = (shmreg->read_off + siz) % (shmreg->length);

  atomic_dec(&shmreg->lock);

  return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x2f2d(%rip), %rax      # 0x5190
movl 0x8(%rax), %ecx
subl 0xc(%rax), %ecx
jns 0x226e
addl 0x4(%rax), %ecx
cmpl %ebx, %ecx
jae 0x22c1
callq 0x243c
testb %al, %al
jne 0x22cf
callq 0x11c0
jmp 0x225c
callq 0x11c0
movq 0x2f02(%rip), %rax      # 0x5190
jmp 0x22c1
lock
incl (%rax)
movq 0x2ef6(%rip), %rbp      # 0x5190
movl (%rbp), %eax
cmpl $0x1, %eax
je 0x22e0
lock
decl (%rbp)
movq 0x2ee3(%rip), %rax      # 0x5190
cmpl $0x0, (%rax)
js 0x234a
movl (%rax), %ecx
cmpl $0x2, %ecx
jge 0x234a
cmpl $0x0, (%rax)
je 0x2290
callq 0x243c
testb %al, %al
je 0x2282
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xc(%rbp), %eax
addl %ebx, %eax
cmpl 0x4(%rbp), %eax
jae 0x22fc
movl 0xc(%rbp), %eax
leaq (%rax,%rbp), %rsi
addq $0x54, %rsi
movl %ebx, %edx
movq %r14, %rdi
jmp 0x2330
movl 0x4(%rbp), %r15d
subl 0xc(%rbp), %r15d
movl %ebx, %r12d
subl %r15d, %r12d
leaq 0x54(%rbp), %r13
movl 0xc(%rbp), %eax
leaq (%rax,%rbp), %rsi
addq $0x54, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x10b0
addq %r15, %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x10b0
addl 0xc(%rbp), %ebx
movl %ebx, %eax
xorl %edx, %edx
divl 0x4(%rbp)
xorl %eax, %eax
movl %edx, 0xc(%rbp)
lock
decl (%rbp)
jmp 0x22d1
movq 0x2c8f(%rip), %rbx      # 0x4fe0
movq (%rbx), %rdi
movl (%rax), %edx
leaq 0xebf(%rip), %rsi       # 0x321c
xorl %eax, %eax
callq 0x11b0
movq (%rbx), %rdi
leaq 0xd01(%rip), %rsi       # 0x306f
leaq 0xee6(%rip), %rdx       # 0x325b
leaq 0xd08(%rip), %rcx       # 0x3084
movl $0x197, %r8d            # imm = 0x197
xorl %eax, %eax
callq 0x11b0
pushq $0x1
popq %rdi
callq 0x1130
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-exec.c
// Function: get_procentry
static _s32 get_procentry(_u32 pid,_u8 make_new) {
  _u32 rno;

  for (rno=0;rno<proc_cnt;rno++) 
    if (procs[rno].pid == pid) return rno;

  if (!make_new) return -1;
  
  proc_cnt++;
  
  if ((proc_cnt % ALLOC_CHUNK) == 1) {
    procs = realloc(procs,(proc_cnt + ALLOC_CHUNK) * sizeof(struct proc_state));
    if (!procs) fatal("out of memory");
    memset((void*)(procs+rno),0,sizeof(struct proc_state) * ALLOC_CHUNK);
  }

  procs[rno].pid = pid;
  
  return rno;

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl 0x2bed(%rip), %ebx      # 0x51a0
movq 0x2bee(%rip), %r14      # 0x51a8
xorl %eax, %eax
movq %r14, %rcx
cmpq %rax, %rbx
je 0x25d1
cmpl %ebp, (%rcx)
je 0x262b
incq %rax
addq $0x40, %rcx
jmp 0x25bf
testb %sil, %sil
je 0x262f
leal 0x1(%rbx), %eax
movl %eax, 0x2bc1(%rip)      # 0x51a0
andl $0x7f, %eax
cmpl $0x1, %eax
jne 0x261e
leal 0x81(%rbx), %esi
shlq $0x6, %rsi
movq %r14, %rdi
callq 0x1210
movq %rax, 0x2ba8(%rip)      # 0x51a8
testq %rax, %rax
je 0x2639
movq %rax, %r14
movq %rbx, %rdi
shlq $0x6, %rdi
addq %rax, %rdi
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0x1060
movq %rbx, %rax
shlq $0x6, %rax
movl %ebp, (%r14,%rax)
jmp 0x2632
movl %eax, %ebx
jmp 0x2632
pushq $-0x1
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x29a0(%rip), %rbx      # 0x4fe0
movq (%rbx), %rcx
leaq 0xc1a(%rip), %rdi       # 0x3264
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x1250
movq (%rbx), %rdi
leaq 0xa10(%rip), %rsi       # 0x306f
leaq 0xc23(%rip), %rdx       # 0x3289
leaq 0xa17(%rip), %rcx       # 0x3084
pushq $0x65
popq %r8
xorl %eax, %eax
callq 0x11b0
pushq $0x1
popq %rdi
callq 0x1130
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzdata.c
// Function: usage
static void
usage(void)
{
	printf("usage: lzdata [options] <files...>\n");
	printf("	--filesize <size>	file size (MB)\n");
	printf("	--chunksize <size>	chunk size (KB)\n");
	printf("	--minlitlen <len>	minimum literal length\n");
	printf("	--maxlitlen <len>	minimum literal length\n");
	printf("	--minmatchlen <len>	minimum match length\n");
	printf("	--maxmatchlen <len>	minimum match length\n");
	printf("	--minoffset <len>	minimum offset length\n");
	printf("	--maxoffset <len>	minimum offset length\n");
	printf("	--matchprob <prob>	probability of match [0..1]\n");
	printf("	--litlenscale <val>	literal length scale (> 0)\n");
	printf("	--matchlenscale <val>	match length scale (> 0)\n");
	printf("	--randomseed <val>	random number seed\n");
	printf("	--verbose		report details used\n");
	printf("	--help			this help\n");
}

// Assembly:
pushq %rax
leaq 0x5ef(%rip), %rdi       # 0x2409
callq 0x1050
leaq 0x606(%rip), %rdi       # 0x242c
callq 0x1050
leaq 0x61c(%rip), %rdi       # 0x244e
callq 0x1050
leaq 0x634(%rip), %rdi       # 0x2472
callq 0x1050
leaq 0x652(%rip), %rdi       # 0x249c
callq 0x1050
leaq 0x670(%rip), %rdi       # 0x24c6
callq 0x1050
leaq 0x68e(%rip), %rdi       # 0x24f0
callq 0x1050
leaq 0x6ac(%rip), %rdi       # 0x251a
callq 0x1050
leaq 0x6c9(%rip), %rdi       # 0x2543
callq 0x1050
leaq 0x6e6(%rip), %rdi       # 0x256c
callq 0x1050
leaq 0x70a(%rip), %rdi       # 0x259c
callq 0x1050
leaq 0x72e(%rip), %rdi       # 0x25cc
callq 0x1050
leaq 0x752(%rip), %rdi       # 0x25fc
callq 0x1050
leaq 0x76d(%rip), %rdi       # 0x2623
callq 0x1050
leaq 0x781(%rip), %rdi       # 0x2643
popq %rax
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O2/lmcilroy[P]lzm/lzdata.c
// Function: gen_literal
static unsigned int
gen_literal(unsigned char * const buffer, unsigned int pos,
    const unsigned int size, struct lzdata_args * const args)
{
	unsigned int length;
	unsigned int end;

	length = args->lit_len_scale / (1 - rngd()) -
	    args->lit_len_scale + args->min_lit_len;

	if (length > args->max_lit_len)
		length = args->max_lit_len;

	if (pos + length > size)
		length = size - pos;

	LOG("L %d %d\n", pos, length);

	args->literals++;
	args->literal_bytes += length;

	end = pos + length;

	if (end > 3) {
		while (pos < end - 3) {
			writemem32(&buffer[pos], rngl());
			pos += 4;
		}
	}

	while (pos < end)
		buffer[pos++] = rngl();

	return pos;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movsd 0x38(%rcx), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x1150
movsd 0x139(%rip), %xmm1      # 0x2030
subsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
subsd 0x38(%r15), %xmm0
movapd %xmm0, %xmm1
movl 0x14(%r15), %eax
cvtsi2sd %rax, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl 0x18(%r15), %ecx
cmpl %eax, %ecx
cmovbl %ecx, %eax
leal (%rax,%r14), %ecx
movl %ebp, %r12d
subl %r14d, %r12d
cmpl %ebp, %ecx
cmovbel %eax, %r12d
incq 0x50(%r15)
addq %r12, 0x60(%r15)
addl %r14d, %r12d
cmpl $0x4, %r12d
jb 0x1f67
leal -0x3(%r12), %ebp
cmpl %ebp, %r14d
jae 0x1f67
movl %r14d, %r15d
callq 0x10b0
movl %eax, (%rbx,%r15)
addl $0x4, %r14d
jmp 0x1f50
movl %r14d, %r14d
movl %r12d, %r15d
cmpq %r15, %r14
jae 0x1f80
callq 0x10b0
movb %al, (%rbx,%r14)
incq %r14
jmp 0x1f6d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/sissm.c
// Function: sissmSegfaultSigaction
void sissmSegfaultSigaction( int signal, siginfo_t *si, void *arg )
{
    int j, nptrs;
    void *buffer[BT_BUF_SIZE];
    char **strings;
    time_t curtime;
    struct tm *loctime;

    nptrs = backtrace( buffer, BT_BUF_SIZE );
    // printf("Caught segfault at address %p\n", si->si_addr);
    // printf( "backtrace() returned %d addresses\n", nptrs );

    // The call backtrace_symbols_fd(buffer, nptrs, STDOUT_FILENO) would
    // produce similar output to the following:
    //
    strings = backtrace_symbols(buffer, nptrs);
    if (strings == NULL) {
        perror( "backtrace_symbols" );
        if ( segfaultFPW != NULL ) {
            fprintf( segfaultFPW, "Segfault Backtrace Error\n" );
            fclose( segfaultFPW );
        };
        exit( EXIT_FAILURE );
    }

    curtime = time (NULL);
    loctime = localtime (&curtime);
    if (NULL != segfaultFPW) fprintf( segfaultFPW, "Crash Time: %s\n", asctime(loctime) );
    for ( j = 0; j < nptrs; j++ ) {
        printf( "%s\n", strings[j] );
        fprintf( segfaultFPW, "%s\n", strings[j] );
    }
    if ( segfaultFPW != NULL ) fclose( segfaultFPW );

    free(strings);
    exit( EXIT_FAILURE );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8018, %rsp           # imm = 0x8018
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x8130
movl %eax, %r14d
movq %rbx, %rdi
movl %eax, %esi
callq 0x80d0
testq %rax, %rax
jne 0x85b9
leaq 0x11aae(%rip), %rdi     # 0x1a030
callq 0x8340
movq 0x2197a(%rip), %rcx     # 0x29f08
testq %rcx, %rcx
je 0x85b1
leaq 0x11aa8(%rip), %rdi     # 0x1a042
pushq $0x19
popq %rsi
pushq $0x1
popq %rdx
callq 0x83a0
movq 0x2195c(%rip), %rdi     # 0x29f08
callq 0x8100
pushq $0x1
popq %rdi
callq 0x8380
movq %rax, %rbx
xorl %r12d, %r12d
xorl %edi, %edi
callq 0x82a0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x8070
movq 0x2192e(%rip), %r15     # 0x29f08
testq %r15, %r15
je 0x85fb
movq %rax, %rdi
callq 0x8140
leaq 0x11a6e(%rip), %rsi     # 0x1a05c
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8250
testl %r14d, %r14d
cmovlel %r12d, %r14d
leaq 0x11dbd(%rip), %r15     # 0x1a3c6
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x8634
movq (%rbx,%r12,8), %rdi
callq 0x8090
movq 0x218e7(%rip), %rdi     # 0x29f08
movq (%rbx,%r12,8), %rdx
movq %r15, %rsi
xorl %eax, %eax
callq 0x8250
incq %r12
jmp 0x860c
movq 0x218cd(%rip), %rdi     # 0x29f08
testq %rdi, %rdi
je 0x8645
callq 0x8100
movq %rbx, %rdi
callq 0x8040
jmp 0x85b1
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/sissm.c
// Function: sissmSegfaultInstall
int sissmSegfaultInstall( char *sissmCfgFileName )
{
    struct sigaction sa;
    char crashFilename[256];
    time_t curtime;
    struct tm *loctime;

    memset( &sa, 0, sizeof(struct sigaction) );
    sigemptyset( &sa.sa_mask );
    sa.sa_sigaction = sissmSegfaultSigaction;
    sa.sa_flags = SA_SIGINFO;

    sigaction(SIGSEGV, &sa, NULL);                                       // invalid memory access
    sigaction(SIGFPE,  &sa, NULL);                                              // divide-by-zero
    sigaction(SIGABRT, &sa, NULL);                                              // stack smashing

    strlcpy( crashFilename, sissmCfgFileName, 256 );
    strlcat( crashFilename, ".crashreport", 256 );
    segfaultFPW = fopen( crashFilename, "at" );

    curtime = time (NULL);
    loctime = localtime (&curtime);
    if ( NULL != segfaultFPW ) {
        fprintf( segfaultFPW, "\n\n------\nInitialized Crash Reporter: %s\n", asctime(loctime) );
        fflush( segfaultFPW );
    }

    return (segfaultFPW == NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0x98, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x81b0
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x8260
leaq -0x140(%rip), %rax      # 0x8549
movq %rax, -0x8(%r15)
movl $0x4, 0x80(%r15)
pushq $0xb
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x80a0
pushq $0x8
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x80a0
pushq $0x6
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x80a0
leaq 0xa0(%rsp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe97a
leaq 0x1198e(%rip), %rsi     # 0x1a06c
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
callq 0xe918
leaq 0x1423e(%rip), %rsi     # 0x1c930
movq %r14, %rdi
callq 0x8330
movq %rax, 0x21807(%rip)     # 0x29f08
xorl %edi, %edi
callq 0x82a0
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x8070
movq 0x217ee(%rip), %rbx     # 0x29f08
testq %rbx, %rbx
je 0x8756
movq %rax, %rdi
callq 0x8140
leaq 0x1194b(%rip), %rsi     # 0x1a079
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8250
movq 0x217c6(%rip), %rdi     # 0x29f08
callq 0x82c0
xorl %eax, %eax
cmpq $0x0, 0x217b7(%rip)     # 0x29f08
sete %al
jmp 0x8759
pushq $0x1
popq %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/sissm.c
// Function: sissmServerRestartPending
int sissmServerRestartPending( void ) {
    int retValue = 0;
    if (_sissmRestartRequest ) {
        _sissmRestartRequest = 0;
	retValue = 1;
    }
    return retValue;
}

// Assembly:
xorl %eax, %eax
cmpb $0x1, 0x2333b(%rip)     # 0x2bd30
jne 0x8a01
movb $0x0, 0x23332(%rip)     # 0x2bd30
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/sissm.c
// Function: sissmDiagnostics
int sissmDiagnostics( void )
{
    int errCode = 0;

    // Check RCON configuration
    //
    if ( (sissmConfig.rconPort < 1024) || (sissmConfig.rconPort > 32767) ) {
        printf("\n** CONFIGURATION ERROR: Invalid Rcon Port is set in .cfg\n");
        printf("Please fix rconPort '%d'.\n", sissmConfig.rconPort );
        errCode = 1;
    }
    if (0 == strlen( sissmConfig.rconPassword) ) {
        printf("\n** CONFIGURATION ERROR: Rcon password is not set in .cfg\n");
        printf("Please fix rconPassword\n");
        errCode = 1;
    }
    if ( 0 == strncmp( "000.000.000.000", reformatIP( sissmConfig.rconIP ), 16 ))  {
        printf("\n** CONFIGURATION ERROR: Invalid server IP set in .cfg\n"); 
        printf("Please fix rconIP '%s'\n", sissmConfig.rconIP );
        errCode = 1;
    }

    // Check critical files
    //
    if ( !isReadable( sissmConfig.gameLogFile ) ) {
        printf("\n** CONFIGURATION ERROR: Game log file not found or unable to read in .cfg\n");
        printf("Please fix gameLogFile: '%s'\n", sissmConfig.gameLogFile );
        errCode = 1;
    }

    if ( errCode ) {
        printf("\nPress ^C now, or SISSM will proceed to run in 15 seconds\n");
        sleep( 15 );
    }

    return errCode;
}

// Assembly:
pushq %rbx
movl $0xffff8000, %eax       # imm = 0xFFFF8000
addl 0x21c56(%rip), %eax     # 0x2a718
xorl %ebx, %ebx
cmpl $0xffff83ff, %eax       # imm = 0xFFFF83FF
ja 0x8aee
leaq 0x1194b(%rip), %rdi     # 0x1a41d
callq 0x8090
movl 0x21c3b(%rip), %esi     # 0x2a718
leaq 0x116fc(%rip), %rdi     # 0x1a1e0
xorl %eax, %eax
callq 0x8180
pushq $0x1
popq %rbx
cmpb $0x0, 0x21c27(%rip)     # 0x2a71c
jne 0x8b12
leaq 0x11959(%rip), %rdi     # 0x1a457
callq 0x8090
leaq 0x11987(%rip), %rdi     # 0x1a491
callq 0x8090
pushq $0x1
popq %rbx
leaq 0x22003(%rip), %rdi     # 0x2ab1c
callq 0xef87
leaq 0x116d6(%rip), %rdi     # 0x1a1fb
pushq $0x10
popq %rdx
movq %rax, %rsi
callq 0x8080
testl %eax, %eax
jne 0x8b58
leaq 0x1196e(%rip), %rdi     # 0x1a4a9
callq 0x8090
leaq 0x116c4(%rip), %rdi     # 0x1a20b
leaq 0x21fce(%rip), %rsi     # 0x2ab1c
xorl %eax, %eax
callq 0x8180
pushq $0x1
popq %rbx
leaq 0x223bd(%rip), %rdi     # 0x2af1c
callq 0xf026
testl %eax, %eax
je 0x8b70
testl %ebx, %ebx
jne 0x8b91
xorl %ebx, %ebx
jmp 0x8ba8
leaq 0x11969(%rip), %rdi     # 0x1a4e0
callq 0x8090
leaq 0x116a0(%rip), %rdi     # 0x1a223
leaq 0x22392(%rip), %rsi     # 0x2af1c
xorl %eax, %eax
callq 0x8180
pushq $0x1
popq %rbx
leaq 0x11990(%rip), %rdi     # 0x1a52b
callq 0x8090
pushq $0xf
popq %rdi
callq 0x83b0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/sissm.c
// Function: sissm_terminal
int sissm_terminal( int argc, char *argv[] )
{
    int paramError = 1;
#ifdef _WIN32
    logPrintfInit( 2, "nul", 1 );
#else
    logPrintfInit( 2, "/dev/null", 1 );
#endif
    if ( argc == 5 ) {
        rdrvTerminal( argv[2], argv[3], argv[4] );
    }
    else if ( paramError ) {
        printf("\n\nSISSM RCON Terminal Tool\n./sissm -t [hostname/IP][port#][rconpassword]");
        printf("\nExample  ./sissm -t 127.0.0.1 27015 myRconPassword\n\n");
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x114ba(%rip), %rsi     # 0x1a3ca
pushq $0x2
popq %rdi
pushq $0x1
popq %rdx
callq 0x191e0
cmpl $0x5, %ebp
jne 0x8f33
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
callq 0x97f5
jmp 0x8f4d
leaq 0x1149a(%rip), %rdi     # 0x1a3d4
xorl %eax, %eax
callq 0x8180
leaq 0x1161d(%rip), %rdi     # 0x1a565
callq 0x8090
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/cfs.c
// Function: cfsCreate
cfsPtr cfsCreate( char *fileName ) 
{
    cfsPtr pCfs = NULL;
    FILE    *fpr;

    if ( NULL != (fpr = fopen( fileName, "rt" )) ) {
        if ( NULL != (pCfs = (cfsPtr) calloc ( 1, sizeof( cfsObj )))) {
            strlcpy( pCfs->cfsFilename, fileName, CFS_FILENAME_MAX );
            pCfs->fpr = fpr;
        }
    }
    return( pCfs );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x11efc(%rip), %rsi     # 0x1ae8b
callq 0x8330
testq %rax, %rax
je 0x8fca
movq %rax, %r15
pushq $0x1
popq %rdi
movl $0x408, %esi            # imm = 0x408
callq 0x8210
testq %rax, %rax
je 0x8fca
movq %rax, %r14
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe97a
movq %r15, 0x400(%r14)
jmp 0x8fcd
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/cfs.c
// Function: cfsDestroy
void cfsDestroy( cfsPtr pCfs )
{
    if ( NULL != pCfs )  {
        if ( NULL != pCfs ) fclose( pCfs->fpr );
        free( pCfs );
    }
    return;
}

// Assembly:
testq %rdi, %rdi
je 0x8ff4
pushq %rbx
movq %rdi, %rbx
movq 0x400(%rdi), %rdi
callq 0x8100
movq %rbx, %rdi
popq %rbx
jmp 0x8040
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/cfs.c
// Function: cfsFetchNum
double cfsFetchNum( cfsPtr pCfs, char *varName, double defaultValue )
{
    double retValue;
    char   defaultValueString[256];
    char   *w;

    snprintf( defaultValueString, 256, "%lf", defaultValue );
    w = cfsFetchStr( pCfs, varName, defaultValueString );

    if ( 1 != sscanf( w, "%lf", &retValue )) retValue = defaultValue;

    return( retValue );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x12ec8(%rip), %r15     # 0x1c0a0
leaq 0x10(%rsp), %r12
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
movq %r15, %rdx
movsd %xmm0, (%rsp)
movb $0x1, %al
callq 0x8190
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x8ff5
leaq 0x22b37(%rip), %rdi     # 0x2bd40
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
xorl %eax, %eax
callq 0x82d0
cmpl $0x1, %eax
je 0x9224
movsd (%rsp), %xmm0
jmp 0x922a
movsd 0x8(%rsp), %xmm0
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/rdrv.c
// Function: rdrvLogFile
void rdrvLogFile( char *buf, int n, char *fileName )
{
    int   i;
    FILE *fpw;

    if (fileName != NULL) {
        if (strlen( fileName ) != 0) {
            if (NULL != (fpw = fopen( fileName, "wb" ))) {
                for ( i = 0; i<n; i++ ) { fprintf( fpw, "%c", buf[i] ); }
                fclose( fpw );
            }
        }
    }
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x928a
cmpb $0x0, (%rdx)
je 0x928a
movl %esi, %ebx
movq %rdi, %r14
leaq 0x11340(%rip), %rsi     # 0x1a59a
movq %rdx, %rdi
callq 0x8330
testq %rax, %rax
je 0x928a
movq %rax, %r15
xorl %r12d, %r12d
testl %ebx, %ebx
cmovlel %r12d, %ebx
cmpq %r12, %rbx
je 0x9296
movsbl (%r14,%r12), %edi
movq %r15, %rsi
callq 0x81e0
incq %r12
jmp 0x9273
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8100
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/rdrv.c
// Function: rdrvReceive
int rdrvReceive( rdrvObj *rPtr, char *bufin )
{
    int n, i;

    for ( i = 0; i<20; i++ ) {
#ifdef _WIN32
        n = recv( rPtr->sockfd, bufin, BUFSIZE_R, 0);
#else
        n = read( rPtr->sockfd, bufin, BUFSIZE_R );
#endif
        if ( n != -1 ) break;
        usleep( RDRV_DELAY_RCVPOLL20 ); 
   }
    if ( n != -1 ) {

#if RDRV_DEBUGPRINT
        printf("Rcvd: ");
        for (i=0; i<n; i++) printf("%02x ", 0xff & bufin[i]);  // printf("%03d %02x\n", i, bufin[i]);
        printf("\n");
#endif

        if ( n < RCVHDRSIZE ) {
            n = -1;
        }
        else {
            n = n - RCVHDRSIZE;
            if ( n != 0 ) {
                for (i = 0; i<n; i++) {
                    bufin[i] = bufin[i+RCVHDRSIZE];
                }
            }
        }
    }
    return( n );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x14
popq %r15
pushq $-0x1
popq %rbp
subl $0x1, %r15d
jb 0x93a8
movl 0x154(%r14), %edi
movl $0x4000, %edx           # imm = 0x4000
movq %rbx, %rsi
callq 0x81f0
cmpl $-0x1, %eax
jne 0x9381
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x8400
jmp 0x9356
cmpl $0xc, %eax
jl 0x93a8
addl $-0xc, %eax
je 0x93a6
movl %eax, %ecx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x93a2
movb 0xc(%rbx,%rdx), %sil
movb %sil, (%rbx,%rdx)
incq %rdx
jmp 0x938f
movl %eax, %ebp
jmp 0x93a8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/rdrv.c
// Function: rdrvInit
rdrvObj *rdrvInit( char *hostName, int portNo, char *rconPassword )
{
#ifdef _WIN32
    WSADATA  wsaData;
#endif
    rdrvObj *rPtr;

    rPtr = (rdrvObj *) calloc( 1, sizeof( rdrvObj ) );
    rPtr->isConnected = 0;
    if (NULL != rPtr) {
        rPtr->sockfd = -1;
        strlcpy(rPtr->rconPassword, rconPassword, RCONPASSMAX);
        rPtr->portNo = portNo;
        strlcpy(rPtr->hostName, hostName, RCONHOSTMAX);
#ifdef _WIN32
        WSAStartup(MAKEWORD(2,2), &wsaData);
#endif
    }
    return( rPtr );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
pushq $0x1
popq %rdi
movl $0x170, %esi            # imm = 0x170
callq 0x8210
movq %rax, %r15
orl $-0x1, 0x154(%rax)
leaq 0x104(%rax), %rdi
pushq $0x50
popq %rdx
movq %rbx, %rsi
callq 0xe97a
movl %ebp, 0x100(%r15)
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
movq %r14, %rsi
callq 0xe97a
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/rdrv.c
// Function: rdrvXmtRcv
int rdrvXmtRcv( rdrvObj *rPtr, int msgType, char *rconCmd, char *rconResp )
{
    int n, errCode = 0, retryCount = 0;

    while ( retryCount++ < 5 ) {
        if ( 0 == (errCode = rdrvSend( rPtr, msgType, rconCmd ))) {
            usleep( RDRV_DELAY_XMT2RCV );
            n = rdrvReceive( rPtr, rconResp );
            if ( n >= 0 ) break;
            if ( n <  0 ) usleep( RDRV_DELAY_RETRANSMIT );
        }
    }
    if ( errCode || ( retryCount >= 5) ) n = -1;
    
    return( n );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %r12d, %r12d
cmpl $0x5, %r12d
je 0x9613
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x92a9
movl $0x2710, %edi           # imm = 0x2710
callq 0x8400
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9342
testl %eax, %eax
jns 0x960d
movl $0x7a120, %edi          # imm = 0x7A120
callq 0x8400
incl %r12d
jmp 0x95d2
cmpl $0x4, %r12d
jb 0x9616
pushq $-0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/rdrv.c
// Function: rdrvCommand
int rdrvCommand( rdrvObj *rPtr, int msgType, char *rconCmd, char *rconResp, int *bytesRead )
{
    int         bytesRead2, errCode;
    static char rconRespCont[BUFSIZE_R];                // for receiving continuation buffer
    static char *rconCmdBlank = "";                               // for sending null string  

    errCode = _rdrvCommand( rPtr, msgType, rconCmd, rconResp, bytesRead );

    while (0 == errCode ) {

        // The above response code postfixes the data with "0x00 0x00" representing end of message
        // BUT this "0x00 0x00" will be missing if data has additional continuation packet(s)
        //
        errCode = _rdrvCommand( rPtr, 0, rconCmdBlank, rconRespCont, &bytesRead2 );
        if ( bytesRead2 <= 2) break;    // if there is no continuation, break out

        logPrintf(LOG_LEVEL_INFO, "rdrv", "Continuation RCON packet %02x %02x %02x containing ::%s::", 
            rconRespCont[0], rconRespCont[1], rconRespCont[2], &rconRespCont[3] );

        // Concatenate the continuation data to the end of master receive buffer
        // First 3 bytes of cont response should be { 0x00 0x00 0x80 } so we skip that
        //
        if (( *bytesRead + bytesRead2 - 3 ) >=  BUFSIZE_R ) break;   // memory bounds safety check
        memcpy( &rconResp[ *bytesRead ], &rconRespCont[ 3 ], bytesRead2 - 3 );
        *bytesRead += (bytesRead2 - 3);          // update totoal size not including 3 byte header
        
    }

    return( errCode );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
callq 0x96e2
movl %eax, %ebp
leaq 0x232ff(%rip), %r13     # 0x2c943
testl %ebp, %ebp
jne 0x96d1
movq %r15, %rdi
xorl %esi, %esi
leaq 0x110b1(%rip), %rdx     # 0x1a709
leaq 0x232e1(%rip), %rcx     # 0x2c940
leaq 0x14(%rsp), %r8
callq 0x96e2
movl %eax, %ebp
movl 0x14(%rsp), %r12d
cmpl $0x3, %r12d
jl 0x96d1
movsbl 0x232c3(%rip), %ecx     # 0x2c940
movsbl 0x232bc(%rip), %r8d     # 0x2c941
movsbl 0x232b5(%rip), %r9d     # 0x2c942
movq %r13, (%rsp)
pushq $0x2
popq %rdi
leaq 0x10f02(%rip), %rsi     # 0x1a59d
leaq 0x10f78(%rip), %rdx     # 0x1a61a
xorl %eax, %eax
callq 0x1920b
movslq (%rbx), %rdi
leal (%rdi,%r12), %eax
cmpl $0x4002, %eax           # imm = 0x4002
jg 0x96d1
addq %r14, %rdi
addl $-0x3, %r12d
movq %r13, %rsi
movq %r12, %rdx
callq 0x8290
addl %r12d, (%rbx)
jmp 0x9644
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/rdrv.c
// Function: rdrvCommand
static int _rdrvCommand( rdrvObj *rPtr, int msgType, char *rconCmd, char *rconResp, int *bytesRead )
{
    int n, exitFlag = 0, retryCount = 0, errCode = 0;

    *bytesRead = 0;

    while ( !exitFlag ) {

        // if no handle (initial or reset condition)
        // try to open the connection.
        //
        if ( rPtr->isConnected == 0 ) {

            // (re-)connect
            //
            rdrvConnect( rPtr );             // ignore the return error
            usleep( RDRV_DELAY_CONN2XMT );
        }

        if ( rPtr->isConnected ) {
            errCode = rdrvSend( rPtr, msgType, rconCmd );
            usleep( RDRV_DELAY_XMT2RCV );
            if ( 0 == errCode ) {
                n = rdrvReceive( rPtr, rconResp );
                if (n > 0)  {
                    *bytesRead = n;
                    exitFlag = 1;
                }
                else {
                    *bytesRead = 0;
                    errCode = 1;
                }
            }
            if ( 0 != errCode ) {
                // disconnect and reconnect
                //
                logPrintf( LOG_LEVEL_CRITICAL, "rdrv", "Warning: RCON comms lost - re-opening with new channel");
                rdrvDisconnect( rPtr );  // ignore this error
                usleep( RDRV_DELAY_RETRY_DISC2CONN );
                rdrvConnect( rPtr );     // ignore this error
                usleep( RDRV_DELAY_RETRY_CONN2XMT );
            }
        }

        ++retryCount;
        if ( retryCount > 3 ) {
            exitFlag = 1;
        }
    }
    if ( retryCount > 3 ) errCode = 2;
    return( errCode );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, (%rsp)
movq %r8, 0x10(%rsp)
andl $0x0, (%r8)
movl %esi, %ebp
movq %rdi, %r12
xorl %r14d, %r14d
pushq $0x1
popq %rbx
xorl %r15d, %r15d
xorl %r13d, %r13d
testl %r14d, %r14d
jne 0x97d8
cmpl $0x0, 0x16c(%r12)
jne 0x9744
movq %r12, %rdi
callq 0x93b5
movl $0x3d090, %edi          # imm = 0x3D090
callq 0x8400
cmpl $0x0, 0x16c(%r12)
je 0x97c1
movq %r12, %rdi
movl %ebp, %esi
movq (%rsp), %rdx
callq 0x92a9
movl $0x2710, %edi           # imm = 0x2710
callq 0x8400
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x9342
xorl %r13d, %r13d
movl %ebx, %r14d
testl %eax, %eax
cmovlel %r13d, %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
jg 0x97c4
xorl %r14d, %r14d
xorl %edi, %edi
leaq 0x10e13(%rip), %rsi     # 0x1a59d
leaq 0x10ec3(%rip), %rdx     # 0x1a654
xorl %eax, %eax
callq 0x1920b
movq %r12, %rdi
callq 0x9591
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x8400
movq %r12, %rdi
callq 0x93b5
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x8400
movl %ebx, %r13d
jmp 0x97c4
xorl %r14d, %r14d
cmpl $0x3, %r15d
leal 0x1(%r15), %eax
cmovael %ebx, %r14d
movl %eax, %r15d
jmp 0x9713
cmpl $0x4, %r15d
pushq $0x2
popq %rax
cmovael %eax, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/picladmin.c
// Function: cmdMacros
int _cmdMacros( char *arg, char *arg2, char *passThru ) 
{
    int i, j = 1, errCode = 1;
    char *w;
    char statusIn[ 1024 ];

    for (i = 0; i<NUM_MACROS; i++) {
        w = getWord( picladminConfig.macros[i], 0, "\007");                // get the macro label
        if ( w != NULL ) {                                       // skip blank entries (possible)
            if ( 0 == strcmp( arg, w ) ) {                         // check if operator cmd match
                while ( NULL != ( w = getWord( picladminConfig.macros[i], j++, "\007" )) ) {
                    errCode = (0 == apiRcon( w, statusIn ));
                    if ( errCode ) break;
                } 
                break;
            }
        }
    }
    _stddResp( errCode );   // ok or error message to game

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %r15
xorl %r13d, %r13d
pushq $0x1
popq %rbx
leaq 0x2afaf(%rip), %rbp     # 0x34940
leaq 0x10d70(%rip), %r12     # 0x1a708
cmpq $0x20000, %r13          # imm = 0x20000
je 0x9a12
leaq 0x4004(,%rbp), %r14
addq %r13, %r14
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0xed9c
testq %rax, %rax
je 0x99cd
movq %r15, %rdi
movq %rax, %rsi
callq 0x8220
testl %eax, %eax
je 0x99d6
addq $0x400, %r13            # imm = 0x400
jmp 0x9998
pushq $0x1
popq %r13
leaq 0x10d27(%rip), %r15     # 0x1a708
movq %rsp, %r12
movl %r13d, %ebp
movl %r13d, %ebx
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xed9c
testq %rax, %rax
je 0x9a12
incl %ebp
movq %rax, %rdi
movq %r12, %rsi
callq 0x12a8a
xorl %ebx, %ebx
testl %eax, %eax
jne 0x99ea
movl %r13d, %ebx
movl %ebx, %edi
callq 0x9a2d
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/picladmin.c
// Function: cmdMacrosList
int _cmdMacrosList( char *arg, char *arg2, char *passThru ) 
{
    int i, errCode = 1;
    char listOut[ 1024 ];

    strlcpy( listOut, "Macros: ", 1024 ); 

    for (i = 0; i<NUM_MACROS; i++) {
        if ( 0 != strlen( picladminConfig.macros[i] )) {    // skip blank entries (possible)
            strlcat( listOut, getWord( picladminConfig.macros[i], 0, "\007" ), 1024 );
            strlcat( listOut, " ", 1024 );
            if ( strlen( listOut ) > 40 ) {
                apiSaySys( listOut );
                strclr( listOut );
            }
            errCode = 0;
        }
    }
    if ( errCode ) {
        apiSaySys( "No Macros defined in config" );
    }
    else {
        if (0 != strlen( listOut )) apiSaySys( listOut );
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movabsq $0x203a736f7263614d, %rax # imm = 0x203A736F7263614D
movq %rsp, %rbx
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
pushq $0x1
popq %rbp
xorl %r12d, %r12d
leaq 0x2aec8(%rip), %r13     # 0x34940
leaq 0x10c89(%rip), %r14     # 0x1a708
leaq 0x116c8(%rip), %r15     # 0x1b14e
cmpq $0x20000, %r12          # imm = 0x20000
je 0x9afc
cmpb $0x0, 0x4004(%r12,%r13)
je 0x9af3
leaq (%r12,%r13), %rdi
addq $0x4004, %rdi           # imm = 0x4004
xorl %ebp, %ebp
xorl %esi, %esi
movq %r14, %rdx
callq 0xed9c
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe918
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe918
movq %rbx, %rdi
callq 0x8120
cmpq $0x29, %rax
jb 0x9af3
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x12753
movq %rbx, %rdi
callq 0xed98
addq $0x400, %r12            # imm = 0x400
jmp 0x9a86
testl %ebp, %ebp
je 0x9b09
leaq 0x10c0c(%rip), %rbx     # 0x1a713
jmp 0x9b0f
cmpb $0x0, (%rsp)
je 0x9b19
movq %rbx, %rdi
xorl %eax, %eax
callq 0x12753
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/picladmin.c
// Function: cmdDeveloper
int _cmdDeveloper( char *arg, char *arg2, char *passThru ) 
{ 
    long int argLong;
    char p2pVarName[255];
    int errCode = 1;

    if ( 0 != strlen( arg )) {
        strlcpy( p2pVarName, "dev.p2p.", 80 );
        strlcat( p2pVarName, arg,        80 );
        errCode = 0;
    } 

    if (1 == sscanf( arg2, "%ld", &argLong )) 
        p2pSetL( p2pVarName, argLong );
    else 
        argLong = 0;

    argLong = p2pGetL( p2pVarName, argLong );
    apiSaySys( "Developer var = '%s' value = '%ld'", p2pVarName, argLong );

    return errCode; 
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %r14
cmpb $0x0, (%rdi)
je 0x9cc7
movq %rdi, %rsi
movabsq $0x2e7032702e766564, %rax # imm = 0x2E7032702E766564
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
pushq $0x50
popq %rdx
callq 0xe918
xorl %ebx, %ebx
jmp 0x9cca
pushq $0x1
popq %rbx
leaq 0x13ec9(%rip), %rsi     # 0x1db9a
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x82d0
cmpl $0x1, %eax
jne 0x9cfb
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x17049
movq 0x8(%rsp), %rsi
jmp 0x9d03
andq $0x0, 0x8(%rsp)
xorl %esi, %esi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x17172
movq %rax, 0x8(%rsp)
leaq 0x10a3b(%rip), %rdi     # 0x1a757
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x12753
movl %ebx, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/picladmin.c
// Function: cmdLock
int _cmdLock( char *arg, char *arg2, char *passThru ) 
{  
    int errCode = 0;

    if (0 == strcmp( "off", arg )) {
        p2pSetL( "pigateway.p2p.lockOut", 0L );
        apiSaySys( "Server public slots are UNLOCKED." );
    }
    else if (0 == strcmp( "on", arg )) {
        p2pSetL( "pigateway.p2p.lockOut", 1L );
        apiSaySys( "Server LOCKED to public until next map." );
    }
    else if (0 == strcmp( "perm", arg )) {
        p2pSetL( "pigateway.p2p.lockOut", 2L );
        apiSaySys( "Server LOCKED to public until unlocked.");
    }
    else if (0 == strcmp( "clan", arg )) {
        p2pSetL( "pigateway.p2p.lockOut", 3L );
        apiSaySys( "Server LOCKED for clan-only until unlocked.");
    }
    else if (0 == strlen( arg )) {
        _sayLockStatus( 0 );
    }
    else {
        apiSaySys( "Missing or incorrect option: off|on|perm|clan" );
    }

    // _stddResp( errCode );   // ok or error message to game
    
    return errCode; 
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10a34(%rip), %rdi     # 0x1a77a
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x9da3
movzbl (%rbx), %ebp
movl %ebp, %eax
subl $0x6f, %eax
jne 0x9d69
movzbl 0x1(%rbx), %eax
subl $0x6e, %eax
jne 0x9d69
movzbl 0x2(%rbx), %eax
negl %eax
testl %eax, %eax
je 0x9dba
leaq 0x10a68(%rip), %rdi     # 0x1a7de
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x9dd2
leaq 0x10ad7(%rip), %rdi     # 0x1a860
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x9dea
testb %bpl, %bpl
je 0x9e10
leaq 0x10a96(%rip), %rdi     # 0x1a837
jmp 0x9e00
leaq 0x109d4(%rip), %rdi     # 0x1a77e
xorl %esi, %esi
callq 0x17049
leaq 0x109dc(%rip), %rdi     # 0x1a794
jmp 0x9e00
leaq 0x109bd(%rip), %rdi     # 0x1a77e
pushq $0x1
popq %rsi
callq 0x17049
leaq 0x109e6(%rip), %rdi     # 0x1a7b6
jmp 0x9e00
leaq 0x109a5(%rip), %rdi     # 0x1a77e
pushq $0x2
popq %rsi
callq 0x17049
leaq 0x109fb(%rip), %rdi     # 0x1a7e3
jmp 0x9e00
leaq 0x1098d(%rip), %rdi     # 0x1a77e
pushq $0x3
popq %rsi
callq 0x17049
leaq 0x10a0b(%rip), %rdi     # 0x1a80b
xorl %eax, %eax
callq 0x12753
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
leaq 0x10967(%rip), %rdi     # 0x1a77e
xorl %esi, %esi
callq 0x17172
cmpb $0x3, %al
je 0x9e4e
movzbl %al, %eax
cmpl $0x2, %eax
je 0x9e3d
cmpl $0x1, %eax
jne 0x9e5f
movb $0x0, 0x4(%rsp)
movl $0x276e6f27, (%rsp)     # imm = 0x276E6F27
jmp 0x9e6d
movl $0x276d72, 0x3(%rsp)    # imm = 0x276D72
movl $0x72657027, (%rsp)     # imm = 0x72657027
jmp 0x9e6d
movl $0x276e61, 0x3(%rsp)    # imm = 0x276E61
movl $0x616c6327, (%rsp)     # imm = 0x616C6327
jmp 0x9e6d
movw $0x27, 0x4(%rsp)
movl $0x66666f27, (%rsp)     # imm = 0x66666F27
leaq 0x118f8(%rip), %rdi     # 0x1b76c
movq %rsp, %rsi
xorl %eax, %eax
callq 0x12753
jmp 0x9e07
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/picladmin.c
// Function: cmdGeneva
int _cmdGeneva( char *arg, char *arg2, char *passThru ) 
{  
    int errCode = 0;

    if (0 == strcmp( "off", arg )) {
        p2pSetL( "piantirush.p2p.genevaKick", 0L );
        apiSaySys( "Geneva Rule Off" );
    }
    else if (0 == strcmp( "on", arg )) {
        p2pSetL( "piantirush.p2p.genevaKick", 1L );
        apiSaySys( "*Geneva Rule is ON - weapons restrictions apply!" );
    }
    else {
        switch ( p2pGetL( "piantirush.p2p.genevaKick", 0L ) ) {
            case 1L:  apiSaySys( "Geneva is ON - weapons restrictions apply" );    break;
            default:  apiSaySys( "Geneva is OFF - no restrictions" );  
        }
    }
    
    return errCode; 
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x108ef(%rip), %rdi     # 0x1a77a
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x9ed8
movzbl (%rbx), %eax
subl $0x6f, %eax
jne 0x9eac
movzbl 0x1(%rbx), %eax
subl $0x6e, %eax
jne 0x9eac
movzbl 0x2(%rbx), %eax
negl %eax
leaq 0x109b0(%rip), %rdi     # 0x1a865
testl %eax, %eax
je 0x9eef
xorl %esi, %esi
callq 0x17172
cmpq $0x1, %rax
leaq 0x109f5(%rip), %rax     # 0x1a8c0
leaq 0x10a18(%rip), %rdi     # 0x1a8ea
cmoveq %rax, %rdi
jmp 0x9efe
leaq 0x10986(%rip), %rdi     # 0x1a865
xorl %esi, %esi
callq 0x17049
leaq 0x10992(%rip), %rdi     # 0x1a87f
jmp 0x9efe
pushq $0x1
popq %rsi
callq 0x17049
leaq 0x10991(%rip), %rdi     # 0x1a88f
xorl %eax, %eax
callq 0x12753
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/schroeder-lvb[P]sissm/src/picladmin.c
// Function: cmdWax
int _cmdWax( char *arg, char *arg2, char *passThru ) 
{  
    int errCode = 0;

    if (0 == strcmp( "off", arg )) {
        p2pSetL( "piantirush.p2p.training", 0L );
        apiSaySys( "Wax Off - starting next objective");
    }
    else if (0 == strcmp( "on", arg )) {
        p2pSetL( "piantirush.p2p.training", 1L );
        apiSaySys( "Wax On - starting next objective");
        p2pSetF("piantirush.p2p.fast", 0.0 );             // turn off FAST mode
    }
    else if (0 == strcmp( "perm", arg )) {
        p2pSetL( "piantirush.p2p.training", 2L );
        apiSaySys( "Wax On/Perm - starting next objective");
        p2pSetF("piantirush.p2p.fast", 0.0 );             // turn off FAST mode
    }
    else {
        switch ( p2pGetL( "piantirush.p2p.training", 0L ) ) {
            case 1L:  apiSaySys( "Wax is ON" );    break;
            case 2L:  apiSaySys( "Wax is PERM" );  break;
            default:  apiSaySys( "Wax is OFF" );  
        }
    }
    
    return errCode; 
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10866(%rip), %rdi     # 0x1a77a
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x9f71
movzbl (%rbx), %eax
subl $0x6f, %eax
jne 0x9f35
movzbl 0x1(%rbx), %eax
subl $0x6e, %eax
jne 0x9f35
movzbl 0x2(%rbx), %eax
negl %eax
testl %eax, %eax
je 0x9f8f
leaq 0x1089c(%rip), %rdi     # 0x1a7de
movq %rbx, %rsi
callq 0x8220
leaq 0x109b9(%rip), %rdi     # 0x1a90a
testl %eax, %eax
je 0x9fa7
xorl %esi, %esi
callq 0x17172
cmpq $0x2, %rax
je 0x9fd0
cmpq $0x1, %rax
jne 0x9fd9
leaq 0x10a30(%rip), %rdi     # 0x1a99f
jmp 0x9f86
leaq 0x10992(%rip), %rdi     # 0x1a90a
xorl %esi, %esi
callq 0x17049
leaq 0x1099c(%rip), %rdi     # 0x1a922
xorl %eax, %eax
callq 0x12753
jmp 0x9fcc
leaq 0x10974(%rip), %rdi     # 0x1a90a
pushq $0x1
popq %rsi
callq 0x17049
leaq 0x1099f(%rip), %rdi     # 0x1a944
jmp 0x9fb6
pushq $0x2
popq %rsi
callq 0x17049
leaq 0x109c3(%rip), %rdi     # 0x1a979
xorl %eax, %eax
callq 0x12753
leaq 0x109a1(%rip), %rdi     # 0x1a965
xorps %xmm0, %xmm0
callq 0x16f38
xorl %eax, %eax
popq %rbx
retq
leaq 0x109d2(%rip), %rdi     # 0x1a9a9
jmp 0x9f86
leaq 0x109d5(%rip), %rdi     # 0x1a9b5
jmp 0x9f86