LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/kaiserschmarrn0[P]mywm/mouse.c
// Function: mouse_resize_motion_north_east
static void mouse_resize_motion_north_east(void *arg) {
	xcb_query_pointer_reply_t *p = w_query_pointer();
	uint32_t vals[3];
	vals[0] = p->root_y - y;
	vals[1] = p->root_x + x;
	vals[2] = south - p->root_y + y;
	free(p);

	update_geometry(stack[curws].fwin, XCB_CONFIG_WINDOW_Y | RESIZE_MASK, vals);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
xorl %eax, %eax
callq 0x37bc
movswl 0x12(%rax), %ecx
movl 0x5871(%rip), %edx      # 0xda88
movl %ecx, %esi
subl %edx, %esi
leaq -0x14(%rbp), %rbx
movl %esi, (%rbx)
movswl 0x10(%rax), %esi
addl 0x5859(%rip), %esi      # 0xda84
movl %esi, 0x4(%rbx)
subl %ecx, %edx
addl 0x5856(%rip), %edx      # 0xda8c
movl %edx, 0x8(%rbx)
movq %rax, %rdi
callq 0x3280
leaq 0x5828(%rip), %rax      # 0xda70
movslq (%rax), %rax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq 0x56d6(%rip), %rcx      # 0xd930
movq 0x48(%rcx,%rax), %rdi
movl $0xe, %esi
movq %rbx, %rdx
callq 0x5498
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/kaiserschmarrn0[P]mywm/mouse.c
// Function: mouse_resize_motion_south_west
static void mouse_resize_motion_south_west(void *arg) {
	xcb_query_pointer_reply_t *p = w_query_pointer();
	uint32_t vals[3];
	vals[0] = p->root_x - x;
	vals[1] = east - p->root_x + x;
	vals[2] = p->root_y + y;
	free(p);

	update_geometry(stack[curws].fwin, XCB_CONFIG_WINDOW_X | RESIZE_MASK, vals);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
xorl %eax, %eax
callq 0x37bc
movswl 0x10(%rax), %ecx
movl 0x57f7(%rip), %edx      # 0xda84
movl %ecx, %esi
subl %edx, %esi
leaq -0x14(%rbp), %rbx
movl %esi, (%rbx)
subl %ecx, %edx
addl 0x57f1(%rip), %edx      # 0xda90
movl %edx, 0x4(%rbx)
movswl 0x12(%rax), %ecx
addl 0x57dc(%rip), %ecx      # 0xda88
movl %ecx, 0x8(%rbx)
movq %rax, %rdi
callq 0x3280
leaq 0x57b2(%rip), %rax      # 0xda70
movslq (%rax), %rax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq 0x5660(%rip), %rcx      # 0xd930
movq 0x48(%rcx,%rax), %rdi
movl $0xd, %esi
movq %rbx, %rdx
callq 0x5498
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/kaiserschmarrn0[P]mywm/snap.c
// Function: snap
void snap(int index) {
	if (!stack[curws].fwin || stack[curws].fwin->is_e_full || stack[curws].fwin->is_i_full) {
		return;
	}

	if (index == stack[curws].fwin->snap_index) {
		snap_restore_state(stack[curws].fwin);
		return;
	}

	if (stack[curws].fwin->snap_index == SNAP_NONE) {
		snap_save_state(stack[curws].fwin, index);
	} else {
		stack[curws].fwin->snap_index = index;
	}

	update_geometry(stack[curws].fwin, MOVE_RESIZE_MASK, snap_regions[index]);

	if (state == MOVE) {
		return;
	}

	safe_raise(stack[curws].fwin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x5697(%rip), %r15      # 0xda70
movslq (%r15), %rax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq 0x5545(%rip), %r12      # 0xd930
movq 0x48(%r12,%rax), %r14
testq %r14, %r14
je 0x8409
cmpl $0x0, 0x190(%r14)
jne 0x8409
cmpl $0x0, 0x18c(%r14)
je 0x8412
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %edi, %ebx
movl 0x178(%r14), %eax
cmpl %edi, %eax
jne 0x8446
movl $0x7, 0x178(%r14)
leaq 0x168(%r14), %rdx
movq %r14, %rdi
movl $0xf, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5498
movq %r14, %rdi
cmpl $0x7, %eax
jne 0x846d
leaq 0x168(%r14), %rsi
movq %r14, %rdi
callq 0x541f
movslq (%r15), %rax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x48(%r12,%rax), %rdi
movl %ebx, 0x178(%r14)
movslq %ebx, %rax
shlq $0x4, %rax
leaq 0x561e(%rip), %rdx      # 0xdaa0
addq %rax, %rdx
movl $0xf, %esi
callq 0x5498
leaq 0x4fae(%rip), %rax      # 0xd444
cmpl $0x1, (%rax)
je 0x8409
movslq (%r15), %rax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movq 0x48(%r12,%rax), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4fcc
// File: /workspace/github_c_makefile_star2_O3/kaiserschmarrn0[P]mywm/margin.c
// Function: margin_event_helper
void margin_event_helper(xcb_generic_event_t *ev, void (*func)(int)) {
	if (state != MOVE) {
		return;
	}
	
	xcb_enter_notify_event_t *e = (xcb_enter_notify_event_t *)ev;

	for (int i = 0; i < LEN(margins); i++) {
		if (e->event == margins[i].win) {
			func(i);
			return;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x4c8e(%rip), %rax      # 0xd444
cmpl $0x1, (%rax)
jne 0x87d8
movl 0xc(%rdi), %eax
leaq 0x4baf(%rip), %rcx      # 0xd374
xorl %edi, %edi
cmpl (%rcx), %eax
je 0x87da
incq %rdi
addq $0x1c, %rcx
cmpq $0x7, %rdi
jne 0x87c7
popq %rbp
retq
popq %rbp
jmpq *%rsi
// File: /workspace/github_c_makefile_star2_O3/kaiserschmarrn0[P]mywm/color.c
// Function: hex_to_rgb
XRenderColor hex_to_rgb(uint32_t hex) {
	rgba col;
	col.v = xcb_color(hex);

	XRenderColor ret;
	ret.red = col.r * 65535 / 255;
	ret.green = col.g * 65535 / 255;
	ret.blue = col.b * 65535 / 255;
	ret.alpha = col.a * 65535 / 255;

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
cmpl $0x1000000, %edi        # imm = 0x1000000
jb 0x88e5
movl %edi, %eax
shrl $0x18, %eax
movl %edi, %ecx
shrl $0x10, %ecx
movl %edi, %edx
shrl $0x8, %edx
movl $0xff, %esi
andl %esi, %ecx
imull %eax, %ecx
imull $0x8081, %ecx, %r8d     # imm = 0x8081
andl %esi, %edx
imull %eax, %edx
imull $0x8081, %edx, %ecx     # imm = 0x8081
andl %edi, %esi
imull %eax, %esi
imull $0x8081, %esi, %eax     # imm = 0x8081
shrl $0x17, %eax
andl $0xff000000, %edi       # imm = 0xFF000000
orl %eax, %edi
shrl $0x7, %r8d
andl $0xff0000, %r8d         # imm = 0xFF0000
orl %edi, %r8d
shrl $0xf, %ecx
andl $0xff00, %ecx           # imm = 0xFF00
orl %r8d, %ecx
movl %ecx, %eax
shrl $0x10, %eax
movl %ecx, %esi
shrl $0x18, %esi
movl $0xff, %edi
andl %edi, %eax
movl %eax, %edx
shll $0x8, %edx
orl %eax, %edx
movl %ecx, %eax
shrl $0x8, %eax
andl %ecx, %edi
movl %edi, %r8d
shll $0x8, %r8d
orl %edi, %r8d
shldl $0x8, %ecx, %esi
shlq $0x30, %rsi
shlq $0x20, %r8
orq %rsi, %r8
shll $0x8, %ecx
andl $0xff0000, %ecx         # imm = 0xFF0000
shll $0x18, %eax
orl %ecx, %eax
orq %r8, %rax
orq %rdx, %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/kaiserschmarrn0[P]mywm/color.c
// Function: xft_color
XftColor xft_color(uint32_t hex) {
	XRenderColor rc = hex_to_rgb(hex);

	XftColor ret;
	XftColorAllocValue(dpy, vis_ptr, cm, &rc, &ret);

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
callq 0x887c
leaq -0x10(%rbp), %rcx
movq %rax, (%rcx)
leaq 0x4b51(%rip), %rax      # 0xd4a0
movq (%rax), %rdi
leaq 0x4b57(%rip), %rax      # 0xd4b0
movq (%rax), %rsi
leaq 0x4b59(%rip), %rax      # 0xd4bc
movl (%rax), %edx
leaq -0x20(%rbp), %rbx
movq %rbx, %r8
callq 0x3450
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/oil_resample.c
// Function: oil_scale_slots
int oil_scale_slots(struct oil_scale *ys)
{
	if (ys->out_height <= ys->in_height) {
		return ys->borders_y[ys->out_pos];
	}
	if (ys->in_pos) {
		return ys->borders_y[ys->in_pos - 1] == 0;
	}
	return ys->borders_y[0] == 0 ? 2 : 1;
}

// Assembly:
movl 0x4(%rdi), %eax
cmpl (%rdi), %eax
jle 0x1a0c
movslq 0x14(%rdi), %rdx
movq 0x38(%rdi), %rcx
xorl %eax, %eax
testq %rdx, %rdx
je 0x1a18
cmpl $0x0, -0x4(%rcx,%rdx,4)
sete %al
retq
movq 0x38(%rdi), %rax
movslq 0x18(%rdi), %rcx
movl (%rax,%rcx,4), %eax
retq
cmpl $0x1, (%rcx)
adcl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/oil_resample.c
// Function: oil_fix_ratio
int oil_fix_ratio(int src_width, int src_height, int *out_width,
	int *out_height)
{
	double width_ratio, height_ratio, tmp;
	int *adjust_dim;

	if (src_width < 1 || src_height < 1 || *out_width < 1 || *out_height < 1) {
		return -1; // bad argument
	}

	width_ratio = *out_width / (double)src_width;
	height_ratio = *out_height / (double)src_height;
	if (width_ratio < height_ratio) {
		tmp = round(width_ratio * src_height);
		adjust_dim = out_height;
	} else {
		tmp = round(height_ratio * src_width);
		adjust_dim = out_width;
	}
	if (tmp > INT_MAX) {
		return -2; // adjusted dimension out of range
	}
	*adjust_dim = tmp ? tmp : 1;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
testl %edi, %edi
setle %al
testl %esi, %esi
setle %cl
orb %al, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x3152
movq %rdx, %rbx
movl (%rdx), %ecx
testl %ecx, %ecx
jle 0x3152
movl (%r14), %edx
testl %edx, %edx
jle 0x3152
cvtsi2sd %ecx, %xmm0
cvtsi2sd %edi, %xmm1
divsd %xmm1, %xmm0
cvtsi2sd %edx, %xmm3
cvtsi2sd %esi, %xmm2
divsd %xmm2, %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm0, %xmm2
movsd %xmm0, 0x10(%rsp)
movsd %xmm3, 0x8(%rsp)
cmpltsd %xmm3, %xmm0
andpd %xmm0, %xmm2
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
callq 0x1040
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
ucomisd 0x1f69(%rip), %xmm0     # 0x5080
ja 0x3152
movsd 0x8(%rsp), %xmm1
ucomisd 0x10(%rsp), %xmm1
cmovaq %r14, %rbx
xorpd %xmm1, %xmm1
cmpneqsd %xmm0, %xmm1
movapd %xmm1, %xmm2
andpd %xmm0, %xmm2
movsd 0x1f2e(%rip), %xmm0     # 0x5070
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
cvttsd2si %xmm1, %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/oil_resample.c
// Function: calc_coeffs
static void calc_coeffs(float *coeffs, float tx, int taps, int ltrim, int rtrim)
{
	int i;
	float tmp, tap_mult, fudge;

	tap_mult = (float)taps / TAPS;
	tx = 1 - tx - taps / 2 + ltrim;
	fudge = 0.0f;

	for (i=ltrim; i<taps-rtrim; i++) {
		tmp = catrom(fabsf(tx) / tap_mult) / tap_mult;
		fudge += tmp;
		coeffs[i] = tmp;
		tx += 1;
	}
	fudge = 1 / fudge;
	for (i=ltrim; i<taps-rtrim; i++) {
		coeffs[i] *= fudge;
	}
}

// Assembly:
movl %esi, %eax
subl %ecx, %eax
cmpl %edx, %eax
jle 0x3278
cvtsi2ss %esi, %xmm2
mulss 0x1fea(%rip), %xmm2     # 0x515c
movss 0x1fd2(%rip), %xmm1     # 0x514c
movaps %xmm1, %xmm4
subss %xmm0, %xmm4
movl %esi, %ecx
shrl $0x1f, %ecx
addl %esi, %ecx
sarl %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
subss %xmm0, %xmm4
cvtsi2ss %edx, %xmm3
addss %xmm4, %xmm3
movl %edx, %ecx
leaq (%rdi,%rcx,4), %rsi
xorps %xmm0, %xmm0
movaps 0x1f83(%rip), %xmm4     # 0x5130
movss 0x1fb7(%rip), %xmm5     # 0x516c
movss 0x1fb3(%rip), %xmm6     # 0x5170
movss 0x1f9b(%rip), %xmm7     # 0x5160
movss 0x1f96(%rip), %xmm8     # 0x5164
movss 0x1f91(%rip), %xmm9     # 0x5168
movss 0x1f70(%rip), %xmm10    # 0x5150
movl %edx, %r8d
movaps %xmm3, %xmm12
andps %xmm4, %xmm12
divss %xmm2, %xmm12
ucomiss %xmm12, %xmm1
jbe 0x3215
movaps %xmm12, %xmm11
mulss %xmm5, %xmm11
addss %xmm6, %xmm11
mulss %xmm12, %xmm11
mulss %xmm12, %xmm11
addss %xmm1, %xmm11
jmp 0x3237
movaps %xmm7, %xmm11
subss %xmm12, %xmm11
mulss %xmm12, %xmm11
addss %xmm8, %xmm11
mulss %xmm12, %xmm11
addss %xmm9, %xmm11
mulss %xmm10, %xmm11
divss %xmm2, %xmm11
addss %xmm11, %xmm0
movss %xmm11, (%rsi)
addss %xmm1, %xmm3
addq $0x4, %rsi
incl %r8d
cmpl %r8d, %eax
jg 0x31e3
cmpl %edx, %eax
jle 0x3278
divss %xmm0, %xmm1
leaq (%rdi,%rcx,4), %rcx
movss (%rcx), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, (%rcx)
addq $0x4, %rcx
incl %edx
cmpl %edx, %eax
jg 0x3262
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/test.c
// Function: main
int main()
{
	int t = 1531289551;
	//int t = time(NULL);
	printf("seed: %d\n", t);
	srand(t);
	oil_global_init();
	test_scale_all();
	test_scale_catrom_extremes();
	printf("worst error: %Lf\n", worst);
	printf("All tests pass.\n");
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
leaq 0x1ff7(%rip), %rdi      # 0x5280
xorl %ebp, %ebp
movl $0x5b459fcf, %esi       # imm = 0x5B459FCF
xorl %eax, %eax
callq 0x1090
movl $0x5b459fcf, %edi       # imm = 0x5B459FCF
callq 0x10c0
callq 0x122c
movl $0x5, %edi
movl $0x1, %esi
callq 0x33e4
movl $0x1, %edi
movl $0x5, %esi
callq 0x33e4
movl $0x8, %edi
movl $0x1, %esi
callq 0x33e4
movl $0x1, %edi
movl $0x8, %esi
callq 0x33e4
movl $0x8, %edi
movl $0x3, %esi
callq 0x33e4
movl $0x3, %edi
movl $0x8, %esi
callq 0x33e4
movl $0x64, %edi
movl $0x1, %esi
callq 0x33e4
movl $0x1, %edi
movl $0x64, %esi
callq 0x33e4
movl $0x64, %edi
movl $0x63, %esi
callq 0x33e4
movl $0x63, %edi
movl $0x64, %esi
callq 0x33e4
movl $0x2, %edi
movl $0x1, %esi
callq 0x33e4
movl $0x1, %edi
movl $0x2, %esi
callq 0x33e4
movl $0x4, %edi
movl $0x4, %esi
callq 0x34de
movq %rax, %rbx
movq (%rax), %rax
movl %ebp, (%rax)
movq 0x8(%rbx), %rax
movl $0xffff00, %ecx         # imm = 0xFFFF00
movl %ecx, (%rax)
movq 0x10(%rbx), %rax
movl %ecx, (%rax)
movq 0x18(%rbx), %rax
movl %ebp, (%rax)
movl $0x4, %edi
movl $0x4, %esi
movl $0x7, %ecx
movl $0x7, %r8d
movq %rbx, %rdx
movl $0x1, %r9d
callq 0x3527
movl $0x4, %esi
movq %rbx, %rdi
callq 0x42cc
fldt 0xc522(%rip)            # 0xf8e0
fstpt (%rsp)
leaq 0x1ec2(%rip), %rdi      # 0x528a
xorl %eax, %eax
callq 0x1090
leaq 0x1f78(%rip), %rdi      # 0x534e
callq 0x1050
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/test.c
// Function: test_scale_each_cs
static void test_scale_each_cs(long dim_a, long dim_b)
{
	test_scale_square_rand(dim_a, dim_b, OIL_CS_G);
	test_scale_square_rand(dim_a, dim_b, OIL_CS_GA);
	test_scale_square_rand(dim_a, dim_b, OIL_CS_RGB);
	test_scale_square_rand(dim_a, dim_b, OIL_CS_RGBA);
	test_scale_square_rand(dim_a, dim_b, OIL_CS_CMYK);
	test_scale_square_rand(dim_a, dim_b, OIL_CS_RGBX);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edx
callq 0x344c
movq %r14, %rdi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x344c
movq %r14, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq 0x344c
movq %r14, %rdi
movq %rbx, %rsi
movl $0x104, %edx            # imm = 0x104
callq 0x344c
movq %r14, %rdi
movq %rbx, %rsi
movl $0x204, %edx            # imm = 0x204
callq 0x344c
movq %r14, %rdi
movq %rbx, %rsi
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x344c
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/test.c
// Function: test_scale_square_rand
static void test_scale_square_rand(long in_dim, long out_dim,
	enum oil_colorspace cs)
{
	long i, in_row_stride;
	unsigned char **input_image;

	in_row_stride = OIL_CMP(cs) * in_dim;

	/* Allocate & populate input image */
	input_image = alloc_2d_uchar(in_row_stride, in_dim);
	for (i=0; i<in_dim; i++) {
		fill_rand8(input_image[i], in_row_stride);
	}
	test_scale(in_dim, in_dim, input_image, out_dim, out_dim, cs);
	free_2d_uchar(input_image, in_dim);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
movl %edx, 0xc(%rsp)
movzbl %dl, %r12d
imulq %rdi, %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x34de
movq %rax, %r15
testq %rbx, %rbx
jle 0x34aa
xorl %r13d, %r13d
testq %r12, %r12
jle 0x34a2
movq (%r15,%r13,8), %rbp
xorl %r14d, %r14d
callq 0x1120
movb %al, (%rbp,%r14)
incq %r14
cmpq %r14, %r12
jne 0x3490
incq %r13
cmpq %rbx, %r13
jne 0x3484
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq 0x10(%rsp), %rcx
movq %rcx, %r8
movl 0xc(%rsp), %r9d
callq 0x3527
movq %r15, %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42cc
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/test.c
// Function: alloc_2d_uchar
static unsigned char **alloc_2d_uchar(long width, long height)
{
	long i;
	unsigned char **rows;

	rows = malloc(height * sizeof(unsigned char*));
	for (i=0; i<height; i++) {
		rows[i] = malloc(width * sizeof(unsigned char));
	}
	return rows;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rsi,8), %rdi
callq 0x1100
movq %rax, %r15
testq %rbx, %rbx
jle 0x3518
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x1100
movq %rax, (%r15,%r12,8)
incq %r12
cmpq %r12, %rbx
jne 0x3504
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/test.c
// Function: free_2d_uchar
static void free_2d_uchar(unsigned char **ptr, long height)
{
	int i;

	for (i=0; i<height; i++) {
		free(ptr[i]);
	}
	free(ptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
jle 0x42f0
movq %rsi, %r14
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x1030
incq %r15
cmpq %r15, %r14
jne 0x42df
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/test.c
// Function: alloc_2d_ld
static long double **alloc_2d_ld(long width, long height)
{
	long i;
	long double **rows;

	rows = malloc(height * sizeof(long double*));
	for (i=0; i<height; i++) {
		rows[i] = malloc(width * sizeof(long double));
	}
	return rows;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rsi,8), %rdi
callq 0x1100
movq %rax, %r15
testq %rbx, %rbx
jle 0x433b
shlq $0x4, %r14
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x1100
movq %rax, (%r15,%r12,8)
incq %r12
cmpq %r12, %rbx
jne 0x4327
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/test.c
// Function: free_2d_ld
static void free_2d_ld(long double **ptr, long height)
{
	int i;

	for (i=0; i<height; i++) {
		free(ptr[i]);
	}
	free(ptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
jle 0x436e
movq %rsi, %r14
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x1030
incq %r15
cmpq %r15, %r14
jne 0x435d
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: copyFileName
static 
void copyFileName ( Char* to, Char* from ) 
{
   if ( strlen(from) > FILE_NAME_LEN-10 )  {
      fprintf (
         stderr,
         "bzip2: file name\n`%s'\n"
         "is suspiciously (more than %d chars) long.\n"
         "Try using a reasonable file name instead.  Sorry! :-)\n",
         from, FILE_NAME_LEN-10
      );
      setExit(1);
      exit(exitValue);
   }

  strncpy(to,from,FILE_NAME_LEN-10);
  to[FILE_NAME_LEN-10]='\0';
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x20e0
cmpq $0x401, %rax            # imm = 0x401
jae 0x3ad7
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2070
movb $0x0, 0x400(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x2452
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: addFlagsFromEnvVar
static 
void addFlagsFromEnvVar ( Cell** argList, Char* varName ) 
{
   Int32 i, j, k;
   Char *envbase, *p;

   envbase = getenv(varName);
   if (envbase != NULL) {
      p = envbase;
      i = 0;
      while (True) {
         if (p[i] == 0) break;
         p += i;
         i = 0;
         while (isspace((Int32)(p[0]))) p++;
         while (p[i] != 0 && !isspace((Int32)(p[i]))) i++;
         if (i > 0) {
            k = i; if (k > FILE_NAME_LEN-10) k = FILE_NAME_LEN-10;
            for (j = 0; j < k; j++) tmpName[j] = p[j];
            tmpName[k] = 0;
            APPEND_FLAG(*argList, tmpName);
         }
      }
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2030
testq %rax, %rax
je 0x3bb2
movq %rax, %r12
cmpb $0x0, (%rax)
je 0x3bb2
callq 0x22a0
movq %rax, %r14
movl $0x400, %ebp            # imm = 0x400
leaq 0x15f22(%rip), %r15     # 0x19a40
movq (%r14), %rax
leaq -0x1(%r12), %r13
incq %r12
movq %r12, %rcx
movsbq 0x1(%r13), %rdx
incq %r13
incq %r12
testb $0x20, 0x1(%rax,%rdx,2)
jne 0x3b29
testb %dl, %dl
je 0x3ba0
xorl %r12d, %r12d
movsbq %dl, %rdx
testb $0x20, 0x1(%rax,%rdx,2)
jne 0x3b61
movb (%rcx), %dl
incq %rcx
decq %r12
testb %dl, %dl
jne 0x3b45
negl %r12d
jmp 0x3b69
testq %r12, %r12
je 0x3ba0
negq %r12
cmpl %ebp, %r12d
movl $0x400, %eax            # imm = 0x400
cmovbl %r12d, %eax
xorl %ecx, %ecx
movb (%r13,%rcx), %dl
movb %dl, (%rcx,%r15)
incq %rcx
cmpq %rcx, %rax
jne 0x3b77
movb $0x0, (%rax,%r15)
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x3bc1
movq %rax, (%rbx)
movl %r12d, %eax
jmp 0x3ba2
xorl %eax, %eax
leaq (%rax,%r13), %r12
cmpb $0x0, (%r13,%rax)
jne 0x3b1e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: snocString
static 
Cell *snocString ( Cell *root, Char *name )
{
   if (root == NULL) {
      Cell *tmp = mkCell();
      tmp->name = (Char*) myMalloc ( 5 + strlen(name) );
      strcpy ( tmp->name, name );
      return tmp;
   } else {
      Cell *tmp = root;
      while (tmp->link != NULL) tmp = tmp->link;
      tmp->link = snocString ( tmp->link, name );
      return root;
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
testq %rdi, %rdi
je 0x3bf0
movq %rdi, %rbx
movq %rdi, %rax
movq %rax, %r15
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x3bd4
xorl %edi, %edi
movq %r14, %rsi
callq 0x3bc1
movq %rax, 0x8(%r15)
jmp 0x3c2d
movl $0x1, %edi
movl $0x10, %esi
callq 0x2150
testq %rax, %rax
je 0x3c36
movq %rax, %rbx
movq %r14, %rdi
callq 0x20e0
addl $0x5, %eax
movslq %eax, %rdi
callq 0x21c0
testq %rax, %rax
je 0x3c36
movq %rax, (%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2090
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x5108
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: mySignalCatcher
static 
void mySignalCatcher ( IntNative n )
{
   fprintf ( stderr,
             "\n%s: Control-C or similar caught, quitting.\n",
             progName );
   cleanUpAndFail(1);
}

// Assembly:
pushq %rax
movq 0x143b5(%rip), %rax     # 0x17ff8
movq (%rax), %rdi
movq 0x15dd3(%rip), %rdx     # 0x19a20
leaq 0xf769(%rip), %rsi      # 0x133bd
xorl %eax, %eax
callq 0x2180
movl $0x1, %edi
callq 0x4f83
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: outOfMemory
static 
void outOfMemory ( void )
{
   fprintf ( stderr,
             "\n%s: couldn't allocate enough memory\n",
             progName );
   showFileNames();
   cleanUpAndFail(1);
}

// Assembly:
pushq %rax
movq 0x12ee8(%rip), %rax     # 0x17ff8
movq (%rax), %rdi
movq 0x14906(%rip), %rdx     # 0x19a20
leaq 0xdb64(%rip), %rsi      # 0x12c85
xorl %eax, %eax
callq 0x2180
callq 0x4f6e
movl $0x1, %edi
callq 0x4f83
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: panic
static 
void panic ( const Char* s )
{
   fprintf ( stderr,
             "\n%s: PANIC -- internal consistency error:\n"
             "\t%s\n"
             "\tThis is a BUG.  Please report it to me at:\n"
             "\tjseward@bzip.org\n",
             progName, s );
   showFileNames();
   cleanUpAndFail( 3 );
}

// Assembly:
pushq %rax
movq %rdi, %rcx
movq 0x12eb6(%rip), %rax     # 0x17ff8
movq (%rax), %rdi
movq 0x148d4(%rip), %rdx     # 0x19a20
leaq 0xe414(%rip), %rsi      # 0x13567
xorl %eax, %eax
callq 0x2180
callq 0x4f6e
movl $0x3, %edi
callq 0x4f83
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: fileExists
static 
Bool fileExists ( Char* name )
{
   FILE *tmp   = fopen ( name, "rb" );
   Bool exists = (tmp != NULL);
   if (tmp != NULL) fclose ( tmp );
   return exists;
}

// Assembly:
pushq %rbx
leaq 0xe3c3(%rip), %rsi      # 0x13534
callq 0x2230
movq %rax, %rbx
testq %rax, %rax
je 0x5186
movq %rbx, %rdi
callq 0x20d0
testq %rbx, %rbx
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: hasSuffix
static 
Bool hasSuffix ( Char* s, const Char* suffix )
{
   Int32 ns = strlen(s);
   Int32 nx = strlen(suffix);
   if (ns < nx) return False;
   if (strcmp(s + ns - nx, suffix) == 0) return True;
   return False;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x20e0
movq %rax, %r15
movq %rbx, %rdi
callq 0x20e0
cmpl %eax, %r15d
jge 0x51b2
xorl %eax, %eax
jmp 0x51cd
movslq %r15d, %rcx
addq %rcx, %r14
cltq
subq %rax, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2160
testl %eax, %eax
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: fopen_output_safely
static
FILE* fopen_output_safely ( Char* name, const char* mode )
{
#  if BZ_UNIX
   FILE*     fp;
   IntNative fh;
   fh = open(name, O_WRONLY|O_CREAT|O_EXCL, S_IWUSR|S_IRUSR);
   if (fh == -1) return NULL;
   fp = fdopen(fh, mode);
   if (fp == NULL) close(fh);
   return fp;
#  else
   return fopen(name, mode);
#  endif
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x14004(%rip), %rdi     # 0x19200
xorl %ebx, %ebx
movl $0xc1, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x2210
cmpl $-0x1, %eax
je 0x5235
movl %eax, %ebp
leaq 0xe31a(%rip), %rsi      # 0x13537
movl %eax, %edi
callq 0x21f0
movq %rax, %rbx
testq %rax, %rax
jne 0x5235
movl %ebp, %edi
callq 0x2120
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: applySavedTimeInfoToOutputFile
static 
void applySavedTimeInfoToOutputFile ( Char *dstName )
{
#  if BZ_UNIX
   IntNative      retVal;
   struct utimbuf uTimBuf;

   uTimBuf.actime = fileMetaInfo.st_atime;
   uTimBuf.modtime = fileMetaInfo.st_mtime;

   retVal = utime ( dstName, &uTimBuf );
   ERROR_IF_NOT_ZERO ( retVal );
#  endif
}

// Assembly:
subq $0x18, %rsp
movq 0x14bf2(%rip), %rax     # 0x19e98
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq 0x14bf3(%rip), %rax     # 0x19ea8
movq %rax, 0x8(%rsi)
leaq 0x13f40(%rip), %rdi     # 0x19200
callq 0x2040
testl %eax, %eax
jne 0x52ce
addq $0x18, %rsp
retq
callq 0x52d3
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: ioError
static 
void ioError ( void )
{
   fprintf ( stderr,
             "\n%s: I/O or other error, bailing out.  "
             "Possible reason follows.\n",
             progName );
   perror ( progName );
   showFileNames();
   cleanUpAndFail( 1 );
}

// Assembly:
pushq %rax
movq 0x12d1d(%rip), %rax     # 0x17ff8
movq (%rax), %rdi
movq 0x1473b(%rip), %rdx     # 0x19a20
leaq 0xe423(%rip), %rsi      # 0x1370f
xorl %eax, %eax
callq 0x2180
movq 0x14726(%rip), %rdi     # 0x19a20
callq 0x2240
callq 0x4f6e
movl $0x1, %edi
callq 0x4f83
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: uInt64_toAscii
static
void uInt64_toAscii ( char* outbuf, UInt64* n )
{
   Int32  i, q;
   UChar  buf[32];
   Int32  nBuf   = 0;
   UInt64 n_copy = *n;
   do {
      q = uInt64_qrm10 ( &n_copy );
      buf[nBuf] = q + '0';
      nBuf++;
   } while (!uInt64_isZero(&n_copy));
   outbuf[nBuf] = 0;
   for (i = 0; i < nBuf; i++) 
      outbuf[i] = buf[nBuf-i-1];
}

// Assembly:
movq %rsi, -0x30(%rsp)
xorl %eax, %eax
movl $0x7, %ecx
xorl %edx, %edx
shll $0x8, %edx
movzbl -0x30(%rsp,%rcx), %esi
orl %edx, %esi
imulq $0x66666667, %rsi, %rdx # imm = 0x66666667
shrq $0x22, %rdx
movb %dl, -0x30(%rsp,%rcx)
addl %edx, %edx
leal (%rdx,%rdx,4), %r8d
movl %esi, %edx
subl %r8d, %edx
addq $-0x1, %rcx
jb 0x5367
orb $0x30, %dl
movb %dl, -0x28(%rsp,%rax)
leaq 0x1(%rax), %rcx
xorl %edx, %edx
cmpb $0x0, -0x30(%rsp,%rdx)
jne 0x53b0
incq %rdx
cmpq $0x8, %rdx
jne 0x539e
jmp 0x53b5
movq %rcx, %rax
jmp 0x5360
movl %ecx, %ecx
movb $0x0, (%rdi,%rcx)
movslq %eax, %rcx
addq %rsp, %rcx
addq $-0x28, %rcx
movq $-0x1, %rdx
movb (%rcx), %sil
movb %sil, 0x1(%rdi,%rdx)
decq %rcx
incq %rdx
cmpq %rdx, %rax
jne 0x53cc
retq
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: crcError
static 
void crcError ( void )
{
   fprintf ( stderr,
             "\n%s: Data integrity error when decompressing.\n",
             progName );
   showFileNames();
   cadvise();
   cleanUpAndFail( 2 );
}

// Assembly:
pushq %rax
movq 0x12bd0(%rip), %rax     # 0x17ff8
movq (%rax), %rdi
movq 0x145ee(%rip), %rdx     # 0x19a20
leaq 0xe45f(%rip), %rsi      # 0x13898
xorl %eax, %eax
callq 0x2180
callq 0x4f6e
callq 0x50f3
movl $0x2, %edi
callq 0x4f83
// File: /workspace/github_c_makefile_star2_O3/coapp-packages[P]bzip2/bzip2.c
// Function: compressedStreamEOF
static 
void compressedStreamEOF ( void )
{
  if (noisy) {
    fprintf ( stderr,
	      "\n%s: Compressed file ends unexpectedly;\n\t"
	      "perhaps it is corrupted?  *Possible* reason follows.\n",
	      progName );
    perror ( progName );
    showFileNames();
    cadvise();
  }
  cleanUpAndFail( 2 );
}

// Assembly:
pushq %rbx
cmpb $0x0, 0x1396f(%rip)     # 0x18dcb
je 0x54d3
movq 0x12b93(%rip), %rbx     # 0x17ff8
movq (%rbx), %rdi
movq 0x145b1(%rip), %rdx     # 0x19a20
leaq 0xe451(%rip), %rsi      # 0x138c7
xorl %eax, %eax
callq 0x2180
movq 0x1459c(%rip), %rdi     # 0x19a20
callq 0x2240
cmpb $0x0, 0x1393b(%rip)     # 0x18dcb
je 0x54d3
movq (%rbx), %rdi
leaq 0xd4c1(%rip), %rsi      # 0x1295d
leaq 0x1394d(%rip), %rdx     # 0x18df0
leaq 0x13d56(%rip), %rcx     # 0x19200
xorl %eax, %eax
callq 0x2180
cmpb $0x0, 0x13913(%rip)     # 0x18dcb
je 0x54d3
movq (%rbx), %rcx
leaq 0xd658(%rip), %rdi      # 0x12b1c
movl $0xf0, %esi
movl $0x1, %edx
callq 0x2270
movl $0x2, %edi
callq 0x4f83
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/MAGI003769[P]EE450-Socket-Project/serverC.c
// Function: parse_data2
int parse_data2(char *args[], char *data, char *edges, int *vertices) {
    char *end_str;
    char *token = strtok_r(data, "\n", &end_str);
    int i = 0;

    while (token != NULL) {
        char *end_token;
        //printf("debug: check line -- %s\n", token);
        if(i == 0) {
            split_args2(args, token);
        } else if (i < 4) {
            args[i+2] = token;
        } else {
            strcat(edges, token);
            strcat(edges, "\n");
            char *token2 = strtok_r(token, " ", &end_token);
            int j = 0;
            while (token2 != NULL && j < 2) {
                for(int k = 0; k < MAXNUMVERTICES; k++) {
                    if(vertices[k] == atoi(token2)) {
                        break;
                    } else if(vertices[k] == -1) {
                        vertices[k] = atoi(token2);
                        break;
                    }
                }
                token2 = strtok_r(NULL, " ", &end_token);
                j++;
            }
        }
        token = strtok_r(NULL, "\n", &end_str);
        i++;
    }

    int vtx_num = 0;
    while(vertices[vtx_num] != -1 && vtx_num < MAXNUMVERTICES) {
        vtx_num++;
    }
    return vtx_num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, -0x38(%rbp)
movq %rsi, %rax
movq %rdi, %r12
leaq 0xd9d(%rip), %rsi       # 0x2148
leaq -0x40(%rbp), %rdx
movq %rax, %rdi
callq 0x10b0
testq %rax, %rax
je 0x1496
movq %rax, %r15
xorl %r14d, %r14d
leaq -0x48(%rbp), %r13
movq %r12, -0x30(%rbp)
testq %r14, %r14
je 0x13e3
cmpq $0x3, %r14
ja 0x13f3
movq %r15, 0x10(%r12,%r14,8)
jmp 0x1475
movq %r12, %rdi
movq %r15, %rsi
callq 0x1343
jmp 0x1475
movq -0x38(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1130
movq %r12, %rdi
callq 0x1050
movw $0xa, (%r12,%rax)
movq -0x30(%rbp), %r12
movq %r15, %rdi
leaq 0xe0c(%rip), %rsi       # 0x222b
movq %r13, %rdx
callq 0x10b0
testq %rax, %rax
je 0x1475
movb $0x1, %r15b
movq %rax, %rdi
callq 0x1120
xorl %ecx, %ecx
movl (%rbx,%rcx,4), %edx
cmpl %eax, %edx
je 0x1453
cmpl $-0x1, %edx
je 0x1450
incq %rcx
cmpq $0xf, %rcx
jne 0x1439
jmp 0x1453
movl %eax, (%rbx,%rcx,4)
xorl %edi, %edi
leaq 0xdcf(%rip), %rsi       # 0x222b
movq %r13, %rdx
callq 0x10b0
testq %rax, %rax
setne %cl
testb %r15b, %cl
movl $0x0, %r15d
jne 0x142f
xorl %edi, %edi
leaq 0xcca(%rip), %rsi       # 0x2148
leaq -0x40(%rbp), %rdx
callq 0x10b0
movq %rax, %r15
incq %r14
testq %rax, %rax
jne 0x13ce
xorl %ecx, %ecx
leaq 0x1(%rcx), %rax
cmpq $0xe, %rcx
ja 0x14ab
cmpl $-0x1, (%rbx,%rcx,4)
movq %rax, %rcx
jne 0x1498
decl %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_05/fsize.c
// Function: main
int main(int argc, char *argv[])
{
  if (argc == 1)
  {
    fsize(".");
  }
  else
  {
    while (--argc > 0)
    {
      fsize(*++argv);
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jne 0x1292
leaq 0xdad(%rip), %rdi       # 0x2038
callq 0x12bb
jmp 0x12b2
jle 0x12b2
movq %rsi, %rbx
movl %edi, %ebp
addq $0x8, %rbx
incl %ebp
movq (%rbx), %rdi
callq 0x12bb
addq $0x8, %rbx
decl %ebp
cmpl $0x2, %ebp
ja 0x129f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_05/fsize.c
// Function: fsize
void fsize(char *name)
{
  struct stat buffer;

  if (stat(name, &buffer) == -1)
  {
    fprintf(stderr, "fsize: cannot access %s\n", name);
    return;
  }

  if ((buffer.st_mode & S_IFMT) == S_IFDIR)
  {
    dir_walk(name, fsize);
  }

  /**
   * off_t st_size         File size, in bytes
   * dev_t st_dev          ID of device containing file
   * ino_t st_ino          File serial number
   * mode_t st_mode        Mode of file (see below)
   * nlink_t st_nlink      Number of hard links
   * uid_t st_uid          User ID of the file
   * gid_t st_gid          Group ID of the file
   * dev_t st_rdev         Device ID
   * time_t st_atime       Time of last access
   * time_t st_mtime       Last data modification time
   * time_t st_ctime       Time of last status change
   * blkcnt_t st_blocks    Blocks allocated for file
   * blksize_t st_blksize  Optimal blocksize for I/O
   */

  // Printed in a similary fashion to ls -l
  print_file_flags(buffer.st_mode);
  printf("%lu ", buffer.st_nlink);
  print_file_user(buffer.st_uid);
  print_file_group(buffer.st_gid);
  print_file_size(buffer.st_size);
  print_file_time(buffer.st_atime);
  printf("%s\n", name);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x10d0
cmpl $-0x1, %eax
je 0x1348
movl 0x20(%rsp), %ebp
movl %ebp, %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x12f7
leaq -0x34(%rip), %rsi       # 0x12bb
movq %rbx, %rdi
callq 0x136c
movl %ebp, %edi
callq 0x1463
movq 0x18(%rsp), %rsi
leaq 0xd49(%rip), %rdi       # 0x2053
xorl %eax, %eax
callq 0x1090
movl 0x24(%rsp), %edi
callq 0x157e
movl 0x28(%rsp), %edi
callq 0x15a2
movq 0x38(%rsp), %rdi
callq 0x15c6
movq 0x50(%rsp), %rdi
callq 0x1631
movq %rbx, %rdi
addq $0x98, %rsp
popq %rbx
popq %rbp
jmp 0x1050
movq 0x2ca9(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xce1(%rip), %rsi       # 0x203a
movq %rbx, %rdx
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_05/fsize.c
// Function: dir_walk
void dir_walk(char *dir_name, void (*func)(char *))
{
  char name[MAX_PATH_LEN];
  struct dirent *dir_entry;
  DIR *dir;

  if ((dir = opendir(dir_name)) == NULL)
  {
    fprintf(stderr, "dir_walk: cannot open %s\n", dir_name);
    return;
  }

  while ((dir_entry = readdir(dir)) != NULL)
  {
    if (strcmp(dir_entry->d_name, ".") == 0 || strcmp(dir_entry->d_name, "..") == 0)
    {
      continue; // Skip self and parent.
    }

    if (strlen(dir_name) + strlen(dir_entry->d_name) + 2 > MAX_PATH_LEN)
    {
      fprintf(stderr, "dir_walk: path too long\n");
    }
    else
    {
      sprintf(name, "%s/%s", dir_name, dir_entry->d_name);
      (*func)(name);
    }
  }

  closedir(dir);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1060
testq %rax, %rax
je 0x1437
movq %rax, %r15
movq %rax, %rdi
callq 0x10e0
testq %rax, %rax
je 0x141d
movq %rax, %rbp
movq %rsp, %r13
cmpb $0x2e, 0x13(%rbp)
jne 0x13bf
cmpb $0x0, 0x14(%rbp)
je 0x1404
cmpb $0x2e, 0x14(%rbp)
jne 0x13bf
cmpb $0x0, 0x15(%rbp)
je 0x1404
addq $0x13, %rbp
movq %rbx, %rdi
callq 0x1080
movq %rax, %r12
movq %rbp, %rdi
callq 0x1080
addq %r12, %rax
addq $-0x3ff, %rax           # imm = 0xFC01
cmpq $-0x402, %rax           # imm = 0xFBFE
jbe 0x1416
movq %r13, %rdi
leaq 0xc9a(%rip), %rsi       # 0x208b
movq %rbx, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x1100
movq %r13, %rdi
callq *%r14
movq %r15, %rdi
callq 0x10e0
movq %rax, %rbp
testq %rax, %rax
jne 0x13a7
jmp 0x141d
callq 0x1130
jmp 0x1404
movq %r15, %rdi
callq 0x10b0
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2bba(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xc10(%rip), %rsi       # 0x2058
movq %rbx, %rdx
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_05/fsize.c
// Function: print_file_flags
void print_file_flags(mode_t st_mode)
{
  printf("%c", ((st_mode & S_IFMT) == S_IFDIR) ? 'd' : '-');
  printf("%c", (st_mode & S_IRUSR) ? 'r' : '-');
  printf("%c", (st_mode & S_IWUSR) ? 'w' : '-');
  printf("%c", (st_mode & S_IXUSR) ? 'x' : '-');
  printf("%c", (st_mode & S_IRGRP) ? 'r' : '-');
  printf("%c", (st_mode & S_IWGRP) ? 'w' : '-');
  printf("%c", (st_mode & S_IXGRP) ? 'x' : '-');
  printf("%c", (st_mode & S_IROTH) ? 'r' : '-');
  printf("%c", (st_mode & S_IWOTH) ? 'w' : '-');
  printf("%c ", (st_mode & S_IXOTH) ? 'x' : '-');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebp
movl %edi, %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
movl $0x64, %edi
movl $0x2d, %r15d
cmovnel %r15d, %edi
callq 0x1030
btl $0x8, %ebp
movl $0x72, %ebx
movl $0x72, %edi
cmovael %r15d, %edi
callq 0x1030
movd %ebp, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa 0xb5b(%rip), %xmm1      # 0x2010
pand %xmm0, %xmm1
pand 0xb5f(%rip), %xmm0      # 0x2020
pxor %xmm2, %xmm2
pcmpeqd %xmm2, %xmm0
pcmpeqd %xmm2, %xmm1
packssdw %xmm0, %xmm1
packsswb %xmm1, %xmm1
pmovmskb %xmm1, %r12d
testb $-0x80, %r12b
movl $0x77, %r14d
movl $0x77, %edi
cmovnel %r15d, %edi
callq 0x1030
testb $0x40, %r12b
movl $0x78, %ebp
movl $0x78, %edi
cmovnel %r15d, %edi
callq 0x1030
testb $0x20, %r12b
movl $0x72, %edi
cmovnel %r15d, %edi
callq 0x1030
testb $0x10, %r12b
movl $0x77, %edi
cmovnel %r15d, %edi
callq 0x1030
testb $0x8, %r12b
movl $0x78, %edi
cmovnel %r15d, %edi
callq 0x1030
testb $0x4, %r12b
cmovnel %r15d, %ebx
movl %ebx, %edi
callq 0x1030
testb $0x2, %r12b
cmovnel %r15d, %r14d
movl %r14d, %edi
callq 0x1030
testb $0x1, %r12b
cmovnel %r15d, %ebp
leaq 0xb24(%rip), %rdi       # 0x2091
movl %ebp, %esi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1090
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_05/fsize.c
// Function: print_file_user
void print_file_user(uid_t st_uid)
{
  struct passwd *password;
  password = getpwuid(st_uid);

  if (password == NULL)
  {
    fprintf(stderr, "Error: cannot find user\n");
    return;
  }

  printf("%s ", password->pw_name);
}

// Assembly:
pushq %rax
callq 0x1070
testq %rax, %rax
je 0x159b
movq (%rax), %rsi
leaq 0xb40(%rip), %rdi       # 0x20d3
xorl %eax, %eax
popq %rcx
jmp 0x1090
callq 0x1152
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_05/fsize.c
// Function: print_file_group
void print_file_group(gid_t st_gid)
{
  struct group *group;
  group = getgrgid(st_gid);

  if (group == NULL)
  {
    fprintf(stderr, "Error: cannot find group\n");
    return;
  }

  printf("%s ", group->gr_name);
}

// Assembly:
pushq %rax
callq 0x10a0
testq %rax, %rax
je 0x15bf
movq (%rax), %rsi
leaq 0xb1c(%rip), %rdi       # 0x20d3
xorl %eax, %eax
popq %rcx
jmp 0x1090
callq 0x116e
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_05/fsize.c
// Function: print_file_size
void print_file_size(size_t size)
{
  static const char *SIZES[] = {"B", "K", "M", "G"};
  size_t div = 0;
  size_t rem = 0;

  while (size >= 1024 && div < (sizeof SIZES / sizeof *SIZES))
  {
    rem = (size % 1024);
    div++;
    size /= 1024;
  }

  printf("%6.1f%s ", (float)size + (float)rem / 1024.0, SIZES[div]);
}

// Assembly:
cmpq $0x400, %rdi            # imm = 0x400
jb 0x1602
xorl %edx, %edx
movq %rdi, %rcx
leaq 0x1(%rdx), %rax
shrq $0xa, %rdi
cmpq $0x100000, %rcx         # imm = 0x100000
jb 0x15ee
cmpq $0x3, %rdx
movq %rax, %rdx
jb 0x15d1
andl $0x3ff, %ecx            # imm = 0x3FF
cvtsi2sd %ecx, %xmm1
mulsd 0xa30(%rip), %xmm1      # 0x2030
jmp 0x1608
xorpd %xmm1, %xmm1
xorl %eax, %eax
cvtsi2ss %rdi, %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm1, %xmm0
leaq 0xac8(%rip), %rcx       # 0x20e4
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
leaq 0xaa4(%rip), %rdi       # 0x20ce
movb $0x1, %al
jmp 0x1090
// File: /workspace/github_c_makefile_star2_O3/dropletzhu[P]msuite/pim_sender.c
// Function: csum
unsigned short
csum (unsigned short *buf, int nwords)
{
	unsigned long sum;
	for (sum = 0; nwords > 0; nwords--)
		sum += *buf++;
	sum = (sum >> 16) + (sum & 0xffff);
	sum += (sum >> 16);

	return ~sum;
}

// Assembly:
testl %esi, %esi
jle 0x1227
incl %esi
xorl %eax, %eax
movzwl (%rdi), %ecx
addq $0x2, %rdi
addq %rcx, %rax
decl %esi
cmpl $0x1, %esi
ja 0x1214
jmp 0x1229
xorl %eax, %eax
movq %rax, %rcx
shrq $0x10, %rcx
movzwl %ax, %eax
addl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
addl %ecx, %eax
notl %eax
retq
// File: /workspace/github_c_makefile_star2_O3/dropletzhu[P]msuite/pim_sender.c
// Function: make_pim_null_register
int make_pim_null_register()
{
	struct ip *iph;
	struct _SPimRegHdr *pim_reg_header;
	UINT2 *flags;
	char *header = datagram;

	if( has_local_source ) {
		iph = (struct ip*)(header);
		iph->ip_hl = 5;
		iph->ip_v = 4;
		iph->ip_tos = 0;
		iph->ip_len = htons(length);
		iph->ip_id = htonl(random());
		iph->ip_off = 0;
		iph->ip_ttl = 255;
		iph->ip_p = IPPROTO_PIM;
		iph->ip_sum = 0;
		iph->ip_src.s_addr = inet_addr (local_source);
		iph->ip_dst.s_addr = inet_addr (rp);

		header += sizeof(struct ip);
	}

	pim_reg_header = (struct _SPimRegHdr*)(header); 
	pim_reg_header->msgtpe = PIMSM_REGISTER_MSG;
	pim_reg_header->pimver = 2;
	pim_reg_header->nulbit = 1;
	flags = (UINT2*)(header + 4);
	*flags = htons(*flags);
	pim_reg_header->u2Checksum = csum((unsigned short*)pim_reg_header,sizeof(struct _SPimRegHdr)>>1);

	if( has_local_source ) {
		iph->ip_sum = csum((unsigned short*)iph, length>>1);
	}

	return 0;
}

// Assembly:
pushq %rax
cmpl $0x0, 0x2e6d(%rip)      # 0x40b4
je 0x12b2
movw $0x45, 0x2e6e(%rip)     # 0x40c0
movzwl 0x2e3f(%rip), %eax      # 0x4098
rolw $0x8, %ax
movw %ax, 0x2e5e(%rip)       # 0x40c2
callq 0x10b0
bswapl %eax
movw %ax, 0x2e52(%rip)       # 0x40c4
movl $0x67ff0000, 0x2e4a(%rip) # imm = 0x67FF0000
movw $0x0, 0x2e45(%rip)      # 0x40ca
leaq 0x12e34(%rip), %rdi     # 0x140c0
callq 0x10a0
movl %eax, 0x2e35(%rip)      # 0x40cc
leaq 0x12e32(%rip), %rdi     # 0x140d0
callq 0x10a0
movl %eax, 0x2e27(%rip)      # 0x40d0
leaq 0x2e24(%rip), %rax      # 0x40d4
jmp 0x12b9
leaq 0x2e07(%rip), %rax      # 0x40c0
movb $0x21, (%rax)
movl $0x4000, %ecx           # imm = 0x4000
orl 0x4(%rax), %ecx
rolw $0x8, %cx
movw %cx, 0x4(%rax)
movd (%rax), %xmm0
pxor %xmm1, %xmm1
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movd 0x4(%rax), %xmm2
punpcklwd %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
paddq %xmm0, %xmm2
pshufd $0xee, %xmm2, %xmm0     # xmm0 = xmm2[2,3,2,3]
paddq %xmm2, %xmm0
movd %xmm0, %ecx
movzwl %cx, %edx
shrl $0x10, %ecx
addl %ecx, %edx
movl %edx, %ecx
shrl $0x10, %ecx
addl %edx, %ecx
notl %ecx
movw %cx, 0x2(%rax)
cmpl $0x0, 0x2d9e(%rip)      # 0x40b4
je 0x1360
movl 0x2d7a(%rip), %ecx      # 0x4098
sarl %ecx
testl %ecx, %ecx
jle 0x1342
incl %ecx
leaq 0x2d93(%rip), %rdx      # 0x40c0
xorl %eax, %eax
movzwl (%rdx), %esi
addq $0x2, %rdx
addq %rsi, %rax
decl %ecx
cmpl $0x1, %ecx
ja 0x132f
jmp 0x1344
xorl %eax, %eax
movq %rax, %rcx
shrq $0x10, %rcx
movzwl %ax, %eax
addl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
addl %ecx, %eax
notl %eax
movw %ax, 0x2d6a(%rip)       # 0x40ca
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/dropletzhu[P]msuite/pim_sender.c
// Function: usage
void usage()
{
	printf("Usage: ./pim_sender -i local_source -r rp -t type -s mcast_source -g mcast_group -p mcast_port -c count -l length\n");
	printf(" -i local_source    local source address\n");
	printf(" -r rp              rp address\n");
	printf(" -t type            1: null register;  2: register;  3: register-stop\n");	
	printf(" -s mcast_source    multicast payload source address\n");
	printf(" -g mcast_group     multicast payload group address\n");
	printf(" -p mcast_port      multicast payload port\n");
	printf(" -c count           the packet count, default count is unlimited\n");
	printf(" -l length          pim packet length, default is 256 bytes\n");
	printf(" Version:           %s\n", version);
}

// Assembly:
pushq %rax
leaq 0xa43(%rip), %rdi       # 0x215d
callq 0x1040
leaq 0xaa9(%rip), %rdi       # 0x21cf
callq 0x1040
leaq 0xac6(%rip), %rdi       # 0x21f8
callq 0x1040
leaq 0xad9(%rip), %rdi       # 0x2217
callq 0x1040
leaq 0xb13(%rip), %rdi       # 0x225d
callq 0x1040
leaq 0xb3c(%rip), %rdi       # 0x2292
callq 0x1040
leaq 0xb64(%rip), %rdi       # 0x22c6
callq 0x1040
leaq 0xb83(%rip), %rdi       # 0x22f1
callq 0x1040
leaq 0xbb8(%rip), %rdi       # 0x2332
callq 0x1040
leaq 0x8c6(%rip), %rdi       # 0x204c
leaq 0x8d7(%rip), %rsi       # 0x2064
xorl %eax, %eax
popq %rcx
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_4/exercise_4_10/calculator.c
// Function: get_line
int get_line(char line[], unsigned int max_line_len)
{
  int c, i;

  for (i = 0; i < max_line_len - 1 && (c = getchar()) != EOF && c != '\n'; ++i)
  {
    line[i] = c;
  }

  if (c == '\n')
  {
    line[i] = c;
    ++i;
  }

  line[i] = '\0';

  return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
decl %ebp
je 0x17d9
movl %ebp, %r15d
xorl %r14d, %r14d
callq 0x1080
cmpl $-0x1, %eax
je 0x17cf
cmpl $0xa, %eax
je 0x17cf
movb %al, (%rbx,%r14)
incq %r14
cmpq %r14, %r15
jne 0x17b2
jmp 0x17d2
movl %r14d, %ebp
cmpl $0xa, %eax
je 0x17db
jmp 0x17e3
xorl %ebp, %ebp
movl %ebp, %eax
movb $0xa, (%rbx,%rax)
incl %ebp
movslq %ebp, %rax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq