LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mrdotx[P]st/st.c
// Function: utf8decode
size_t
utf8decode(const char *c, Rune *u, size_t clen)
{
    size_t i, j, len, type;
    Rune udecoded;

    *u = UTF_INVALID;
    if (!clen)
        return 0;
    udecoded = utf8decodebyte(c[0], &len);
    if (!BETWEEN(len, 1, UTF_SIZ))
        return 1;
    for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
        udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
        if (type != 0)
            return j;
    }
    if (j < len)
        return 0;
    *u = udecoded;
    utf8validate(u, len);

    return len;
}

// Assembly:
movl $0xfffd, (%rsi)         # imm = 0xFFFD
testq %rdx, %rdx
je 0xa2a9
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movzbl (%rdi), %ebx
xorl %r8d, %r8d
leaq 0x822b(%rip), %r10      # 0x124a1
leaq 0x821f(%rip), %r11      # 0x1249c
xorl %ecx, %ecx
movzbl (%rcx,%r10), %r9d
movl %r9d, %eax
andl %ebx, %eax
movzbl (%rcx,%r11), %ebp
cmpl %ebp, %eax
je 0xa2ac
incq %rcx
addq $0x4, %r8
cmpq $0x5, %rcx
jne 0xa27f
movl $0x1, %eax
jmp 0xa36a
xorl %eax, %eax
retq
leaq -0x1(%rcx), %r14
movl $0x1, %eax
cmpq $0x3, %r14
ja 0xa36a
notl %r9d
andl %ebx, %r9d
cmpq $0x1, %rdx
sete %al
cmpq $0x2, %rcx
setae %bl
setb %bpl
orb %al, %bpl
jne 0xa32b
movl $0x1, %eax
movzbl (%rdi,%rax), %ebx
xorl %r14d, %r14d
movzbl (%r14,%r10), %ebp
movl %ebp, %r15d
andl %ebx, %r15d
movzbl (%r14,%r11), %r12d
cmpl %r12d, %r15d
je 0xa308
incq %r14
cmpq $0x5, %r14
jne 0xa2e8
jmp 0xa36a
testq %r14, %r14
jne 0xa36a
notl %ebp
andl %ebx, %ebp
shll $0x6, %r9d
orl %ebp, %r9d
incq %rax
cmpq %rcx, %rax
setb %bl
cmpq %rdx, %rax
jae 0xa32b
cmpq %rcx, %rax
jb 0xa2e1
testb %bl, %bl
je 0xa333
xorl %eax, %eax
jmp 0xa36a
movl %r9d, (%rsi)
leaq 0x8173(%rip), %rax      # 0x124b0
cmpl %r9d, (%r8,%rax)
jbe 0xa34b
movl $0xfffd, (%rsi)         # imm = 0xFFFD
jmp 0xa367
movl %r9d, %eax
andl $0xfffff800, %eax       # imm = 0xFFFFF800
cmpl $0xd800, %eax           # imm = 0xD800
je 0xa343
leaq 0x816f(%rip), %rax      # 0x124d0
cmpl (%r8,%rax), %r9d
ja 0xa343
movq %rcx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mrdotx[P]st/st.c
// Function: tscrollup
void
tscrollup(int orig, int n, int copyhist)
{
	int i;
	Line temp;

	LIMIT(n, 0, term.bot-orig+1);

	if (copyhist) {
		term.histi = (term.histi + 1) % HISTSIZE;
		temp = term.hist[term.histi];
		term.hist[term.histi] = term.line[orig];
		term.line[orig] = temp;
	}

	if (term.scr > 0 && term.scr < HISTSIZE)
		term.scr = MIN(term.scr + n, HISTSIZE-1);

	tclearregion(0, orig, term.col-1, orig+n-1);
	tsetdirt(orig+n, term.bot);

	for (i = orig; i <= term.bot-n; i++) {
		temp = term.line[i];
		term.line[i] = term.line[i+n];
		term.line[i+n] = temp;
	}

	if (term.scr == 0)
		selscroll(orig, -n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
testl %esi, %esi
js 0xc609
movl 0xeefe(%rip), %r14d     # 0x1b4f8
subl %ebx, %r14d
incl %r14d
cmpl %esi, %r14d
cmovgel %esi, %r14d
jmp 0xc60c
xorl %r14d, %r14d
movslq %ebx, %r15
testl %edx, %edx
je 0xc670
leaq 0xdeee(%rip), %rax      # 0x1a508
movl 0xeea0(%rip), %ecx      # 0x1b4c0
movl %ecx, %edx
incl %edx
movslq %edx, %rdx
imulq $0x10624dd3, %rdx, %rdx # imm = 0x10624DD3
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x25, %rdx
addl %esi, %edx
imull $0x1f4, %edx, %edx      # imm = 0x1F4
negl %edx
addl %edx, %ecx
incl %ecx
movl %ecx, 0xee73(%rip)      # 0x1b4c0
movslq %ecx, %rcx
movq 0x18(%rax,%rcx,8), %rdx
movq 0xdeb4(%rip), %rsi      # 0x1a510
movq (%rsi,%r15,8), %rsi
movq %rsi, 0x18(%rax,%rcx,8)
movq 0xdea4(%rip), %rax      # 0x1a510
movq %rdx, (%rax,%r15,8)
movl 0xee4e(%rip), %eax      # 0x1b4c4
leal -0x1(%rax), %ecx
cmpl $0x1f2, %ecx            # imm = 0x1F2
ja 0xc694
addl %r14d, %eax
movl $0x1f3, %ecx            # imm = 0x1F3
cmpl %ecx, %eax
cmovgel %ecx, %eax
movl %eax, 0xee30(%rip)      # 0x1b4c4
movl 0xde72(%rip), %edx      # 0x1a50c
decl %edx
leal (%r14,%rbx), %ebp
leal (%r14,%rbx), %ecx
decl %ecx
xorl %edi, %edi
movl %ebx, %esi
callq 0x9551
movl 0xee43(%rip), %esi      # 0x1b4f8
movl %ebp, %edi
callq 0x72f4
movl 0xee36(%rip), %eax      # 0x1b4f8
movl %eax, %ecx
subl %r14d, %ecx
cmpl %ebx, %ecx
jl 0xc6fd
movslq %r14d, %rcx
addq %r15, %rcx
notl %eax
addl %ebp, %eax
movq 0xde34(%rip), %rdx      # 0x1a510
movq (%rdx,%r15,8), %rsi
movq (%rdx,%rcx,8), %rdi
movq %rdi, (%rdx,%r15,8)
movq 0xde21(%rip), %rdx      # 0x1a510
movq %rsi, (%rdx,%rcx,8)
incq %r15
incq %rcx
incl %eax
jne 0xc6d5
cmpl $0x0, 0xedc0(%rip)      # 0x1b4c4
je 0xc711
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
negl %r14d
movl %ebx, %edi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8b7c
// File: /workspace/github_c_makefile_star2_O3/mrdotx[P]st/st.c
// Function: tscrolldown
void
tscrolldown(int orig, int n, int copyhist)
{
	int i;
	Line temp;

	LIMIT(n, 0, term.bot-orig+1);

	if (copyhist) {
		term.histi = (term.histi - 1 + HISTSIZE) % HISTSIZE;
		temp = term.hist[term.histi];
		term.hist[term.histi] = term.line[term.bot];
		term.line[term.bot] = temp;
	}

	tsetdirt(orig, term.bot-n);
	tclearregion(0, term.bot-n+1, term.col-1, term.bot);

	for (i = term.bot; i >= orig+n; i--) {
		temp = term.line[i];
		term.line[i] = term.line[i-n];
		term.line[i-n] = temp;
	}

	if (term.scr == 0)
		selscroll(orig, n);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
movl %edi, %ebx
movslq 0xedc1(%rip), %rsi      # 0x1b4f8
testl %eax, %eax
js 0xc74d
movl %esi, %r14d
subl %ebx, %r14d
incl %r14d
cmpl %eax, %r14d
cmovgel %eax, %r14d
jmp 0xc750
xorl %r14d, %r14d
testl %edx, %edx
je 0xc7b9
leaq 0xddad(%rip), %rax      # 0x1a508
movl 0xed5f(%rip), %ecx      # 0x1b4c0
movl %ecx, %edx
addl $0x1f3, %edx            # imm = 0x1F3
movslq %edx, %rdx
imulq $0x10624dd3, %rdx, %rdx # imm = 0x10624DD3
movq %rdx, %rdi
shrq $0x3f, %rdi
sarq $0x25, %rdx
addl %edi, %edx
imull $0x1f4, %edx, %edx      # imm = 0x1F4
negl %edx
addl %edx, %ecx
addl $0x1f3, %ecx            # imm = 0x1F3
movl %ecx, 0xed2a(%rip)      # 0x1b4c0
movslq %ecx, %rcx
movq 0x18(%rax,%rcx,8), %rdx
movq 0xdd6b(%rip), %rdi      # 0x1a510
movq (%rdi,%rsi,8), %rdi
movq %rdi, 0x18(%rax,%rcx,8)
movq 0xdd5b(%rip), %rax      # 0x1a510
movq %rdx, (%rax,%rsi,8)
subl %r14d, %esi
movl %ebx, %edi
callq 0x72f4
movl 0xed2f(%rip), %ecx      # 0x1b4f8
movl %ecx, %esi
subl %r14d, %esi
incl %esi
movl 0xdd36(%rip), %edx      # 0x1a50c
decl %edx
xorl %edi, %edi
callq 0x9551
movslq 0xed12(%rip), %rax      # 0x1b4f8
leal (%r14,%rbx), %edx
cmpl %edx, %eax
jl 0xc82f
movslq %r14d, %rcx
movslq %edx, %rdx
incq %rax
shlq $0x3, %rcx
negq %rcx
movq 0xdd0b(%rip), %rsi      # 0x1a510
leaq (%rsi,%rax,8), %rdi
movq -0x8(%rsi,%rax,8), %r8
movq -0x8(%rcx,%rdi), %rdi
movq %rdi, -0x8(%rsi,%rax,8)
movq 0xdcf1(%rip), %rsi      # 0x1a510
addq %rcx, %rsi
movq %r8, -0x8(%rsi,%rax,8)
decq %rax
cmpq %rdx, %rax
jg 0xc7fe
cmpl $0x0, 0xec8e(%rip)      # 0x1b4c4
je 0xc840
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %ebx, %edi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8b7c
// File: /workspace/github_c_makefile_star2_O3/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, 0x10a1a(%rip)     # 0x1d9f0
jne 0xd028
movq 0x10a21(%rip), %rax     # 0x1da00
testq %rax, %rax
jle 0xd04b
movq 0x10a0d(%rip), %rbx     # 0x1d9f8
movq 0x10afe(%rip), %rdi     # 0x1daf0
movq 0x10b6f(%rip), %rsi     # 0x1db68
movq 0x10af8(%rip), %rdx     # 0x1daf8
movq %rbx, %rcx
callq 0x6600
addq $0x10, %rbx
movq 0x109ed(%rip), %rax     # 0x1da00
movq %rax, %rcx
shlq $0x4, %rcx
addq 0x109d7(%rip), %rcx     # 0x1d9f8
cmpq %rcx, %rbx
jb 0xcfeb
jmp 0xd04b
movq $0x103, 0x109cd(%rip) # imm = 0x103
movl $0x1030, %edi           # imm = 0x1030
callq 0x6f75
movq %rax, 0x109b4(%rip)     # 0x1d9f8
movq 0x109b5(%rip), %rax     # 0x1da00
testq %rax, %rax
je 0xd0b9
leaq 0xc579(%rip), %r12      # 0x195d0
leaq 0x5e26(%rip), %rbx      # 0x12e84
leaq 0x5e00(%rip), %r14      # 0x12e65
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x10986(%rip), %rdx     # 0x1d9f8
addq %r13, %rdx
movl %r15d, %edi
xorl %esi, %esi
callq 0xd137
testl %eax, %eax
jne 0xd0a5
movq (%r12), %rsi
testq %rsi, %rsi
je 0xd098
movq %r14, %rdi
xorl %eax, %eax
callq 0x6f9f
jmp 0xd0a5
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x6f9f
incq %r15
addq $0x8, %r12
addq $0x10, %r13
cmpq %r15, 0x10949(%rip)     # 0x1da00
ja 0xd06b
movq 0x10b38(%rip), %rdi     # 0x1dbf8
testq %rdi, %rdi
je 0xd0d6
xorl %esi, %esi
callq 0x6480
movss %xmm0, 0xc4b8(%rip)     # 0x1958c
jmp 0xd0de
movss 0xc4ae(%rip), %xmm0     # 0x1958c
movss 0x5b12(%rip), %xmm1     # 0x12bf8
mulss %xmm0, %xmm1
cvttss2si %xmm1, %eax
movq 0x10903(%rip), %rcx     # 0x1d9f8
movl 0xc499(%rip), %edx      # 0x19594
shlq $0x4, %rdx
movw %ax, 0xe(%rcx,%rdx)
movq (%rcx,%rdx), %rax
mulss 0x5aec(%rip), %xmm0     # 0x12bfc
andl $0xffffff, %eax         # imm = 0xFFFFFF
cvttss2si %xmm0, %esi
shll $0x18, %esi
movslq %esi, %rsi
orq %rax, %rsi
movq %rsi, (%rcx,%rdx)
movb $0x1, 0x108c3(%rip)     # 0x1d9f0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xd1ec
leal -0x10(%rdi), %r9d
cmpl $0xef, %r9d
ja 0xd1de
cmpl $0xe7, %edi
ja 0xd207
movzbl %r9b, %ecx
imull $0x39, %ecx, %eax
shrl $0xb, %eax
imull $0x2828, %eax, %eax     # imm = 0x2828
movl $0x3737, %esi           # imm = 0x3737
addl %esi, %eax
xorl %edx, %edx
cmpl $0x24, %r9d
cmovbl %edx, %eax
imull $0xab, %ecx, %r9d
shrl $0xa, %r9d
imull $0x2b, %r9d, %edi
shrl $0x7, %edi
andl $-0x2, %edi
leal (%rdi,%rdi,2), %edi
movl %r9d, %r10d
subb %dil, %r10b
movzbl %r10b, %r10d
imull $0x2828, %r10d, %edi    # imm = 0x2828
addl %esi, %edi
testb %r10b, %r10b
cmovel %edx, %edi
addl %r9d, %r9d
leal (%r9,%r9,2), %r9d
subb %r9b, %cl
movzbl %cl, %ecx
imull $0x2828, %ecx, %r9d     # imm = 0x2828
addl %esi, %r9d
testb %cl, %cl
cmovel %edx, %r9d
jmp 0xd217
movslq %edi, %rax
leaq 0xc3e8(%rip), %rcx      # 0x195d0
movq (%rcx,%rax,8), %rcx
movq 0x108fd(%rip), %rdi     # 0x1daf0
movq 0x1096e(%rip), %rsi     # 0x1db68
movq 0x108f7(%rip), %rdx     # 0x1daf8
popq %rax
jmp 0x6520
imull $0xa0a, %edi, %eax      # imm = 0xA0A
addl $0xffffeef8, %eax       # imm = 0xFFFFEEF8
movl %eax, %edi
movl %eax, %r9d
movq %rsp, %rcx
movw %ax, (%rcx)
movw %di, 0x2(%rcx)
movw %r9w, 0x4(%rcx)
movq 0x108c3(%rip), %rdi     # 0x1daf0
movq 0x10934(%rip), %rsi     # 0x1db68
movq 0x108bd(%rip), %rdx     # 0x1daf8
callq 0x6720
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xd289
movl %edi, %edi
movq 0x107ac(%rip), %r8      # 0x1da00
decq %r8
cmpq %rdi, %r8
jb 0xd289
movq 0x10795(%rip), %rax     # 0x1d9f8
shlq $0x4, %rdi
movb 0x9(%rax,%rdi), %al
movb %al, (%rsi)
movq 0x10784(%rip), %rax     # 0x1d9f8
movb 0xb(%rax,%rdi), %al
movb %al, (%rdx)
movq 0x10777(%rip), %rax     # 0x1d9f8
movb 0xd(%rax,%rdi), %al
movb %al, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xd2f5
movl %edi, %r14d
movq 0x1075c(%rip), %rax     # 0x1da00
decq %rax
cmpq %r14, %rax
jb 0xd2f5
leaq 0x8(%rsp), %rdx
callq 0xd137
testl %eax, %eax
je 0xd2f5
movq 0x1082f(%rip), %rdi     # 0x1daf0
movq 0x108a0(%rip), %rsi     # 0x1db68
movq 0x10829(%rip), %rdx     # 0x1daf8
shlq $0x4, %r14
movq 0x1071e(%rip), %rcx     # 0x1d9f8
addq %r14, %rcx
callq 0x6600
movq 0x1070f(%rip), %rax     # 0x1d9f8
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_O3/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
testq %rdi, %rdi
movq 0x105e9(%rip), %rax     # 0x1dc20
cmoveq %rax, %rdi
cmpb $0x0, (%rdi)
cmoveq %rax, %rdi
leaq 0x8(%rsp), %rsi
movq %rdi, (%rsi)
movq 0x1049f(%rip), %rdi     # 0x1daf0
leaq 0x10(%rsp), %r8
movl $0x1, %edx
movl $0x4, %ecx
callq 0x6440
testl %eax, %eax
jne 0xd6a9
movq 0x10480(%rip), %rdi     # 0x1daf0
movq 0x10489(%rip), %rsi     # 0x1db00
leaq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x6340
movq 0x10465(%rip), %rdi     # 0x1daf0
movq 0x1046e(%rip), %rsi     # 0x1db00
movq 0x10497(%rip), %rcx     # 0x1db30
movq %rbx, %rdx
callq 0x6460
movq (%rbx), %rdi
callq 0x6090
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
testq %rdi, %rdi
movq 0x10562(%rip), %rax     # 0x1dc20
cmoveq %rax, %rdi
cmpb $0x0, (%rdi)
cmoveq %rax, %rdi
leaq 0x8(%rsp), %rsi
movq %rdi, (%rsi)
movq 0x10418(%rip), %rdi     # 0x1daf0
leaq 0x10(%rsp), %r8
movl $0x1, %edx
movl $0x4, %ecx
callq 0x6440
testl %eax, %eax
jne 0xd730
movq 0x103f9(%rip), %rdi     # 0x1daf0
movq 0x10402(%rip), %rsi     # 0x1db00
leaq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x6400
movq 0x103de(%rip), %rdi     # 0x1daf0
movq 0x103e7(%rip), %rsi     # 0x1db00
movq 0x10408(%rip), %rcx     # 0x1db28
movq %rbx, %rdx
callq 0x6460
movq (%rbx), %rdi
callq 0x6090
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xf6f7(%rip), %rdi      # 0x1db48
testq %rdi, %rdi
je 0xe495
movl 0xb9a8(%rip), %ecx      # 0x19e04
imull 0xf7b1(%rip), %eax      # 0x1dc14
addl %ecx, %eax
movw %ax, 0xf6e4(%rip)       # 0x1db50
incl %esi
imull 0xf79b(%rip), %esi      # 0x1dc10
addl %ecx, %esi
movw %si, 0xf6d4(%rip)       # 0x1db52
movq 0xf6d3(%rip), %rdx      # 0x1db58
leaq 0x4a15(%rip), %rsi      # 0x12ea1
xorl %ecx, %ecx
xorl %eax, %eax
jmp 0x6290
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xf400(%rip), %rdi      # 0x1daf0
callq 0x6180
testq %rax, %rax
je 0xe737
movq %rax, %rdi
callq 0x66c0
movq %rax, %rbx
movq $-0x18, %r14
leaq 0xb6fd(%rip), %r15      # 0x19e10
movq 0x18(%r14,%r15), %rsi
movl 0x20(%r14,%r15), %edx
movq 0x28(%r14,%r15), %rcx
movq %rbx, %rdi
callq 0xe5a1
addq $0x18, %r14
cmpq $0x318, %r14            # imm = 0x318
jb 0xe713
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe623(%rip), %rbx      # 0x1dc78
testq %rbx, %rbx
je 0xf6b1
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 0x387e(%rip), %rdx      # 0x12f0a
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 0x6d26
jmp 0xf6a4
// File: /workspace/github_c_makefile_star2_O3/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 0x7662(%rip), %xmm0     # 0x17230
movaps %xmm0, 0x10(%rsp)
movups 0x7666(%rip), %xmm0     # 0x17240
movaps %xmm0, (%rsp)
movq 0xdf0b(%rip), %rdi      # 0x1daf0
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x66e0
movq %rax, 0xdf47(%rip)      # 0x1db40
testq %rax, %rax
je 0xfc94
leaq 0x368c(%rip), %rsi      # 0x13295
leaq 0x10(%rsp), %rdx
movq %rax, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x65f0
testq %rax, %rax
jne 0xfc9c
leaq 0x36af(%rip), %rsi      # 0x132d5
leaq 0xdf23(%rip), %rdx      # 0x1db50
xorl %edi, %edi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x6710
movq %rax, 0xdf19(%rip)      # 0x1db58
movl $0x1, %ebx
cmpq $0x0, 0xdefc(%rip)      # 0x1db48
jne 0xfc94
movq 0xdeeb(%rip), %rdi      # 0x1db40
movq 0xdea4(%rip), %r8       # 0x1db00
movq %rsp, %r10
leaq 0x367c(%rip), %rsi      # 0x132e2
leaq 0x3680(%rip), %rcx      # 0x132ed
leaq 0x3621(%rip), %r9       # 0x13295
movl $0x408, %edx            # imm = 0x408
xorl %eax, %eax
pushq $0x0
pushq %r10
callq 0x6030
addq $0x10, %rsp
movq %rax, 0xdeb9(%rip)      # 0x1db48
testq %rax, %rax
je 0xfca6
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
retq
callq 0x6d42
jmp 0xfc1f
callq 0x6d64
jmp 0xfc94
// File: /workspace/github_c_makefile_star2_O3/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 0x10064
movq %rax, %r14
movq 0xdad2(%rip), %rdi      # 0x1daf0
movq %rax, %rsi
callq 0x67b0
movq 0xdc7b(%rip), %rdx      # 0x1dca8
movslq 0xdc6c(%rip), %rcx      # 0x1dca0
movq %rcx, %rsi
shlq $0x4, %rsi
movq %rax, (%rdx,%rsi)
testq %rax, %rax
je 0x1005c
movl %ebx, 0x8(%rdx,%rsi)
movl $0x0, 0xc(%rdx,%rsi)
incl %ecx
movl %ecx, 0xdc48(%rip)      # 0x1dca0
xorl %ebp, %ebp
jmp 0x10064
movq %r14, %rdi
callq 0x6050
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xd091(%rip), %eax      # 0x1dca0
testl %eax, %eax
jle 0x10c38
movq 0xced6(%rip), %rdi      # 0x1daf0
movq 0xd087(%rip), %rcx      # 0x1dca8
decl %eax
movl %eax, 0xd077(%rip)      # 0x1dca0
shlq $0x4, %rax
movq (%rcx,%rax), %rsi
callq 0x60d0
jmp 0x10c09
leaq 0xcdc9(%rip), %rdi      # 0x1da08
callq 0x10c91
leaq 0xcdf5(%rip), %rdi      # 0x1da40
callq 0x10c91
leaq 0xce21(%rip), %rdi      # 0x1da78
callq 0x10c91
leaq 0xce4d(%rip), %rdi      # 0x1dab0
callq 0x10c91
movq 0xd049(%rip), %rdi      # 0x1dcb8
cvtss2sd (%rbx), %xmm0
callq 0xf6b8
callq 0xf964
xorl %edi, %edi
xorl %esi, %esi
callq 0x100b5
callq 0x9a8c
popq %rbx
jmp 0xfcd6
// File: /workspace/github_c_makefile_star2_O3/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 0xce54(%rip), %rdi      # 0x1daf0
movq 0x20(%rbx), %rsi
callq 0x60d0
movq 0x30(%rbx), %rdi
callq 0x6050
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x10cbd
popq %rbx
jmp 0x64f0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x10ee7
movl %edx, %ecx
leaq 0x1e1e(%rip), %rdx      # 0x12d00
movl (%rdx,%rcx,4), %ebp
jmp 0x10ef8
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 0x94b7(%rip), %r13      # 0x1a3d0
cmpl %ebx, 0x38(%r12,%r13)
jne 0x10f60
movl 0x24(%r12,%r13), %eax
cmpl 0x54(%r14), %eax
jne 0x10f60
movl 0x3c(%r12,%r13), %r15d
testl %r15d, %r15d
je 0x10f4c
callq 0x8b6f
cmpl $0x1, %eax
movl $0x0, %eax
sbbl %eax, %eax
orl $0x1, %eax
cmpl %eax, %r15d
jne 0x10f60
movl 0x20(%r12,%r13), %eax
cmpl $-0x1, %eax
je 0x10f7e
cmpl %eax, 0x4(%rsp)
je 0x10f7e
cmpl %eax, %ebp
je 0x10f7e
addq $0x20, %r12
cmpq $0xc0, %r12
jb 0x10f19
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 0x10f6f
// File: /workspace/github_c_makefile_star2_O3/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 0x1bd8(%rip), %rax      # 0x12c8c
cmpl $0x0, (%rax)
je 0x110d4
movl (%rdi), %eax
movl %eax, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
cmpl $0x2800, %ecx           # imm = 0x2800
jne 0x110d4
movzbl %al, %eax
orl $0x1800, %eax           # imm = 0x1800
retq
leaq 0x1bad(%rip), %rax      # 0x12c88
cmpl $0x0, (%rax)
je 0x110fa
testb $0x1, 0x4(%rdi)
movzbl (%rdi), %eax
je 0x110fd
leaq 0x26b0(%rip), %rcx      # 0x137a0
movzwl (%rcx,%rax,2), %eax
orl $0x8000, %eax           # imm = 0x8000
retq
movzbl (%rdi), %eax
movl %eax, %eax
leaq 0x269a(%rip), %rcx      # 0x137a0
movzwl (%rcx,%rax,2), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5e56
leaq 0x4aee(%rip), %rdi      # 0xa928
xorl %eax, %eax
callq 0x577b
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5f05
movq %rax, %r15
movq %rbx, (%rsp)
movl $0x10, %edi
callq 0x21d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x5f05
movq %rax, %r12
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
addq $0x5, %r15
leaq 0xab(%rip), %rdx        # 0x5f35
movq (%rsp), %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0x6602
testq %rax, %rax
je 0x5ef9
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 0x5f16
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x68fd
testl %eax, %eax
je 0x5f03
movq %r12, %rdi
callq 0x2040
jmp 0x5f05
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4a2d(%rip), %rdi      # 0xa94a
leaq 0x4a37(%rip), %rsi      # 0xa95b
leaq 0x4c0a(%rip), %rcx      # 0xab35
movl $0x18b, %edx            # imm = 0x18B
callq 0x2140
// File: /workspace/github_c_makefile_star2_O3/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 0x5f7b
cmpq $0x3, %rdx
ja 0x5fa6
leaq 0x4d53(%rip), %rdi      # 0xaca9
leaq 0x4d85(%rip), %rsi      # 0xace2
leaq 0x4d62(%rip), %rdx      # 0xacc6
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x577b
callq 0x2090
movl $0x0, (%rax)
jmp 0x5f7e
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 0x5fc5
cmpq $0x4, %rdx
jne 0x5f4f
xorl %r15d, %r15d
xorl %r14d, %r14d
movl %eax, %ebp
jmp 0x5f81
testl %eax, %eax
jne 0x5fe7
cmpq $0x7, %rdx
jbe 0x5f4f
movl 0x4(%r14), %r15d
bswapl %r15d
leal 0x8(%r15), %eax
cmpq %rdx, %rax
jne 0x6001
addq $0x8, %r14
xorl %ebp, %ebp
jmp 0x5f81
leaq 0x4cbb(%rip), %rdi      # 0xaca9
leaq 0x4ced(%rip), %rsi      # 0xace2
leaq 0x4cd7(%rip), %rdx      # 0xacd3
jmp 0x5f64
leaq 0x4ca1(%rip), %rdi      # 0xaca9
leaq 0x4cd3(%rip), %rsi      # 0xace2
leaq 0x4cb0(%rip), %rdx      # 0xacc6
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x577b
callq 0x2090
movl $0x0, (%rax)
jmp 0x5f81
// File: /workspace/github_c_makefile_star2_O3/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 0x607a
leaq 0x48ca(%rip), %rdi      # 0xa928
xorl %eax, %eax
callq 0x577b
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x6129
movq %rax, %r15
movq %rbx, (%rsp)
movl $0x10, %edi
callq 0x21d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x6129
movq %rax, %r12
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
addq $0x5, %r15
leaq -0x179(%rip), %rdx      # 0x5f35
movq (%rsp), %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0x6602
testq %rax, %rax
je 0x611d
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 0x613a
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x68fd
testl %eax, %eax
je 0x6127
movq %r12, %rdi
callq 0x2040
jmp 0x6129
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4809(%rip), %rdi      # 0xa94a
leaq 0x4813(%rip), %rsi      # 0xa95b
leaq 0x4a69(%rip), %rcx      # 0xabb8
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x2140
// File: /workspace/github_c_makefile_star2_O3/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 0x61a3
leaq 0x47a1(%rip), %rdi      # 0xa928
xorl %eax, %eax
callq 0x577b
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x6252
movq %rax, %r15
movq %rbx, (%rsp)
movl $0x10, %edi
callq 0x21d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x6252
movq %rax, %r12
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
addq $0x5, %r15
leaq -0x7a7(%rip), %rdx      # 0x5a30
movq (%rsp), %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0x6602
testq %rax, %rax
je 0x6246
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 0x6263
movq (%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x68fd
testl %eax, %eax
je 0x6250
movq %r12, %rdi
callq 0x2040
jmp 0x6252
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46e0(%rip), %rdi      # 0xa94a
leaq 0x46ea(%rip), %rsi      # 0xa95b
leaq 0x49c4(%rip), %rcx      # 0xac3c
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x2140
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x1251
movb 0x3f(%rsi), %cl
addb %cl, %cl
movb %cl, 0x3f(%rdi)
testb %al, %al
js 0x127f
retq
xorb $0x1, 0x3e(%rdi)
xorb $0x25, %cl
movb %cl, 0x3f(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x128e
movb 0x3f(%rsi), %dl
leal (%rdx,%rdx), %ecx
xorb %dl, %cl
movb %cl, 0x3f(%rdi)
testb %al, %al
js 0x12c5
retq
xorb $0x1, 0x3e(%rdi)
xorb $0x25, %cl
movb %cl, 0x3f(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x12e7
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1359
movl %edx, %ebp
movq %rbx, %rdi
callq 0x1060
decl %ebp
je 0x136b
movq %rbx, %rdi
movq %rbx, %rsi
jmp 0x1348
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_O3/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 0x13de
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
blsmskl %ecx, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
je 0x13b5
xorl %eax, %eax
sarl %ecx
incl %eax
cmpl $0x1, %ecx
ja 0x13ac
movq %rsp, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x10b0
xorl %eax, %eax
movb (%rsp,%rax), %cl
xorb (%rbx,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x40, %rax
jne 0x13c4
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1403
cmpl $0x1, %ecx
jne 0x140e
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x1060
jmp 0x140e
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x10c0
xorl %eax, %eax
movb (%rsp,%rax), %cl
xorb (%rbx,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x40, %rax
jne 0x1410
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x144f
xorl %eax, %eax
sarl %ecx
incl %eax
cmpl $0x1, %ecx
ja 0x1446
movq %rsp, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x10b0
xorl %eax, %eax
movb (%rsp,%rax), %cl
xorb (%rbx,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x40, %rax
jne 0x145e
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %rdi, %r14
movl 0x4abc(%rip), %edi      # 0x7230
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %edi, %edi
js 0x27f1
movq %rsi, %r15
movq %rsp, %r12
movl $0x10, %edx
movq %r12, %rsi
callq 0x20a0
testl %eax, %eax
js 0x2798
je 0x27a2
jmp 0x27aa
callq 0x2030
cmpl $0xb, (%rax)
jne 0x27f1
movl 0x4a88(%rip), %edi      # 0x7230
jmp 0x2783
leaq 0x10(%rsp), %r12
movl 0x4a7b(%rip), %edi      # 0x7230
movl 0xc(%rsp), %edx
movq %r12, %rsi
callq 0x20a0
testl %eax, %eax
js 0x27c9
je 0x27af
jmp 0x27d5
callq 0x2030
cmpl $0xb, (%rax)
je 0x27af
jmp 0x27f1
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
nop
// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movq (%rcx), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x20b0
movq (%rbx), %rcx
movl $0x2, %ebx
cmpb $0x0, (%rcx)
jne 0x28de
leaq 0x4877(%rip), %r14      # 0x70c0
cmpl $0x0, 0x20(%r14)
je 0x2856
movq 0x18(%r14), %rcx
jmp 0x2860
movabsq $0x1070000002000001, %rcx # imm = 0x1070000002000001
cmpl $0x0, 0x30(%r14)
je 0x286d
movq 0x28(%r14), %rdx
jmp 0x2877
movabsq $0x10700003ff000001, %rdx # imm = 0x10700003FF000001
movaps 0x18f2(%rip), %xmm0     # 0x4170
leaq 0x10(%rsp), %rdi
movaps %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 0x273c
movl $0x3, %ebx
cmpl $0x40, %eax
jne 0x28de
leaq 0x10(%rsp), %rdi
movl $0x40, %esi
callq 0x275d
cmpl $0x40, %eax
jne 0x28de
cmpl $0x0, 0x8(%r14)
jg 0x28e8
xorl %eax, %eax
cmpl $0x0, 0x30(%rsp)
setne %al
leal (%rax,%rax,2), %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
leaq 0x10(%rsp), %rdi
callq 0x2170
jmp 0x28d1