LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/tests/pthread_create_blocking_np/timing.c
// Function: workfunc
static void *
workfunc(void * cookie)
{
	struct info * info = cookie;

	/* For checking the order. */
	if (monoclock_get(&info->thr_start))
		warnp("monoclock_get");

	/* Wait if the test calls for it. */
	if (info->options & WAIT_THREAD_AFTER_START)
		millisleep(WAIT_MS);

	/* For checking the order. */
	if (monoclock_get(&info->thr_stop))
		warnp("monoclock_get");

	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0x1e90
cmpl $0x0, %eax
je 0x1dcf
jmp 0x1d98
callq 0x1060
cmpl $0x0, (%rax)
je 0x1dbd
leaq 0x12d7(%rip), %rdi      # 0x3080
movb $0x0, %al
callq 0x2270
callq 0x1060
movl $0x0, (%rax)
jmp 0x1dcb
leaq 0x12bc(%rip), %rdi      # 0x3080
movb $0x0, %al
callq 0x24c0
jmp 0x1dcd
jmp 0x1dcf
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1de7
movl $0xa, %edi
callq 0x1e40
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x1e90
cmpl $0x0, %eax
je 0x1e32
jmp 0x1dfb
callq 0x1060
cmpl $0x0, (%rax)
je 0x1e20
leaq 0x1274(%rip), %rdi      # 0x3080
movb $0x0, %al
callq 0x2270
callq 0x1060
movl $0x0, (%rax)
jmp 0x1e2e
leaq 0x1259(%rip), %rdi      # 0x3080
movb $0x0, %al
callq 0x24c0
jmp 0x1e30
jmp 0x1e32
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/../cram/../htslib/sam.h
// Function: sam_itr_next
static inline int sam_itr_next(htsFile *htsfp, hts_itr_t *itr, bam1_t *r) {
    if (!htsfp->is_bgzf && !htsfp->is_cram) {
        hts_log_error("%s not BGZF compressed", htsfp->fn ? htsfp->fn : "File");
        return -2;
    }
    if (!itr) {
        hts_log_error("Null iterator");
        return -2;
    }

    if (itr->multi)
        return hts_itr_multi_next(htsfp, itr, r);
    else
        return hts_itr_next(htsfp->is_bgzf ? htsfp->fp.bgzf : NULL, itr, r, htsfp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x6136
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x3, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x6136
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x60ff
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x610c
leaq 0xfe7ba(%rip), %rax     # 0x1048c0
movq %rax, -0x28(%rbp)
jmp 0x610c
movq -0x28(%rbp), %rcx
movl $0x1, %edi
leaq 0xfe780(%rip), %rsi     # 0x10489c
leaq 0xfe786(%rip), %rdx     # 0x1048a9
movb $0x0, %al
callq 0xacc0
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x61c6
cmpq $0x0, -0x18(%rbp)
jne 0x6160
movl $0x1, %edi
leaq 0xfe753(%rip), %rsi     # 0x10489c
leaq 0xfe775(%rip), %rdx     # 0x1048c5
movb $0x0, %al
callq 0xacc0
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x61c6
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6187
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x143d0
movl %eax, -0x4(%rbp)
jmp 0x61c6
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x61a6
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x61ae
xorl %eax, %eax
movq %rax, -0x30(%rbp)
jmp 0x61ae
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x13fe0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/vmtest.c
// Function: main
int
main(void)
{
	printf("Starting VM tests.\n");
	test1();
	test2();
	printf("VM tests complete.\n");

	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
leaq 0x781(%rip), %rdi       # 0x20a7
movb $0x0, %al
callq 0x1060
callq 0x1950
callq 0x1a20
leaq 0x77d(%rip), %rdi       # 0x20bb
movb $0x0, %al
callq 0x1060
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/vmtest.c
// Function: test1
static void
test1(void)
{
	int		vm_status;
	/*
	 * (5 + (2 * 2))
	 * program:
	 * 05 05 00	; IMM 0x0005
	 * 05 02 00	; IMM 0x0002
	 * 05 02 00	; IMM 0x0002
	 * 03		; MUL
	 * 01		; ADD
	 * 06		; DO (ADD 0x0002 0x0002)
	 * 06		; DO (MUL 0x0004 0x0005)
	 */
	uint8_t		prog[] = "\x05\x05\x00\x03\x05\x02\x00\x01\x05"
				 "\x02\x00\x06\x06";
	uint16_t	prog_len = sizeof(prog)+1;
	machine		vm;

	vm = vm_new();
	if (NULL == vm)
		errx(EX_OSERR, "FAILED: memory allocation error.\n");

	vm_status = vm_run(vm, prog, prog_len);
	if (VM_ERR == vm_status) {
		errx(EX_SOFTWARE, "FAILED: VM stopped with error.\n");
	}

	if (vm_peek(vm) != 20)
		fprintf(stderr, "prog2.bin: FAILED\n");
	else
		printf("prog1.bin: OK\n");

	vm_destroy(vm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x7f1(%rip), %rax       # 0x2150
movq %rax, -0x12(%rbp)
movl 0x7ef(%rip), %eax       # 0x2158
movl %eax, -0xa(%rbp)
movw 0x7e9(%rip), %ax        # 0x215c
movw %ax, -0x6(%rbp)
movw $0xf, -0x14(%rbp)
callq 0x1490
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
jne 0x19a1
movl $0x47, %edi
leaq 0x735(%rip), %rsi       # 0x20cf
movb $0x0, %al
callq 0x1050
movq -0x20(%rbp), %rdi
leaq -0x12(%rbp), %rsi
movzwl -0x14(%rbp), %edx
callq 0x1850
movl %eax, -0x4(%rbp)
xorl %eax, %eax
cmpl -0x4(%rbp), %eax
jne 0x19cf
movl $0x46, %edi
leaq 0x729(%rip), %rsi       # 0x20f1
movb $0x0, %al
callq 0x1050
movq -0x20(%rbp), %rdi
callq 0x1890
movzwl %ax, %eax
cmpl $0x14, %eax
je 0x19fa
movq 0x2611(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x720(%rip), %rsi       # 0x2111
movb $0x0, %al
callq 0x1070
jmp 0x1a08
leaq 0x723(%rip), %rdi       # 0x2124
movb $0x0, %al
callq 0x1060
movq -0x20(%rbp), %rdi
callq 0x1530
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/vmtest.c
// Function: test2
static void
test2(void)
{
	int		vm_status;
	/*
	 * program:
	 * (2 + (3 * (4 / 2))) ; = 8
	 *
	 * 05 02 00	; IMM 0x0002
	 * 01		; ADD
	 * 05 03 00	; IMM 0x0003
	 * 03		; MUL
	 * 05 04 00	; IMM 0x0004
	 * 04		; DIV
	 * 05 02 00	; IMM 0x0002
	 * 06		; DO (DIV 0x0004 0x0002)
	 * 06		; DO (MUL 0x0003 0x0002)
	 * 06		; DO (MUL 0x0002 0x0006)
	 */
	uint8_t		prog[] = "\x05\x02\x00\x01\x05\x03\x00\x03"
				 "\x05\x04\x00\x04\x05\x02\x00\x06"
				 "\x06\x06";
	uint16_t	prog_len = sizeof(prog);
	machine		vm;

	vm = vm_new();
	if (NULL == vm)
		errx(EX_OSERR, "FAILED: memory allocation error.\n");

	vm_status = vm_run(vm, prog, prog_len);
	if (VM_ERR == vm_status) {
		errx(EX_SOFTWARE, "FAILED: VM stopped with error.\n");
	}

	if (vm_peek(vm) != 8)
		fprintf(stderr, "prog2.bin: FAILED\n");
	else
		printf("prog2.bin: OK\n");

	vm_destroy(vm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x731(%rip), %rax       # 0x2160
movq %rax, -0x20(%rbp)
movq 0x72e(%rip), %rax       # 0x2168
movq %rax, -0x18(%rbp)
movw 0x72b(%rip), %ax        # 0x2170
movw %ax, -0x10(%rbp)
movb 0x723(%rip), %al        # 0x2172
movb %al, -0xe(%rbp)
movw $0x13, -0x22(%rbp)
callq 0x1490
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rax
jne 0x1a7c
movl $0x47, %edi
leaq 0x65a(%rip), %rsi       # 0x20cf
movb $0x0, %al
callq 0x1050
movq -0x30(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movzwl -0x22(%rbp), %edx
callq 0x1850
movl %eax, -0x4(%rbp)
xorl %eax, %eax
cmpl -0x4(%rbp), %eax
jne 0x1aaa
movl $0x46, %edi
leaq 0x64e(%rip), %rsi       # 0x20f1
movb $0x0, %al
callq 0x1050
movq -0x30(%rbp), %rdi
callq 0x1890
movzwl %ax, %eax
cmpl $0x8, %eax
je 0x1ad5
movq 0x2536(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x645(%rip), %rsi       # 0x2111
movb $0x0, %al
callq 0x1070
jmp 0x1ae3
leaq 0x657(%rip), %rdi       # 0x2133
movb $0x0, %al
callq 0x1060
movq -0x30(%rbp), %rdi
callq 0x1530
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]gpss/datcnf.c
// Function: main
int main(int argc, char *argv[])
{
	int id = atoi(argv[1]);
	if (id == 0)
		test2();
	if (id == 1)
		test3();
	if (id == 2)
		test4();
	if (id == 3)
		test5();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1040
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x1181
callq 0x11b0
cmpl $0x1, -0x14(%rbp)
jne 0x118c
callq 0x1250
cmpl $0x2, -0x14(%rbp)
jne 0x1197
callq 0x12e0
cmpl $0x3, -0x14(%rbp)
jne 0x11a2
callq 0x1360
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]gpss/datcnf.c
// Function: test2
static void test2(void)
{
	printf("9 9\n");
	printf("3 0 1 2\n");
	printf("3 3 4 5\n");
	printf("3 6 7 8\n");
	printf("3 0 3 7\n");
	printf("3 0 4 8\n");
	printf("3 1 3 6\n");
	printf("3 1 5 8\n");
	printf("3 2 4 6\n");
	printf("3 2 5 7\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xe49(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1030
leaq 0xe40(%rip), %rdi       # 0x2009
movb $0x0, %al
callq 0x1030
leaq 0xe3b(%rip), %rdi       # 0x2012
movb $0x0, %al
callq 0x1030
leaq 0xe36(%rip), %rdi       # 0x201b
movb $0x0, %al
callq 0x1030
leaq 0xe31(%rip), %rdi       # 0x2024
movb $0x0, %al
callq 0x1030
leaq 0xe2c(%rip), %rdi       # 0x202d
movb $0x0, %al
callq 0x1030
leaq 0xe27(%rip), %rdi       # 0x2036
movb $0x0, %al
callq 0x1030
leaq 0xe22(%rip), %rdi       # 0x203f
movb $0x0, %al
callq 0x1030
leaq 0xe1d(%rip), %rdi       # 0x2048
movb $0x0, %al
callq 0x1030
leaq 0xe18(%rip), %rdi       # 0x2051
movb $0x0, %al
callq 0x1030
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]gpss/datcnf.c
// Function: test3
static void test3(void)
{
	printf("9 8\n");
	printf("3 0 1 2\n");
	printf("3 3 4 5\n");
	printf("3 6 7 8\n");
	printf("3 0 3 7\n");
	printf("3 0 4 8\n");
	printf("3 1 3 6\n");
	printf("3 2 4 6\n");
	printf("3 2 5 7\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xdff(%rip), %rdi       # 0x205a
movb $0x0, %al
callq 0x1030
leaq 0xda0(%rip), %rdi       # 0x2009
movb $0x0, %al
callq 0x1030
leaq 0xd9b(%rip), %rdi       # 0x2012
movb $0x0, %al
callq 0x1030
leaq 0xd96(%rip), %rdi       # 0x201b
movb $0x0, %al
callq 0x1030
leaq 0xd91(%rip), %rdi       # 0x2024
movb $0x0, %al
callq 0x1030
leaq 0xd8c(%rip), %rdi       # 0x202d
movb $0x0, %al
callq 0x1030
leaq 0xd87(%rip), %rdi       # 0x2036
movb $0x0, %al
callq 0x1030
leaq 0xd8b(%rip), %rdi       # 0x2048
movb $0x0, %al
callq 0x1030
leaq 0xd86(%rip), %rdi       # 0x2051
movb $0x0, %al
callq 0x1030
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]gpss/datcnf.c
// Function: test4
static void test4(void)
{
	printf("7 7\n");
	printf("3 0 1 2\n");
	printf("3 1 3 5\n");
	printf("3 0 3 4\n");
	printf("3 0 5 6\n");
	printf("3 1 4 6\n");
	printf("3 2 3 6\n");
	printf("3 2 4 5\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xd74(%rip), %rdi       # 0x205f
movb $0x0, %al
callq 0x1030
leaq 0xd10(%rip), %rdi       # 0x2009
movb $0x0, %al
callq 0x1030
leaq 0xd5d(%rip), %rdi       # 0x2064
movb $0x0, %al
callq 0x1030
leaq 0xd58(%rip), %rdi       # 0x206d
movb $0x0, %al
callq 0x1030
leaq 0xd53(%rip), %rdi       # 0x2076
movb $0x0, %al
callq 0x1030
leaq 0xd4e(%rip), %rdi       # 0x207f
movb $0x0, %al
callq 0x1030
leaq 0xd49(%rip), %rdi       # 0x2088
movb $0x0, %al
callq 0x1030
leaq 0xd44(%rip), %rdi       # 0x2091
movb $0x0, %al
callq 0x1030
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]gpss/datcnf.c
// Function: test5
static void test5(void)
{
	int n = 1000 & ~1;
	int l = 3;
	int i, j;
	printf("%d %d\n", n, n / 2);
	for (i = 0; i < n; i += 2) {
		printf("%d", l);
		for (j = 0; j < l; j++)
			printf(" %d", (i + j) % n);
		printf("\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x3e8, -0x4(%rbp)      # imm = 0x3E8
movl $0x3, -0x8(%rbp)
movl -0x4(%rbp), %esi
movl -0x4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edx
leaq 0xd0d(%rip), %rdi       # 0x209a
movb $0x0, %al
callq 0x1030
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1401
movl -0x8(%rbp), %esi
leaq 0xcf5(%rip), %rdi       # 0x20a2
movb $0x0, %al
callq 0x1030
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x13e8
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
cltd
idivl -0x4(%rbp)
movl %edx, %esi
leaq 0xccb(%rip), %rdi       # 0x20a1
movb $0x0, %al
callq 0x1030
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x13bb
leaq 0xc21(%rip), %rdi       # 0x2010
movb $0x0, %al
callq 0x1030
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc(%rbp)
jmp 0x139b
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/dxwc[P]sfeed/sfeed_opml_import.c
// Function: main
int
main(void)
{
	if (pledge("stdio", NULL) == -1)
		err(1, "pledge");

	parser.xmlattr = xml_handler_attr;
	parser.xmlattrentity = xml_handler_attrentity;
	parser.xmltagend = xml_handler_end_element;

	fputs(
	    "#sfeedpath=\"$HOME/.sfeed/feeds\"\n"
	    "\n"
	    "# list of feeds to fetch:\n"
	    "feeds() {\n"
	    "	# feed <name> <feedurl> [basesiteurl] [encoding]\n", stdout);
	/* NOTE: getnext is defined in xml.h for inline optimization */
	xml_parse(&parser);
	fputs("}\n", stdout);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
leaq 0x6a(%rip), %rax        # 0x1250
movq %rax, 0x3ea3(%rip)      # 0x5090
leaq 0x12c(%rip), %rax       # 0x1320
movq %rax, 0x3ead(%rip)      # 0x50a8
leaq 0x1be(%rip), %rax       # 0x13c0
movq %rax, 0x3ef7(%rip)      # 0x5100
movq 0x3dd0(%rip), %rax      # 0x4fe0
movq (%rax), %rsi
leaq 0x1dea(%rip), %rdi      # 0x3004
callq 0x1080
leaq 0x3e6a(%rip), %rdi      # 0x5090
callq 0x1760
movq 0x3dae(%rip), %rax      # 0x4fe0
movq (%rax), %rsi
leaq 0x1e40(%rip), %rdi      # 0x307c
callq 0x1080
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dxwc[P]sfeed/sfeed_opml_import.c
// Function: xml_handler_attr
static void
xml_handler_attr(XMLParser *p, const char *tag, size_t taglen,
	const char *name, size_t namelen, const char *value, size_t valuelen)
{
	if (strcasecmp(tag, "outline"))
		return;

	if (!strcasecmp(name, "title"))
		strlcat(title, value, sizeof(title));
	else if (!strcasecmp(name, "text"))
		strlcat(text, value, sizeof(text));
	else if (!strcasecmp(name, "xmlurl"))
		strlcat(url, value, sizeof(url));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1e00(%rip), %rsi      # 0x307f
callq 0x1040
cmpl $0x0, %eax
je 0x128e
jmp 0x1314
movq -0x20(%rbp), %rdi
leaq 0x1dee(%rip), %rsi      # 0x3087
callq 0x1040
cmpl $0x0, %eax
jne 0x12ba
movq -0x30(%rbp), %rsi
leaq 0x6682(%rip), %rdi      # 0x7930
movl $0x100, %edx            # imm = 0x100
callq 0x2980
jmp 0x1314
movq -0x20(%rbp), %rdi
leaq 0x1dc8(%rip), %rsi      # 0x308d
callq 0x1040
cmpl $0x0, %eax
jne 0x12e6
movq -0x30(%rbp), %rsi
leaq 0x6756(%rip), %rdi      # 0x7a30
movl $0x100, %edx            # imm = 0x100
callq 0x2980
jmp 0x1312
movq -0x20(%rbp), %rdi
leaq 0x1da1(%rip), %rsi      # 0x3092
callq 0x1040
cmpl $0x0, %eax
jne 0x1310
movq -0x30(%rbp), %rsi
leaq 0x682a(%rip), %rdi      # 0x7b30
movl $0x800, %edx            # imm = 0x800
callq 0x2980
jmp 0x1312
jmp 0x1314
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dxwc[P]sfeed/sfeed_opml_import.c
// Function: xml_handler_attrentity
static void
xml_handler_attrentity(XMLParser *p, const char *tag, size_t taglen,
	const char *name, size_t namelen, const char *value, size_t valuelen)
{
	char buf[16];
	ssize_t len;

	if ((len = xml_entitytostr(value, buf, sizeof(buf))) < 0)
		return;
	if (len > 0)
		xml_handler_attr(p, tag, taglen, name, namelen, buf, len);
	else
		xml_handler_attr(p, tag, taglen, name, namelen, value, valuelen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x10, %edx
callq 0x1560
cltq
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
jge 0x1364
jmp 0x13b7
cmpq $0x0, -0x48(%rbp)
jle 0x1392
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq -0x40(%rbp), %r9
movq -0x48(%rbp), %rax
movq %rax, (%rsp)
callq 0x1250
jmp 0x13b7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x1250
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dxwc[P]sfeed/sfeed_opml_import.c
// Function: xml_handler_end_element
static void
xml_handler_end_element(XMLParser *p, const char *tag, size_t taglen,
	int isshort)
{
	if (strcasecmp(tag, "outline"))
		return;

	if (url[0]) {
		fputs("\tfeed '", stdout);
		if (title[0])
			printsafe(title);
		else if (text[0])
			printsafe(text);
		else
			fputs("unnamed", stdout);
		fputs("' '", stdout);
		printsafe(url);
		fputs("'\n", stdout);
	}
	url[0] = text[0] = title[0] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1c9d(%rip), %rsi      # 0x307f
callq 0x1040
cmpl $0x0, %eax
je 0x13f1
jmp 0x14a7
cmpb $0x0, 0x6738(%rip)      # 0x7b30
je 0x1492
movq 0x3bdb(%rip), %rax      # 0x4fe0
movq (%rax), %rsi
leaq 0x1c8a(%rip), %rdi      # 0x3099
callq 0x1080
cmpb $0x0, 0x6515(%rip)      # 0x7930
je 0x142b
leaq 0x650c(%rip), %rdi      # 0x7930
callq 0x14b0
jmp 0x145a
cmpb $0x0, 0x65fe(%rip)      # 0x7a30
je 0x1442
leaq 0x65f5(%rip), %rdi      # 0x7a30
callq 0x14b0
jmp 0x1458
movq 0x3b97(%rip), %rax      # 0x4fe0
movq (%rax), %rsi
leaq 0x1c4e(%rip), %rdi      # 0x30a1
callq 0x1080
jmp 0x145a
movq 0x3b7f(%rip), %rax      # 0x4fe0
movq (%rax), %rsi
leaq 0x1c3e(%rip), %rdi      # 0x30a9
callq 0x1080
leaq 0x66b9(%rip), %rdi      # 0x7b30
callq 0x14b0
movq 0x3b5d(%rip), %rax      # 0x4fe0
movq (%rax), %rsi
leaq 0x1c20(%rip), %rdi      # 0x30ad
callq 0x1080
movb $0x0, 0x6497(%rip)      # 0x7930
movb $0x0, 0x6590(%rip)      # 0x7a30
movb $0x0, 0x6689(%rip)      # 0x7b30
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dxwc[P]sfeed/sfeed_opml_import.c
// Function: printsafe
static void
printsafe(const char *s)
{
	for (; *s; s++) {
		if (iscntrl((unsigned char)*s))
			continue;
		else if (*s == '\\')
			fputs("\\\\", stdout);
		else if (*s == '\'')
			fputs("'\\''", stdout);
		else
			putchar(*s);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1554
callq 0x10c0
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x14e9
jmp 0x1543
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x150d
movq 0x3ae4(%rip), %rax      # 0x4fe0
movq (%rax), %rsi
leaq 0x1baa(%rip), %rdi      # 0x30b0
callq 0x1080
jmp 0x153f
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x1531
movq 0x3ac0(%rip), %rax      # 0x4fe0
movq (%rax), %rsi
leaq 0x1b89(%rip), %rdi      # 0x30b3
callq 0x1080
jmp 0x153d
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x1030
jmp 0x153f
jmp 0x1541
jmp 0x1543
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x14bc
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ramirezsebas[P]TP-LISTINGS/./src/capitulo_5/5.11/socket-client.c
// Function: main
int main (int argc, char* const argv[])
{
  const char* const socket_name = argv[1];
  const char* const message = argv[2];
  int socket_fd;
  struct sockaddr_un name;

  /* Create the socket. */
  socket_fd = socket (PF_LOCAL, SOCK_STREAM, 0);
  /* Store the server’s name in the socket address. */
  name.sun_family = AF_LOCAL;
  strcpy (name.sun_path, socket_name);
  /* Connect the socket. */
  connect (socket_fd, (const struct sockaddr *)&name, SUN_LEN (&name));
  /* Write the text on the command line to the socket. */
  write_text (socket_fd, message);
  close (socket_fd);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x1, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x1080
movl %eax, -0x24(%rbp)
movw $0x1, -0x92(%rbp)
leaq -0x92(%rbp), %rdi
addq $0x2, %rdi
movq -0x18(%rbp), %rsi
callq 0x1030
movl -0x24(%rbp), %eax
movl %eax, -0x98(%rbp)
leaq -0x92(%rbp), %rdi
addq $0x2, %rdi
callq 0x1050
movl -0x98(%rbp), %edi
movq %rax, %rcx
xorl %eax, %eax
addq $0x2, %rax
addq %rcx, %rax
movl %eax, %edx
leaq -0x92(%rbp), %rsi
callq 0x1070
movl -0x24(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x1190
movl -0x24(%rbp), %edi
callq 0x1060
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/acidDrain[P]st/st.c
// Function: newterm
void
newterm(const Arg* a)
{
	switch (fork()) {
	case -1:
		die("fork failed: %s\n", strerror(errno));
		break;
	case 0:
		chdir(getcwd_by_pid(pid));
		execlp("st", "./st", "-c", "st-256color", "-t", "Suckless Terminal", "-f", "Fira Code:style=bold:size=11:hinting=true:autohint=true:antialias=true:hintstyle=hintslight", NULL);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
callq 0x68b0
movl %eax, %ecx
movl %ecx, -0xc(%rbp)
subl $-0x1, %eax
je 0x9129
jmp 0x911d
movl -0xc(%rbp), %eax
testl %eax, %eax
je 0x9148
jmp 0x91af
callq 0x6600
movl (%rax), %edi
callq 0x64b0
movq %rax, %rsi
leaq 0xc72b(%rip), %rdi      # 0x1586a
movb $0x0, %al
callq 0x6b60
jmp 0x91af
movl 0x177ae(%rip), %edi     # 0x208fc
callq 0x91c0
movq %rax, %rdi
callq 0x6060
leaq 0xc776(%rip), %rdi      # 0x158d8
leaq 0xc76d(%rip), %rsi      # 0x158d6
leaq 0xc76b(%rip), %rdx      # 0x158db
leaq 0xc767(%rip), %rcx      # 0x158de
leaq 0xc76c(%rip), %r8       # 0x158ea
leaq 0xc768(%rip), %r9       # 0x158ed
leaq 0xc773(%rip), %r10      # 0x158ff
leaq 0xc76f(%rip), %rax      # 0x15902
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, %al
callq 0x6230
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/acidDrain[P]st/x.c
// Function: setpalette
void setpalette(const Arg *arg) {

    if ( arg->i < LEN(palettes) )   {
        colorname = palettes[arg->i];
        xloadcols();
        cresize(win.w, win.h);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movslq (%rax), %rax
cmpq $0x4, %rax
jae 0x1283b
movq -0x8(%rbp), %rax
movslq (%rax), %rcx
leaq 0x7fa9(%rip), %rax      # 0x1a7c0
shlq $0x7, %rcx
addq %rcx, %rax
movq %rax, 0x1063b(%rip)     # 0x22e60
callq 0xd6b0
movl 0x10648(%rip), %edi     # 0x22e78
movl 0x10646(%rip), %esi     # 0x22e7c
callq 0x117b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/moshmap.c
// Function: referenceCreate
Reference *referenceCreate (Moshset *ms, U32 size)
{
  if (!ms || !ms->size) die ("moshset must be initialised before reference") ;
  if (!size) die ("refCreate must have size > 0") ;
  Reference *ref = new0 (1, Reference) ;
  ref->ms = ms ;
  ref->depth = ms->max ? new0 (ms->max, U32) : new0 (ms->size, U32) ;
  ref->size = size ;
  ref->index = new (size, U32) ;
  ref->offset = new (size, U32) ;
  ref->id = new (size, U32) ;
  ref->dict = dictCreate (1024) ;
  ref->len = arrayCreate (1024, U32) ;
  /* NB don't create loc and rev here */
  return ref ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1340
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x134e
leaq 0x8cbd(%rip), %rdi      # 0xa004
movb $0x0, %al
callq 0x8ca0
cmpl $0x0, -0xc(%rbp)
jne 0x1362
leaq 0x8cd6(%rip), %rdi      # 0xa031
movb $0x0, %al
callq 0x8ca0
movl $0x1, %edi
movl $0x50, %esi
callq 0x8dd0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
je 0x13a3
movq -0x8(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0x8dd0
movq %rax, -0x20(%rbp)
jmp 0x13ba
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0x8dd0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0xc(%rbp), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x8d80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0xc(%rbp), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x8d80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0xc(%rbp), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x8d80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x400, %edi            # imm = 0x400
callq 0x7480
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
movl $0x400, %edi            # imm = 0x400
movl $0x4, %esi
callq 0x7dc0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/moshmap.c
// Function: referenceDestroy
void referenceDestroy (Reference *ref)
{ free (ref->depth) ;
  if (ref->loc) free (ref->loc) ; if (ref->rev) free (ref->rev) ;
  free (ref->index) ; free (ref->offset) ; free (ref->id) ;
  dictDestroy (ref->dict) ; arrayDestroy (ref->len) ;
  free (ref) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x1491
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x14a9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x7530
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x7fc0
movq -0x8(%rbp), %rdi
callq 0x1040
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/moshmap.c
// Function: usage
void usage (void)
{ fprintf (stderr, "Usage: moshmap <commands>\n") ;
  fprintf (stderr, "Commands are executed in order - set parameters before using them!\n") ;
  fprintf (stderr, "  -K | --kmer <kmer size> [%d]\n", params.k) ;
  fprintf (stderr, "  -W | --window <window> [%d]\n", params.w) ;
  fprintf (stderr, "  -S | --seed <random number seed> [%d]\n", params.s) ;
  fprintf (stderr, "  -B | --tableBits <hash index table bitcount> [%d]\n", params.B) ;
  fprintf (stderr, "  -v | --verbose : toggle verbose mode\n") ;
  fprintf (stderr, "  -t | --threads <number of threads for parallel ops> [%d]\n", numThreads) ;
  fprintf (stderr, "  -o | --output <output filename> : '-' for stdout\n") ;
  fprintf (stderr, "  -f | --referenceFasta <reference fasta file>\n") ;
  fprintf (stderr, "  -w | --referenceWrite <file stem> : writes reference hash files\n") ;
  fprintf (stderr, "  -r | --referenceRead <file stem> : read reference hash files\n") ;
  fprintf (stderr, "  -q | --query <query fasta file>\n") ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb2cd(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x7659(%rip), %rsi      # 0xa38e
movb $0x0, %al
callq 0x1120
movq 0xb2b5(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x765c(%rip), %rsi      # 0xa3a9
movb $0x0, %al
callq 0x1120
movq 0xb29d(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movl 0xc5ec(%rip), %edx      # 0xf350
leaq 0x7682(%rip), %rsi      # 0xa3ed
movb $0x0, %al
callq 0x1120
movq 0xb27f(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movl 0xc5d2(%rip), %edx      # 0xf354
leaq 0x7684(%rip), %rsi      # 0xa40d
movb $0x0, %al
callq 0x1120
movq 0xb261(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movl 0xc5b8(%rip), %edx      # 0xf358
leaq 0x7685(%rip), %rsi      # 0xa42c
movb $0x0, %al
callq 0x1120
movq 0xb243(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movl 0xc59e(%rip), %edx      # 0xf35c
leaq 0x7690(%rip), %rsi      # 0xa455
movb $0x0, %al
callq 0x1120
movq 0xb225(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x76ad(%rip), %rsi      # 0xa48a
movb $0x0, %al
callq 0x1120
movq 0xb20d(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movl 0xb32c(%rip), %edx      # 0xe120
leaq 0x76b7(%rip), %rsi      # 0xa4b2
movb $0x0, %al
callq 0x1120
movq 0xb1ef(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x76db(%rip), %rsi      # 0xa4ee
movb $0x0, %al
callq 0x1120
movq 0xb1d7(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x76f7(%rip), %rsi      # 0xa522
movb $0x0, %al
callq 0x1120
movq 0xb1bf(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x770f(%rip), %rsi      # 0xa552
movb $0x0, %al
callq 0x1120
movq 0xb1a7(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x773a(%rip), %rsi      # 0xa595
movb $0x0, %al
callq 0x1120
movq 0xb18f(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x7762(%rip), %rsi      # 0xa5d5
movb $0x0, %al
callq 0x1120
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: query_session_built
int query_session_built(uint32_t uid) {
	assert(uid < USER_CNT);

	if(sessions[uid].state == USER_STATE_UNUSED
	|| sessions[uid].state == USER_STATE_NOT_LOGIN) {
		return false;
	}else{
		return true;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
cmpl $0x5, -0x8(%rbp)
jae 0x12e3
jmp 0x1302
leaq 0x4d67(%rip), %rdi      # 0x6051
leaq 0x4d23(%rip), %rsi      # 0x6014
movl $0x4a, %edx
leaq 0x4d20(%rip), %rcx      # 0x601d
callq 0x10a0
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x8f12(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
je 0x1334
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x8ef9(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0xc(%rax)
jne 0x133d
movl $0x0, -0x4(%rbp)
jmp 0x1344
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: wrap_send
void wrap_send(int conn, server_message_t *psm) {
	size_t total_len = 0;
	while(total_len < sizeof(server_message_t)) {
		size_t len = send(conn, psm + total_len, sizeof(server_message_t) - total_len, 0);
		if(len < 0) {
			loge("broken pipe\n");
		}

		total_len += len;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x1a3, -0x18(%rbp)     # imm = 0x1A3
jae 0x15e0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
imulq $0x1a3, -0x18(%rbp), %rax # imm = 0x1A3
addq %rax, %rsi
movl $0x1a3, %edx            # imm = 0x1A3
subq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x1080
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jae 0x15d2
movq 0x8a43(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x5ffc(%rip), %rsi      # 0x75bb
leaq 0x6026(%rip), %rdx      # 0x75ec
movl $0x3a8, %ecx            # imm = 0x3A8
movb $0x0, %al
callq 0x10f0
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x1577
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: user_join_battle
void user_join_battle(uint32_t bid, uint32_t uid) {
	int ux = (rand() & 0x7FFF) % BATTLE_W;
	int uy = (rand() & 0x7FFF) % BATTLE_H;
	battles[bid].users[uid].pos.x = ux;
	battles[bid].users[uid].pos.y = uy;
	log("alloc position (%hhu, %hhu) for launcher #%d@%s\n",
			ux, uy, uid, sessions[uid].user_name);

	sessions[uid].state = USER_STATE_BATTLE;

	if(battles[bid].users[uid].battle_state == BATTLE_STATE_UNJOINED) {
		user_join_battle_common_part(bid, uid, USER_STATE_BATTLE);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
callq 0x11a0
andl $0x7fff, %eax           # imm = 0x7FFF
movl $0x3c, %ecx
cltd
idivl %ecx
movl %edx, -0xc(%rbp)
callq 0x11a0
andl $0x7fff, %eax           # imm = 0x7FFF
movl $0x10, %ecx
cltd
idivl %ecx
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movb %al, %cl
movl -0x4(%rbp), %eax
movl %eax, %edx
leaq 0x8b77(%rip), %rax      # 0xa390
imulq $0xb08, %rdx, %rdx      # imm = 0xB08
addq %rdx, %rax
addq $0x10, %rax
movl -0x8(%rbp), %edx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x10(%rax)
movl -0x10(%rbp), %eax
movb %al, %cl
movl -0x4(%rbp), %eax
movl %eax, %edx
leaq 0x8b4b(%rip), %rax      # 0xa390
imulq $0xb08, %rdx, %rdx      # imm = 0xB08
addq %rdx, %rax
addq $0x10, %rax
movl -0x8(%rbp), %edx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x11(%rax)
movq 0x8791(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movl -0xc(%rbp), %r8d
movl -0x10(%rbp), %r9d
movl -0x8(%rbp), %r10d
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x899e(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
leaq 0x494c(%rip), %rsi      # 0x61dc
leaq 0x498e(%rip), %rdx      # 0x6225
movl $0x89, %ecx
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x10f0
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x8968(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0x3, 0xc(%rax)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x8abe(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x10, %rax
movl -0x8(%rbp), %ecx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x18ff
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl $0x3, %edx
callq 0x15f0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: user_invited_to_join_battle
void user_invited_to_join_battle(uint32_t bid, uint32_t uid) {
	if(sessions[uid].state == USER_STATE_WAIT_TO_BATTLE
	&& bid != sessions[uid].bid) {
		log("user %d@%s rejects old battle #%d since he was invited to a new battle\n", uid, sessions[uid].user_name, sessions[uid].bid);

		send_to_client_with_username(sessions[uid].inviter_id, SERVER_MESSAGE_FRIEND_REJECT_BATTLE, sessions[uid].user_name);
	}

	user_join_battle_common_part(bid, uid, USER_STATE_WAIT_TO_BATTLE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x88f6(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x4, 0xc(%rax)
jne 0x19dd
movl -0x4(%rbp), %eax
movl -0x8(%rbp), %ecx
movl %ecx, %edx
leaq 0x88d6(%rip), %rcx      # 0xa220
imulq $0x48, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
je 0x19dd
movq 0x8697(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movl -0x8(%rbp), %r8d
movl -0x8(%rbp), %eax
leaq 0x88ae(%rip), %r9       # 0xa220
imulq $0x48, %rax, %rax
addq %rax, %r9
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x889b(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
leaq 0x48a0(%rip), %rsi      # 0x6236
leaq 0x48f9(%rip), %rdx      # 0x6296
movl $0x95, %ecx
movl %eax, (%rsp)
movb $0x0, %al
callq 0x10f0
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x8868(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %edi
movl -0x8(%rbp), %eax
leaq 0x8854(%rip), %rdx      # 0xa220
imulq $0x48, %rax, %rax
addq %rax, %rdx
movl $0x17, %esi
callq 0x1a00
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl $0x4, %edx
callq 0x15f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: send_to_client_with_username
void send_to_client_with_username(int uid, int message, char *user_name) {
	int conn = sessions[uid].conn;
	server_message_t sm;
	memset(&sm, 0, sizeof(server_message_t));
	sm.response = message;
	strncpy(sm.friend_name, user_name, USERNAME_SIZE - 1);
	wrap_send(conn, &sm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x8800(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
leaq -0x1b7(%rbp), %rdi
xorl %esi, %esi
movl $0x1a3, %edx            # imm = 0x1A3
callq 0x10c0
movl -0x8(%rbp), %eax
movb %al, -0x1b7(%rbp)
leaq -0x1b7(%rbp), %rdi
addq $0x1, %rdi
movq -0x10(%rbp), %rsi
movl $0x6, %edx
callq 0x1040
movl -0x14(%rbp), %edi
leaq -0x1b7(%rbp), %rsi
callq 0x1560
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: find_uid_by_user_name
int find_uid_by_user_name(const char *user_name) {
	int ret_uid = -1;
	log("find user '%s'\n", user_name);
	for(int i = 0; i < USER_CNT; i++) {
		if(query_session_built(i)) {
			if(strncmp(user_name, sessions[i].user_name, USERNAME_SIZE - 1) == 0) {
				ret_uid = i;
				break;
			}
		}
	}

	if(ret_uid == -1) {
		logi("fail\n");
	}else{
		logi("found: %d@%s\n", ret_uid, sessions[ret_uid].user_name);
	}

	return ret_uid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movq 0x855e(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movq -0x8(%rbp), %r8
leaq 0x480a(%rip), %rsi      # 0x62b2
leaq 0x482b(%rip), %rdx      # 0x62da
movl $0x9f, %ecx
movb $0x0, %al
callq 0x10f0
movl $0x0, -0x10(%rbp)
cmpl $0x5, -0x10(%rbp)
jge 0x1b11
movl -0x10(%rbp), %edi
callq 0x12d0
cmpl $0x0, %eax
je 0x1b04
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
leaq 0x873c(%rip), %rsi      # 0xa220
imulq $0x48, %rax, %rax
addq %rax, %rsi
movl $0x6, %edx
callq 0x1050
cmpl $0x0, %eax
jne 0x1b02
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x1b11
jmp 0x1b04
jmp 0x1b06
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1ac2
cmpl $-0x1, -0xc(%rbp)
jne 0x1b3d
movq 0x84da(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x47c8(%rip), %rsi      # 0x62f0
leaq 0x47ab(%rip), %rdx      # 0x62da
movl $0xaa, %ecx
movb $0x0, %al
callq 0x10f0
jmp 0x1b77
movq 0x84b4(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movl -0xc(%rbp), %r8d
movslq -0xc(%rbp), %rax
leaq 0x86ca(%rip), %r9       # 0xa220
imulq $0x48, %rax, %rax
addq %rax, %r9
leaq 0x47ae(%rip), %rsi      # 0x6312
leaq 0x476f(%rip), %rdx      # 0x62da
movl $0xac, %ecx
movb $0x0, %al
callq 0x10f0
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: get_unalloced_battle
int get_unalloced_battle() {
	int ret_bid = -1;
	pthread_mutex_lock(&battles_lock);
	for(int i = 0; i < USER_CNT; i++) {
		if(battles[i].is_alloced == false) {
			memset(&battles[i], 0, sizeof(struct battle_t));
			battles[i].is_alloced = true;
			ret_bid = i;
			break;
		}
	}
	pthread_mutex_unlock(&battles_lock);
	if(ret_bid == -1) {
		loge("check here, returned battle id should not be -1\n");
	}else{
		log("alloc unalloced battle id #%d\n", ret_bid);
	}
	return ret_bid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
leaq 0x865a(%rip), %rdi      # 0xa1f0
callq 0x1190
movl $0x0, -0x8(%rbp)
cmpl $0x5, -0x8(%rbp)
jge 0x1c13
movslq -0x8(%rbp), %rcx
leaq 0x87dd(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x1c06
movslq -0x8(%rbp), %rax
leaq 0x87c3(%rip), %rdi      # 0xa390
imulq $0xb08, %rax, %rax      # imm = 0xB08
addq %rax, %rdi
xorl %esi, %esi
movl $0xb08, %edx            # imm = 0xB08
callq 0x10c0
movslq -0x8(%rbp), %rcx
leaq 0x87a2(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
movl $0x1, (%rax)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c13
jmp 0x1c08
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1ba2
leaq 0x85d6(%rip), %rdi      # 0xa1f0
callq 0x1120
cmpl $-0x1, -0x4(%rbp)
jne 0x1c4b
movq 0x83cc(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x4706(%rip), %rsi      # 0x633c
leaq 0x474a(%rip), %rdx      # 0x6387
movl $0xbf, %ecx
movb $0x0, %al
callq 0x10f0
jmp 0x1c73
movq 0x83a6(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movl -0x4(%rbp), %r8d
leaq 0x473c(%rip), %rsi      # 0x639c
leaq 0x4720(%rip), %rdx      # 0x6387
movl $0xc1, %ecx
movb $0x0, %al
callq 0x10f0
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: get_unused_session
int get_unused_session() {
	int ret_uid = -1;
	pthread_mutex_lock(&sessions_lock);
	for(int i = 0; i < USER_CNT; i++) {
		if(sessions[i].state == USER_STATE_UNUSED) {
			memset(&sessions[i], 0, sizeof(struct session_t));
			sessions[i].conn = -1;
			sessions[i].state = USER_STATE_NOT_LOGIN;
			ret_uid = i;
			break;
		}
	}
	pthread_mutex_unlock(&sessions_lock);
	if(ret_uid == -1) {
		log("fail to alloc session id\n");
	}else{
		log("alloc unused session id #%d\n", ret_uid);
	}
	return ret_uid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
leaq 0x8532(%rip), %rdi      # 0xa1c8
callq 0x1190
movl $0x0, -0x8(%rbp)
cmpl $0x5, -0x8(%rbp)
jge 0x1d2c
movslq -0x8(%rbp), %rcx
leaq 0x8569(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
jne 0x1d1c
movslq -0x8(%rbp), %rax
leaq 0x8551(%rip), %rdi      # 0xa220
imulq $0x48, %rax, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x10c0
movslq -0x8(%rbp), %rcx
leaq 0x8533(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movslq -0x8(%rbp), %rcx
leaq 0x851a(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0xc(%rax)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d2c
jmp 0x1d1e
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1ca2
leaq 0x8495(%rip), %rdi      # 0xa1c8
callq 0x1120
cmpl $-0x1, -0x4(%rbp)
jne 0x1d64
movq 0x82b3(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x4684(%rip), %rsi      # 0x63d3
leaq 0x46af(%rip), %rdx      # 0x6405
movl $0xd4, %ecx
movb $0x0, %al
callq 0x10f0
jmp 0x1d8c
movq 0x828d(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movl -0x4(%rbp), %r8d
leaq 0x469f(%rip), %rsi      # 0x6418
leaq 0x4685(%rip), %rdx      # 0x6405
movl $0xd6, %ecx
movb $0x0, %al
callq 0x10f0
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: inform_friends
void inform_friends(int uid, int message) {
	server_message_t sm;
	char *user_name = sessions[uid].user_name;
	memset(&sm, 0, sizeof(server_message_t));
	sm.message = message;
	for(int i = 0; i < USER_CNT; i++) {
		if(i == uid || !query_session_built(i))
			continue;
		strncpy(sm.friend_name, user_name, USERNAME_SIZE - 1);
		wrap_send(sessions[i].conn, &sm);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x8464(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x1b8(%rbp)
leaq -0x1ab(%rbp), %rdi
xorl %esi, %esi
movl $0x1a3, %edx            # imm = 0x1A3
callq 0x10c0
movl -0x8(%rbp), %eax
movb %al, -0x1ab(%rbp)
movl $0x0, -0x1bc(%rbp)
cmpl $0x5, -0x1bc(%rbp)
jge 0x1e67
movl -0x1bc(%rbp), %eax
cmpl -0x4(%rbp), %eax
je 0x1e14
movl -0x1bc(%rbp), %edi
callq 0x12d0
cmpl $0x0, %eax
jne 0x1e16
jmp 0x1e56
leaq -0x1ab(%rbp), %rdi
addq $0x1, %rdi
movq -0x1b8(%rbp), %rsi
movl $0x6, %edx
callq 0x1040
movslq -0x1bc(%rbp), %rcx
leaq 0x83e0(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edi
leaq -0x1ab(%rbp), %rsi
callq 0x1560
movl -0x1bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1bc(%rbp)
jmp 0x1df0
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: get_unused_item
int get_unused_item(int bid) {
	int ret_item_id = -1;
	pthread_mutex_lock(&items_lock[bid]);
	for(int i = 0; i < MAX_ITEM; i++) {
		if(!(battles[bid].items[i].is_used)) {
			ret_item_id = i;
			battles[bid].items[i].is_used = true;
			break;
		}
	}
	pthread_mutex_unlock(&items_lock[bid]);
	return ret_item_id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0xffffffff, -0x8(%rbp) # imm = 0xFFFFFFFF
movslq -0x4(%rbp), %rax
leaq 0xbc33(%rip), %rdi      # 0xdac0
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x1190
movl $0x0, -0xc(%rbp)
cmpl $0x87, -0xc(%rbp)
jge 0x1f11
movslq -0x4(%rbp), %rcx
leaq 0x84dc(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x78, %rax
movslq -0xc(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x1f04
movl -0xc(%rbp), %eax
movl %eax, -0x8(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x84ad(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x78, %rax
movslq -0xc(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0x1f11
jmp 0x1f06
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1ea0
movslq -0x4(%rbp), %rax
leaq 0xbba4(%rip), %rdi      # 0xdac0
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x1120
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)