LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/9wm[P]9wm/grab.c
// Function: selectwin
Client *
selectwin(int release, int *shift, ScreenInfo * s)
{
	XEvent ev;
	XButtonEvent *e;
	int status;
	Window w;
	Client *c;

	status = grab(s->root, s->root, ButtonMask, s->target, 0);
	if (status != GrabSuccess) {
		graberror("selectwin", status);	/* */
		return 0;
	}
	w = None;
	for (;;) {
		XMaskEvent(dpy, ButtonMask, &ev);
		e = &ev.xbutton;
		switch (ev.type) {
		case ButtonPress:
			if (e->button != Button3) {
				ungrab(e);
				return 0;
			}
			w = e->subwindow;
			if (!release) {
				c = getclient(w, 0);
				if (c == 0)
					ungrab(e);
				if (shift != 0)
					*shift = (e->state & ShiftMask) != 0;
				return c;
			}
			break;
		case ButtonRelease:
			ungrab(e);
			if (e->button != Button3 || e->subwindow != w)
				return 0;
			if (shift != 0)
				*shift = (e->state & ShiftMask) != 0;
			return getclient(w, 0);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rcx
movl $0xc, %edx
xorl %r8d, %r8d
callq 0x72f0
movl %eax, -0xec(%rbp)
cmpl $0x0, -0xec(%rbp)
je 0x7e4b
movl -0xec(%rbp), %esi
leaq 0x1963(%rip), %rdi      # 0x979a
movb $0x0, %al
callq 0x8ed0
movq $0x0, -0x8(%rbp)
jmp 0x7fc3
movq $0x0, -0xf8(%rbp)
leaq 0x4b1b(%rip), %rax      # 0xc978
movq (%rax), %rdi
movl $0xc, %esi
leaq -0xe0(%rbp), %rdx
movq %rdx, -0x110(%rbp)
callq 0x25e0
movq -0x110(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, -0x104(%rbp)
subl $0x4, %eax
je 0x7ead
jmp 0x7e99
movl -0x104(%rbp), %eax
subl $0x5, %eax
je 0x7f4c
jmp 0x7fbe
movq -0xe8(%rbp), %rax
cmpl $0x3, 0x54(%rax)
je 0x7ed3
movq -0xe8(%rbp), %rdi
callq 0x7370
movq $0x0, -0x8(%rbp)
jmp 0x7fc3
movq -0xe8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0xf8(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x7f4a
movq -0xf8(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x6e90
movq %rax, -0x100(%rbp)
cmpq $0x0, -0x100(%rbp)
jne 0x7f18
movq -0xe8(%rbp), %rdi
callq 0x7370
cmpq $0x0, -0x18(%rbp)
je 0x7f3d
movq -0xe8(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x100(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7fc3
jmp 0x7fbe
movq -0xe8(%rbp), %rdi
callq 0x7370
movq -0xe8(%rbp), %rax
cmpl $0x3, 0x54(%rax)
jne 0x7f79
movq -0xe8(%rbp), %rax
movq 0x30(%rax), %rax
cmpq -0xf8(%rbp), %rax
je 0x7f83
movq $0x0, -0x8(%rbp)
jmp 0x7fc3
cmpq $0x0, -0x18(%rbp)
je 0x7fa8
movq -0xe8(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0xf8(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x6e90
movq %rax, -0x8(%rbp)
jmp 0x7fc3
jmp 0x7e56
movq -0x8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/9wm[P]9wm/grab.c
// Function: sweepcalc
void
sweepcalc(Client * c, int x, int y)
{
	int dx, dy, sx, sy;

	dx = x - c->x;
	dy = y - c->y;
	sx = sy = 1;
	if (dx < 0) {
		dx = -dx;
		sx = -1;
	}
	if (dy < 0) {
		dy = -dy;
		sy = -1;
	}

	dx -= 2 * BORDER;
	dy -= 2 * BORDER;
	if (c->size.flags & PResizeInc) {
		dx = c->min_dx + (dx - c->min_dx) / c->size.width_inc * c->size.width_inc;
		dy = c->min_dy + (dy - c->min_dy) / c->size.height_inc * c->size.height_inc;
	}

	if (c->size.flags & PMaxSize) {
		if (dx > c->size.max_width)
			dx = c->size.max_width;
		if (dy > c->size.max_height)
			dy = c->size.max_height;
	}
	c->dx = sx * (dx + 2 * BORDER);
	c->dy = sy * (dy + 2 * BORDER);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
subl 0x28(%rcx), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
subl 0x2c(%rcx), %eax
movl %eax, -0x18(%rbp)
movl $0x1, -0x20(%rbp)
movl $0x1, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x801b
xorl %eax, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
cmpl $0x0, -0x18(%rbp)
jge 0x8030
xorl %eax, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
leaq 0x42e9(%rip), %rax      # 0xc320
movl (%rax), %ecx
shll %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
leaq 0x42d6(%rip), %rax      # 0xc320
movl (%rax), %ecx
shll %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x80d0
movq -0x8(%rbp), %rax
movl 0x90(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
subl 0x90(%rcx), %eax
movq -0x8(%rbp), %rcx
cltd
idivl 0x68(%rcx)
movl %eax, %ecx
movl -0x28(%rbp), %eax
movq -0x8(%rbp), %rdx
imull 0x68(%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x94(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
subl 0x94(%rcx), %eax
movq -0x8(%rbp), %rcx
cltd
idivl 0x6c(%rcx)
movl %eax, %ecx
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rdx
imull 0x6c(%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0x8110
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jle 0x80f8
movq -0x8(%rbp), %rax
movl 0x60(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x64(%rcx), %eax
jle 0x810e
movq -0x8(%rbp), %rax
movl 0x64(%rax), %eax
movl %eax, -0x18(%rbp)
jmp 0x8110
movl -0x1c(%rbp), %ecx
movl -0x14(%rbp), %eax
leaq 0x4203(%rip), %rdx      # 0xc320
movl (%rdx), %edx
shll %edx
addl %edx, %eax
imull %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
movl -0x20(%rbp), %ecx
movl -0x18(%rbp), %eax
leaq 0x41e6(%rip), %rdx      # 0xc320
movl (%rdx), %edx
shll %edx
addl %edx, %eax
imull %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x34(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/9wm[P]9wm/grab.c
// Function: drawbound
void
drawbound(Client * c)
{
	int x, y, dx, dy;
	ScreenInfo *s;

	s = c->screen;
	x = c->x;
	y = c->y;
	dx = c->dx;
	dy = c->dy;
	if (dx < 0) {
		x += dx;
		dx = -dx;
	}
	if (dy < 0) {
		y += dy;
		dy = -dy;
	}
	if (dx <= 2 || dy <= 2)
		return;
	XDrawRectangle(dpy, s->root, s->gc, x, y, dx - 1, dy - 1);
	XDrawRectangle(dpy, s->root, s->gc, x + 1, y + 1, dx - 3, dy - 3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x81da
movl -0x14(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
xorl %eax, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x81f1
movl -0x18(%rbp), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
xorl %eax, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x2, -0x14(%rbp)
jle 0x81fd
cmpl $0x2, -0x18(%rbp)
jg 0x81ff
jmp 0x8274
leaq 0x4772(%rip), %rax      # 0xc978
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
movl -0xc(%rbp), %ecx
movl -0x10(%rbp), %r8d
movl -0x14(%rbp), %r9d
subl $0x1, %r9d
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl %eax, (%rsp)
callq 0x20c0
leaq 0x473b(%rip), %rax      # 0xc978
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movl -0x10(%rbp), %r8d
addl $0x1, %r8d
movl -0x14(%rbp), %r9d
subl $0x3, %r9d
movl -0x18(%rbp), %eax
subl $0x3, %eax
movl %eax, (%rsp)
callq 0x20c0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/9wm[P]9wm/grab.c
// Function: sweep
int
sweep(Client * c)
{
	XEvent ev;
	int status;
	XButtonEvent *e;
	ScreenInfo *s;

	s = c->screen;
	status = grab(s->root, s->root, ButtonMask, s->sweep0, 0);
	if (status != GrabSuccess) {
		graberror("sweep", status);	/* */
		return 0;
	}

	XMaskEvent(dpy, ButtonMask, &ev);
	e = &ev.xbutton;
	if (e->button != Button3) {
		ungrab(e);
		return 0;
	}
	if (c->size.flags & (PMinSize | PBaseSize))
		setmouse(e->x + c->min_dx, e->y + c->min_dy, s);
	XChangeActivePointerGrab(dpy, ButtonMask, s->boxcurs, e->time);
	return sweepdrag(c, e, sweepcalc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0xe8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0xe8(%rbp), %rax
movq 0x58(%rax), %rcx
movl $0xc, %edx
xorl %r8d, %r8d
callq 0x72f0
movl %eax, -0xd4(%rbp)
cmpl $0x0, -0xd4(%rbp)
je 0x874e
movl -0xd4(%rbp), %esi
leaq 0x1069(%rip), %rdi      # 0x97a4
movb $0x0, %al
callq 0x8ed0
movl $0x0, -0x4(%rbp)
jmp 0x8828
leaq 0x4223(%rip), %rax      # 0xc978
movq (%rax), %rdi
movl $0xc, %esi
leaq -0xd0(%rbp), %rdx
callq 0x25e0
leaq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
cmpl $0x3, 0x54(%rax)
je 0x879c
movq -0xe0(%rbp), %rdi
callq 0x7370
movl $0x0, -0x4(%rbp)
jmp 0x8828
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
andq $0x110, %rax            # imm = 0x110
cmpq $0x0, %rax
je 0x87e4
movq -0xe0(%rbp), %rax
movl 0x40(%rax), %edi
movq -0x10(%rbp), %rax
addl 0x90(%rax), %edi
movq -0xe0(%rbp), %rax
movl 0x44(%rax), %esi
movq -0x10(%rbp), %rax
addl 0x94(%rax), %esi
movq -0xe8(%rbp), %rdx
callq 0x89a0
leaq 0x418d(%rip), %rax      # 0xc978
movq (%rax), %rdi
movq -0xe8(%rbp), %rax
movq 0x60(%rax), %rdx
movq -0xe0(%rbp), %rax
movq 0x38(%rax), %rcx
movl $0xc, %esi
callq 0x25a0
movq -0x10(%rbp), %rdi
movq -0xe0(%rbp), %rsi
leaq -0x850(%rip), %rdx      # 0x7fd0
callq 0x82d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x9c(%rax)
je 0x8893
movq -0x10(%rbp), %rax
movl 0x28(%rax), %edi
leaq 0x3aaa(%rip), %rax      # 0xc320
subl (%rax), %edi
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %esi
leaq 0x3a9a(%rip), %rax      # 0xc320
subl (%rax), %esi
movq -0x20(%rbp), %rdx
callq 0x89a0
jmp 0x88d2
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movq -0x10(%rbp), %rsi
addq $0x2c, %rsi
movq -0x20(%rbp), %rdx
callq 0x8940
leaq 0x3a6d(%rip), %rax      # 0xc320
movl (%rax), %ecx
movq -0x10(%rbp), %rax
addl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
leaq 0x3a5a(%rip), %rax      # 0xc320
movl (%rax), %ecx
movq -0x10(%rbp), %rax
addl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x60(%rax), %rcx
movl $0xc, %edx
xorl %r8d, %r8d
callq 0x72f0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x891a
movl -0x14(%rbp), %esi
leaq 0xea0(%rip), %rdi       # 0x97aa
movb $0x0, %al
callq 0x8ed0
movl $0x0, -0x4(%rbp)
jmp 0x8931
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x7d9(%rip), %rdx      # 0x8150
callq 0x82d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/9wm[P]9wm/error.c
// Function: fatal
void
fatal(char *s)
{
	fprintf(stderr, "9wm: ");
	perror(s);
	fprintf(stderr, "\n");
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x32f5(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0xaae(%rip), %rsi       # 0x97bb
movb $0x0, %al
callq 0x22b0
movq -0x8(%rbp), %rdi
callq 0x24a0
movq 0x32d4(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x486(%rip), %rsi       # 0x91b4
movb $0x0, %al
callq 0x22b0
movl $0x1, %edi
callq 0x2520
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x3c26(%rip), %rax      # 0xc980
cmpl $0x0, (%rax)
je 0x8d9b
movq -0x18(%rbp), %rax
movzbl 0x21(%rax), %eax
cmpl $0x2, %eax
jne 0x8d9b
movq -0x18(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0xa, %eax
jne 0x8d9b
movq 0x3278(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0xa37(%rip), %rsi       # 0x97c1
movb $0x0, %al
callq 0x22b0
movl $0x1, %edi
callq 0x2520
cmpl $0x0, 0x3dc6(%rip)      # 0xcb68
je 0x8dca
movq -0x18(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0x3, %eax
je 0x8dbe
movq -0x18(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0xc, %eax
jne 0x8dca
movl $0x0, -0x4(%rbp)
jmp 0x8eb7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x20(%rax), %esi
leaq -0x70(%rbp), %rdx
movl $0x50, %ecx
callq 0x2370
leaq -0x110(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x21(%rax), %edx
leaq 0x572(%rip), %rsi       # 0x936c
movb $0x0, %al
callq 0x2510
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rdx
leaq -0xc0(%rbp), %r8
leaq 0x9f6(%rip), %rsi       # 0x9810
leaq 0x394(%rip), %rcx       # 0x91b5
movl $0x50, %r9d
callq 0x2280
movsbl -0xc0(%rbp), %eax
cmpl $0x0, %eax
jne 0x8e55
leaq -0xc0(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x21(%rax), %edx
leaq 0x9cb(%rip), %rsi       # 0x9819
movb $0x0, %al
callq 0x2510
movq 0x319c(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq -0xc0(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, %ecx
leaq -0x70(%rbp), %r8
leaq 0x9b0(%rip), %rsi       # 0x982b
movb $0x0, %al
callq 0x22b0
leaq 0x3af7(%rip), %rax      # 0xc980
cmpl $0x0, (%rax)
je 0x8eb0
movq 0x3163(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x99f(%rip), %rsi       # 0x983e
movb $0x0, %al
callq 0x22b0
movl $0x1, %edi
callq 0x2520
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
movq %rdi, -0x8(%rsp)
cmpq $0x0, -0x8(%rsp)
je 0x14ac
movq -0x8(%rsp), %rax
cmpq $0x0, 0x50(%rax)
je 0x14ac
movq -0x8(%rsp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rsp), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movq -0x8(%rsp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rsp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq -0x8(%rsp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rsp), %rax
addq 0x38(%rax), %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rsp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rsp), %rax
imulq 0x48(%rax), %rcx
movq -0x8(%rsp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movq -0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1479
movq -0x8(%rsp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
addq 0x50(%rax), %rcx
movq %rcx, 0x50(%rax)
movq -0x8(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x149f
movq -0x8(%rsp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
addq 0x50(%rax), %rcx
movq %rcx, 0x50(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x50(%rax)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movl $0x58, %edi
callq 0x1080
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x28(%rax)
movq 0x8(%rsp), %rdi
callq 0x11b0
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
jne 0x154e
jmp 0x1571
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1540
movq (%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1540
movq (%rsp), %rdi
callq 0x1030
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x16ae
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x1623
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1614
movq 0x10(%rsp), %rdi
callq 0x1950
jmp 0x161e
movq 0x10(%rsp), %rdi
callq 0x1a60
jmp 0x16ae
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x166e
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1658
movq 0x8(%rsp), %rdi
callq 0x1950
movq 0x10(%rsp), %rdi
callq 0x1950
jmp 0x166c
movq 0x10(%rsp), %rdi
callq 0x1950
movq 0x10(%rsp), %rdi
callq 0x1a60
jmp 0x16a9
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1693
movq 0x10(%rsp), %rdi
callq 0x1a60
movq 0x10(%rsp), %rdi
callq 0x1950
jmp 0x16a7
movq 0x8(%rsp), %rdi
callq 0x1a60
movq 0x10(%rsp), %rdi
callq 0x1a60
jmp 0x16a9
jmp 0x15c9
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
callq 0x1740
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
callq 0x17a0
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
addq 0x50(%rax), %rcx
movq %rcx, 0x50(%rax)
movq 0x28(%rsp), %rdi
callq 0x13d0
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1800
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1800
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x15c0
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1782
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x10(%rsp), %rdi
callq 0x11b0
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x15c0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x17e2
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x10(%rsp), %rdi
callq 0x11b0
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x1822
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x187e
cmpq $0x0, 0x10(%rsp)
jne 0x1836
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x187e
movq 0x18(%rsp), %rdi
callq 0x1bf0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x15c0
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rdi
callq 0x11b0
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, (%rsp)
movq %rdi, 0x10(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x1740
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x17a0
movq (%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rsi
addq $0x30, %rsi
movl $0x28, %edx
callq 0x1070
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1800
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1800
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x13d0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x13d0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x13d0
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x13d0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x13d0
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x19e8
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x19d9
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x19e6
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x19e8
movq (%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1a30
movq 0x8(%rsp), %rcx
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rdi
callq 0x11b0
movq 0x10(%rsp), %rdi
callq 0x11b0
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x13d0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x13d0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x13d0
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x13d0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x13d0
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x1af8
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x1ae9
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x1af6
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1af8
movq (%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1b40
movq 0x8(%rsp), %rcx
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rdi
callq 0x11b0
movq 0x10(%rsp), %rdi
callq 0x11b0
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1bac
movq $0x0, 0x10(%rsp)
jmp 0x1bde
jmp 0x1bae
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1bca
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x1bae
movq 0x8(%rsp), %rdi
callq 0x15c0
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/6851-2021[P]euler_tour_tree/splay_tree.c
// Function: find_max
Node* find_max(Node* node) {
    // node must not be null
    if (node == NULL) {
        return NULL;
    }

    // walk right to max
    while (node->right != NULL) {
        node = node->right;
    }
    return node;
}

// Assembly:
movq %rdi, -0x10(%rsp)
cmpq $0x0, -0x10(%rsp)
jne 0x1c08
movq $0x0, -0x8(%rsp)
jmp 0x1c30
jmp 0x1c0a
movq -0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1c26
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rsp)
jmp 0x1c0a
movq -0x10(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
je 0x1cb2
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1c40
movq (%rsp), %rax
movq 0x18(%rax), %rsi
movq (%rsp), %rax
movq 0x20(%rax), %rdx
leaq 0x2394(%rip), %rdi      # 0x4004
movb $0x0, %al
callq 0x1040
movq (%rsp), %rax
movq 0x30(%rax), %rsi
movq (%rsp), %rax
movq 0x38(%rax), %rdx
movq (%rsp), %rax
movq 0x40(%rax), %rcx
movq (%rsp), %rax
movq 0x48(%rax), %r8
leaq 0x2372(%rip), %rdi      # 0x4010
movb $0x0, %al
callq 0x1040
movq (%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c40
popq %rax
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x18, %edi
callq 0x1080
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rdi
shlq $0x4, %rdi
callq 0x1080
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rdi
shlq $0x0, %rdi
callq 0x1080
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x1da1
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x14b0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1d22
movq 0x18(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
shlq $0x4, %rsi
callq 0x1090
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rsi
shlq $0x0, %rsi
callq 0x1090
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x1ea4
movq 0x8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x14b0
movq %rax, (%rsp)
movq (%rsp), %rcx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq (%rsp), %rcx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1e28
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x1f32
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rcx
testb $0x1, (%rax,%rcx)
jne 0x1f20
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x1b70
movq 0x8(%rsp), %rdi
callq 0x1540
jmp 0x1f22
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1ed0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x1030
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1030
movq 0x20(%rsp), %rdi
callq 0x1030
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x1f8a
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x1fcb
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x1b70
movq 0x8(%rsp), %rdi
callq 0x1b90
movq %rax, (%rsp)
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x2012
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rsp), %rcx
testb $0x1, (%rax,%rcx)
jne 0x201f
movl $0x1, 0x44(%rsp)
jmp 0x2124
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x1740
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x17a0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1b90
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x20b3
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq $0x0, (%rax)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq 0x8(%rsp), %rax
jne 0x20ff
movq 0x18(%rsp), %rdi
callq 0x1bf0
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rdx
movq 0x18(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x1800
movq 0x8(%rsp), %rdi
callq 0x1030
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x18, %edi
callq 0x1080
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rdi
shlq $0x3, %rdi
callq 0x1080
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rdi
shlq $0x3, %rdi
callq 0x1080
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, (%rsp)
movq (%rsp), %rax
cmpq 0x10(%rsp), %rax
jae 0x26f4
imulq $0xa, (%rsp), %rdx
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq $-0x1, (%rax,%rcx,8)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x26b1
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
cmpq $-0x1, -0x20(%rsp)
je 0x2742
movq -0x18(%rsp), %rax
cmpq -0x20(%rsp), %rax
jne 0x272a
movb $0x1, -0x1(%rsp)
jmp 0x2747
movq -0x10(%rsp), %rax
movq (%rax), %rax
movq -0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rsp)
jmp 0x270f
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x28e5
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq 0x18(%rsp), %rax
jne 0x28d3
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2860
jmp 0x28d5
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x2897
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x29ab
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq 0x28(%rsp), %rax
jne 0x2996
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x28f0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jge 0x2978
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x298c
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x28f0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x2998
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x291e
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x2a7b
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq 0x28(%rsp), %rax
jne 0x2a66
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x29c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jle 0x2a48
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x2a5c
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x29c0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x2a68
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x29ee
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x2b11
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq 0x18(%rsp), %rax
jne 0x2aff
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2a90
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x2b01
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x2abe
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq $0x1, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x2b93
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq 0x18(%rsp), %rax
jne 0x2b81
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2b20
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x2b83
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x2b40
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)