LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/hex2bin/mot2bin.c
// Function: NoFailOpenOutputFile
void NoFailOpenOutputFile (char *Flnm)
{
    while ((Filout = fopen(Flnm,"wb")) == NULL)
    {
        /* Failure to open the output file may be
        simply due to an insufficiant permission setting. */

        fprintf(stderr,"Output file %s cannot be opened. Enter new file name: ", Flnm);
        fgets(Flnm,MAX_FILE_NAME_SIZE,stdin);
        if (Flnm[0] == '\0') exit(1);
    }
#ifdef USE_FILE_BUFFERS
    FiloutBuf = (char *) NoFailMalloc (BUFFSZ);
    setvbuf(Filout, FiloutBuf, _IOFBF, BUFFSZ);
#endif

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xf7d(%rip), %r14       # 0x22b5
movq 0x2ca1(%rip), %r12      # 0x3fe0
leaq 0xf72(%rip), %r15       # 0x22b8
movq 0x2c8b(%rip), %r13      # 0x3fd8
pushq $0x51
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10b0
movq %rax, 0x2d76(%rip)      # 0x40d8
testq %rax, %rax
jne 0x1393
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1100
movq (%r13), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1120
cmpb $0x0, (%rbx)
jne 0x1350
pushq $0x1
popq %rdi
callq 0x10d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/hex2bin/mot2bin.c
// Function: PutExtension
void PutExtension(char *Flnm, char *Extension)
{
char        *Period;        /* location of period in file name */
boolean     Samename;

    /* This assumes DOS like file names */
    /* Don't use strchr(): consider the following filename:
    	../my.dir/file.hex
    */
    if ((Period = strrchr(Flnm,'.')) != NULL)
        *(Period) = '\0';

    Samename = FALSE;
    if (strcmp(Extension, Period+1)== 0)
        Samename = TRUE;

    strcat(Flnm,".");
    strcat(Flnm, Extension);
    if (Samename)
    {
        fprintf (stderr,"Input and output filenames (%s) are the same.", Flnm);
        exit(1);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x2e
popq %rsi
callq 0x10a0
testq %rax, %rax
je 0x13bc
movb $0x0, (%rax)
incq %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x10f0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x1050
movw $0x2e, (%rbx,%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1130
testl %ebp, %ebp
je 0x13ee
popq %rbx
popq %r14
popq %rbp
retq
movq 0x2beb(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
leaq 0xef0(%rip), %rsi       # 0x22ef
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/src/test_sqrti.c
// Function: main
int
main (int argc VL_UNUSED, char** argv VL_UNUSED)
{
  vl_index i ;
  for (i = 0 ; i < 0xff ; ++i) {
    vl_uint8 x = (vl_uint8)i ;
    vl_uint8 r = vl_fast_sqrt_ui8(x) ;
    vl_uint8 r_ = (vl_uint8) floor(sqrt((double)x)) ;
    if (r != r_) abort() ;
    /* printf("sqrt(%5d) = %5d -- %5d\n", i, r, r_) ; */
  }

  for (i = 0 ; i < 0xffffffff ; ++i) {
    vl_uint16 x = (vl_uint16)i ;
    vl_uint16 r = vl_fast_sqrt_ui16(x) ;
    vl_uint16 r_ = (vl_uint8) floor(sqrt((double)x)) ;
    if (r != r_) abort() ;
    /* printf("sqrt(%5d) = %5d -- %5d\n", i, r, r_) ; */
  }

  return 0 ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
pushq $0x6
popq %rbp
xorl %r14d, %r14d
cmpq $0xff, %r14
je 0x11bd
xorl %r15d, %r15d
movl %r14d, %eax
movl %ebp, %ecx
testl %ecx, %ecx
js 0x119e
addb %r15b, %r15b
movzbl %r15b, %r15d
leal 0x1(,%r15,2), %edx
shll %cl, %edx
movzbl %al, %eax
andl $0xfd, %edx
cmpl %eax, %edx
setbe %sil
cmoval %ebx, %edx
subb %dl, %al
orb %sil, %r15b
addl $-0x2, %ecx
jmp 0x116d
movzbl %r14b, %eax
cvtsi2sd %eax, %xmm0
sqrtsd %xmm0, %xmm0
callq 0x1040
cvttsd2si %xmm0, %eax
incq %r14
cmpb %al, %r15b
je 0x115c
jmp 0x1226
xorl %ebx, %ebx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
pushq $0xe
popq %rbp
xorl %r15d, %r15d
cmpq %r14, %r15
je 0x122b
xorl %r12d, %r12d
movl %r15d, %eax
movl %ebp, %ecx
testl %ecx, %ecx
js 0x1205
leal 0x1(,%r12,4), %edx
shll %cl, %edx
movzwl %ax, %esi
andl $0xfffd, %edx           # imm = 0xFFFD
xorl %edi, %edi
cmpl %esi, %edx
setbe %dil
cmoval %ebx, %edx
subl %edx, %eax
leal (%rdi,%r12,2), %r12d
addl $-0x2, %ecx
jmp 0x11d8
movzwl %r15w, %eax
cvtsi2sd %eax, %xmm0
sqrtsd %xmm0, %xmm0
callq 0x1040
cvttsd2si %xmm0, %eax
movzbl %al, %eax
incq %r15
cmpw %ax, %r12w
je 0x11cb
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-1600-compact64.c
// Function: KeccakP1600_AddBytesInLane
void KeccakP1600_AddBytesInLane(void *argState, unsigned int lanePosition, const unsigned char *data, unsigned int offset, unsigned int length)
{
    unsigned int i;
    #if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
    unsigned char * state = (unsigned char*)argState + lanePosition * sizeof(tKeccakLane) + offset;
    for(i=0; i<length; i++)
        ((unsigned char *)state)[i] ^= data[i];
    #else
    tKeccakLane lane = 0;
    for(i=0; i<length; i++)
        lane |= ((tKeccakLane)data[i]) << ((i+offset)*8);
    ((tKeccakLane*)argState)[lanePosition] ^= lane;
    #endif
}

// Assembly:
movl %esi, %eax
leaq (%rdi,%rax,8), %rsi
movl %ecx, %eax
addq %rsi, %rax
movl %r8d, %ecx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x5821
movb (%rdx,%rsi), %dil
xorb %dil, (%rax,%rsi)
incq %rsi
jmp 0x580f
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-1600-compact64.c
// Function: KeccakP1600_ExtractAndAddBytesInLane
void KeccakP1600_ExtractAndAddBytesInLane(const void *state, unsigned int lanePosition, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length)
{
    tSmallUInt i;
    tKeccakLane lane = ((tKeccakLane*)state)[lanePosition];
    lane >>= offset*8;
    for(i=0; i<length; i++) {
        output[i] = input[i] ^ (lane & 0xFF);
        lane >>= 8;
    }
}

// Assembly:
movl %esi, %eax
shll $0x3, %r8d
shrxq %r8, (%rdi,%rax,8), %rax
movl %r9d, %esi
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x5c5c
movb (%rdx,%rdi), %r8b
xorb %al, %r8b
movb %r8b, (%rcx,%rdi)
shrq $0x8, %rax
incq %rdi
jmp 0x5c43
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-200-compact.c
// Function: KeccakP200_AddBytes
void KeccakP200_AddBytes(void *argState, const unsigned char *data, unsigned int offset, unsigned int length)
{
    tSmallUInt i;
    tKeccakLane * state = (tKeccakLane*)argState + offset;
    for(i=0; i<length; i++)
        state[i] ^= data[i];
}

// Assembly:
movl %edx, %eax
addq %rdi, %rax
movl %ecx, %ecx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x641c
movb (%rsi,%rdx), %dil
xorb %dil, (%rax,%rdx)
incq %rdx
jmp 0x640a
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-200-compact.c
// Function: KeccakP200_ExtractAndAddBytes
void KeccakP200_ExtractAndAddBytes(const void *argState, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length)
{
    unsigned int i;
    tKeccakLane * state = (tKeccakLane*)argState + offset;
    for(i=0; i<length; i++)
        output[i] = input[i] ^ state[i];
}

// Assembly:
movl %ecx, %eax
addq %rdi, %rax
movl %r8d, %ecx
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x65be
movb (%rax,%rdi), %r8b
xorb (%rsi,%rdi), %r8b
movb %r8b, (%rdx,%rdi)
incq %rdi
jmp 0x65a8
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-800-compact.c
// Function: KeccakP800_AddBytes
void KeccakP800_AddBytes(void *argState, const unsigned char *data, unsigned int offset, unsigned int length)
{
    tSmallUInt i;
    unsigned char * state = (unsigned char*)argState + offset;

    for(i=0; i<length; i++)
        ((unsigned char *)state)[i] ^= data[i];
}

// Assembly:
movl %edx, %eax
addq %rdi, %rax
movl %ecx, %ecx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x6bbc
movb (%rsi,%rdx), %dil
xorb %dil, (%rax,%rdx)
incq %rdx
jmp 0x6baa
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-800-compact.c
// Function: KeccakP800_ExtractAndAddBytes
void KeccakP800_ExtractAndAddBytes(const void *argState, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length)
{
    tSmallUInt i;
    const unsigned char * state = (const unsigned char*)argState + offset;

    for(i=0; i<length; i++)
        output[i] = input[i] ^ state[i];
}

// Assembly:
movl %ecx, %eax
addq %rdi, %rax
movl %r8d, %ecx
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x6dc5
movb (%rax,%rdi), %r8b
xorb (%rsi,%rdi), %r8b
movb %r8b, (%rdx,%rdi)
incq %rdi
jmp 0x6daf
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
    unsigned char *c,unsigned long long *clen,
    const unsigned char *m,unsigned long long mlen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *nsec,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    LunarKeyak_Instance instance;

    LunarKeyak_Initialize( &instance, k, 16, npub, 150, 0, 0, 0, 0 );
    LunarKeyak_Wrap( &instance, m, c, (size_t)mlen, ad, (size_t)adlen, c+mlen, 0, 0 );
    *clen = mlen + 16;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x678, %rsp            # imm = 0x678
movq %r9, %r15
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, 0x18(%rsp)
movq %rdi, %rbp
movq 0x6c0(%rsp), %rsi
movq 0x6b8(%rsp), %rcx
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
leaq 0x20(%rsp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
movl $0x96, %r8d
xorl %r9d, %r9d
callq 0x5200
leaq (%rbx,%rbp), %rax
movq %rax, (%rsp)
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movq %r12, %r8
movq %r15, %r9
callq 0x5500
addq $0x10, %rbx
movq 0x18(%rsp), %rax
movq %rbx, (%rax)
xorl %eax, %eax
addq $0x678, %rsp            # imm = 0x678
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
    unsigned char *m,unsigned long long *mlen,
    unsigned char *nsec,
    const unsigned char *c,unsigned long long clen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    LunarKeyak_Instance instance;
    unsigned long long mlen_;

    if (clen < 16)
        return -1;
    LunarKeyak_Initialize( &instance, k, 16, npub, 150, 0, 0, 1, 0 );
    mlen_ = clen - 16;
    *mlen = mlen_;
    if ( LunarKeyak_Wrap( &instance, c, m, (size_t)mlen_, ad, (size_t)adlen, (unsigned char*)c+mlen_, 1, 0 ) == 1 )
        return 0;
    return -1;
}

// Assembly:
cmpq $0x10, %r8
jae 0xd618
pushq $-0x1
popq %rax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x678, %rsp            # imm = 0x678
movq %r9, %rbx
movq %r8, %r13
movq %rcx, %r14
movq %rsi, %rbp
movq %rdi, %r15
movq 0x6c0(%rsp), %rsi
movq 0x6b8(%rsp), %rcx
andl $0x0, 0x10(%rsp)
andq $0x0, (%rsp)
pushq $0x1
popq %r12
movl %r12d, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
pushq $0x10
popq %rdx
movl $0x96, %r8d
xorl %r9d, %r9d
callq 0x5200
leaq -0x10(%r13), %rcx
movq %rcx, (%rbp)
leaq (%r14,%r13), %rax
addq $-0x10, %rax
movl %r12d, 0x8(%rsp)
movq %rax, (%rsp)
andl $0x0, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %r8
movq 0x6b0(%rsp), %r9
callq 0x5500
movl %eax, %ecx
xorl %eax, %eax
cmpl %r12d, %ecx
setne %al
negl %eax
addq $0x678, %rsp            # imm = 0x678
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/tests/valgrind/potential-memleaks.c
// Function: main
int
main(int argc, char * argv[])
{
	int i;

	if (argc == 2) {
		/* Run the relevant function. */
		for (i = 0; i < num_tests; i++) {
			if ((strcmp(argv[1], tests[i].name)) == 0) {
				tests[i].func();
				goto success;
			}
		}

		/* We didn't find the desired function name. */
		goto err0;
	} else {
		/* Print test names. */
		for (i = 0; i < num_tests; i++)
			printf("%s\n", tests[i].name);
	}

success:
	/* Success! */
	exit(0);

err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x2, %edi
jne 0x1241
movq 0x8(%rsi), %rbx
xorl %ecx, %ecx
leaq 0x2b4d(%rip), %r14      # 0x3d60
leaq 0x10(%rcx), %r15
cmpq $0x80, %r15
je 0x125f
movq (%rcx,%r14), %rsi
movq %rbx, %rdi
callq 0x10b0
movq %r15, %rcx
testl %eax, %eax
jne 0x1213
movq -0x8(%r15,%r14), %rax
callq *%rax
xorl %edi, %edi
callq 0x1050
xorl %ebx, %ebx
leaq 0x2b16(%rip), %r14      # 0x3d60
cmpq $0x70, %rbx
je 0x123a
movq (%rbx,%r14), %rdi
callq 0x1040
addq $0x10, %rbx
jmp 0x124a
pushq $0x1
popq %rdi
callq 0x1050
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/tests/valgrind/potential-memleaks.c
// Function: pl_freebsd_pthread_nothing
static void
pl_freebsd_pthread_nothing(void)
{
	pthread_t thr;
	int rc;

	if ((rc = pthread_create(&thr, NULL, pl_workthread_nothing, NULL)))
		fprintf(stderr, "pthread_create: %s", strerror(rc));
	if ((rc = pthread_join(thr, NULL)))
		fprintf(stderr, "pthread_join: %s", strerror(rc));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x17a(%rip), %rdx       # 0x143e
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1080
testl %eax, %eax
jne 0x12ec
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x1030
testl %eax, %eax
jne 0x1313
addq $0x10, %rsp
popq %rbx
retq
movq 0x2cf5(%rip), %rcx      # 0x3fe8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x10a0
leaq 0xdc7(%rip), %rsi       # 0x20cb
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10e0
jmp 0x12d6
movq 0x2cce(%rip), %rcx      # 0x3fe8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x10a0
leaq 0xdb3(%rip), %rsi       # 0x20de
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10e0
jmp 0x12e6
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/tests/valgrind/potential-memleaks.c
// Function: pl_freebsd_pthread_strerror_localtime
static void
pl_freebsd_pthread_strerror_localtime(void)
{
	pthread_t thr;
	int rc;

	if ((rc = pthread_create(&thr, NULL,
	    pl_workthread_strerror_localtime, NULL)))
		fprintf(stderr, "pthread_create: %s", strerror(rc));
	if ((rc = pthread_join(thr, NULL)))
		fprintf(stderr, "pthread_join: %s", strerror(rc));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xfb(%rip), %rdx        # 0x1441
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1080
testl %eax, %eax
jne 0x136e
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x1030
testl %eax, %eax
jne 0x1395
addq $0x10, %rsp
popq %rbx
retq
movq 0x2c73(%rip), %rcx      # 0x3fe8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x10a0
leaq 0xd45(%rip), %rsi       # 0x20cb
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10e0
jmp 0x1358
movq 0x2c4c(%rip), %rcx      # 0x3fe8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x10a0
leaq 0xd31(%rip), %rsi       # 0x20de
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10e0
jmp 0x1368
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/tests/valgrind/potential-memleaks.c
// Function: pl_freebsd_pthread_getaddrinfo
static void
pl_freebsd_pthread_getaddrinfo(void)
{
	pthread_t thr;
	int rc;

	if ((rc = pthread_create(&thr, NULL,
	    pl_workthread_getaddrinfo, NULL)))
		fprintf(stderr, "pthread_create: %s", strerror(rc));
	if ((rc = pthread_join(thr, NULL)))
		fprintf(stderr, "pthread_join: %s", strerror(rc));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xa6(%rip), %rdx        # 0x146e
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1080
testl %eax, %eax
jne 0x13f0
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x1030
testl %eax, %eax
jne 0x1417
addq $0x10, %rsp
popq %rbx
retq
movq 0x2bf1(%rip), %rcx      # 0x3fe8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x10a0
leaq 0xcc3(%rip), %rsi       # 0x20cb
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10e0
jmp 0x13da
movq 0x2bca(%rip), %rcx      # 0x3fe8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x10a0
leaq 0xcaf(%rip), %rsi       # 0x20de
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10e0
jmp 0x13ea
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/tests/valgrind/potential-memleaks.c
// Function: pl_workthread_strerror_localtime
static void *
pl_workthread_strerror_localtime(void * cookie)
{
	char * str = strerror(1);
	time_t now;
	struct tm tm;

	(void)cookie; /* UNUSED */
	(void)str; /* UNUSED */

	time(&now);
	localtime_r(&now, &tm);

	return (NULL);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
pushq $0x1
popq %rdi
callq 0x10a0
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x10f0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x10c0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]spiped/tests/valgrind/potential-memleaks.c
// Function: pl_workthread_getaddrinfo
static void
pl_getaddrinfo(const char * addr)
{
	struct addrinfo hints;
	struct addrinfo * res;
	const char * ports = "80";
	int error;

	/* Create hints structure. */
	memset(&hints, 0, sizeof(hints));
	hints.ai_family = AF_UNSPEC;
	hints.ai_socktype = SOCK_STREAM;
	hints.ai_protocol = IPPROTO_TCP;

	/* Perform DNS lookup. */
	if ((error = getaddrinfo(addr, ports, &hints, &res)) != 0) {
		/* Only print an error if we're online. */
		if (error != EAI_AGAIN) {
			fprintf(stderr, "Error looking up %s: %s", addr,
			    gai_strerror(error));
		}
		return;
	}

	/* Clean up. */
	freeaddrinfo(res);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, 0x20(%rdx)
movabsq $0x600000001, %rax      # imm = 0x600000001
movq %rax, 0x8(%rdx)
leaq 0xc54(%rip), %rdi       # 0x20ef
leaq 0xc57(%rip), %rsi       # 0x20f9
leaq 0x8(%rsp), %rcx
callq 0x1060
cmpl $-0x3, %eax
je 0x14bf
testl %eax, %eax
jne 0x14c7
movq 0x8(%rsp), %rdi
callq 0x1090
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
retq
movq 0x2b1a(%rip), %rcx      # 0x3fe8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x10d0
leaq 0xc1d(%rip), %rsi       # 0x20fc
leaq 0xc09(%rip), %rdx       # 0x20ef
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x10e0
jmp 0x14bf
// File: /workspace/github_c_makefile_star2_O2/unixlab[P]cloudflare-udp-ping/./stddev.h
// Function: stddev_add
static inline void stddev_add(struct stddev *sd, int value)
{
	sd->count++;
	sd->sum += value;
	sd->sum_sq += value * value;
	if (value < sd->min) {
		sd->min = value;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
incq 0x18(%rdi)
movslq %esi, %rax
addq %rax, 0x8(%rdi)
movl %eax, %ecx
imull %ecx, %ecx
addq %rcx, 0x10(%rdi)
cmpl %eax, (%rdi)
jle 0x401b35
movl %esi, (%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/unixlab[P]cloudflare-udp-ping/./stddev.h
// Function: stddev_get
static inline void stddev_get(struct stddev *sd, uint64_t *counter_ptr,
			      double *avg_ptr, double *stddev_ptr)
{
	double avg = 0.0, dev = 0.0;
	double sum = (double)sd->sum, sum_sq = (double)sd->sum_sq,
	       count = (double)sd->count;

	if (avg_ptr) {
		if (sd->count != 0) {
			avg = sum / count;
		}
	}

	if (stddev_ptr) {
		if (sd->count > 2) {
			double variance =
				(sum_sq - (sum * (sum / count))) / count;
			dev = sqrt(fabs(variance));
		}
	}
	if (counter_ptr) {
		*counter_ptr = sd->count;
	}
	if (avg_ptr) {
		*avg_ptr = avg;
	}
	if (stddev_ptr) {
		*stddev_ptr = dev;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cvtsi2sdq 0x8(%rdi), %xmm0
movq 0x18(%rdi), %rax
movq %rax, %xmm1
punpckldq 0xb2138(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xb2140(%rip), %xmm1    # 0x4b4020
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
movapd %xmm0, %xmm4
divsd %xmm2, %xmm4
xorpd %xmm3, %xmm3
xorpd %xmm5, %xmm5
testq %rax, %rax
je 0x401f05
movapd %xmm4, %xmm5
xorpd %xmm1, %xmm1
testq %rdx, %rdx
je 0x401f12
movapd %xmm5, %xmm1
testq %rcx, %rcx
setne %r8b
cmpq $0x3, %rax
setae %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x401f62
movsd 0x10(%rdi), %xmm3
unpcklps 0xb20da(%rip), %xmm3    # xmm3 = xmm3[0],mem[0],xmm3[1],mem[1]
subpd 0xb20e2(%rip), %xmm3    # 0x4b4020
movapd %xmm3, %xmm5
unpckhpd %xmm3, %xmm5            # xmm5 = xmm5[1],xmm3[1]
addsd %xmm3, %xmm5
mulsd %xmm4, %xmm0
subsd %xmm0, %xmm5
divsd %xmm2, %xmm5
andpd 0xb20d2(%rip), %xmm5    # 0x4b4030
sqrtsd %xmm5, %xmm3
testq %rsi, %rsi
je 0x401f6a
movq %rax, (%rsi)
testq %rdx, %rdx
je 0x401f73
movsd %xmm1, (%rdx)
testq %rcx, %rcx
je 0x401f7c
movsd %xmm3, (%rcx)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/unixlab[P]cloudflare-udp-ping/net.c
// Function: str_quote
const char *str_quote(const char *s)
{
	static char buf[1024];
	int r = snprintf(buf, sizeof(buf), "\"%.*s\"", (int)sizeof(buf) - 4, s);
	if (r >= (int)sizeof(buf)) {
		buf[sizeof(buf) - 1] = 0;
	}
	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %r8
leaq 0xe74e2(%rip), %rdi     # 0x4e9470
leaq 0xb22ca(%rip), %rdx     # 0x4b425f
movl $0x400, %esi            # imm = 0x400
movl $0x3fc, %ecx            # imm = 0x3FC
xorl %eax, %eax
callq 0x40d420
cmpl $0x400, %eax            # imm = 0x400
jl 0x401fb4
movb $0x0, 0xe78bb(%rip)     # 0x4e986f
leaq 0xe74b5(%rip), %rax     # 0x4e9470
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/unixlab[P]cloudflare-udp-ping/net.c
// Function: parse_addr
void parse_addr(struct net_addr *netaddr, const char *addr)
{
	char *colon = strrchr(addr, ':');
	if (colon == NULL) {
		FATAL("You forgot to specify port");
	}
	int port = atoi(colon + 1);
	if (port < 0 || port > 65535) {
		FATAL("Invalid port number %d", port);
	}
	char host[255];
	int addr_len = colon - addr > 254 ? 254 : colon - addr;
	strncpy(host, addr, addr_len);
	host[addr_len] = '\0';
	net_gethostbyname(netaddr, host, port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x3a
popq %rsi
movq %r14, %rdi
callq 0x401060
testq %rax, %rax
je 0x402057
movq %rax, %r12
leaq 0x1(%rax), %rdi
callq 0x40b670
movl %eax, %r15d
cmpl $0x10000, %eax          # imm = 0x10000
jae 0x40208f
subq %r14, %r12
movl $0xfe, %eax
cmpq %rax, %r12
cmovgeq %rax, %r12
movslq %r12d, %r12
leaq -0x130(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x401090
movb $0x0, -0x130(%rbp,%r12)
movq %rbx, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x4020d5
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x4e77a8, %rbx         # imm = 0x4E77A8
movq (%rbx), %rcx
leaq 0xb2204(%rip), %rdi     # 0x4b426c
pushq $0x2e
popq %rsi
pushq $0x1
popq %rdx
callq 0x4142f0
movq (%rbx), %rdi
leaq 0xb20e9(%rip), %rsi     # 0x4b4166
leaq 0xb2217(%rip), %rdx     # 0x4b429b
leaq 0xb21db(%rip), %rcx     # 0x4b4266
pushq $0x3d
jmp 0x4020c4
movq $0x4e77a8, %rbx         # imm = 0x4E77A8
movq (%rbx), %rdi
leaq 0xb2206(%rip), %rsi     # 0x4b42a6
movl %r15d, %edx
xorl %eax, %eax
callq 0x40d290
movq (%rbx), %rdi
leaq 0xb20b2(%rip), %rsi     # 0x4b4166
leaq 0xb21e0(%rip), %rdx     # 0x4b429b
leaq 0xb21a4(%rip), %rcx     # 0x4b4266
pushq $0x41
popq %r8
xorl %eax, %eax
callq 0x40d290
pushq $0x1
popq %rdi
callq 0x40c1f0
// File: /workspace/github_c_makefile_star2_O2/unixlab[P]cloudflare-udp-ping/net.c
// Function: net_gethostbyname
void net_gethostbyname(struct net_addr *shost, const char *host, int port)
{
	memset(shost, 0, sizeof(struct net_addr));

	struct in_addr in_addr;
	struct in6_addr in6_addr;

	/* Try ipv4 address first */
	if (inet_pton(AF_INET, host, &in_addr) == 1) {
		goto got_ipv4;
	}

	/* Then ipv6 */
	if (inet_pton(AF_INET6, host, &in6_addr) == 1) {
		goto got_ipv6;
	}

	FATAL("inet_pton(%s)", str_quote(host));
	return;

got_ipv4:
	shost->ipver = 4;
	shost->sockaddr = (struct sockaddr *)&shost->sin4;
	shost->sockaddr_len = sizeof(shost->sin4);
	shost->sin4.sin_family = AF_INET;
	shost->sin4.sin_port = htons(port);
	shost->sin4.sin_addr = in_addr;
	return;

got_ipv6:
	shost->ipver = 6;
	shost->sockaddr = (struct sockaddr *)&shost->sin6;
	shost->sockaddr_len = sizeof(shost->sin4);
	shost->sin6.sin6_family = AF_INET6;
	shost->sin6.sin6_port = htons(port);
	shost->sin6.sin6_addr = in6_addr;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
pushq $0x2
popq %rdi
leaq -0x1c(%rbp), %rdx
callq 0x4606e0
cmpl $0x1, %eax
jne 0x40213b
movl $0x4, (%rbx)
leaq 0x4(%rbx), %rax
movq %rax, 0x30(%rbx)
movl $0x10, 0x38(%rbx)
rolw $0x8, %r14w
movw $0x2, 0x4(%rbx)
movw %r14w, 0x6(%rbx)
movl -0x1c(%rbp), %eax
movl %eax, 0x8(%rbx)
jmp 0x40217c
pushq $0xa
popq %rdi
leaq -0x2c(%rbp), %rdx
movq %r15, %rsi
callq 0x4606e0
cmpl $0x1, %eax
jne 0x402187
movl $0x6, (%rbx)
leaq 0x14(%rbx), %rax
movq %rax, 0x30(%rbx)
movl $0x10, 0x38(%rbx)
rolw $0x8, %r14w
movw $0xa, 0x14(%rbx)
movw %r14w, 0x16(%rbx)
movups -0x2c(%rbp), %xmm0
movups %xmm0, 0x1c(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq $0x4e77a8, %r14         # imm = 0x4E77A8
movq (%r14), %rbx
movq %r15, %rdi
callq 0x401f80
leaq 0xb2131(%rip), %rsi     # 0x4b42d1
leaq 0xe72c9(%rip), %rdx     # 0x4e9470
movq %rbx, %rdi
xorl %eax, %eax
callq 0x40d290
movq (%r14), %rdi
leaq 0xb1fab(%rip), %rsi     # 0x4b4166
leaq 0xb2131(%rip), %rdx     # 0x4b42f3
leaq 0xb209d(%rip), %rcx     # 0x4b4266
pushq $0x5b
popq %r8
xorl %eax, %eax
callq 0x40d290
pushq $0x1
popq %rdi
callq 0x40c1f0
// File: /workspace/github_c_makefile_star2_O2/unixlab[P]cloudflare-udp-ping/net.c
// Function: addr_to_str
const char *addr_to_str(struct net_addr *addr)
{
	char dst[INET6_ADDRSTRLEN + 1];
	int port = 0;

	switch (addr->ipver) {
	case 4: {
		inet_ntop(AF_INET, &addr->sin4.sin_addr, dst, INET6_ADDRSTRLEN);
		port = ntohs(addr->sin4.sin_port);
	} break;
	case 16: {
		inet_ntop(AF_INET6, &addr->sin6.sin6_addr, dst,
			  INET6_ADDRSTRLEN);
		port = ntohs(addr->sin6.sin6_port);
	} break;
	default:
		dst[0] = '?';
		dst[1] = 0x00;
	}

	static char buf[255];
	snprintf(buf, sizeof(buf), "%s:%i", dst, port);
	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x10, %eax
je 0x40220d
cmpl $0x4, %eax
jne 0x40222a
leaq 0x8(%rbx), %rsi
pushq $0x2
popq %rdi
leaq -0x40(%rbp), %rdx
pushq $0x2e
popq %rcx
callq 0x45fba0
movzwl 0x6(%rbx), %eax
jmp 0x402224
leaq 0x1c(%rbx), %rsi
pushq $0xa
popq %rdi
leaq -0x40(%rbp), %rdx
pushq $0x2e
popq %rcx
callq 0x45fba0
movzwl 0x16(%rbx), %eax
rolw $0x8, %ax
jmp 0x402232
movw $0x3f, -0x40(%rbp)
xorl %eax, %eax
movzwl %ax, %r8d
leaq 0xe7633(%rip), %rbx     # 0x4e9870
leaq 0xb20c1(%rip), %rdx     # 0x4b4305
leaq -0x40(%rbp), %rcx
movl $0xff, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x40d420
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/unixlab[P]cloudflare-udp-ping/net.c
// Function: thread_spawn
struct thread *thread_spawn(void (*callback)(void *), void *userdata)
{
	struct thread *thread = calloc(1, sizeof(struct thread));
	thread->callback = callback;
	thread->userdata = userdata;
	int r = pthread_create(&thread->thread_id, NULL, _thread_start, thread);
	if (r != 0) {
		PFATAL("pthread_create()");
	}
	return thread;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x426af0
movq %rax, %rbx
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
leaq 0x7f(%rip), %rdx        # 0x40278a
movq %rax, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x41d590
testl %eax, %eax
jne 0x40272a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq $0x4e77a8, %rbx         # imm = 0x4E77A8
movq (%rbx), %rcx
leaq 0xb1cea(%rip), %rdi     # 0x4b4425
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x4142f0
movq (%rbx), %rdi
leaq 0xb192b(%rip), %rsi     # 0x4b407b
leaq 0xb1cf2(%rip), %rdx     # 0x4b4449
leaq 0xb1b08(%rip), %rcx     # 0x4b4266
movl $0xf8, %r8d
xorl %eax, %eax
callq 0x40d290
leaq 0xb193b(%rip), %rdi     # 0x4b40ad
callq 0x40d640
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x416660
pushq $0x1
popq %rdi
callq 0x40c1f0
// File: /workspace/github_c_makefile_star2_O2/unixlab[P]cloudflare-udp-ping/net.c
// Function: thread_start
static void *_thread_start(void *userdata)
{
	struct thread *thread = userdata;

	/* Direct all signals to main thread. */
	sigset_t set;
	sigfillset(&set);
	int r = pthread_sigmask(SIG_SETMASK, &set, NULL);
	if (r != 0) {
		PFATAL("pthread_sigmask()");
	}

	thread->callback(thread->userdata);
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq -0x90(%rbp), %r14
movq %r14, %rdi
callq 0x40b640
pushq $0x2
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x420b50
testl %eax, %eax
jne 0x4027d0
movq 0x10(%rbx), %rdi
callq *0x8(%rbx)
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq $0x4e77a8, %rbx         # imm = 0x4E77A8
movq (%rbx), %rcx
leaq 0xb1ceb(%rip), %rdi     # 0x4b44cc
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x4142f0
movq (%rbx), %rdi
leaq 0xb1885(%rip), %rsi     # 0x4b407b
leaq 0xb1cf4(%rip), %rdx     # 0x4b44f1
leaq 0xb1a62(%rip), %rcx     # 0x4b4266
movl $0xea, %r8d
xorl %eax, %eax
callq 0x40d290
leaq 0xb1895(%rip), %rdi     # 0x4b40ad
callq 0x40d640
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x416660
pushq $0x1
popq %rdi
callq 0x40c1f0
// File: /workspace/github_c_makefile_star2_O2/unixlab[P]cloudflare-udp-ping/net.c
// Function: optstring_from_long_options
const char *optstring_from_long_options(const struct option *opt)
{
	static char optstring[256] = {0};
	char *osp = optstring;

	for (; opt->name != NULL; opt++) {
		if (opt->flag == 0 && opt->val > 0 && opt->val < 256) {
			*osp++ = opt->val;
			switch (opt->has_arg) {
			case optional_argument:
				*osp++ = ':';
				*osp++ = ':';
				break;
			case required_argument:
				*osp++ = ':';
				break;
			}
		}
	}
	*osp++ = '\0';

	if (osp - optstring >= (int)sizeof(optstring)) {
		abort();
	}

	return optstring;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xe6bb4(%rip), %rdx     # 0x4e9970
pushq $0x2
popq %rax
pushq $0x3
popq %rcx
cmpq $0x0, (%rdi)
je 0x402e18
cmpq $0x0, 0x10(%rdi)
jne 0x402e0c
movl 0x18(%rdi), %r8d
leal -0x1(%r8), %esi
cmpl $0xfe, %esi
ja 0x402e0c
leaq 0x1(%rdx), %rsi
movb %r8b, (%rdx)
movl 0x8(%rdi), %r8d
cmpl $0x1, %r8d
je 0x402e03
cmpl $0x2, %r8d
jne 0x402e0f
leaq 0x2(%rdx), %rsi
movb $0x3a, 0x1(%rdx)
movq %rcx, %r8
jmp 0x402e06
movq %rax, %r8
addq %r8, %rdx
movb $0x3a, (%rsi)
movq %rdx, %rsi
addq $0x20, %rdi
movq %rsi, %rdx
jmp 0x402dc2
movb $0x0, (%rdx)
leaq 0xe6b4e(%rip), %rax     # 0x4e9970
negq %rax
addq %rdx, %rax
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0x402e3c
leaq 0xe6b36(%rip), %rax     # 0x4e9970
popq %rbp
retq
callq 0x401154
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Skin_Menu
void Skin_Menu (edict_t *ent)
{
	int i, j, start;
	char **skinlist;

	if (!SkinListInUse())
	{
		Skin_Old_Menu(ent);
		return;
	}

	// Calculate our page
	start = 15*ent->client->menupage;


	skinlist = SkinGetList(ent);

	// Find if last page was the last
	if (start > 14)
	{
		for (i=start-15;i < start; i++)
		{
			if (!skinlist[i]) // Last entry
			{
				start = 0;			// Go to first page
				ent->client->menupage = 0;
			}
		}
	}

	Menu_Free(ent);
	ent->client->menu = MENU_LOCAL;
	ent->client->menuselect = 0;

	if (ent->client->ctf.teamnum == CTF_TEAM_RED)
	{
		Menu_Set(ent, 0, "LMCTF Red Skins", Main_Menu);
		Menu_Set(ent, 1, "---------------", NULL);
	}
	else
	{
		Menu_Set(ent, 0, "LMCTF Blue Skins", Main_Menu);
		Menu_Set(ent, 1, "----------------", NULL);
	}

	for (i=start, j=2; skinlist[i] && j < 17; i++,j++)
	{
		Menu_Set(ent, j, skinlist[i], SetSkin);
	}

	Menu_Set(ent, 17, "<next page>", Skin_Menu);

	Menu_Draw (ent);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
callq 0x18f00
testl %eax, %eax
je 0x19f69
movq 0x58(%rbx), %rax
movl 0x10c0(%rax), %ebp
imull $0xf, %ebp, %r12d
movq %rbx, %rdi
callq 0x18760
movq %rax, %r14
testl %ebp, %ebp
jle 0x19ea7
leal -0xf(%r12), %eax
cltq
movslq %r12d, %rcx
cmpq %rcx, %rax
jge 0x19ea7
cmpq $0x0, (%r14,%rax,8)
jne 0x19ea2
movq 0x58(%rbx), %rcx
andl $0x0, 0x10c0(%rcx)
xorl %r12d, %r12d
incq %rax
jmp 0x19e85
movq %rbx, %rdi
callq 0x189e0
movq 0x58(%rbx), %rax
andq $0x0, 0xf84(%rax)
cmpl $0x1, 0x1100(%rax)
leaq 0x3447c(%rip), %rax     # 0x4e345
leaq 0x34485(%rip), %rdx     # 0x4e355
cmoveq %rax, %rdx
leaq 0x3430a(%rip), %rax     # 0x4e1e5
leaq 0x34302(%rip), %r15     # 0x4e1e4
cmoveq %rax, %r15
movq 0x4c8b3(%rip), %rcx     # 0x667a0
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x183a0
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x183a0
movslq %r12d, %rax
leaq (%r14,%rax,8), %r15
movq 0x4caf8(%rip), %r14     # 0x66a10
movq (%r15,%r13,8), %rdx
testq %rdx, %rdx
je 0x19f3a
leaq 0x2(%r13), %rsi
cmpl $0x10, %esi
ja 0x19f3a
movq %rbx, %rdi
movq %r14, %rcx
callq 0x183a0
incq %r13
jmp 0x19f18
leaq 0x34425(%rip), %rdx     # 0x4e366
movq 0x4ca90(%rip), %rcx     # 0x669d8
pushq $0x11
popq %rsi
movq %rbx, %rdi
callq 0x183a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19880
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x18a60
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Help_Menu
void Help_Menu (edict_t *ent)
{
	char text[MAX_INFO_STRING];
	int i,j, start;

	// Calculate our page
	start = 15*ent->client->menupage;

	// Find if last page was the last
	if (start > 14)
	{
		for (i=start-15;i < start; i++)
		{
			if (!helptext[i][0]) // Last entry
			{
				start = 0;			// Go to first page
				ent->client->menupage = 0;
			}
		}
	}

	Menu_Free(ent);
	ent->client->menu = MENU_LOCAL;
	ent->client->menuselect = 0;

	Menu_Set(ent, 0, "LMCTF Commands", Main_Menu);
	Menu_Set(ent, 1, "--------------", NULL);
	for (i=2, j=start; i < 17 && helptext[j][0]; i++, j++)
	{
		sprintf(text, "%.24s", helptext[j]);
		Menu_Set(ent, i, text, NULL);
	}
	Menu_Set(ent, 17, "<next page>", Help_Menu);

	Menu_Draw (ent);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
movq 0x58(%rdi), %rax
movl 0x10c0(%rax), %edx
imull $0xf, %edx, %ecx
testl %edx, %edx
jle 0x19fd2
leal -0xf(%rcx), %edx
movslq %edx, %rdx
imulq $0x19, %rdx, %rsi
addq 0x4cd6d(%rip), %rsi     # 0x66d20
movslq %ecx, %r14
cmpq %r14, %rdx
jge 0x19fd5
cmpb $0x0, (%rsi)
jne 0x19fc9
andl $0x0, 0x10c0(%rax)
xorl %ecx, %ecx
incq %rdx
addq $0x19, %rsi
jmp 0x19fb3
movslq %ecx, %r14
movq %rbx, %rdi
callq 0x189e0
movq 0x58(%rbx), %rax
andq $0x0, 0xf84(%rax)
leaq 0x34e44(%rip), %rdx     # 0x4ee34
movq 0x4c7a9(%rip), %rcx     # 0x667a0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x183a0
leaq 0x341de(%rip), %rdx     # 0x4e1e6
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x183a0
imulq $0x19, %r14, %r14
addq 0x4cd00(%rip), %r14     # 0x66d20
pushq $0x2
popq %rbp
leaq 0x346e9(%rip), %r15     # 0x4e713
movq %rsp, %r12
cmpl $0x11, %ebp
je 0x1a05f
cmpb $0x0, (%r14)
je 0x1a05f
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x198c0
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x183a0
incl %ebp
addq $0x19, %r14
jmp 0x1a02d
leaq 0x34300(%rip), %rdx     # 0x4e366
movq 0x4c7a3(%rip), %rcx     # 0x66810
pushq $0x11
popq %rsi
movq %rbx, %rdi
callq 0x183a0
movq %rbx, %rdi
callq 0x19880
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Main_Menu
void Main_Menu (edict_t *ent)
{
	gclient_t	*cl;

	cl = ent->client;

	Menu_Free(ent);
	ent->client->menu = MENU_LOCAL;
	ent->client->menuselect = 1;

	Menu_Set(ent, 0, "LM CTF Option Menu", Help_Menu);
	Menu_Set(ent, 1, "------------------", NULL);
//-bat
//put back in
//#ifdef OLDOBSERVERCODE
	//if (ctf_validateplayer(ent, CTF_TEAM_OBSERVER))
	if(ent->client->ctf.teamnum ==  CTF_TEAM_OBSERVER ||
		ent->client->ctf.teamnum ==  CTF_TEAM_OBSERVER_RED ||
		ent->client->ctf.teamnum ==  CTF_TEAM_OBSERVER_BLUE)
			Menu_Set(ent, 3, "Observer Options", Obs_Main_Menu);
	else
	{
		Menu_Set(ent, 3, "Become Observer", Observe_Exec);
		Menu_Set(ent, 4, "Change Team", Change_Team_Exec);
	}
//#else
//	Menu_Set(ent, 4, "Change Team", Change_Team_Exec);
//#endif
	Menu_Set(ent, 5, "Change Skin", Skin_Menu);
	Menu_Set(ent, 6, "Radio Sounds", Radio_Menu);
	Menu_Set(ent, 7, "Voice Sounds", Voice_Menu);
	if (!((int)ctfflags->value & CTF_VOTEMENU_OFF))
		Menu_Set(ent, 8, "Voting Menu", Vote_Menu);              //Vampire -- voting menu
	if (cl->ctf.extra_flags & CTF_EXTRAFLAGS_REFEREE)
		Menu_Set(ent, 9, "Referee Menu", Ref_Main_Menu);
	Menu_Set(ent, 10, "Help", Help_Menu);

	cl->menuselect = 0;

	Menu_Draw (ent);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %r14
callq 0x189e0
movq 0x58(%rbx), %rax
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0xf84(%rax)
leaq 0x33ed2(%rip), %rdx     # 0x4e010
movq 0x4c6cb(%rip), %rcx     # 0x66810
movq %rbx, %rdi
xorl %esi, %esi
callq 0x183a0
leaq 0x3408c(%rip), %rdx     # 0x4e1e2
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x183a0
movq 0x58(%rbx), %rax
cmpl $-0x3, 0x1100(%rax)
jb 0x1a182
leaq 0x3419f(%rip), %rdx     # 0x4e316
movq 0x4c4a2(%rip), %rcx     # 0x66620
pushq $0x3
jmp 0x1a1ab
leaq 0x33e9a(%rip), %rdx     # 0x4e023
movq 0x4c338(%rip), %rcx     # 0x664c8
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x33e91(%rip), %rdx     # 0x4e033
movq 0x4cb6f(%rip), %rcx     # 0x66d18
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x33e84(%rip), %rdx     # 0x4e03f
movq 0x4c816(%rip), %rcx     # 0x669d8
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x33ece(%rip), %rdx     # 0x4e0a2
movq 0x4cded(%rip), %rcx     # 0x66fc8
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x3413a(%rip), %rdx     # 0x4e327
movq 0x4c9f4(%rip), %rcx     # 0x66be8
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x183a0
movq 0x4c952(%rip), %rax     # 0x66b58
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testw %ax, %ax
js 0x1a22c
leaq 0x3411a(%rip), %rdx     # 0x4e334
movq 0x4ca7f(%rip), %rcx     # 0x66ca0
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x183a0
testb $0x2, 0x1108(%r14)
je 0x1a24f
leaq 0x3417d(%rip), %rdx     # 0x4e3ba
movq 0x4c8ac(%rip), %rcx     # 0x66af0
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x34229(%rip), %rdx     # 0x4e47f
movq 0x4c5b3(%rip), %rcx     # 0x66810
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x183a0
andl $0x0, 0xf88(%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19880
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Menu_Free
void Menu_Free (edict_t *ent)
{
	int i;
	for (i=0; i < 18; i++)
	{
		if (ent->client->localmenu[i].text)
		{
			gi.TagFree(ent->client->localmenu[i].text);
			ent->client->localmenu[i].text = NULL;
			ent->client->localmenu[i].func = NULL;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x4c2b8(%rip), %r15     # 0x66600
cmpq $0x120, %r14            # imm = 0x120
je 0x1a37f
movq 0x58(%rbx), %rax
movq 0xf90(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x1a379
callq *0x110(%r15)
movq 0x58(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xf90(%rax,%r14)
addq $0x10, %r14
jmp 0x1a348
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Menu_Set
void Menu_Set (edict_t *ent, int item, char *text, void	(*func)(edict_t *ent))
{
	if (ent->client->localmenu[item].text)
			gi.TagFree(ent->client->localmenu[item].text);

	// Set the menu text to a TagMalloc'ed string, kind of like strdup
	ent->client->localmenu[item].text = G_CopyString(text);
	ent->client->localmenu[item].func = func;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
movq 0x58(%rdi), %rax
movslq %esi, %r12
shlq $0x4, %r12
movq 0xf90(%rax,%r12), %rdi
testq %rdi, %rdi
je 0x1a3bb
movq 0x4c24b(%rip), %rax     # 0x66600
callq *0x110(%rax)
movq %r15, %rdi
callq 0x18100
movq 0x58(%r14), %rcx
movq %rax, 0xf90(%rcx,%r12)
movq %rbx, 0xf98(%rcx,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Obs_Main_Menu
void Obs_Main_Menu (edict_t *ent)
{
char text[MAX_INFO_STRING];

	Menu_Free(ent);
	ent->client->menu = MENU_LOCAL;
	ent->client->menuselect = 1;


	Menu_Set(ent, 1, "LMCTF Observer Menu", NULL);
	Menu_Set(ent, 2, "-------------------", NULL);
	Menu_Set(ent, 4, "Play CTF", Observe_Exec);

	sprintf(text, "Observe Red");
	Menu_Set(ent, 6, text, Observe_Red);

	sprintf(text, "Observe_Blue");
	Menu_Set(ent, 7, text, Observe_Blue);

	sprintf(text, "Observe_All");
	Menu_Set(ent, 8, text, Observe);

	Menu_Set(ent, 10, "Help", Help_Menu);

	Menu_Draw (ent);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
callq 0x189e0
movq 0x58(%rbx), %rax
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0xf84(%rax)
leaq 0x33f5f(%rip), %rdx     # 0x4e372
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x183a0
leaq 0x33dba(%rip), %rdx     # 0x4e1e1
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x183a0
leaq 0x33f4b(%rip), %rdx     # 0x4e386
movq 0x4c086(%rip), %rcx     # 0x664c8
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x183a0
movabsq $0x206576726573624f, %rax # imm = 0x206576726573624F
movq %rsp, %r14
movq %rax, (%r14)
movl $0x646552, 0x8(%r14)    # imm = 0x646552
movq 0x4c4fc(%rip), %rcx     # 0x66968
pushq $0x6
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x183a0
movabsq $0x65756c425f6576, %rax # imm = 0x65756C425F6576
movq %rax, 0x5(%r14)
movabsq $0x5f6576726573624f, %r15 # imm = 0x5F6576726573624F
movq %r15, (%r14)
movq 0x4caec(%rip), %rcx     # 0x66f88
pushq $0x7
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x183a0
movq %r15, (%r14)
movl $0x6c6c41, 0x8(%r14)    # imm = 0x6C6C41
movq 0x4bfc4(%rip), %rcx     # 0x66480
pushq $0x8
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x183a0
leaq 0x33fae(%rip), %rdx     # 0x4e47f
movq 0x4c338(%rip), %rcx     # 0x66810
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x183a0
movq %rbx, %rdi
callq 0x19880
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Observe_Exec
void Observe_Exec(edict_t *ent)
{
	if(ent->client->ctf.teamnum <= CTF_TEAM_OBSERVER)
		TeamJoin(ent);
	else
		Observe(ent);

	Ctf_Menu(ent);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rax
cmpl $0x0, 0x1100(%rax)
js 0x1a513
movq %rbx, %rdi
callq 0x19c68
jmp 0x1a51b
movq %rbx, %rdi
callq 0x19a60
movq %rbx, %rdi
popq %rbx
jmp 0x199b0
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Voice_Menu
void Voice_Menu (edict_t *ent)
{
	int i;

	Menu_Free(ent);
	ent->client->menu = MENU_LOCAL;
	ent->client->menuselect = 0;

	Menu_Set(ent, 0, "Play_Voice Menu", Main_Menu);
	Menu_Set(ent, 1, "---------------", NULL);
	for (i=2; i < 18; i++)
	{
		if (voicelist[i])
			Menu_Set(ent, i, voicelist[i], Voice_Exec);
	}

	Menu_Draw (ent);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x189e0
movq 0x58(%rbx), %rax
andq $0x0, 0xf84(%rax)
leaq 0x348b0(%rip), %rdx     # 0x4ee24
movq 0x4c225(%rip), %rcx     # 0x667a0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x183a0
leaq 0x33c59(%rip), %rdx     # 0x4e1e5
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x183a0
pushq $0x2
popq %r14
movq 0x4ca14(%rip), %r12     # 0x66fb8
movq 0x4c6c5(%rip), %r15     # 0x66c70
cmpq $0x12, %r14
je 0x1a5cd
movq (%r12,%r14,8), %rdx
testq %rdx, %rdx
je 0x1a5c8
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rcx
callq 0x183a0
incq %r14
jmp 0x1a5ab
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x19880
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: SetSkin
void SetSkin (edict_t *ent)
{
	int i;
	char **skinlist;

	i = (ent->client->menuselect - 2)+ent->client->menulastpage*15;

	skinlist = SkinGetList(ent);

	ClientSetSkin(ent, skinlist[i]);
	ent->client->currmenu = Skin_Menu;
	ent->client->menupage = 0;
	Skin_Menu(ent);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rax
movslq 0xf88(%rax), %rcx
movslq 0x10c4(%rax), %rax
imulq $0xf, %rax, %r14
addq %rcx, %r14
callq 0x18760
movq -0x10(%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x198b0
movq 0x58(%rbx), %rax
movq 0x4c01c(%rip), %rcx     # 0x669d8
movq %rcx, 0x10b0(%rax)
andl $0x0, 0x10c0(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19cf8
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Ref_Map_Menu
void Ref_Map_Menu (edict_t *ent)
{
	Menu_Free(ent);
	ent->client->menu = MENU_LOCAL;
	ent->client->menuselect = 0;

	//gi.dprintf("Ref_Map_Menu\n");
	Menu_Set(ent, 0, "Map Menu", Ref_Main_Menu);
	Menu_Set(ent, 1, "--------", NULL);
	Menu_Set(ent, 2, "LMCTF Set 1", Ref_Map_A_Menu);
	Menu_Set(ent, 3, "LMCTF Set 2", Ref_Map_B_Menu);
	Menu_Set(ent, 4, "LMCTF Set 3", Ref_Map_C_Menu);
	Menu_Set(ent, 5, "LMCTF Set 4", Ref_Map_D_Menu);
	Menu_Set(ent, 6, "LMCTF Set 5", Ref_Map_E_Menu);
	if (maplistindex != -2) // No list
		Menu_Set(ent, 7, "Maplist", Ref_Map_Maplist_Menu);

	Menu_Draw (ent);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x189e0
movq 0x58(%rbx), %rax
andq $0x0, 0xf84(%rax)
leaq 0x34318(%rip), %rdx     # 0x4edb6
movq 0x4c04b(%rip), %rcx     # 0x66af0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x183a0
leaq 0x33736(%rip), %rdx     # 0x4e1ec
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x183a0
leaq 0x342a8(%rip), %rdx     # 0x4ed72
movq 0x4bc8f(%rip), %rcx     # 0x66760
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x3429b(%rip), %rdx     # 0x4ed7e
movq 0x4c086(%rip), %rcx     # 0x66b70
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x3428e(%rip), %rdx     # 0x4ed8a
movq 0x4bf15(%rip), %rcx     # 0x66a18
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x34281(%rip), %rdx     # 0x4ed96
movq 0x4b8a4(%rip), %rcx     # 0x663c0
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x34274(%rip), %rdx     # 0x4eda2
movq 0x4bc0b(%rip), %rcx     # 0x66740
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x183a0
movq 0x4c291(%rip), %rax     # 0x66dd8
cmpl $-0x2, (%rax)
je 0x1ab65
leaq 0x3425b(%rip), %rdx     # 0x4edae
movq 0x4bfb6(%rip), %rcx     # 0x66b10
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x183a0
movq %rbx, %rdi
popq %rbx
jmp 0x19880