LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/9wm[P]9wm/grab.c
// Function: drag
int
drag(Client * c)
{
	int status;
	ScreenInfo *s;

	s = c->screen;
	if (c->init)
		setmouse(c->x - BORDER, c->y - BORDER, s);
	else {
		getmouse(&c->x, &c->y, s);	/* start at current mouse pos */
		c->x += BORDER;
		c->y += BORDER;
	}
	status = grab(s->root, s->root, ButtonMask, s->boxcurs, 0);
	if (status != GrabSuccess) {
		graberror("drag", status);	/* */
		return 0;
	}
	return sweepdrag(c, 0, dragcalc);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xf8(%rdi), %r14
cmpl $0x0, 0x9c(%rdi)
je 0x639f
leaq 0x4fa7(%rip), %rax      # 0xb330
movl (%rax), %eax
movl 0x28(%rbx), %edi
movl 0x2c(%rbx), %esi
subl %eax, %edi
subl %eax, %esi
movq %r14, %rdx
callq 0x645d
jmp 0x63cd
leaq 0x28(%rbx), %rdi
leaq 0x2c(%rbx), %rsi
movq %r14, %rdx
callq 0x6419
leaq 0x4f7a(%rip), %rax      # 0xb330
movq 0x28(%rbx), %xmm0
movd (%rax), %xmm1
pshufd $0x50, %xmm1, %xmm1     # xmm1 = xmm1[0,0,1,1]
paddd %xmm0, %xmm1
movq %xmm1, 0x28(%rbx)
movq 0x8(%r14), %rdi
movq 0x60(%r14), %rcx
pushq $0xc
popq %rdx
movq %rdi, %rsi
xorl %r8d, %r8d
callq 0x575a
testl %eax, %eax
je 0x6401
leaq 0x13bc(%rip), %rdi      # 0x77aa
movl %eax, %esi
xorl %eax, %eax
callq 0x67ef
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq -0x4ce(%rip), %rdx      # 0x5f3a
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6047
// File: /workspace/github_c_makefile_star2_O2/9wm[P]9wm/cursor.c
// Function: initcurs
void
initcurs(ScreenInfo * s)
{
	XColor dummy;

	XAllocNamedColor(dpy, DefaultColormap(dpy, s->num), "black", &bl, &dummy);
	XAllocNamedColor(dpy, DefaultColormap(dpy, s->num), "white", &wh, &dummy);

	switch (curs) {
	case 2:
		s->arrow = getcursor(&blitarrow, s);
		s->target = getcursor(&blittarget, s);
		s->sweep0 = getcursor(&blitsweep, s);
		s->boxcurs = getcursor(&blitsweep, s);
		break;
	case 1:
		s->arrow = getcursor(&arrowdata, s);
		s->target = getcursor(&sightdata, s);
		s->sweep0 = getcursor(&sweep0data, s);
		s->boxcurs = getcursor(&boxcursdata, s);
		break;
	default:
		s->arrow = XCreateFontCursor(dpy, XC_left_ptr);
		s->target = XCreateFontCursor(dpy, XC_crosshair);
		s->sweep0 = XCreateFontCursor(dpy, XC_sizing);
		s->boxcurs = XCreateFontCursor(dpy, XC_dotbox);
		break;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x5447(%rip), %r15      # 0xb988
movq (%r15), %rdi
movq 0xe8(%rdi), %rax
movslq (%rbx), %rcx
shlq $0x7, %rcx
movq 0x50(%rax,%rcx), %rsi
leaq 0x1251(%rip), %rdx      # 0x77af
leaq 0x55f3(%rip), %rcx      # 0xbb58
movq %rsp, %r14
movq %r14, %r8
callq 0x2410
movq (%r15), %rdi
movq 0xe8(%rdi), %rax
movslq (%rbx), %rcx
shlq $0x7, %rcx
movq 0x50(%rax,%rcx), %rsi
leaq 0x1228(%rip), %rdx      # 0x77b5
leaq 0x55d4(%rip), %rcx      # 0xbb68
movq %r14, %r8
callq 0x2410
leaq 0x53d9(%rip), %rax      # 0xb97c
movl (%rax), %eax
cmpl $0x1, %eax
je 0x65f4
cmpl $0x2, %eax
jne 0x663e
leaq 0x527e(%rip), %rdi      # 0xb838
movq %rbx, %rsi
callq 0x6494
movq %rax, 0x68(%rbx)
leaq 0x51df(%rip), %rdi      # 0xb7ac
movq %rbx, %rsi
callq 0x6494
movq %rax, 0x50(%rbx)
leaq 0x52e4(%rip), %r14      # 0xb8c4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6494
movq %rax, 0x58(%rbx)
movq %r14, %rdi
jmp 0x6634
leaq 0x5099(%rip), %rdi      # 0xb694
movq %rbx, %rsi
callq 0x6494
movq %rax, 0x68(%rbx)
leaq 0x4ffa(%rip), %rdi      # 0xb608
movq %rbx, %rsi
callq 0x6494
movq %rax, 0x50(%rbx)
leaq 0x4ecf(%rip), %rdi      # 0xb4f0
movq %rbx, %rsi
callq 0x6494
movq %rax, 0x58(%rbx)
leaq 0x4f48(%rip), %rdi      # 0xb57c
movq %rbx, %rsi
callq 0x6494
jmp 0x6676
movq (%r15), %rdi
pushq $0x44
popq %rsi
callq 0x20e0
movq %rax, 0x68(%rbx)
movq (%r15), %rdi
pushq $0x22
popq %rsi
callq 0x20e0
movq %rax, 0x50(%rbx)
movq (%r15), %rdi
pushq $0x78
popq %rsi
callq 0x20e0
movq %rax, 0x58(%rbx)
movq (%r15), %rdi
pushq $0x28
popq %rsi
callq 0x20e0
movq %rax, 0x60(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/9wm[P]9wm/error.c
// Function: fatal
void
fatal(char *s)
{
	fprintf(stderr, "9wm: ");
	perror(s);
	fprintf(stderr, "\n");
	exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4966(%rip), %r14      # 0xaff8
movq (%r14), %rcx
leaq 0x111f(%rip), %rdi      # 0x77bb
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
callq 0x2540
movq %rbx, %rdi
callq 0x24b0
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x2240
pushq $0x1
popq %rdi
callq 0x2530
// File: /workspace/github_c_makefile_star2_O2/9wm[P]9wm/error.c
// Function: handler
int
handler(Display * d, XErrorEvent * e)
{
	char msg[80], req[80], number[80];

	if (initting && (e->request_code == X_ChangeWindowAttributes) && (e->error_code == BadAccess)) {
		fprintf(stderr, "9wm: it looks like there's already a window manager running;  9wm not started\n");
		exit(1);
	}

	if (ignore_badwindow && (e->error_code == BadWindow || e->error_code == BadColor))
		return 0;

	XGetErrorText(d, e->error_code, msg, sizeof(msg));
	sprintf(number, "%d", e->request_code);
	XGetErrorDatabaseText(d, "XRequest", number, "", req, sizeof(req));
	if (req[0] == '\0')
		sprintf(req, "<request-code-%d>", e->request_code);

	fprintf(stderr, "9wm: %s(0x%x): %s\n", req, (int) e->resourceid, msg);

	if (initting) {
		fprintf(stderr, "9wm: failure during initialisation; aborting\n");
		exit(1);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x52b0(%rip), %r13      # 0xb990
cmpl $0x0, (%r13)
je 0x66f7
cmpb $0x2, 0x21(%rbx)
jne 0x66f7
cmpb $0xa, 0x20(%rbx)
je 0x67cb
cmpl $0x0, 0x547a(%rip)      # 0xbb78
movzbl 0x20(%rbx), %esi
je 0x6722
cmpl $0x3, %esi
je 0x670e
cmpl $0xc, %esi
jne 0x6722
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50(%rsp), %rdx
pushq $0x50
popq %rbp
movq %r14, %rdi
movl %ebp, %ecx
callq 0x2380
movzbl 0x21(%rbx), %edx
leaq 0xc2a(%rip), %rsi       # 0x7369
leaq 0xa0(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2520
leaq 0x10b8(%rip), %rsi      # 0x7810
leaq 0xa56(%rip), %rcx       # 0x71b5
movq %rsp, %r12
movq %r14, %rdi
movq %r15, %rdx
movq %r12, %r8
movl %ebp, %r9d
callq 0x2290
cmpb $0x0, (%r12)
jne 0x678f
movzbl 0x21(%rbx), %edx
leaq 0x1094(%rip), %rsi      # 0x7819
movq %rsp, %rdi
xorl %eax, %eax
callq 0x2520
movq 0x4862(%rip), %r14      # 0xaff8
movq (%r14), %rdi
movl 0x10(%rbx), %ecx
leaq 0x1088(%rip), %rsi      # 0x782b
movq %rsp, %rdx
leaq 0x50(%rsp), %r8
xorl %eax, %eax
callq 0x22c0
cmpl $0x0, (%r13)
je 0x670e
movq (%r14), %rcx
leaq 0x1077(%rip), %rdi      # 0x783e
pushq $0x2d
jmp 0x67de
movq 0x4826(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0xfe5(%rip), %rdi       # 0x77c1
pushq $0x4e
popq %rsi
pushq $0x1
popq %rdx
callq 0x2540
pushq $0x1
popq %rdi
callq 0x2530
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: propagate
void propagate(Node* node) {
    #ifdef SUBTREE_INCREMENT
    if (node != NULL && node->augments.lazy != 0) {
        node->value += node->augments.lazy;
        #ifdef SUBTREE_MIN
        node->augments.min += node->augments.lazy;
        #endif
        #ifdef SUBTREE_MAX
        node->augments.max += node->augments.lazy;
        #endif
        #ifdef SUBTREE_SUM
        node->augments.sum += (node->augments.lazy) * (node->augments.size);
        #endif
        if (node->left != NULL) {
            node->left->augments.lazy += node->augments.lazy;
        }
        if (node->right != NULL) {
            node->right->augments.lazy += node->augments.lazy;
        }
        node->augments.lazy = 0;
    }
    #endif
}

// Assembly:
testq %rdi, %rdi
je 0x12a5
movq 0x50(%rdi), %rax
testq %rax, %rax
je 0x12a5
addq %rax, 0x20(%rdi)
vpbroadcastq %rax, %xmm0
vpaddq 0x30(%rdi), %xmm0, %xmm0
vmovdqu %xmm0, 0x30(%rdi)
movq 0x48(%rdi), %rcx
imulq %rax, %rcx
addq %rcx, 0x40(%rdi)
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x128f
addq %rax, 0x50(%rcx)
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x12a0
movq 0x50(%rdi), %rcx
addq %rcx, 0x50(%rax)
andq $0x0, 0x50(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: make_node
Node* make_node(k_t key, v_t value, int is_start) {
    Node* node = malloc(sizeof(Node));
    node->key = key;
    node->value = value;

    node->left = NULL;
    node->right = NULL;
    node->parent = NULL;
    node->is_start = is_start;

    augment_node(node);
    return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x58
popq %rdi
callq 0x1070
movq %rax, %r12
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movl %ebx, 0x28(%rax)
movq %rax, %rdi
callq 0x119c
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: delete_recursive
void delete_recursive(Node* node) {
    if (node == NULL) return;

    delete_recursive(node->left);
    delete_recursive(node->right);
    free(node);
}

// Assembly:
testq %rdi, %rdi
je 0x1314
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x12f0
movq 0x10(%rbx), %rdi
callq 0x12f0
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: splay
void splay(Node* node) {

    // rotate until node is at root
    while (node->parent) {
        Node* parent = node->parent;
        Node* gp = parent->parent;

        if (gp == NULL) {
            // zig step
            if (node == parent->left) {
                right_rotate(node);
            } else {
                left_rotate(node);
            }
            break;
        }
        if (node == parent->left) {
            if (parent == gp->left) {
                // zig-zig
                right_rotate(parent);
                right_rotate(node);
            } else {
                // zig-zag
                right_rotate(node);
                left_rotate(node);
            }
        } else {
            if (parent == gp->left) {
                // zig-zag
                left_rotate(node);
                right_rotate(node);
            } else {
                // zig-zig
                left_rotate(parent);
                left_rotate(node);
            }
        }
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1394
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
testq %rcx, %rcx
je 0x1396
movq 0x8(%rcx), %rcx
cmpq %rbx, %rax
je 0x1364
cmpq %rcx, %rdi
je 0x137b
callq 0x158d
jmp 0x1371
cmpq %rcx, %rdi
je 0x1385
movq %rbx, %rdi
callq 0x1510
movq %rbx, %rdi
callq 0x158d
jmp 0x133b
movq %rbx, %rdi
callq 0x158d
jmp 0x138a
callq 0x1510
movq %rbx, %rdi
callq 0x1510
jmp 0x133b
popq %rbx
retq
movq %rbx, %rdi
cmpq %rbx, %rax
je 0x13a4
popq %rbx
jmp 0x158d
popq %rbx
jmp 0x1510
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: update_range
void update_range(Node* start, Node* end, v_t delta) {
    // split out subtree
    Node* left = split_left(start);
    Node* right = split_right(end);

    // increment values
    end->augments.lazy += delta;
    propagate(end);

    // re-concatenate tree
    merge(left, merge(end, right));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
callq 0x13f8
movq %rax, %r15
movq %r14, %rdi
callq 0x1429
movq %rax, %r12
addq %rbx, 0x50(%r14)
movq %r14, %rdi
callq 0x1254
movq %r14, %rdi
movq %r12, %rsi
callq 0x145a
movq %r15, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145a
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: split_left
Node* split_left(Node* node) {
    // node ends up on right side
    // returns the root of the other (left) tree
    // which might be null
    splay(node);
    Node* left = node->left;
    if (left != NULL) {
        left->parent = NULL;
        node->left = NULL;
    }

    augment_node(node);
    return left;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1337
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1416
andq $0x0, (%r14)
andq $0x0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x119c
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: split_right
Node* split_right(Node* node) {
    // node ends up on left side
    // returns the root of the other (right) tree
    // which might be null
    splay(node);
    Node* right = node->right;
    if (right != NULL) {
        right->parent = NULL;
        node->right = NULL;
    }

    augment_node(node);
    return right;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1337
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x1447
andq $0x0, (%r14)
andq $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0x119c
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: merge
Node* merge(Node* node1, Node* node2) {

    // if either node is null, return the other
    if (node1 == NULL) {
        return node2;
    }
    if (node2 == NULL) {
        return node1;
    }

    // max of node1's tree becomes new root
    Node* root = find_max(node1);
    splay(root);

    // append node2's tree
    root->right = node2;
    node2->parent = root;

    augment_node(root);
    return root;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x1492
testq %rbx, %rbx
je 0x148f
callq 0x163b
movq %rax, %r14
movq %rax, %rdi
callq 0x1337
movq %rbx, 0x10(%r14)
movq %r14, (%rbx)
movq %r14, %rdi
callq 0x119c
movq %r14, %rbx
jmp 0x1492
movq %rdi, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: query
Augmentations query(Node* start, Node* end) {
    // split out subtree
    Node* left = split_left(start);
    Node* right = split_right(end);

    // find query value
    Augmentations ret = end->augments;

    // re-concatenate tree
    merge(left, merge(end, right));
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x13f8
movq %rax, %r15
movq %rbx, %rdi
callq 0x1429
vmovups 0x30(%rbx), %ymm0
vmovups %ymm0, (%r14)
movq 0x50(%rbx), %rcx
movq %rcx, 0x20(%r14)
movq %rbx, %rdi
movq %rax, %rsi
vzeroupper
callq 0x145a
movq %r15, %rdi
movq %rax, %rsi
callq 0x145a
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: right_rotate
void right_rotate(Node* node) {
    Node* parent = node->parent;

    // propagate augmented values
    propagate(parent);
    propagate(parent->left);
    propagate(parent->right);
    propagate(node->left);
    propagate(node->right);

    // updating pointers with grandparent node
    Node* gp = parent->parent;
    if (gp != NULL) {
        if (parent == gp->left) {
            gp->left = node;
        }
        else {
            gp->right = node;
        }
    }
    node->parent = gp;
    parent->parent = node;
    parent->left = node->right;
    if (parent->left != NULL) {
        parent->left->parent = parent;
    }
    node->right = parent;

    augment_node(parent);
    augment_node(node);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq %r14, %rdi
callq 0x1254
movq 0x8(%r14), %rdi
callq 0x1254
movq 0x10(%r14), %rdi
callq 0x1254
movq 0x8(%rbx), %rdi
callq 0x1254
movq 0x10(%rbx), %rdi
callq 0x1254
movq (%r14), %rax
testq %rax, %rax
je 0x155c
xorl %ecx, %ecx
cmpq 0x8(%rax), %r14
setne %cl
movq %rbx, 0x8(%rax,%rcx,8)
movq %rax, (%rbx)
movq %rbx, (%r14)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x1572
movq %r14, (%rax)
movq %r14, 0x10(%rbx)
movq %r14, %rdi
callq 0x119c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x119c
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: left_rotate
void left_rotate(Node* node) {
    Node* parent = node->parent;

    // propagate augmented values
    propagate(parent);
    propagate(parent->left);
    propagate(parent->right);
    propagate(node->left);
    propagate(node->right);

    // updating pointers with grandparent node
    Node* gp = parent->parent;
    if (gp != NULL) {
        if (parent == gp->right) {
            gp->right = node;
        }
        else {
            gp->left = node;
        }
    }
    node->parent = gp;
    parent->parent = node;
    parent->right = node->left;
    if (parent->right != NULL) {
        parent->right->parent = parent;
    }
    node->left = parent;

    augment_node(parent);
    augment_node(node);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq %r14, %rdi
callq 0x1254
movq 0x8(%r14), %rdi
callq 0x1254
movq 0x10(%r14), %rdi
callq 0x1254
movq 0x8(%rbx), %rdi
callq 0x1254
movq 0x10(%rbx), %rdi
callq 0x1254
movq (%r14), %rax
testq %rax, %rax
je 0x15d9
xorl %ecx, %ecx
cmpq 0x10(%rax), %r14
sete %cl
movq %rbx, 0x8(%rax,%rcx,8)
movq %rax, (%rbx)
movq %rbx, (%r14)
movq 0x8(%rbx), %rax
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x15ef
movq %r14, (%rax)
movq %r14, 0x8(%rbx)
movq %r14, %rdi
callq 0x119c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x119c
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: find_min
Node* find_min(Node* node) {
    // node must not be null
    if (node == NULL) {
        return NULL;
    }

    // walk left to min
    while (node->left != NULL) {
        node = node->left;
    }
    splay(node);
    return node;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x1634
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x161e
movq %rbx, %rdi
callq 0x1337
jmp 0x1636
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: print
void print(Node* node) {
    if (node != NULL) {
        print(node->left);
        printf("(%ld, %ld) ", node->key, node->value);
        printf("[%ld, %ld, %ld, %ld] ", node->augments.min, node->augments.max,
        node->augments.sum, node->augments.size);
        print(node->right);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x19c3(%rip), %r14      # 0x3022
leaq 0x19c8(%rip), %r15      # 0x302e
testq %rbx, %rbx
je 0x16a6
movq 0x8(%rbx), %rdi
callq 0x1650
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
movq 0x40(%rbx), %rcx
movq 0x48(%rbx), %r8
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
movq 0x10(%rbx), %rbx
jmp 0x1666
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree.c
// Function: make_euler_tour_tree
EulerTourTree* make_euler_tour_tree(s_t n) {
    EulerTourTree* tree = malloc(sizeof(EulerTourTree));
    tree->n = n;

    // visits is a length-2n array of Node pointers.
    // visits[2i] and visits[2i+1] stores the pointers to the
    // first and last visits of node i, respectively.
    tree->visits = malloc(sizeof(NodePair) * n);
    tree->has_parent = malloc(sizeof(bool) * n);

    // make n Nodes with default values
    for (k_t i = 0; i < n; ++i) {
        Node* node = make_node(i, 0, 1);
        tree->visits[i].first = node;
        tree->visits[i].last = node;
        tree->has_parent[i] = false;
    }

    return tree;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x1070
movq %rax, %r14
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
shlq $0x4, %rdi
callq 0x1070
movq %rax, %r15
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x1070
movq %rax, %r12
movq %rax, 0x8(%r14)
addq $0x8, %r15
xorl %r13d, %r13d
pushq $0x1
popq %rbp
cmpq %r13, %rbx
je 0x171a
movq %r13, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x12a6
movq %rax, -0x8(%r15)
movq %rax, (%r15)
movb $0x0, (%r12,%r13)
incq %r13
addq $0x10, %r15
jmp 0x16f4
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree.c
// Function: extend_euler_tour_tree
void extend_euler_tour_tree(EulerTourTree* tree, s_t n) {
    s_t old_n = tree->n;
    tree->n = n;

    // visits is a length-2n array of Node pointers.
    // visits[2i] and visits[2i+1] stores the pointers to the
    // first and last visits of node i, respectively.
    tree->visits = realloc(tree->visits, sizeof(NodePair) * n);
    tree->has_parent = realloc(tree->has_parent, sizeof(bool) * n);

    // make n Nodes with default values
    for (k_t i = old_n; i < n; ++i) {
        Node* node = make_node(i, 0, 1);
        tree->visits[i].first = node;
        tree->visits[i].last = node;
        tree->has_parent[i] = false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x10(%r14), %r15
movq %rsi, 0x10(%r14)
shlq $0x4, %rsi
callq 0x1080
movq %rax, (%r14)
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x1080
movq %rax, 0x8(%r14)
movq %r15, %r12
shlq $0x4, %r12
orq $0x8, %r12
pushq $0x1
popq %rbp
cmpq %rbx, %r15
jae 0x179e
movq %r15, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x12a6
movq (%r14), %rcx
movq %rax, -0x8(%rcx,%r12)
movq %rax, (%rcx,%r12)
movq 0x8(%r14), %rax
movb $0x0, (%rax,%r15)
incq %r15
addq $0x10, %r12
jmp 0x176f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree.c
// Function: destroy_euler_tour_tree
void destroy_euler_tour_tree(EulerTourTree* tree) {
    
    s_t n = tree->n;

    for (k_t i = 0; i < n; ++i) {
        if (!tree->has_parent[i]) {
            Node* node = tree->visits[i].first;
            root(node);
            delete_recursive(node);
        }
    }

    free(tree->visits);
    free(tree->has_parent);
    free(tree);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x17ed
movq 0x8(%rbx), %rax
cmpb $0x0, (%rax,%r13)
jne 0x17e4
movq (%rbx), %rax
movq (%rax,%r12), %r14
movq %r14, %rdi
callq 0x160a
movq %r14, %rdi
callq 0x12f0
incq %r13
addq $0x10, %r12
jmp 0x17bd
movq (%rbx), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree.c
// Function: find_root
k_t find_root(EulerTourTree* tree, k_t v) {
    // if out-of-bounds, then node is singleton
    if (v >= tree->n) {
        return v;
    }

    // return minimum element of the splay tree starting from first visit to v

    Node* first_visit = tree->visits[v].first;
    root(first_visit);
    Node* min_node = find_min(first_visit);
    return min_node->key;
}

// Assembly:
movq %rsi, %rax
cmpq %rsi, 0x10(%rdi)
jbe 0x1839
pushq %rbx
movq (%rdi), %rcx
shlq $0x4, %rax
movq (%rcx,%rax), %rbx
movq %rbx, %rdi
callq 0x160a
movq %rbx, %rdi
callq 0x1618
movq 0x18(%rax), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree.c
// Function: cut
int cut(EulerTourTree* tree, k_t v) {
    // return if node is out-of-bounds or does not have a parent
    if (v >= tree->n || !tree->has_parent[v]) {
        return 1;
    }
        
    tree->has_parent[v] = false;

    // split splay tree before first and after last visit to v
    Node* first = tree->visits[v].first;
    Node* last = tree->visits[v].last;
    Node* left = split_left(first);
    Node* right = split_right(last);

    // potential extra visitation
    Node* redundant = find_min(right);

    // cut redundant node
    if (redundant->right != NULL) {
        redundant->right->parent = NULL;
    }

    // reassign last pointer if necessary
    if (tree->visits[redundant->key].last == redundant) {
        tree->visits[redundant->key].last = find_max(left);
    }

    merge(left, redundant->right);
    free(redundant);
    return 0;
}

// Assembly:
pushq $0x1
popq %rax
cmpq %rsi, 0x10(%rdi)
jbe 0x18da
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
cmpb $0x1, (%rcx,%rsi)
jne 0x18d5
movb $0x0, (%rcx,%rsi)
movq (%rbx), %rax
shlq $0x4, %rsi
movq (%rax,%rsi), %rdi
movq 0x8(%rax,%rsi), %r15
callq 0x13f8
movq %rax, %r14
movq %r15, %rdi
callq 0x1429
movq %rax, %rdi
callq 0x1618
movq %rax, %r15
movq 0x10(%rax), %rsi
testq %rsi, %rsi
je 0x1895
andq $0x0, (%rsi)
movq (%rbx), %rax
movq 0x18(%r15), %rcx
shlq $0x4, %rcx
cmpq %r15, 0x8(%rax,%rcx)
jne 0x18c3
movq %r14, %rdi
callq 0x163b
movq (%rbx), %rcx
movq 0x18(%r15), %rdx
shlq $0x4, %rdx
movq %rax, 0x8(%rcx,%rdx)
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x145a
movq %r15, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree.c
// Function: link
int link(EulerTourTree* tree, k_t u, k_t v) {
    if (u >= tree->n) {
        extend_euler_tour_tree(tree, u+1);
    }
    if (v >= tree->n) {
        extend_euler_tour_tree(tree, v+1);
    }

    if (!tree->has_parent[u]) {
        tree->has_parent[u] = true;
    }
    else {
        return 1;
    }

    if (find_root(tree, v) == u) {
        return 2;
    }
    

    // split before last visit to v
    Node* left = split_left(tree->visits[v].last);

    // create new visit to v
    int is_first = (tree->visits[v].first == tree->visits[v].last);
    Node* new_v = make_node(v, tree->visits[v].first->value, is_first);

    // concatenate visits in the correct order
    Node* root_node = merge(left, new_v);
    root(tree->visits[u].first);
    root_node = merge(root_node, tree->visits[u].first);
    root_node = merge(root_node, tree->visits[v].last);

    // if v was a leaf, need to update visits
    if (is_first) {
        update_node_start(tree->visits[v].first, 0);
        tree->visits[v].first = new_v;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rax
cmpq %rsi, %rax
ja 0x1908
leaq 0x1(%r14), %rsi
movq %rbx, %rdi
callq 0x172c
movq 0x10(%rbx), %rax
cmpq %r15, %rax
ja 0x1919
leaq 0x1(%r15), %rsi
movq %rbx, %rdi
callq 0x172c
movq 0x8(%rbx), %rax
cmpb $0x0, (%rax,%r14)
je 0x1928
pushq $0x1
jmp 0x193f
movb $0x1, (%rax,%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x180f
cmpq %r14, %rax
jne 0x1951
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
movq %r15, %r13
shlq $0x4, %r13
movq 0x8(%rax,%r13), %rdi
callq 0x13f8
movq %rax, %rbp
movq (%rbx), %rax
movq (%rax,%r13), %r12
movq 0x8(%rax,%r13), %rax
movq %rax, (%rsp)
xorl %edx, %edx
cmpq %rax, %r12
sete %dl
movq 0x20(%r12), %rsi
movq %r15, %rdi
callq 0x12a6
movq %rax, %r15
movq %rbp, %rdi
movq %rax, %rsi
callq 0x145a
movq %rax, %rbp
movq (%rbx), %rax
shlq $0x4, %r14
movq (%rax,%r14), %rdi
callq 0x160a
movq (%rbx), %rax
movq (%rax,%r14), %rsi
movq %rbp, %rdi
callq 0x145a
movq (%rbx), %rcx
movq 0x8(%rcx,%r13), %rsi
movq %rax, %rdi
callq 0x145a
xorl %ebp, %ebp
cmpq (%rsp), %r12
jne 0x1940
movq (%rbx), %rax
movq (%rax,%r13), %rdi
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x149d
movq (%rbx), %rax
movq %r15, (%rax,%r13)
jmp 0x1940
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree_test.c
// Function: make_euler_tour_tree_test
EulerTourTreeTest* make_euler_tour_tree_test(s_t n) {
    EulerTourTreeTest* tree = malloc(sizeof(EulerTourTreeTest));
    tree->n = n;
    tree->parent = malloc(sizeof(v_t) * n);
    tree->value = malloc(sizeof(v_t) * n);
    for (k_t i = 0; i < n; i++) {
        tree->value[i] = i*10;
        tree->parent[i] = -1;
    }
    return tree;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x1070
movq %rax, %r14
movq %rbx, 0x10(%rax)
leaq (,%rbx,8), %r12
movq %r12, %rdi
callq 0x1070
movq %rax, %r15
movq %rax, (%r14)
movq %r12, %rdi
callq 0x1070
movq %rax, 0x8(%r14)
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %rdx, %rbx
je 0x1b87
movq %rcx, (%rax,%rdx,8)
orq $-0x1, (%r15,%rdx,8)
incq %rdx
addq $0xa, %rcx
jmp 0x1b70
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree_test.c
// Function: is_ancestor
bool is_ancestor(EulerTourTreeTest* tree, k_t u, k_t v) {
    while (v != -1) {
        if (u == v) {
            return true;
        }
        v = tree->parent[v];
    }
    return false;
}

// Assembly:
cmpq %rsi, %rdx
je 0x1baa
cmpq $-0x1, %rdx
je 0x1baa
movq (%rdi), %rax
movq (%rax,%rdx,8), %rdx
jmp 0x1b96
cmpq $-0x1, %rdx
setne %al
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree_test.c
// Function: subtree_update_test
void subtree_update_test(EulerTourTreeTest* tree, k_t v, v_t delta) {
    tree->value[v] += delta;
    for (k_t i = 0; i < tree->n; i++) {
        if (tree->parent[i] == v) {
            subtree_update_test(tree, i, delta);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rax
addq %rdx, (%rax,%rsi,8)
xorl %r12d, %r12d
cmpq 0x10(%r15), %r12
jge 0x1c45
movq (%r15), %rax
cmpq %r14, (%rax,%r12,8)
jne 0x1c40
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1c07
incq %r12
jmp 0x1c23
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree_test.c
// Function: subtree_aggregate_min_test
v_t subtree_aggregate_min_test(EulerTourTreeTest* tree, k_t v) {
    v_t min_val = tree->value[v];
    for (k_t i = 0; i < tree->n; i++) {
        if (tree->parent[i] == v) {
            min_val = MIN(min_val, subtree_aggregate_min_test(tree, i));
        }
    }
    return min_val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
movq (%rax,%rsi,8), %r15
movq %rcx, %rax
sarq $0x3f, %rax
andnq %rcx, %rax, %r13
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x1ca0
movq (%r14), %rax
cmpq %rbx, (%rax,%r12,8)
jne 0x1c9b
movq %r14, %rdi
movq %r12, %rsi
callq 0x1c51
cmpq %rax, %r15
cmovgeq %rax, %r15
incq %r12
jmp 0x1c7b
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree_test.c
// Function: subtree_aggregate_max_test
v_t subtree_aggregate_max_test(EulerTourTreeTest* tree, k_t v) {
    v_t max_val = tree->value[v];
    for (k_t i = 0; i < tree->n; i++) {
        if (tree->parent[i] == v) {
            max_val = MAX(max_val, subtree_aggregate_max_test(tree, i));
        }
    }
    return max_val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
movq (%rax,%rsi,8), %r15
movq %rcx, %rax
sarq $0x3f, %rax
andnq %rcx, %rax, %r13
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x1cfc
movq (%r14), %rax
cmpq %rbx, (%rax,%r12,8)
jne 0x1cf7
movq %r14, %rdi
movq %r12, %rsi
callq 0x1cad
cmpq %rax, %r15
cmovleq %rax, %r15
incq %r12
jmp 0x1cd7
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree_test.c
// Function: subtree_aggregate_sum_test
v_t subtree_aggregate_sum_test(EulerTourTreeTest* tree, k_t v) {
    v_t sum = tree->value[v];
    for (k_t i = 0; i < tree->n; i++) {
        if (tree->parent[i] == v) {
            sum += subtree_aggregate_sum_test(tree, i);
        }
    }
    return sum;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
movq (%rax,%rsi,8), %r15
movq %rcx, %rax
sarq $0x3f, %rax
andnq %rcx, %rax, %r13
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x1d54
movq (%r14), %rax
cmpq %rbx, (%rax,%r12,8)
jne 0x1d4f
movq %r14, %rdi
movq %r12, %rsi
callq 0x1d09
addq %rax, %r15
incq %r12
jmp 0x1d33
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/6851-2021[P]euler_tour_tree/euler_tour_tree_test.c
// Function: subtree_aggregate_size_test
v_t subtree_aggregate_size_test(EulerTourTreeTest* tree, k_t v) {
    v_t count = 1;
    for (k_t i = 0; i < tree->n; i++) {
        if (tree->parent[i] == v) {
            count += subtree_aggregate_size_test(tree, i);
        }
    }
    return count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq %rax, %rcx
sarq $0x3f, %rcx
andnq %rax, %rcx, %r13
pushq $0x1
popq %r15
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x1da8
movq (%r14), %rax
cmpq %rbx, (%rax,%r12,8)
jne 0x1da3
movq %r14, %rdi
movq %r12, %rsi
callq 0x1d61
addq %rax, %r15
incq %r12
jmp 0x1d87
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_20/detab.c
// Function: main
int main(void)
{
  int c;
  unsigned int nr_of_spaces;

  while ((c = getchar()) != EOF)
  {
    if (c == '\t')
    {
      nr_of_spaces = TAB_LENGTH;

      while (nr_of_spaces)
      {
        putchar(' ');
        --nr_of_spaces;
      }
    }
    else
    {
      putchar(c);
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
pushq $-0x8
popq %rbp
pushq $0x20
popq %rbx
callq 0x1040
cmpl $0x9, %eax
je 0x116e
cmpl $-0x1, %eax
je 0x1182
movl %eax, %edi
callq 0x1030
jmp 0x1156
movl %ebp, %r14d
testl %r14d, %r14d
je 0x1156
movl %ebx, %edi
callq 0x1030
incl %r14d
jmp 0x1171
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/giometti[P]mastering_UNIX_programming/chapter_03/flockw.c
// Function: main
int main(void)
{
	int  fd;
	char buf[32];
	int ret;
	struct flock fl;

        /* Open the file */
        fd = open("file.locked", O_WRONLY);
        if (fd < 0) {
                perror("open");
                return -1;
        }
        printf("file opened\n");

	/* Establish the write lock */
	fl.l_type   = F_WRLCK;
	fl.l_whence = SEEK_SET;
	fl.l_start  = 0;        /* Offset from l_whence */
	fl.l_len    = 0;        /* length, 0 = to EOF   */
	fl.l_pid    = getpid();
	ret = fcntl(fd, F_SETLKW, &fl);
	if (ret < 0) {
                perror("fcntl(F_SETLKW)");
                return -1;
        }
        printf("write lock get\n");

	ret = write(fd, buf, 32);
        if (ret < 0) {
                perror("write");
                return -1;
        }
        printf("write done\n");

        printf("sleeping 10s...\n");
        sleep(10);

        /* Unlock the region */
        fl.l_type   = F_UNLCK;
        fl.l_whence = SEEK_SET;
        fl.l_start  = 0;        /* Offset from l_whence */
        fl.l_len    = 0;        /* length, 0 = to EOF   */
        fl.l_pid    = getpid();
        ret = fcntl(fd, F_UNLCK, &fl); 
        if (ret < 0) {
                perror("fcntl(F_SETLKW)");
                return -1;
        }
        printf("unlock done\n");

	close(fd);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
leaq 0xe49(%rip), %rdi       # 0x2004
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x1080
testl %eax, %eax
js 0x129c
movl %eax, %ebx
leaq 0xe55(%rip), %rdi       # 0x202b
callq 0x1030
movq %rsp, %r14
movl $0x1, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
callq 0x1060
movl %eax, 0x18(%r14)
pushq $0x7
popq %rsi
movl %ebx, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1040
testl %eax, %eax
js 0x1293
leaq 0xe23(%rip), %rdi       # 0x2037
callq 0x1030
leaq 0x20(%rsp), %rsi
pushq $0x20
popq %rdx
movl %ebx, %edi
callq 0x1050
testl %eax, %eax
js 0x12a5
leaq 0x8(%rsp), %r14
leaq 0xe0e(%rip), %rdi       # 0x2046
callq 0x1030
leaq 0xe0d(%rip), %rdi       # 0x2051
callq 0x1030
pushq $0xa
popq %rdi
callq 0x10a0
movl $0x2, -0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
callq 0x1060
movl %eax, 0x10(%r14)
xorl %ebp, %ebp
pushq $0x2
popq %rsi
movq %rsp, %rdx
movl %ebx, %edi
xorl %eax, %eax
callq 0x1040
testl %eax, %eax
js 0x1293
leaq 0xddc(%rip), %rdi       # 0x2061
callq 0x1030
movl %ebx, %edi
callq 0x1070
jmp 0x12b4
leaq 0xd7b(%rip), %rdi       # 0x2015
jmp 0x12ac
leaq 0xd6d(%rip), %rdi       # 0x2010
jmp 0x12ac
leaq 0xd79(%rip), %rdi       # 0x2025
callq 0x1090
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv3/aesni/aez_ni.c
// Function: load_partial
static __m128i load_partial(const void *p, unsigned n) {
    if ((unsigned long)p % 16 == 0) return _mm_loadu_si128((__m128i*)p);
    else {
        __m128i tmp; unsigned i;
        for (i=0; i<n; i++) ((char*)&tmp)[i] = ((char*)p)[i];
        return tmp;
    }
}

// Assembly:
testb $0xf, %dil
je 0x1537
movl %esi, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x1530
movb (%rdi,%rcx), %dl
movb %dl, -0x18(%rsp,%rcx)
incq %rcx
jmp 0x151f
vmovaps -0x18(%rsp), %xmm0
retq
vmovups (%rdi), %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv3/aesni/aez_ni.c
// Function: aes
static __m128i aes(__m128i *key, __m128i in) {
    in = _mm_aesenc_si128 (in,key[0]);
    in = _mm_aesenc_si128 (in,key[1]);
    in = _mm_aesenc_si128 (in,key[2]);
    in = _mm_aesenc_si128 (in,key[0]);
    in = _mm_aesenc_si128 (in,key[1]);
    in = _mm_aesenc_si128 (in,key[2]);
    in = _mm_aesenc_si128 (in,key[0]);
    in = _mm_aesenc_si128 (in,key[1]);
    in = _mm_aesenc_si128 (in,key[2]);
    return _mm_aesenc_si128 (in,key[0]);
}

// Assembly:
vmovdqa (%rdi), %xmm1
vmovdqa 0x10(%rdi), %xmm2
vmovdqa 0x20(%rdi), %xmm3
vaesenc %xmm1, %xmm0, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm1, %xmm0, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm1, %xmm0, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm1, %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv3/aesni/aez_ni.c
// Function: aez_encrypt
void aez_encrypt(aez_ctx_t *ctx, char *n, unsigned nbytes,
                 char *ad, unsigned adbytes, unsigned abytes,
                 char *src, unsigned bytes, char *dst) {

    __m128i t = aez_hash(ctx, n, nbytes, ad, adbytes, abytes);
    if (bytes==0) {
        unsigned i;
        t = aes((__m128i*)ctx, vxor3(t, ctx->J[0], ctx->J[1]));
        for (i=0; i<abytes; i++) dst[i] = ((char*)&t)[i];
    } else if (bytes+abytes < 32)
        cipher_aez_tiny(ctx, t, 0, src, bytes, abytes, dst);
    else
        cipher_aez_core(ctx, t, 0, src, bytes, abytes, dst);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r14d
movq %rdi, %r12
movq 0x50(%rsp), %rbx
movl 0x48(%rsp), %r15d
movq 0x40(%rsp), %r13
callq 0x1080
testl %r15d, %r15d
je 0x2f25
leal (%r15,%r14), %eax
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movl %r15d, %ecx
movl %r14d, %r8d
movq %rbx, %r9
addq $0x10, %rsp
cmpl $0x1f, %eax
ja 0x2f65
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1040
vmovdqa 0x20(%r12), %xmm1
vpternlogq $0x96, 0x30(%r12), %xmm1, %xmm0
movq %r12, %rdi
callq 0x2b2f
vmovdqa %xmm0, (%rsp)
movl %r14d, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x2f57
movb (%rsp,%rcx), %dl
movb %dl, (%rbx,%rcx)
incq %rcx
jmp 0x2f47
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv3/aesni/aez_ni.c
// Function: aez_decrypt
int aez_decrypt(aez_ctx_t *ctx, char *n, unsigned nbytes,
                 char *ad, unsigned adbytes, unsigned abytes,
                 char *src, unsigned bytes, char *dst) {

    __m128i t;
    if (bytes < abytes) return -1;
    t = aez_hash(ctx, n, nbytes, ad, adbytes, abytes);
    if (bytes==abytes) {
        __m128i claimed = zero_pad(load_partial(src,abytes), 16-abytes);
        t = zero_pad(aes((__m128i*)ctx, vxor3(t, ctx->J[0], ctx->J[1])), 16-abytes);
        return _mm_testc_si128(t, claimed) - 1;
    } else if (bytes < 32) {
        return cipher_aez_tiny(ctx, t, 1, src, bytes, abytes, dst);
    } else {
        return cipher_aez_core(ctx, t, 1, src, bytes, abytes, dst);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl 0x68(%rsp), %ebp
cmpl %r9d, %ebp
jae 0x2f8d
pushq $-0x1
popq %rax
jmp 0x3003
movl %r9d, %r14d
movq %rdi, %rbx
movq 0x70(%rsp), %r15
movq 0x60(%rsp), %r12
callq 0x1080
cmpl %r14d, %ebp
jne 0x3010
movq %r12, %rdi
movl %ebp, %esi
vmovaps %xmm0, 0x20(%rsp)
callq 0x1515
pushq $0x10
popq %rax
subl %ebp, %eax
leaq 0x113d(%rip), %rcx      # 0x4100
vmovups (%rax,%rcx), %xmm1
vmovaps %xmm1, (%rsp)
vandps %xmm0, %xmm1, %xmm0
vmovaps %xmm0, 0x10(%rsp)
vmovdqa 0x20(%rbx), %xmm1
vmovdqa 0x20(%rsp), %xmm0
vpternlogq $0x96, 0x30(%rbx), %xmm1, %xmm0
movq %rbx, %rdi
callq 0x2b2f
vpand (%rsp), %xmm0, %xmm0
xorl %eax, %eax
vptest 0x10(%rsp), %xmm0
adcl $-0x1, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r12, %rdx
movl %ebp, %ecx
movl %r14d, %r8d
movq %r15, %r9
addq $0x30, %rsp
cmpl $0x1f, %ebp
ja 0x3037
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1040
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O2/dxwc[P]sfeed/sfeed_plain.c
// Function: main
int
main(int argc, char *argv[])
{
	FILE *fp;
	char *name;
	int i;

	if (pledge("stdio rpath", NULL) == -1)
		err(1, "pledge");

	setlocale(LC_CTYPE, "");

	if (pledge(argc == 1 ? "stdio" : "stdio rpath", NULL) == -1)
		err(1, "pledge");

	if ((comparetime = time(NULL)) == -1)
		err(1, "time");
	/* 1 day is old news */
	comparetime -= 86400;

	if (argc == 1) {
		printfeed(stdin, "");
	} else {
		for (i = 1; i < argc; i++) {
			if (!(fp = fopen(argv[i], "r")))
				err(1, "fopen: %s", argv[i]);
			name = ((name = strrchr(argv[i], '/'))) ? name + 1 : argv[i];
			printfeed(fp, name);
			if (ferror(fp))
				err(1, "ferror: %s", argv[i]);
			fclose(fp);
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xd54(%rip), %rsi       # 0x2047
xorl %edi, %edi
callq 0x1180
xorl %edi, %edi
callq 0x1150
movq %rax, 0x2e00(%rip)      # 0x4108
cmpq $-0x1, %rax
je 0x13d0
addq $-0x15180, %rax         # imm = 0xFFFEAE80
movq %rax, 0x2de9(%rip)      # 0x4108
cmpl $0x1, %ebp
jne 0x134b
movq 0x2cb5(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
leaq 0xd12(%rip), %rsi       # 0x2047
callq 0x13e1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %ebp, %r14
pushq $0x1
popq %r13
pushq $0x2f
popq %rbp
cmpq %r14, %r13
jge 0x133a
movq (%rbx,%r13,8), %rdi
leaq 0xc9f(%rip), %rsi       # 0x2004
callq 0x1190
movq (%rbx,%r13,8), %r12
testq %rax, %rax
je 0x13ac
movq %rax, %r15
movq %r12, %rdi
movl %ebp, %esi
callq 0x10b0
leaq 0x1(%rax), %rsi
testq %rax, %rax
cmoveq %r12, %rsi
movq %r15, %rdi
callq 0x13e1
movq %r15, %rdi
callq 0x1050
testl %eax, %eax
jne 0x13bb
movq %r15, %rdi
callq 0x1060
incq %r13
jmp 0x1355
leaq 0xc53(%rip), %rsi       # 0x2006
pushq $0x1
popq %rdi
movq %r12, %rdx
jmp 0x13c9
movq (%rbx,%r13,8), %rdx
leaq 0xc4a(%rip), %rsi       # 0x2010
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x1170
leaq 0xc49(%rip), %rsi       # 0x2020
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x1170
// File: /workspace/github_c_makefile_star2_O2/dxwc[P]sfeed/sfeed_plain.c
// Function: printfeed
static void
printfeed(FILE *fp, const char *feedname)
{
	char *fields[FieldLast];
	struct tm *tm;
	time_t parsedtime;
	ssize_t linelen;

	while ((linelen = getline(&line, &linesize, fp)) > 0) {
		if (line[linelen - 1] == '\n')
			line[--linelen] = '\0';
		if (!parseline(line, fields))
			break;

		parsedtime = 0;
		if (strtotime(fields[FieldUnixTimestamp], &parsedtime))
			continue;
		if (!(tm = localtime(&parsedtime)))
			err(1, "localtime");

		if (parsedtime >= comparetime)
			fputs("N ", stdout);
		else
			fputs("  ", stdout);

		fprintf(stdout, "%04d-%02d-%02d %02d:%02d  ",
		        tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
		        tm->tm_hour, tm->tm_min);
		if (feedname[0]) {
			printutf8pad(stdout, feedname, 15, ' ');
			fputs("  ", stdout);
		}
		printutf8pad(stdout, fields[FieldTitle], 70, ' ');
		printf(" %s\n", fields[FieldLink]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, %r14
leaq 0x2d12(%rip), %r13      # 0x4110
leaq 0x2d13(%rip), %r12      # 0x4118
leaq 0x20(%rsp), %rbp
leaq 0xc2f(%rip), %r15       # 0x2040
movq %rdi, 0x10(%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x11b0
testq %rax, %rax
jle 0x1547
movq 0x2cdc(%rip), %rdi      # 0x4110
cmpb $0xa, -0x1(%rdi,%rax)
jne 0x1447
movb $0x0, -0x1(%rdi,%rax)
movq 0x2cc9(%rip), %rdi      # 0x4110
movq %rbp, %rsi
callq 0x1a0d
testq %rax, %rax
je 0x1547
andq $0x0, 0x8(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1a69
testl %eax, %eax
jne 0x1416
movq %r12, %rbx
movq %r13, %r12
leaq 0x8(%rsp), %rdi
callq 0x1030
testq %rax, %rax
je 0x1556
movq %rax, %r13
movq 0x8(%rsp), %rax
cmpq 0x2c6f(%rip), %rax      # 0x4108
movq 0x2b38(%rip), %r14      # 0x3fd8
movq (%r14), %rsi
leaq 0xb7b(%rip), %rdi       # 0x2025
cmovlq %r15, %rdi
callq 0x10c0
movq (%r14), %rdi
movl 0x14(%r13), %edx
movl $0x76c, %eax            # imm = 0x76C
addl %eax, %edx
movl 0x10(%r13), %ecx
incl %ecx
movl 0xc(%r13), %r8d
movl 0x4(%r13), %eax
movl 0x8(%r13), %r9d
movq %r14, %r13
movl %eax, (%rsp)
leaq 0xb48(%rip), %rsi       # 0x2028
xorl %eax, %eax
callq 0x1120
movq 0x18(%rsp), %rsi
cmpb $0x0, (%rsi)
pushq $0x20
popq %r14
je 0x1510
movq (%r13), %rdi
pushq $0xf
popq %rdx
movl %r14d, %ecx
callq 0x1b57
movq (%r13), %rsi
movq %r15, %rdi
callq 0x10c0
movq (%r13), %rdi
movq 0x28(%rsp), %rsi
pushq $0x46
popq %rdx
movl %r14d, %ecx
callq 0x1b57
movq 0x30(%rsp), %rsi
leaq 0xb13(%rip), %rdi       # 0x2043
xorl %eax, %eax
callq 0x1090
movq %r12, %r13
movq %rbx, %r12
movq 0x10(%rsp), %r14
jmp 0x1416
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xabe(%rip), %rsi       # 0x201b
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x1170
nop
// File: /workspace/github_c_makefile_star2_O2/antonblanchard[P]will-it-scale/tests/open3.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	while (1) {
		int fd = open(tmpfile, O_RDWR);
		assert(fd >= 0);
		close(fd);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x256c(%rip), %r14      # 0x4180
pushq $0x2
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1220
testl %eax, %eax
js 0x1c33
movl %eax, %edi
callq 0x1160
incq (%rbx)
jmp 0x1c17
leaq 0x633(%rip), %rdi       # 0x226d
leaq 0x634(%rip), %rsi       # 0x2275
leaq 0x660(%rip), %rcx       # 0x22a8
pushq $0x18
popq %rdx
callq 0x1130