LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: xloadcols
void
xloadcols(void)
{
	int i;
	static int loaded;
	Color *cp;

	if (loaded) {
		for (cp = dc.col; cp < &dc.col[dc.collen]; ++cp)
			XftColorFree(xw.dpy, xw.vis, xw.cmap, cp);
	} else {
		dc.collen = MAX(LEN(colorname), 256);
		dc.col = xmalloc(dc.collen * sizeof(Color));
	}

	for (i = 0; i < dc.collen; i++)
		if (!xloadcolor(i, NULL, &dc.col[i])) {
			if (colorname[i])
				die("could not allocate color '%s'\n", colorname[i]);
			else
				die("could not allocate color %d\n", i);
		}

	/* set alpha value of bg color */
	if (opt_alpha)
		alpha = strtof(opt_alpha, NULL);
	dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * alpha);
	dc.col[defaultbg].pixel &= 0x00FFFFFF;
	dc.col[defaultbg].pixel |= (unsigned char)(0xff * alpha) << 24;
	loaded = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpb $0x1, 0x1126a(%rip)     # 0x1da00
jne 0xc7e3
cmpq $0x0, 0x11270(%rip)     # 0x1da10
jle 0xc7ff
movq 0x1125f(%rip), %rbx     # 0x1da08
movq 0x11350(%rip), %rdi     # 0x1db00
movq 0x113c1(%rip), %rsi     # 0x1db78
movq 0x1134a(%rip), %rdx     # 0x1db08
movq %rbx, %rcx
callq 0x6600
addq $0x10, %rbx
movq 0x1123f(%rip), %rax     # 0x1da10
shlq $0x4, %rax
addq 0x1122c(%rip), %rax     # 0x1da08
cmpq %rax, %rbx
jb 0xc7a9
jmp 0xc7ff
movq $0x103, 0x11222(%rip) # imm = 0x103
movl $0x1030, %edi           # imm = 0x1030
callq 0x6f85
movq %rax, 0x11209(%rip)     # 0x1da08
cmpq $0x0, 0x11209(%rip)     # 0x1da10
je 0xc872
leaq 0xcdd0(%rip), %r12      # 0x195e0
leaq 0x664d(%rip), %rbx      # 0x12e64
leaq 0x6627(%rip), %r14      # 0x12e45
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x111dd(%rip), %rdx     # 0x1da08
addq %r13, %rdx
movl %r15d, %edi
xorl %esi, %esi
callq 0xc8ee
testl %eax, %eax
jne 0xc85e
movq (%r12), %rsi
testq %rsi, %rsi
je 0xc851
movq %r14, %rdi
xorl %eax, %eax
callq 0x6faf
jmp 0xc85e
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x6faf
incq %r15
addq $0x8, %r12
addq $0x10, %r13
cmpq %r15, 0x111a0(%rip)     # 0x1da10
ja 0xc824
movq 0x1138f(%rip), %rdi     # 0x1dc08
testq %rdi, %rdi
je 0xc88d
xorl %esi, %esi
callq 0x6480
movss %xmm0, 0xcd0f(%rip)     # 0x1959c
movss 0xcd07(%rip), %xmm0     # 0x1959c
movss 0x6337(%rip), %xmm1     # 0x12bd4
mulss %xmm0, %xmm1
cvttss2si %xmm1, %eax
movq 0x1115c(%rip), %rcx     # 0x1da08
movl 0xccf2(%rip), %edx      # 0x195a4
shlq $0x4, %rdx
movw %ax, 0xe(%rcx,%rdx)
movq (%rcx,%rdx), %rax
mulss 0x6311(%rip), %xmm0     # 0x12bd8
andl $0xffffff, %eax         # imm = 0xFFFFFF
cvttss2si %xmm0, %esi
shll $0x18, %esi
movslq %esi, %rsi
orq %rax, %rsi
movq %rsi, (%rcx,%rdx)
movb $0x1, 0x1111c(%rip)     # 0x1da00
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: xloadcolor
int
xloadcolor(int i, const char *name, Color *ncolor)
{
	XRenderColor color = { .alpha = 0xffff };

	if (!name) {
		if (BETWEEN(i, 16, 255)) { /* 256 color */
			if (i < 6*6*6+16) { /* same colors as xterm */
				color.red   = sixd_to_16bit( ((i-16)/36)%6 );
				color.green = sixd_to_16bit( ((i-16)/6) %6 );
				color.blue  = sixd_to_16bit( ((i-16)/1) %6 );
			} else { /* greyscale */
				color.red = 0x0808 + 0x0a0a * (i - (6*6*6+16));
				color.green = color.blue = color.red;
			}
			return XftColorAllocValue(xw.dpy, xw.vis,
			                          xw.cmap, &color, ncolor);
		} else
			name = colorname[i];
	}

	return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor);
}

// Assembly:
pushq %rax
movq %rdx, %r8
movq %rsi, %rcx
movabsq $-0x1000000000000, %rax # imm = 0xFFFF000000000000
movq %rax, (%rsp)
testq %rsi, %rsi
jne 0xc9b7
leal -0x10(%rdi), %eax
cmpl $0xef, %eax
ja 0xc9a9
cmpl $0xe7, %edi
jg 0xc9d2
movl %eax, %edx
imulq $0x38e38e39, %rdx, %rsi # imm = 0x38E38E39
shrq $0x23, %rsi
imulq $0x2aaaaaab, %rsi, %rcx # imm = 0x2AAAAAAB
shrq $0x20, %rcx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %esi
imull $0x2828, %esi, %edi     # imm = 0x2828
movl $0x3737, %ecx           # imm = 0x3737
addl %ecx, %edi
testl %esi, %esi
cmovel %esi, %edi
movw %di, (%rsp)
movl $0xaaaaaaab, %esi       # imm = 0xAAAAAAAB
imulq %rdx, %rsi
shrq $0x22, %rsi
imulq $0x2aaaaaab, %rsi, %rdx # imm = 0x2AAAAAAB
shrq $0x20, %rdx
addl %edx, %edx
leal (%rdx,%rdx,2), %edx
movl %esi, %edi
subl %edx, %edi
imull $0x2828, %edi, %edx     # imm = 0x2828
addl %ecx, %edx
testl %edi, %edi
cmovel %edi, %edx
movw %dx, 0x2(%rsp)
addl %esi, %esi
leal (%rsi,%rsi,2), %edx
subl %edx, %eax
imull $0x2828, %eax, %edx     # imm = 0x2828
addl %ecx, %edx
testl %eax, %eax
cmovel %eax, %edx
movw %dx, 0x4(%rsp)
jmp 0xc9eb
movslq %edi, %rax
leaq 0xcc2d(%rip), %rcx      # 0x195e0
movq (%rcx,%rax,8), %rcx
movq 0x11142(%rip), %rdi     # 0x1db00
movq 0x111b3(%rip), %rsi     # 0x1db78
movq 0x1113c(%rip), %rdx     # 0x1db08
popq %rax
jmp 0x6520
imull $0xa0a, %edi, %eax      # imm = 0xA0A
addl $0xffffeef8, %eax       # imm = 0xFFFFEEF8
movw %ax, (%rsp)
movw %ax, 0x4(%rsp)
movw %ax, 0x2(%rsp)
movq 0x1110e(%rip), %rdi     # 0x1db00
movq 0x1117f(%rip), %rsi     # 0x1db78
movq 0x11108(%rip), %rdx     # 0x1db08
movq %rsp, %rcx
callq 0x6730
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: xgetcolor
int
xgetcolor(int x, unsigned char *r, unsigned char *g, unsigned char *b)
{
	if (!BETWEEN(x, 0, dc.collen - 1))
		return 1;

	*r = dc.col[x].color.red >> 8;
	*g = dc.col[x].color.green >> 8;
	*b = dc.col[x].color.blue >> 8;

	return 0;
}

// Assembly:
movl $0x1, %eax
testl %edi, %edi
js 0xca51
movl %edi, %edi
movq 0x10ff4(%rip), %r8      # 0x1da10
decq %r8
cmpq %rdi, %r8
jb 0xca51
movq 0x10fdd(%rip), %rax     # 0x1da08
shlq $0x4, %rdi
movb 0x9(%rax,%rdi), %al
movb %al, (%rsi)
movq 0x10fcc(%rip), %rax     # 0x1da08
movb 0xb(%rax,%rdi), %al
movb %al, (%rdx)
movq 0x10fbf(%rip), %rax     # 0x1da08
movb 0xd(%rax,%rdi), %al
movb %al, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: xsetcolorname
int
xsetcolorname(int x, const char *name)
{
	Color ncolor;

	if (!BETWEEN(x, 0, dc.collen - 1))
		return 1;

	if (!xloadcolor(x, name, &ncolor))
		return 1;

	XftColorFree(xw.dpy, xw.vis, xw.cmap, &dc.col[x]);
	dc.col[x] = ncolor;

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl $0x1, %ebx
testl %edi, %edi
js 0xcabd
movl %edi, %r14d
movq 0x10fa4(%rip), %rax     # 0x1da10
decq %rax
cmpq %r14, %rax
jb 0xcabd
leaq 0x8(%rsp), %rdx
callq 0xc8ee
testl %eax, %eax
je 0xcabd
movq 0x11077(%rip), %rdi     # 0x1db00
movq 0x110e8(%rip), %rsi     # 0x1db78
movq 0x11071(%rip), %rdx     # 0x1db08
shlq $0x4, %r14
movq 0x10f66(%rip), %rcx     # 0x1da08
addq %r14, %rcx
callq 0x6600
movq 0x10f57(%rip), %rax     # 0x1da08
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rax,%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: xseticontitle
void
xseticontitle(char *p)
{
	XTextProperty prop;
	DEFAULT(p, opt_title);

	if (p[0] == '\0')
		p = opt_title;

	if (Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
	                                &prop) != Success)
		return;
	XSetWMIconName(xw.dpy, xw.win, &prop);
	XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmiconname);
	XFree(prop.value);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
leaq 0x8(%rsp), %rsi
movq %rdi, (%rsi)
testq %rdi, %rdi
movq 0x10e29(%rip), %rax     # 0x1dc30
cmoveq %rax, %rdi
movq %rdi, (%rsi)
cmpb $0x0, (%rdi)
cmoveq %rax, %rdi
movq %rdi, (%rsi)
movq 0x10ce1(%rip), %rdi     # 0x1db00
leaq 0x10(%rsp), %r8
movl $0x1, %edx
movl $0x4, %ecx
callq 0x6440
testl %eax, %eax
jne 0xce77
movq 0x10cc2(%rip), %rdi     # 0x1db00
movq 0x10ccb(%rip), %rsi     # 0x1db10
leaq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x6340
movq 0x10ca7(%rip), %rdi     # 0x1db00
movq 0x10cb0(%rip), %rsi     # 0x1db10
movq 0x10cd9(%rip), %rcx     # 0x1db40
movq %rbx, %rdx
callq 0x6460
movq (%rbx), %rdi
callq 0x6090
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: xsettitle
void
xsettitle(char *p)
{
	XTextProperty prop;
	DEFAULT(p, opt_title);

	if (p[0] == '\0')
		p = opt_title;

	if (Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
	                                &prop) != Success)
		return;
	XSetWMName(xw.dpy, xw.win, &prop);
	XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname);
	XFree(prop.value);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
leaq 0x8(%rsp), %rsi
movq %rdi, (%rsi)
testq %rdi, %rdi
movq 0x10d9c(%rip), %rax     # 0x1dc30
cmoveq %rax, %rdi
movq %rdi, (%rsi)
cmpb $0x0, (%rdi)
cmoveq %rax, %rdi
movq %rdi, (%rsi)
movq 0x10c54(%rip), %rdi     # 0x1db00
leaq 0x10(%rsp), %r8
movl $0x1, %edx
movl $0x4, %ecx
callq 0x6440
testl %eax, %eax
jne 0xcf04
movq 0x10c35(%rip), %rdi     # 0x1db00
movq 0x10c3e(%rip), %rsi     # 0x1db10
leaq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x6400
movq 0x10c1a(%rip), %rdi     # 0x1db00
movq 0x10c23(%rip), %rsi     # 0x1db10
movq 0x10c44(%rip), %rcx     # 0x1db38
movq %rbx, %rdx
callq 0x6460
movq (%rbx), %rdi
callq 0x6090
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: xximspot
void
xximspot(int x, int y)
{
	if (xw.ime.xic == NULL)
		return;

	xw.ime.spot.x = borderpx + x * win.cw;
	xw.ime.spot.y = borderpx + (y + 1) * win.ch;

	XSetICValues(xw.ime.xic, XNPreeditAttributes, xw.ime.spotlist, NULL);
}

// Assembly:
movl %edi, %eax
movq 0xff34(%rip), %rdi      # 0x1db58
testq %rdi, %rdi
je 0xdc68
movl 0xc1e5(%rip), %ecx      # 0x19e14
imull 0xffee(%rip), %eax      # 0x1dc24
addl %ecx, %eax
movw %ax, 0xff21(%rip)       # 0x1db60
incl %esi
imull 0xffd8(%rip), %esi      # 0x1dc20
addl %ecx, %esi
movw %si, 0xff11(%rip)       # 0x1db62
movq 0xff10(%rip), %rdx      # 0x1db68
leaq 0x5222(%rip), %rsi      # 0x12e81
xorl %ecx, %ecx
xorl %eax, %eax
jmp 0x6290
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: config_init
void
config_init(void)
{
	char *resm;
	XrmDatabase db;
	ResourcePref *p;

	XrmInitialize();
	resm = XResourceManagerString(xw.dpy);
	if (!resm)
		return;

	db = XrmGetStringDatabase(resm);
	for (p = resources; p < resources + LEN(resources); p++)
		resource_load(db, p->name, p->type, p->dst);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x6570
movq 0xfc3d(%rip), %rdi      # 0x1db00
callq 0x6180
testq %rax, %rax
je 0xdf0a
movq %rax, %rdi
callq 0x66d0
movq %rax, %rbx
movq $-0x18, %r14
leaq 0xbf3a(%rip), %r15      # 0x19e20
movq 0x18(%r14,%r15), %rsi
movl 0x20(%r14,%r15), %edx
movq 0x28(%r14,%r15), %rcx
movq %rbx, %rdi
callq 0xdd74
addq $0x18, %r14
cmpq $0x318, %r14            # imm = 0x318
jb 0xdee6
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: opencopied
void
opencopied(const Arg *arg)
{
	size_t const max_cmd = 2048;
	char * const clip = xsel.clipboard;
	if(!clip) {
		fprintf(stderr, "Warning: nothing copied to clipboard\n");
		return;
	}

	/* account for space/quote (3) and \0 (1) and & (1) */
	/* e.g.: xdg-open "https://st.suckless.org"& */
	size_t const cmd_size = max_cmd + strlen(clip) + 5;
	char cmd[cmd_size];

	snprintf(cmd, cmd_size, "%s \"%s\"&", (char *)arg->v, clip);
	system(cmd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0xee92(%rip), %rbx      # 0x1dc88
testq %rbx, %rbx
je 0xee52
movq %rdi, %r14
movq %rbx, %rdi
callq 0x6390
movq %rsp, %r12
leaq 0x805(%rax), %rsi
movq %rsp, %r15
addq $0x814, %rax            # imm = 0x814
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq (%r14), %rcx
leaq 0x40bd(%rip), %rdx      # 0x12eea
movq %r15, %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0x60b0
movq %r15, %rdi
callq 0x6220
movq %r12, %rsp
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x6d36
jmp 0xee45
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: ximopen
int
ximopen(Display *dpy)
{
	XIMCallback imdestroy = { .client_data = NULL, .callback = ximdestroy };
	XICCallback icdestroy = { .client_data = NULL, .callback = xicdestroy };

	xw.ime.xim = XOpenIM(xw.dpy, NULL, NULL, NULL);
	if (xw.ime.xim == NULL)
		return 0;

	if (XSetIMValues(xw.ime.xim, XNDestroyCallback, &imdestroy, NULL))
		fprintf(stderr, "XSetIMValues: "
		                "Could not set XNDestroyCallback.\n");

	xw.ime.spotlist = XVaCreateNestedList(0, XNSpotLocation, &xw.ime.spot,
	                                      NULL);

	if (xw.ime.xic == NULL) {
		xw.ime.xic = XCreateIC(xw.ime.xim, XNInputStyle,
		                       XIMPreeditNothing | XIMStatusNothing,
		                       XNClientWindow, xw.win,
		                       XNDestroyCallback, &icdestroy,
		                       NULL);
	}
	if (xw.ime.xic == NULL)
		fprintf(stderr, "XCreateIC: Could not create input context.\n");

	return 1;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movups 0x7ec1(%rip), %xmm0     # 0x17230
movaps %xmm0, 0x10(%rsp)
movups 0x7ec5(%rip), %xmm0     # 0x17240
movaps %xmm0, (%rsp)
movq 0xe77a(%rip), %rdi      # 0x1db00
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x66f0
movq %rax, 0xe7b6(%rip)      # 0x1db50
testq %rax, %rax
je 0xf43e
leaq 0x3ecb(%rip), %rsi      # 0x13275
leaq 0x10(%rsp), %rdx
movq %rax, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x65f0
testq %rax, %rax
jne 0xf446
leaq 0x3eea(%rip), %rsi      # 0x132b5
leaq 0xe78e(%rip), %rdx      # 0x1db60
xorl %edi, %edi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x6720
movq %rax, 0xe784(%rip)      # 0x1db68
cmpq $0x0, 0xe76c(%rip)      # 0x1db58
jne 0xf42f
movq 0xe75b(%rip), %rdi      # 0x1db50
movq 0xe714(%rip), %r8       # 0x1db10
movq %rsp, %r10
leaq 0x3ebc(%rip), %rsi      # 0x132c2
leaq 0x3ec0(%rip), %rcx      # 0x132cd
leaq 0x3e61(%rip), %r9       # 0x13275
movl $0x408, %edx            # imm = 0x408
xorl %eax, %eax
pushq $0x0
pushq %r10
callq 0x6030
addq $0x10, %rsp
movq %rax, 0xe729(%rip)      # 0x1db58
movl $0x1, %ebx
cmpq $0x0, 0xe71c(%rip)      # 0x1db58
je 0xf450
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
retq
callq 0x6d52
jmp 0xf3c4
callq 0x6d74
jmp 0xf43e
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: xloadsparefont
int
xloadsparefont(FcPattern *pattern, int flags)
{
	FcPattern *match;
	FcResult result;
	
	match = FcFontMatch(NULL, pattern, &result);
	if (!match) {
		return 1;
	}

	if (!(frc[frclen].font = XftFontOpenPattern(xw.dpy, match))) {
		FcPatternDestroy(match);
		return 1;
	}

	frc[frclen].flags = flags;
	/* Believe U+0000 glyph will present in each default font */
	frc[frclen].unicodep = 0;
	frclen++;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %rsi
leaq 0xc(%rsp), %rdx
xorl %edi, %edi
callq 0x61b0
movl $0x1, %ebp
testq %rax, %rax
je 0xf813
movq %rax, %r14
movq 0xe333(%rip), %rdi      # 0x1db00
movq %rax, %rsi
callq 0x67c0
movq 0xe4dc(%rip), %rdx      # 0x1dcb8
movslq 0xe4cd(%rip), %rcx      # 0x1dcb0
movq %rcx, %rsi
shlq $0x4, %rsi
movq %rax, (%rdx,%rsi)
testq %rax, %rax
je 0xf80b
movl %ebx, 0x8(%rdx,%rsi)
movl $0x0, 0xc(%rdx,%rsi)
incl %ecx
movl %ecx, 0xe4a9(%rip)      # 0x1dcb0
xorl %ebp, %ebp
jmp 0xf813
movq %r14, %rdi
callq 0x6050
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: zoomabs
void
zoomabs(const Arg *arg)
{
	xunloadfonts();
	xloadfonts(usedfont, arg->f);
	xloadsparefonts();
	cresize(0, 0);
	redraw();
	xhints();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xd8d0(%rip), %eax      # 0x1dcb0
testl %eax, %eax
jle 0x10409
movq 0xd715(%rip), %rdi      # 0x1db00
movq 0xd8c6(%rip), %rcx      # 0x1dcb8
decl %eax
movl %eax, 0xd8b6(%rip)      # 0x1dcb0
shlq $0x4, %rax
movq (%rcx,%rax), %rsi
callq 0x60d0
jmp 0x103da
leaq 0xd608(%rip), %rdi      # 0x1da18
callq 0x10462
leaq 0xd634(%rip), %rdi      # 0x1da50
callq 0x10462
leaq 0xd660(%rip), %rdi      # 0x1da88
callq 0x10462
leaq 0xd68c(%rip), %rdi      # 0x1dac0
callq 0x10462
movq 0xd888(%rip), %rdi      # 0x1dcc8
cvtss2sd (%rbx), %xmm0
callq 0xee59
callq 0xf105
xorl %edi, %edi
xorl %esi, %esi
callq 0xf864
callq 0x96d5
popq %rbx
jmp 0xf480
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: xunloadfont
void
xunloadfont(Font *f)
{
	XftFontClose(xw.dpy, f->match);
	FcPatternDestroy(f->pattern);
	if (f->set)
		FcFontSetDestroy(f->set);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xd693(%rip), %rdi      # 0x1db00
movq 0x20(%rbx), %rsi
callq 0x60d0
movq 0x30(%rbx), %rdi
callq 0x6050
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x1048e
popq %rbx
jmp 0x64f0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/x.c
// Function: mouseaction
int
mouseaction(XEvent *e, uint release)
{
	MouseShortcut *ms;

	/* ignore Button<N>mask for Button<N> - it's set on release */
	uint state = e->xbutton.state & ~buttonmask(e->xbutton.button);

	for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
		if (ms->release == release &&
		    ms->button == e->xbutton.button &&
		    (!ms->altscrn || (ms->altscrn == (tisaltscr() ? 1 : -1))) &&
		    (match(ms->mod, state) ||  /* exact or forced */
		     match(ms->mod, state & ~forcemousemod))) {
			ms->func(&(ms->arg));
			return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x50(%rdi), %eax
movl 0x54(%rdi), %ecx
leal -0x1(%rcx), %edx
cmpl $0x4, %edx
jae 0x10694
movl %edx, %ecx
leaq 0x2651(%rip), %rdx      # 0x12ce0
movl (%rdx,%rcx,4), %ebp
jmp 0x106a5
xorl %ebp, %ebp
cmpl $0x5, %ecx
setne %bpl
negl %ebp
orl $0xffffefff, %ebp       # imm = 0xFFFFEFFF
andl %eax, %ebp
movl %ebp, %eax
andl $0xffff9fef, %eax       # imm = 0xFFFF9FEF
movl %eax, 0x4(%rsp)
andl $0xffff9fee, %ebp       # imm = 0xFFFF9FEE
movq $-0x20, %r12
leaq 0x9d1a(%rip), %r13      # 0x1a3e0
cmpl %ebx, 0x38(%r12,%r13)
jne 0x10712
movl 0x24(%r12,%r13), %eax
cmpl 0x54(%r14), %eax
jne 0x10712
movl 0x3c(%r12,%r13), %r15d
testl %r15d, %r15d
je 0x106f9
callq 0x896a
cmpl $0x1, %eax
movl $0x0, %eax
sbbl %eax, %eax
orl $0x1, %eax
cmpl %eax, %r15d
jne 0x10712
movl 0x20(%r12,%r13), %eax
cmpl $-0x1, %eax
je 0x10730
cmpl %eax, 0x4(%rsp)
je 0x10730
cmpl $-0x1, %eax
je 0x10730
cmpl %eax, %ebp
je 0x10730
addq $0x20, %r12
cmpq $0xc0, %r12
jb 0x106c6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq (%r12,%r13), %rdi
addq $0x30, %rdi
callq *-0x8(%rdi)
movl $0x1, %eax
jmp 0x10721
// File: /workspace/github_c_makefile_star2_O1/mrdotx[P]st/boxdraw.c
// Function: boxdrawindex
ushort
boxdrawindex(const Glyph *g)
{
	if (boxdraw_braille && (g->u & ~0xff) == 0x2800)
		return BRL | (uint8_t)g->u;
	if (boxdraw_bold && (g->mode & ATTR_BOLD))
		return BDB | boxdata[(uint8_t)g->u];
	return boxdata[(uint8_t)g->u];
}

// Assembly:
leaq 0x23ec(%rip), %rax      # 0x12c68
cmpl $0x0, (%rax)
je 0x1089c
movl (%rdi), %eax
movl %eax, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
cmpl $0x2800, %ecx           # imm = 0x2800
jne 0x1089c
movzbl %al, %eax
orl $0x1800, %eax           # imm = 0x1800
retq
leaq 0x23c1(%rip), %rax      # 0x12c64
cmpl $0x0, (%rax)
je 0x108ae
testb $0x1, 0x4(%rdi)
jne 0x108bd
movzbl (%rdi), %eax
leaq 0x2ec8(%rip), %rcx      # 0x13780
movzwl (%rcx,%rax,2), %eax
retq
movzbl (%rdi), %eax
leaq 0x2eb9(%rip), %rcx      # 0x13780
movzwl (%rcx,%rax,2), %eax
orl $0x8000, %eax           # imm = 0x8000
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/perftests/dynamodb_kv/main.c
// Function: callback_get
static int
callback_get(void * cookie, int status, const uint8_t * buf, size_t buflen)
{
	struct status * C = cookie;

	C->done = 1;
	C->status = status;
	if (status == 0) {
		fprintf(stderr, "value returned: \"");
		fwrite(buf, buflen, 1, stderr);
		fprintf(stderr, "\"\n");
	} else if (status == 2) {
		fprintf(stderr, "no value associated\n");
	}

	/* Success! */
	return (0);
}

// Assembly:
pushq %rax
movl $0x1, (%rdi)
movl %esi, 0x4(%rdi)
cmpl $0x2, %esi
je 0x2f37
testl %esi, %esi
je 0x2f2a
xorl %eax, %eax
popq %rcx
retq
movq %rdx, %rdi
movq %rcx, %rsi
callq 0x232c
jmp 0x2f26
callq 0x2310
jmp 0x2f26
nop
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/proto_dynamodb_kv/proto_dynamodb_kv_client.c
// Function: proto_dynamodb_kv_request_get
int
proto_dynamodb_kv_request_get(struct wire_requestqueue * Q, const char * key,
    int (* callback)(void *, int, const uint8_t *, size_t), void * cookie)
{
	struct data_cookie * C;
	uint8_t *rbuf, *p;
	size_t rlen;

	/* Validate key length. */
	if (strlen(key) > 255) {
		warn0("Key is too long");
		goto err0;
	}

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct data_cookie))) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;

	/* Compute request packet size. */
	rlen = 4 + 1 + strlen(key);

	/* Start writing a request. */
	if ((p = rbuf = wire_requestqueue_add_getbuf(Q,
	    rlen, callback_data, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(p, PROTO_DDBKV_GET);
	p += 4;
	*p++ = (uint8_t)strlen(key);
	memcpy(p, key, strlen(key));
	p += strlen(key);

	/* Sanity check. */
	assert(p == &rbuf[rlen]);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, rbuf, rlen))
		goto err1;

	/* Success! */
	return (0);

err1:
	free(C);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20f0
cmpq $0x100, %rax            # imm = 0x100
jb 0x5e4e
leaq 0x4ae6(%rip), %rdi      # 0xa918
xorl %eax, %eax
callq 0x5773
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5efd
movq %rax, %r15
movq %rbx, (%rsp)
movl $0x10, %edi
callq 0x21d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x5efd
movq %rax, %r12
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
addq $0x5, %r15
leaq 0xab(%rip), %rdx        # 0x5f2d
movq (%rsp), %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0x65ed
testq %rax, %rax
je 0x5ef1
movq %rax, %rbp
movl $0x10010100, (%rax)     # imm = 0x10010100
movq %r13, %rdi
callq 0x20f0
leaq 0x5(%rbp), %r14
movb %al, 0x4(%rbp)
movq %r13, %rdi
callq 0x20f0
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x21b0
movq %r13, %rdi
callq 0x20f0
addq %rbp, %rax
addq $0x5, %rax
movq %rbp, %rcx
addq %r15, %rcx
cmpq %rcx, %rax
jne 0x5f0e
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x68c9
testl %eax, %eax
je 0x5efb
movq %r12, %rdi
callq 0x2040
jmp 0x5efd
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4a25(%rip), %rdi      # 0xa93a
leaq 0x4a2f(%rip), %rsi      # 0xa94b
leaq 0x4c02(%rip), %rcx      # 0xab25
movl $0x18b, %edx            # imm = 0x18B
callq 0x2140
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/proto_dynamodb_kv/proto_dynamodb_kv_client.c
// Function: callback_data
static int
callback_data(void * cookie, uint8_t * buf, size_t buflen)
{
	struct data_cookie * C = cookie;
	int failed = 1;
	uint32_t status;
	uint32_t len = 0;
	uint8_t * dbuf = NULL;
	int rc;

	/* If we have a packet, parse it. */
	if (buf != NULL) {
		/* Do we have the right packet length? */
		if (buflen < 4)
			BAD("GET", "bogus length");

		/* Parse the status. */
		status = be32dec(&buf[0]);

		/* Non-zero status is a failure. */
		switch (status) {
		case 0:
			break;
		case 1:
		case 2:
			if (buflen != 4)
				BAD("GET", "bogus length");
			failed = (int)status;
			goto failed;
		default:
			BAD("GET", "invalid status");
		}

		/* Parse the data length. */
		if (buflen < 8)
			BAD("GET", "bogus length");
		len = be32dec(&buf[4]);

		/* Do we have the right packet length? */
		if (buflen != 8 + len)
			BAD("GET", "bogus length");

		/* Success!  Point at the data. */
		failed = 0;
		dbuf = &buf[8];
	}

failed:
	/* Invoke the upstream callback. */
	rc = (C->callback)(C->cookie, failed, dbuf, len);

	/* Free the cookie. */
	free(C);

	/* Return status from callback. */
	return (rc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %ebp
testq %rsi, %rsi
je 0x5f73
cmpq $0x3, %rdx
ja 0x5f9e
leaq 0x4d4b(%rip), %rdi      # 0xac99
leaq 0x4d7d(%rip), %rsi      # 0xacd2
leaq 0x4d5a(%rip), %rdx      # 0xacb6
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x5773
callq 0x2090
movl $0x0, (%rax)
jmp 0x5f76
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
movl %r15d, %ecx
movl %ebp, %esi
movq %r14, %rdx
callq *(%rbx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
movl (%rsi), %eax
bswapl %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x5fbd
cmpq $0x4, %rdx
jne 0x5f47
xorl %r15d, %r15d
xorl %r14d, %r14d
movl %eax, %ebp
jmp 0x5f79
testl %eax, %eax
jne 0x5fdf
cmpq $0x7, %rdx
jbe 0x5f47
movl 0x4(%r14), %r15d
bswapl %r15d
leal 0x8(%r15), %eax
cmpq %rdx, %rax
jne 0x5ff9
addq $0x8, %r14
xorl %ebp, %ebp
jmp 0x5f79
leaq 0x4cb3(%rip), %rdi      # 0xac99
leaq 0x4ce5(%rip), %rsi      # 0xacd2
leaq 0x4ccf(%rip), %rdx      # 0xacc3
jmp 0x5f5c
leaq 0x4c99(%rip), %rdi      # 0xac99
leaq 0x4ccb(%rip), %rsi      # 0xacd2
leaq 0x4ca8(%rip), %rdx      # 0xacb6
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x5773
callq 0x2090
movl $0x0, (%rax)
jmp 0x5f79
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/proto_dynamodb_kv/proto_dynamodb_kv_client.c
// Function: proto_dynamodb_kv_request_getc
int
proto_dynamodb_kv_request_getc(struct wire_requestqueue * Q, const char * key,
    int (* callback)(void *, int, const uint8_t *, size_t), void * cookie)
{
	struct data_cookie * C;
	uint8_t *rbuf, *p;
	size_t rlen;

	/* Validate key length. */
	if (strlen(key) > 255) {
		warn0("Key is too long");
		goto err0;
	}

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct data_cookie))) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;

	/* Compute request packet size. */
	rlen = 4 + 1 + strlen(key);

	/* Start writing a request. */
	if ((p = rbuf = wire_requestqueue_add_getbuf(Q,
	    rlen, callback_data, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(p, PROTO_DDBKV_GETC);
	p += 4;
	*p++ = (uint8_t)strlen(key);
	memcpy(p, key, strlen(key));
	p += strlen(key);

	/* Sanity check. */
	assert(p == &rbuf[rlen]);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, rbuf, rlen))
		goto err1;

	/* Success! */
	return (0);

err1:
	free(C);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20f0
cmpq $0x100, %rax            # imm = 0x100
jb 0x6072
leaq 0x48c2(%rip), %rdi      # 0xa918
xorl %eax, %eax
callq 0x5773
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x6121
movq %rax, %r15
movq %rbx, (%rsp)
movl $0x10, %edi
callq 0x21d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x6121
movq %rax, %r12
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
addq $0x5, %r15
leaq -0x179(%rip), %rdx      # 0x5f2d
movq (%rsp), %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0x65ed
testq %rax, %rax
je 0x6115
movq %rax, %rbp
movl $0x11010100, (%rax)     # imm = 0x11010100
movq %r13, %rdi
callq 0x20f0
leaq 0x5(%rbp), %r14
movb %al, 0x4(%rbp)
movq %r13, %rdi
callq 0x20f0
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x21b0
movq %r13, %rdi
callq 0x20f0
addq %rbp, %rax
addq $0x5, %rax
movq %rbp, %rcx
addq %r15, %rcx
cmpq %rcx, %rax
jne 0x6132
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x68c9
testl %eax, %eax
je 0x611f
movq %r12, %rdi
callq 0x2040
jmp 0x6121
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4801(%rip), %rdi      # 0xa93a
leaq 0x480b(%rip), %rsi      # 0xa94b
leaq 0x4a61(%rip), %rcx      # 0xaba8
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x2140
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/proto_dynamodb_kv/proto_dynamodb_kv_client.c
// Function: proto_dynamodb_kv_request_delete
int
proto_dynamodb_kv_request_delete(struct wire_requestqueue * Q,
    const char * key, int (* callback)(void *, int), void * cookie)
{
	struct status_cookie * C;
	uint8_t *rbuf, *p;
	size_t rlen;

	/* Validate key length. */
	if (strlen(key) > 255) {
		warn0("Key is too long");
		goto err0;
	}

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct status_cookie))) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;

	/* Compute request packet size. */
	rlen = 4 + 1 + strlen(key);

	/* Start writing a request. */
	if ((p = rbuf = wire_requestqueue_add_getbuf(Q,
	    rlen, callback_status, C)) == NULL)
		goto err1;

	/* Construct request. */
	be32enc(p, PROTO_DDBKV_DELETE);
	p += 4;
	*p++ = (uint8_t)strlen(key);
	memcpy(p, key, strlen(key));
	p += strlen(key);

	/* Sanity check. */
	assert(p == &rbuf[rlen]);

	/* Finish writing request. */
	if (wire_requestqueue_add_done(Q, rbuf, rlen))
		goto err1;

	/* Success! */
	return (0);

err1:
	free(C);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20f0
cmpq $0x100, %rax            # imm = 0x100
jb 0x619b
leaq 0x4799(%rip), %rdi      # 0xa918
xorl %eax, %eax
callq 0x5773
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x624a
movq %rax, %r15
movq %rbx, (%rsp)
movl $0x10, %edi
callq 0x21d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x624a
movq %rax, %r12
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
addq $0x5, %r15
leaq -0x7a7(%rip), %rdx      # 0x5a28
movq (%rsp), %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0x65ed
testq %rax, %rax
je 0x623e
movq %rax, %rbp
movl $0x20010100, (%rax)     # imm = 0x20010100
movq %r13, %rdi
callq 0x20f0
leaq 0x5(%rbp), %r14
movb %al, 0x4(%rbp)
movq %r13, %rdi
callq 0x20f0
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x21b0
movq %r13, %rdi
callq 0x20f0
addq %rbp, %rax
addq $0x5, %rax
movq %rbp, %rcx
addq %r15, %rcx
cmpq %rcx, %rax
jne 0x625b
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x68c9
testl %eax, %eax
je 0x6248
movq %r12, %rdi
callq 0x2040
jmp 0x624a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46d8(%rip), %rdi      # 0xa93a
leaq 0x46e2(%rip), %rsi      # 0xa94b
leaq 0x49bc(%rip), %rcx      # 0xac2c
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x2140
nop
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/omdsha512k128n128tau128v2/ref/omdsha512.c
// Function: double_block
void
double_block (hashblock res, const hashblock in)
{
    unsigned int i;
    /* create bitmask from msb using signed shift */
    unsigned char carry = in[0] & 0x80;

    for (i = 0; i < OMD_n-1; i++)
       {
	  /* shift with carry from next block */
	  res[i] = (in[i] << 1) | (in[i+1] >> 7);
       }
	
	res[OMD_n -1] = (in[OMD_n -1] << 1);

    /* xor P(x) if msb */
	if(carry) {
	    res[OMD_n -2] = res[OMD_n -2] ^ 0x01;
	    res[OMD_n -1] = res[OMD_n -1] ^ 0x25;
	}
}

// Assembly:
movb (%rsi), %al
xorl %ecx, %ecx
movb (%rsi,%rcx), %dl
movb 0x1(%rsi,%rcx), %r8b
shrb $0x7, %r8b
addb %dl, %dl
orb %r8b, %dl
movb %dl, (%rdi,%rcx)
leaq 0x1(%rcx), %rdx
movq %rdx, %rcx
cmpq $0x3f, %rdx
jne 0x1261
movb 0x3f(%rsi), %cl
addb %cl, %cl
movb %cl, 0x3f(%rdi)
testb %al, %al
js 0x128f
retq
xorb $0x1, 0x3e(%rdi)
xorb $0x25, %cl
movb %cl, 0x3f(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/omdsha512k128n128tau128v2/ref/omdsha512.c
// Function: triple_block
void
triple_block (hashblock res, const hashblock in)
{
    unsigned int i;
    /* create bitmask from msb using signed shift */
    unsigned char carry = in[0] & 0x80;

    for (i = 0; i < OMD_n -1; i++)
       {
	  /* shift and xor */
	  res[i] = in[i] ^ ((in[i] << 1) | (in[i+1] >> 7));
       }

	res[OMD_n -1] = in[OMD_n -1] ^ (in[OMD_n -1] << 1);

    /* xor P(x) if msb */
	if(carry) {
	    res[OMD_n -2] = res[OMD_n -2] ^ 0x01;
	    res[OMD_n -1] = res[OMD_n -1] ^ 0x25;
	}
}

// Assembly:
movb (%rsi), %al
xorl %ecx, %ecx
movb (%rsi,%rcx), %dl
movb 0x1(%rsi,%rcx), %r8b
shrb $0x7, %r8b
leal (%rdx,%rdx), %r9d
orb %r8b, %r9b
xorb %dl, %r9b
movb %r9b, (%rdi,%rcx)
leaq 0x1(%rcx), %rdx
movq %rdx, %rcx
cmpq $0x3f, %rdx
jne 0x129e
movb 0x3f(%rsi), %dl
leal (%rdx,%rdx), %ecx
xorb %dl, %cl
movb %cl, 0x3f(%rdi)
testb %al, %al
js 0x12d5
retq
xorb $0x1, 0x3e(%rdi)
xorb $0x25, %cl
movb %cl, 0x3f(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/omdsha512k128n128tau128v2/ref/omdsha512.c
// Function: l2b
void
l2b (hashblock bit_string, int value)
{
   int ptr = value*8;
   unsigned int i = OMD_n;

   memset(bit_string, 0x00, OMD_n);

   while (i--)
      {   /* write the bytes of value into tau */
	 bit_string[i] = ptr & 0xff;
	 ptr >>= 8;
      }
}

// Assembly:
shll $0x3, %esi
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, 0x20(%rdi)
vmovups %ymm0, (%rdi)
movl $0x40, %eax
movl %esi, %ecx
sarl $0x8, %ecx
movb %sil, -0x1(%rdi,%rax)
movl %ecx, %esi
decq %rax
jne 0x12f7
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/omdsha512k128n128tau128v2/ref/omdsha512.c
// Function: calc_L_i
void
calc_L_i (hashblock l, const hashblock lzero, unsigned int i)
{
   /* i==0 => l=lzero */
   if (i == 0)
      {
	 memcpy (l, lzero, OMD_n );
	 return;
      }

   double_block (l,lzero);

   /* L[i]=2.L[i-1] */
   while (--i)
      {
	 double_block (l,l);
      }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %edx, %edx
je 0x1369
movl %edx, %ebp
movq %rbx, %rdi
callq 0x1070
decl %ebp
je 0x137b
movq %rbx, %rdi
movq %rbx, %rsi
jmp 0x1358
vmovups (%rsi), %ymm0
vmovups 0x20(%rsi), %ymm1
vmovups %ymm1, 0x20(%rbx)
vmovups %ymm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/omdsha512k128n128tau128v2/ref/omdsha512.c
// Function: increment_masking_message
void
increment_masking_message (hashblock delta_n, const hashblock delta_o,
			   const hashblock lzero, int i)
{
   hashblock l;

   if (i < 1)
      {
	 return;
      }

   /* \delta_{N, i, 0} = \delta_{N, i-1, 0} ^ L[ntz(i)]  */
   calc_L_i (l, lzero, ntz(i));
   xor_block (delta_n, delta_o, l);

}

// Assembly:
testl %ecx, %ecx
jle 0x13ee
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
blsmskl %ecx, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
je 0x13c5
xorl %eax, %eax
sarl %ecx
incl %eax
cmpl $0x1, %ecx
ja 0x13bc
movq %rsp, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x10c0
xorl %eax, %eax
movb (%rsp,%rax), %cl
xorb (%rbx,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x40, %rax
jne 0x13d4
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/omdsha512k128n128tau128v2/ref/omdsha512.c
// Function: final_masking_message
void
final_masking_message (hashblock delta_n, const hashblock delta_o,
		       const hashblock lstar, int j)
{
   hashblock l;

   switch (j)
      {
	 /* \delta_{N, i, 1} = \delta_{N, i, 0} ^ 2*L_*  */
	 case 1: double_block (l, lstar); break;

	 /* \delta_{N, i, 2} = \delta_{N, i, 0} ^ 3*L_*  */
	 case 2: triple_block (l, lstar); break;
      }

	xor_block (delta_n, delta_o, l);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x2, %ecx
je 0x1413
cmpl $0x1, %ecx
jne 0x141e
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x1070
jmp 0x141e
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x10d0
xorl %eax, %eax
movb (%rsp,%rax), %cl
xorb (%rbx,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x40, %rax
jne 0x1420
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/omdsha512k128n128tau128v2/ref/omdsha512.c
// Function: increment_masking_associated_data
void
increment_masking_associated_data (hashblock delta_n, const hashblock delta_o,
				   const hashblock lzero, int i)
{
   hashblock l;

   /* \delta_{i, 0} = \delta_{i-1, 0} ^ L[ntz(i)]  */
   calc_L_i (l, lzero, ntz(i));
   xor_block (delta_n, delta_o, l);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
blsmskl %ecx, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
je 0x145f
xorl %eax, %eax
sarl %ecx
incl %eax
cmpl $0x1, %ecx
ja 0x1456
movq %rsp, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x10c0
xorl %eax, %eax
movb (%rsp,%rax), %cl
xorb (%rbx,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x40, %rax
jne 0x146e
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/sguerrini97[P]ps3linux-ps3vuart-tools/ps3dm/dev.c
// Function: dev_read
int
dev_read(void *buf, size_t len)
{
	char tmp[4096];
	struct ps3dm_header *hdr;
	int ret;

	if (fd < 0)
		return (-1);

	hdr = (struct ps3dm_header *) tmp;

	while (1) {
		ret = read(fd, hdr, sizeof(*hdr));
		if (ret < 0) {
			if (errno != EAGAIN)
				return (-1);
		} else if (ret > 0) {
			break;
		}
	}

	while (1) {
		ret = read(fd, hdr + 1, hdr->reply_length);
		if (ret < 0) {
			if (errno != EAGAIN)
				return (-1);
		} else if (ret > 0) {
			break;
		}
	}

	if (len > (sizeof(*hdr) + hdr->reply_length))
		len = sizeof(*hdr) + hdr->reply_length;

	memcpy(buf, tmp, len);

	return (len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, 0x4ac5(%rip)      # 0x7230
js 0x27e4
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %r12
movl 0x4ab4(%rip), %edi      # 0x7230
movl $0x10, %edx
movq %r12, %rsi
callq 0x20a0
testl %eax, %eax
js 0x2791
je 0x2776
jmp 0x279d
callq 0x2030
cmpl $0xb, (%rax)
je 0x2776
jmp 0x27e4
leaq 0x10(%rsp), %r12
movl 0x4a88(%rip), %edi      # 0x7230
movl 0xc(%rsp), %edx
movq %r12, %rsi
callq 0x20a0
testl %eax, %eax
js 0x27bc
je 0x27a2
jmp 0x27c8
callq 0x2030
cmpl $0xb, (%rax)
je 0x27a2
jmp 0x27e4
movq %rsp, %rsi
movl 0xc(%rsi), %ebx
addq $0x10, %rbx
cmpq %r15, %rbx
cmovaeq %r15, %rbx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x20e0
movl %ebx, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/sguerrini97[P]ps3linux-ps3vuart-tools/ps3dm/sm/cmd_sm_drive_auth.c
// Function: cmd_sm_drive_auth_exec
int
cmd_sm_drive_auth_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3dm_sm_drive_auth drive_auth;
	uint64_t arg, laid, paid;
	char *endptr;
	int ret;

	arg = strtoull(argv[0], &endptr, 0);
	if (*endptr != '\0')
		return (CMD_EINVAL);

	laid = opts.laid_valid ? opts.laid : 0x1070000002000001ull;
	paid = opts.paid_valid ? opts.paid : 0x10700003ff000001ull;

	ps3dm_init_header(&drive_auth.dm_hdr, 1, PS3DM_FID_SM,
	    sizeof(drive_auth) - sizeof(struct ps3dm_header),
	    sizeof(drive_auth) - sizeof(struct ps3dm_header));
	ps3dm_init_ss_header(&drive_auth.ss_hdr, PS3DM_PID_SM_DRIVE_AUTH,
	    laid, paid);
	drive_auth.arg = arg;

	ret = dev_write(&drive_auth, sizeof(drive_auth));
	if (ret != sizeof(drive_auth))
		return (CMD_EIO);

	ret = dev_read(&drive_auth, sizeof(drive_auth));
	if (ret != sizeof(drive_auth))
		return (CMD_EIO);

	if (opts.do_verbose > 0)
		fprintf(stderr, "ss status %d\n", drive_auth.ss_hdr.status);

	if (drive_auth.ss_hdr.status)
		return (CMD_EIO);

	return (CMD_EOK);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq (%rcx), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x20b0
movq (%rbx), %rcx
movl $0x2, %ebx
cmpb $0x0, (%rcx)
jne 0x28d0
leaq 0x4885(%rip), %r14      # 0x70c0
cmpl $0x0, 0x20(%r14)
je 0x2848
movq 0x18(%r14), %rcx
jmp 0x2852
movabsq $0x1070000002000001, %rcx # imm = 0x1070000002000001
cmpl $0x0, 0x30(%r14)
je 0x285f
movq 0x28(%r14), %rdx
jmp 0x2869
movabsq $0x10700003ff000001, %rdx # imm = 0x10700003FF000001
movaps 0x1900(%rip), %xmm0     # 0x4170
leaq 0x8(%rsp), %rdi
movups %xmm0, (%rdi)
movq $0x5004, 0x10(%rdi)     # imm = 0x5004
movq $0x5000, 0x18(%rdi)     # imm = 0x5000
movq %rcx, 0x28(%rdi)
movq %rdx, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movl $0x40, %esi
callq 0x2730
movl $0x3, %ebx
cmpl $0x40, %eax
jne 0x28d0
leaq 0x8(%rsp), %rdi
movl $0x40, %esi
callq 0x2751
cmpl $0x40, %eax
jne 0x28d0
cmpl $0x0, 0x8(%r14)
jg 0x28da
xorl %eax, %eax
cmpl $0x0, 0x28(%rsp)
setne %al
leal (%rax,%rax,2), %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x8(%rsp), %rdi
callq 0x2170
jmp 0x28c3
nop
// File: /workspace/github_c_makefile_star2_O1/sguerrini97[P]ps3linux-ps3vuart-tools/ps3dm/sm/cmd_sm_get_rnd.c
// Function: cmd_sm_get_rnd_exec
int
cmd_sm_get_rnd_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3dm_sm_get_rnd get_rnd;
	uint64_t laid, paid;
	int len;
	int ret;

	laid = opts.laid_valid ? opts.laid : 0x1070000002000001ull;
	paid = opts.paid_valid ? opts.paid : 0x1070000031000001ull;

	ps3dm_init_header(&get_rnd.dm_hdr, 1, PS3DM_FID_SM,
	    sizeof(struct ps3dm_ss_header),
	    sizeof(get_rnd) - sizeof(struct ps3dm_header));
	ps3dm_init_ss_header(&get_rnd.ss_hdr, PS3DM_PID_SM_GET_RND,
	    laid, paid);

	len = sizeof(struct ps3dm_header) + sizeof(struct ps3dm_ss_header);

	ret = dev_write(&get_rnd, len);
	if (ret != len)
		return (CMD_EIO);

	ret = dev_read(&get_rnd, sizeof(get_rnd));
	if (ret != sizeof(get_rnd))
		return (CMD_EIO);

	if (opts.do_verbose > 0)
		fprintf(stderr, "ss status %d\n", get_rnd.ss_hdr.status);

	if (get_rnd.ss_hdr.status)
		return (CMD_EIO);

	fwrite((char *) get_rnd.rnd, 1, sizeof(get_rnd.rnd), stdout);

	return (CMD_EOK);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
leaq 0x47ca(%rip), %r14      # 0x70c0
cmpl $0x0, 0x20(%r14)
movabsq $0x1070000002000001, %rax # imm = 0x1070000002000001
movq %rax, %rcx
je 0x290e
movq 0x18(%r14), %rcx
cmpl $0x0, 0x30(%r14)
je 0x291b
movq 0x28(%r14), %rax
jmp 0x2921
addq $0x2f000000, %rax       # imm = 0x2F000000
movaps 0x1898(%rip), %xmm0     # 0x41c0
leaq 0x8(%rsp), %rdi
movups %xmm0, (%rdi)
movq $0x5003, 0x10(%rdi)     # imm = 0x5003
movq $0x5000, 0x18(%rdi)     # imm = 0x5000
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movl $0x38, %esi
callq 0x2730
movl $0x3, %ebx
cmpl $0x38, %eax
jne 0x299e
leaq 0x8(%rsp), %rdi
movl $0x50, %esi
callq 0x2751
cmpl $0x50, %eax
jne 0x299e
cmpl $0x0, 0x8(%r14)
jg 0x29a8
cmpl $0x0, 0x28(%rsp)
jne 0x299e
leaq 0x40(%rsp), %rdi
movq 0x463e(%rip), %rax      # 0x6fc8
movq (%rax), %rcx
movl $0x1, %esi
movl $0x18, %edx
callq 0x2130
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
leaq 0x8(%rsp), %rdi
callq 0x2194
jmp 0x2977
// File: /workspace/github_c_makefile_star2_O1/sguerrini97[P]ps3linux-ps3vuart-tools/ps3dm/sm/cmd_sm_get_version.c
// Function: cmd_sm_get_version_exec
int
cmd_sm_get_version_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3dm_sm_get_version get_version;
	uint64_t laid, paid;
	int len;
	int ret;

	laid = opts.laid_valid ? opts.laid : 0x1070000002000001ull;
	paid = opts.paid_valid ? opts.paid : 0x10700003ff000001ull;

	ps3dm_init_header(&get_version.dm_hdr, 1, PS3DM_FID_SM,
	    sizeof(struct ps3dm_ss_header),
	    sizeof(get_version) - sizeof(struct ps3dm_header));
	ps3dm_init_ss_header(&get_version.ss_hdr, PS3DM_PID_SM_GET_VERSION,
	    laid, paid);

	len = sizeof(struct ps3dm_header) + sizeof(struct ps3dm_ss_header);

	ret = dev_write(&get_version, len);
	if (ret != len)
		return (CMD_EIO);

	ret = dev_read(&get_version, sizeof(get_version));
	if (ret != sizeof(get_version))
		return (CMD_EIO);

	if (opts.do_verbose > 0)
		fprintf(stderr, "ss status %d\n", get_version.ss_hdr.status);

	if (get_version.ss_hdr.status)
		return (CMD_EIO);

	hex_fprintf(stdout, (char *) get_version.version,
	    sizeof(get_version.version));

	return (CMD_EOK);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq 0x46fe(%rip), %r14      # 0x70c0
cmpl $0x0, 0x20(%r14)
je 0x29cf
movq 0x18(%r14), %rax
jmp 0x29d9
movabsq $0x1070000002000001, %rax # imm = 0x1070000002000001
cmpl $0x0, 0x30(%r14)
je 0x29e6
movq 0x28(%r14), %rcx
jmp 0x29f0
movabsq $0x10700003ff000001, %rcx # imm = 0x10700003FF000001
movaps 0x17f9(%rip), %xmm0     # 0x41f0
leaq 0x8(%rsp), %rdi
movups %xmm0, (%rdi)
movq $0x5006, 0x10(%rdi)     # imm = 0x5006
movq $0x5000, 0x18(%rdi)     # imm = 0x5000
movq %rax, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
movl $0x38, %esi
callq 0x2730
movl $0x3, %ebx
cmpl $0x38, %eax
jne 0x2a68
leaq 0x8(%rsp), %rdi
movl $0x40, %esi
callq 0x2751
cmpl $0x40, %eax
jne 0x2a68
cmpl $0x0, 0x8(%r14)
jg 0x2a72
cmpl $0x0, 0x28(%rsp)
jne 0x2a68
movq 0x4574(%rip), %rax      # 0x6fc8
movq (%rax), %rdi
leaq 0x40(%rsp), %rsi
movl $0x8, %edx
callq 0x3bc5
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x8(%rsp), %rdi
callq 0x21b8
jmp 0x2a46
nop
// File: /workspace/github_c_makefile_star2_O1/sguerrini97[P]ps3linux-ps3vuart-tools/ps3dm/sm/cmd_sm_set_del_encdec_key.c
// Function: cmd_sm_set_del_encdec_key_exec
int
cmd_sm_set_del_encdec_key_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3dm_sm_set_del_encdec_key set_del_encdec_key;
	uint64_t arg, laid, paid;
	char *endptr;
	int ret;

	arg = strtoull(argv[0], &endptr, 0);
	if (*endptr != '\0')
		return (CMD_EINVAL);

	laid = opts.laid_valid ? opts.laid : 0x1070000002000001ull;
	paid = opts.paid_valid ? opts.paid : 0x10700003ff000001ull;

	ps3dm_init_header(&set_del_encdec_key.dm_hdr, 1, PS3DM_FID_SM,
	    sizeof(set_del_encdec_key) - sizeof(struct ps3dm_header),
	    sizeof(set_del_encdec_key) - sizeof(struct ps3dm_header));
	ps3dm_init_ss_header(&set_del_encdec_key.ss_hdr, PS3DM_PID_SM_SET_DEL_ENCDEC_KEY,
	    laid, paid);
	set_del_encdec_key.arg = arg;

	ret = dev_write(&set_del_encdec_key, sizeof(set_del_encdec_key));
	if (ret != sizeof(set_del_encdec_key))
		return (CMD_EIO);

	ret = dev_read(&set_del_encdec_key, sizeof(set_del_encdec_key));
	if (ret != sizeof(set_del_encdec_key))
		return (CMD_EIO);

	if (opts.do_verbose > 0)
		fprintf(stderr, "ss status %d\n", set_del_encdec_key.ss_hdr.status);

	if (set_del_encdec_key.ss_hdr.status)
		return (CMD_EIO);

	return (CMD_EOK);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq (%rcx), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x20b0
movq (%rbx), %rcx
movl $0x2, %ebx
cmpb $0x0, (%rcx)
jne 0x2b44
leaq 0x4611(%rip), %r14      # 0x70c0
cmpl $0x0, 0x20(%r14)
je 0x2abc
movq 0x18(%r14), %rcx
jmp 0x2ac6
movabsq $0x1070000002000001, %rcx # imm = 0x1070000002000001
cmpl $0x0, 0x30(%r14)
je 0x2ad3
movq 0x28(%r14), %rdx
jmp 0x2add
movabsq $0x10700003ff000001, %rdx # imm = 0x10700003FF000001
movaps 0x168c(%rip), %xmm0     # 0x4170
leaq 0x8(%rsp), %rdi
movups %xmm0, (%rdi)
movq $0x5002, 0x10(%rdi)     # imm = 0x5002
movq $0x5000, 0x18(%rdi)     # imm = 0x5000
movq %rcx, 0x28(%rdi)
movq %rdx, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movl $0x40, %esi
callq 0x2730
movl $0x3, %ebx
cmpl $0x40, %eax
jne 0x2b44
leaq 0x8(%rsp), %rdi
movl $0x40, %esi
callq 0x2751
cmpl $0x40, %eax
jne 0x2b44
cmpl $0x0, 0x8(%r14)
jg 0x2b4e
xorl %eax, %eax
cmpl $0x0, 0x28(%rsp)
setne %al
leal (%rax,%rax,2), %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x8(%rsp), %rdi
callq 0x21dc
jmp 0x2b37
nop