LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/example.c
// Function: replace_asm_named
static void replace_asm_named(const char **src_p, char **dst_p, struct asm_arg *args, int nr)
{
	const char *src = *src_p;
	const char *end = src;

	for(;;) {
		char c = *end++;
		if (!c)
			return;
		if (c == ']') {
			int i;

			*src_p = end;
			for (i = 0; i < nr; i++) {
				const struct ident *ident = args[i].name;
				int len;
				if (!ident)
					continue;
				len = ident->len;
				if (memcmp(src, ident->name, len))
					continue;
				replace_asm_arg(dst_p, args+i);
				return;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb (%rax), %al
movb %al, -0x31(%rbp)
cmpb $0x0, -0x31(%rbp)
jne 0x16ab9
jmp 0x16b52
movsbl -0x31(%rbp), %eax
cmpl $0x5d, %eax
jne 0x16b4d
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x16b4b
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x16aff
jmp 0x16b40
movq -0x40(%rbp), %rax
movzbl 0x10(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x12, %rsi
movslq -0x44(%rbp), %rdx
callq 0x11180
cmpl $0x0, %eax
je 0x16b26
jmp 0x16b40
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x38(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x16b60
jmp 0x16b52
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x16ad8
jmp 0x16b4d
jmp 0x16a9a
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/example.c
// Function: replace_asm_arg
static void replace_asm_arg(char **dst_p, struct asm_arg *arg)
{
	char *dst = *dst_p;
	int len = strlen(arg->value);

	memcpy(dst, arg->value, len);
	*dst_p = dst + len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x110c0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x111d0
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: lookup_storage
struct storage *lookup_storage(struct basic_block *bb, pseudo_t pseudo, enum inout_enum inout)
{
	struct storage_hash_list *list = storage_hash_table[storage_hash(bb,pseudo,inout)];
	struct storage_hash *hash;

	FOR_EACH_PTR(list, hash) {
		if (hash->bb == bb && hash->pseudo == pseudo && hash->inout == inout)
			return hash->storage;
	} END_FOR_EACH_PTR(hash);
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x487b0
movl %eax, %eax
movl %eax, %ecx
leaq 0x53542(%rip), %rax     # 0x9bc00
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x486ea
jmp 0x48794
jmp 0x486ec
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x40(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x4877c
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x48737
cmpq $0x0, -0x30(%rbp)
jne 0x48737
jmp 0x4876e
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x4876c
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x4876c
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x4876c
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x4879c
jmp 0x4876e
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x486f3
jmp 0x4877e
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq -0x38(%rbp), %rax
jne 0x486ec
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: add_storage
void add_storage(struct storage *storage, struct basic_block *bb, pseudo_t pseudo, enum inout_enum inout)
{
	struct storage_hash_list **listp = storage_hash_table + storage_hash(bb,pseudo,inout);
	struct storage_hash *hash = alloc_storage_hash(storage);

	hash->bb = bb;
	hash->pseudo = pseudo;
	hash->inout = inout;

	add_ptr_list(listp, hash);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x487b0
movl %eax, %eax
movl %eax, %ecx
leaq 0x533de(%rip), %rax     # 0x9bc00
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x48880
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3a100
movq %rax, -0x40(%rbp)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: free_storage
void free_storage(void)
{
	int i;

	for (i = 0; i < MAX_STORAGE_HASH; i++) {
		vrfy_storage(storage_hash_table + i);
		free_ptr_list(storage_hash_table + i);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x40, -0x4(%rbp)
jge 0x48930
movslq -0x4(%rbp), %rax
leaq 0x53300(%rip), %rdi     # 0x9bc00
shlq $0x3, %rax
addq %rax, %rdi
callq 0x48940
movslq -0x4(%rbp), %rax
leaq 0x532e9(%rip), %rdi     # 0x9bc00
shlq $0x3, %rax
addq %rax, %rdi
callq 0x3aa60
jmp 0x48925
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x488ef
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: show_storage
const char *show_storage(struct storage *s)
{
	static char buffer[1024];
	if (!s)
		return "none";
	switch (s->type) {
	case REG_REG:
		sprintf(buffer, "reg%d (%d)", s->regno, s->name);
		break;
	case REG_STACK:
		sprintf(buffer, "%d(SP) (%d)", s->offset, s->name);
		break;
	case REG_ARG:
		sprintf(buffer, "ARG%d (%d)", s->regno, s->name);
		break;
	default:
		sprintf(buffer, "%d:%d (%d)", s->type, s->regno, s->name);
		break;
	}
	return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x48b43
leaq 0x2706c(%rip), %rax     # 0x6fba6
movq %rax, -0x8(%rbp)
jmp 0x48c0b
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0x48b67
jmp 0x48b53
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x48b8c
jmp 0x48b5d
movl -0x14(%rbp), %eax
subl $0x5, %eax
je 0x48bb1
jmp 0x48bd6
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0x53284(%rip), %rdi     # 0x9be00
leaq 0x2820d(%rip), %rsi     # 0x70d90
movb $0x0, %al
callq 0x112d0
jmp 0x48c00
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0x5325f(%rip), %rdi     # 0x9be00
leaq 0x281f3(%rip), %rsi     # 0x70d9b
movb $0x0, %al
callq 0x112d0
jmp 0x48c00
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0x5323a(%rip), %rdi     # 0x9be00
leaq 0x281da(%rip), %rsi     # 0x70da7
movb $0x0, %al
callq 0x112d0
jmp 0x48c00
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r8d
leaq 0x5320e(%rip), %rdi     # 0x9be00
leaq 0x281b9(%rip), %rsi     # 0x70db2
movb $0x0, %al
callq 0x112d0
leaq 0x531f9(%rip), %rax     # 0x9be00
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: set_up_storage
void set_up_storage(struct entrypoint *ep)
{
	struct basic_block *bb;

	/* First set up storage for the incoming arguments */
	set_up_argument_storage(ep, ep->entry->bb);

	/* Then do a list of all the inter-bb storage */
	FOR_EACH_PTR(ep->bbs, bb) {
		set_up_bb_storage(bb);
	} END_FOR_EACH_PTR(bb);

	name_storage();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x48cf0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x48c66
jmp 0x48cdb
jmp 0x48c68
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x48cc7
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x48cb3
cmpq $0x0, -0x10(%rbp)
jne 0x48cb3
jmp 0x48cbc
movq -0x10(%rbp), %rdi
callq 0x48de0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x48c6f
jmp 0x48cc9
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq -0x18(%rbp), %rax
jne 0x48c68
callq 0x49000
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: set_up_argument_storage
static void set_up_argument_storage(struct entrypoint *ep, struct basic_block *bb)
{
	pseudo_t arg;

	FOR_EACH_PTR(bb->needs, arg) {
		struct storage *storage = alloc_storage();

		/* FIXME! Totally made-up argument passing conventions */
		if (arg->type == PSEUDO_ARG) {
			storage->type = REG_ARG;
			storage->regno = arg->nr;
		}
		add_storage(storage, bb, arg, STOR_IN);
	} END_FOR_EACH_PTR(arg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x48d28
jmp 0x48dd8
jmp 0x48d2a
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x48dc0
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x48d75
cmpq $0x0, -0x18(%rbp)
jne 0x48d75
jmp 0x48db2
callq 0x49270
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x4, 0x4(%rax)
jne 0x48d9f
movq -0x40(%rbp), %rax
movl $0x5, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x487f0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x48d31
jmp 0x48dc2
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq -0x20(%rbp), %rax
jne 0x48d2a
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: name_storage
static void name_storage(void)
{
	int i;
	int name = 0;

	for (i = 0; i < MAX_STORAGE_HASH; i++) {
		struct storage_hash *hash;
		FOR_EACH_PTR(storage_hash_table[i], hash) {
			struct storage *storage = hash->storage;
			if (storage->name)
				continue;
			storage->name = ++name;
		} END_FOR_EACH_PTR(hash);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
cmpl $0x40, -0x4(%rbp)
jge 0x490f5
jmp 0x4901e
movslq -0x4(%rbp), %rcx
leaq 0x52bd7(%rip), %rax     # 0x9bc00
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4904d
jmp 0x490e5
jmp 0x4904f
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x490cd
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x4909a
cmpq $0x0, -0x10(%rbp)
jne 0x4909a
jmp 0x490c2
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x490b2
jmp 0x490c2
movl -0x8(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x49056
jmp 0x490cf
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq -0x18(%rbp), %rax
jne 0x4904f
jmp 0x490e7
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x49012
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: hash_list_cmp
static int hash_list_cmp(const void *_a, const void *_b)
{
	const struct storage_hash *a = _a;
	const struct storage_hash *b = _b;
	if (a->pseudo != b->pseudo)
		return a->pseudo < b->pseudo ? -1 : 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x49153
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x4915a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: storage_hash_cmp
static int storage_hash_cmp(const void *_a, const void *_b)
{
	const struct storage_hash *a = _a;
	const struct storage_hash *b = _b;
	struct storage *aa = a->storage;
	struct storage *bb = b->storage;

	if (a->bb != b->bb)
		return a->bb < b->bb ? -1 : 1;
	if (a->inout != b->inout)
		return a->inout < b->inout ? -1 : 1;
	if (aa->type != bb->type)
		return aa->type < bb->type ? -1 : 1;
	if (aa->regno != bb->regno)
		return aa->regno < bb->regno ? -1 : 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
je 0x491ca
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x28(%rbp), %rax
movq (%rax), %rsi
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x49263
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x491fc
movq -0x20(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x28(%rbp), %rax
movl 0x10(%rax), %esi
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl %esi, %edx
cmovbl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x49263
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x38(%rbp), %rcx
cmpl (%rcx), %eax
je 0x4922a
movq -0x30(%rbp), %rax
movl (%rax), %edx
movq -0x38(%rbp), %rax
movl (%rax), %esi
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl %esi, %edx
cmovbl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x49263
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x38(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x4925c
movq -0x30(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x38(%rbp), %rax
movl 0x10(%rax), %esi
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl %esi, %edx
cmovll %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x49263
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: combine_storage
static struct storage * combine_storage(struct storage *src, struct storage *dst)
{
	struct storage **usep;

	/* Remove uses of "src_storage", replace with "dst" */
	FOR_EACH_PTR(src->users, usep) {
		assert(*usep == src);
		*usep = dst;
		add_ptr_list(&dst->users, usep);
	} END_FOR_EACH_PTR(usep);

	/* Mark it unused */
	src->type = REG_BAD;
	src->users = NULL;
	return dst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x492b8
jmp 0x49385
jmp 0x492ba
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x4936d
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x49309
cmpq $0x0, -0x18(%rbp)
jne 0x49309
jmp 0x4935f
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x49318
jmp 0x49337
leaq 0x27ae5(%rip), %rdi     # 0x70e04
leaq 0x27a10(%rip), %rsi     # 0x70d36
movl $0xcc, %edx
leaq 0x27adf(%rip), %rcx     # 0x70e11
callq 0x11120
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3a100
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x492c1
jmp 0x4936f
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq -0x20(%rbp), %rax
jne 0x492ba
movq -0x8(%rbp), %rax
movl $0x6, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch.c
// Function: dispatch_accept
int
dispatch_accept(struct dispatch_state * D, int s)
{

	/* Accept a connection. */
	D->accepting = 1;
	if (network_accept(s, callback_accept, D) == NULL)
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x50(%rax)
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rdx
leaq 0x28(%rip), %rsi        # 0x3fa0
callq 0xab10
cmpq $0x0, %rax
jne 0x3f85
jmp 0x3f8e
movl $0x0, -0x4(%rbp)
jmp 0x3f95
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch.c
// Function: dispatch_close
int
dispatch_close(struct dispatch_state * D)
{

	/* Sanity check. */
	assert(D->read_cookie == NULL);
	assert(D->npending == 0);

	/* Free the buffered reader for the connection. */
	netbuf_read_free(D->readq);

	/* Free the buffered writer for the connection. */
	netbuf_write_free(D->writeq);

	/* Close the connection. */
	while (close(D->sconn)) {
		if (errno == EINTR)
			continue;
		warnp("close");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x4279
jmp 0x4298
leaq 0xe325(%rip), %rdi      # 0x125a5
leaq 0xe335(%rip), %rsi      # 0x125bc
movl $0x18c, %edx            # imm = 0x18C
leaq 0xe334(%rip), %rcx      # 0x125c7
callq 0x2240
movq -0x10(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x42a5
jmp 0x42c4
leaq 0xe347(%rip), %rdi      # 0x125f3
leaq 0xe309(%rip), %rsi      # 0x125bc
movl $0x18d, %edx            # imm = 0x18D
leaq 0xe308(%rip), %rcx      # 0x125c7
callq 0x2240
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0xa210
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0xa8e0
movq -0x10(%rbp), %rax
movl 0x54(%rax), %edi
callq 0x2260
cmpl $0x0, %eax
je 0x4334
callq 0x20a0
cmpl $0x4, (%rax)
jne 0x42fb
jmp 0x42de
jmp 0x42fd
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4322
leaq 0xf316(%rip), %rdi      # 0x13624
movb $0x0, %al
callq 0xf070
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4330
leaq 0xf2fb(%rip), %rdi      # 0x13624
movb $0x0, %al
callq 0xf2c0
jmp 0x4332
jmp 0x433d
movl $0x0, -0x4(%rbp)
jmp 0x4344
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch.c
// Function: dispatch_done
int
dispatch_done(struct dispatch_state * D)
{
	size_t i;
	int rc = 0;	/* No errors yet. */

	/* Shut down the worker threads. */
	for (i = 0; i < D->nreaders + 2; i++) {
		if (worker_kill(D->workers[i])) {
			warnp("Cannot destroy worker thread");
			rc = -1;
		}
	}
	free(D->workers);

	/* Stop reading work completion messages. */
	network_read_cancel(D->wakeup_cookie);

	/* Close the work completion message conduit. */
	while (close(D->spair[1])) {
		if (errno == EINTR)
			continue;
		warnp("close");
		rc = -1;
	}
	while (close(D->spair[0])) {
		if (errno == EINTR)
			continue;
		warnp("close");
		rc = -1;
	}

	/* Free allocated memory. */
	free(D->readers_idle);
	free(D);

	/* Return success, or failure if anything went wrong. */
	return (rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x14(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jae 0x43e7
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5710
cmpl $0x0, %eax
je 0x43d7
jmp 0x439b
callq 0x20a0
cmpl $0x0, (%rax)
je 0x43c0
leaq 0xe258(%rip), %rdi      # 0x12604
movb $0x0, %al
callq 0xf070
callq 0x20a0
movl $0x0, (%rax)
jmp 0x43ce
leaq 0xe23d(%rip), %rdi      # 0x12604
movb $0x0, %al
callq 0xf2c0
jmp 0x43d0
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
jmp 0x43d9
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x436b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0xaf50
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %edi
callq 0x2260
cmpl $0x0, %eax
je 0x445d
callq 0x20a0
cmpl $0x4, (%rax)
jne 0x441d
jmp 0x4400
jmp 0x441f
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4444
leaq 0xf1f4(%rip), %rdi      # 0x13624
movb $0x0, %al
callq 0xf070
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4452
leaq 0xf1d9(%rip), %rdi      # 0x13624
movb $0x0, %al
callq 0xf2c0
jmp 0x4454
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
jmp 0x4400
jmp 0x445f
movq -0x8(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x2260
cmpl $0x0, %eax
je 0x44bc
callq 0x20a0
cmpl $0x4, (%rax)
jne 0x447c
jmp 0x445f
jmp 0x447e
callq 0x20a0
cmpl $0x0, (%rax)
je 0x44a3
leaq 0xf195(%rip), %rdi      # 0x13624
movb $0x0, %al
callq 0xf070
callq 0x20a0
movl $0x0, (%rax)
jmp 0x44b1
leaq 0xf17a(%rip), %rdi      # 0x13624
movb $0x0, %al
callq 0xf2c0
jmp 0x44b3
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
jmp 0x445f
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rdi
callq 0x2040
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch.c
// Function: dropconnection
static int
dropconnection(void * cookie)
{
	struct dispatch_state * D = cookie;
	void * tmp;

	/* If we're waiting for a request to arrive, stop waiting. */
	if (D->read_cookie != NULL) {
		wire_readpacket_wait_cancel(D->read_cookie);
		D->read_cookie = NULL;
	}

	/* Kill any queued read requests. */
	while (D->readq_head) {
		tmp = D->readq_head;
		D->readq_head = D->readq_head->next;
		D->npending -= 1;
		free(tmp);
	}

	/* Success!  (We can't fail -- but netbuf_write doesn't know that.) */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x4518
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x10160
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
jmp 0x451a
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x455f
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rcx
subq $0x1, %rcx
movq %rcx, 0x70(%rax)
movq -0x18(%rbp), %rdi
callq 0x2040
jmp 0x451a
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_params
int
dispatch_request_params(struct dispatch_state * dstate,
    struct proto_lbs_request * R)
{
	uint64_t blkno;

	/* Sanity check. */
	assert(dstate->blocklen <= UINT32_MAX);

	/* Figure out what the first available block number is. */
	if ((blkno = storage_nextblock(dstate->sstate)) == (uint64_t)(-1))
		goto err1;

	/* Send the response packet back. */
	dstate->npending--;
	if (proto_lbs_response_params(dstate->writeq, R->ID,
	    (uint32_t)dstate->blocklen, blkno))
		goto err1;

	/* Free the request structure. */
	free(R);

	/* Success! */
	return (0);

err1:
	free(R);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, 0x28(%rax)
ja 0x47d1
jmp 0x47f0
leaq 0xdfb2(%rip), %rdi      # 0x1278a
leaq 0xdfca(%rip), %rsi      # 0x127a9
movl $0x19, %edx
leaq 0xdfd1(%rip), %rcx      # 0x127bc
callq 0x2240
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x5c20
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0x4809
jmp 0x4854
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, %edx
movq -0x20(%rbp), %rcx
callq 0xf790
cmpl $0x0, %eax
je 0x4842
jmp 0x4854
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
jmp 0x4864
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_params2
int
dispatch_request_params2(struct dispatch_state * dstate,
    struct proto_lbs_request * R)
{
	uint64_t blkno;
	uint64_t lastblk;

	/* Sanity check. */
	assert(dstate->blocklen <= UINT32_MAX);

	/* Figure out what the first available block number is. */
	if ((blkno = storage_nextblock(dstate->sstate)) == (uint64_t)(-1))
		goto err1;

	/*
	 * If we have blocks, the last block written is the one immediately
	 * prior to the first available block number.  Otherwise, we send a
	 * (uint64_t)(-1) back.
	 */
	if (blkno != 0)
		lastblk = blkno - 1;
	else
		lastblk = (uint64_t)(-1);

	/* Send the response packet back. */
	dstate->npending--;
	if (proto_lbs_response_params2(dstate->writeq, R->ID,
	    (uint32_t)dstate->blocklen, blkno, lastblk))
		goto err1;

	/* Free the request structure. */
	free(R);

	/* Success! */
	return (0);

err1:
	free(R);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, 0x28(%rax)
ja 0x4891
jmp 0x48b0
leaq 0xdef2(%rip), %rdi      # 0x1278a
leaq 0xdf0a(%rip), %rsi      # 0x127a9
movl $0x3e, %edx
leaq 0xdf62(%rip), %rcx      # 0x1280d
callq 0x2240
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x5c20
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0x48c9
jmp 0x4935
cmpq $0x0, -0x20(%rbp)
je 0x48de
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x48e6
movq $-0x1, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, %edx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0xf960
cmpl $0x0, %eax
je 0x4923
jmp 0x4935
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
jmp 0x4945
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_get
int
dispatch_request_get(struct dispatch_state * dstate,
    struct proto_lbs_request * R)
{
	struct readq * rq;

	/* Add the read request to the pending read queue. */
	if ((rq = malloc(sizeof(struct readq))) == NULL)
		goto err1;
	rq->next = NULL;
	rq->reqID = R->ID;
	rq->blkno = R->r.get.blkno;
	if (dstate->readq_head == NULL)
		dstate->readq_head = rq;
	else
		*(dstate->readq_tail) = rq;
	dstate->readq_tail = &rq->next;

	/* Free the request structure. */
	free(R);

	/* Poke the queue. */
	if (dispatch_request_pokereadq(dstate))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x18, %edi
callq 0x23a0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x4979
jmp 0x49ff
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x49bc
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x78(%rax)
jmp 0x49ce
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x18(%rbp), %rdi
callq 0x2040
movq -0x10(%rbp), %rdi
callq 0x4a20
cmpl $0x0, %eax
je 0x49f6
jmp 0x4a08
movl $0x0, -0x4(%rbp)
jmp 0x4a0f
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_pokereadq
int
dispatch_request_pokereadq(struct dispatch_state * dstate)
{
	struct readq * R;
	struct workctl * reader;
	uint8_t * buf;

	/* Loop as long as we can launch a read. */
	while ((dstate->nreaders_idle > 0) && (dstate->readq_head != NULL)) {
		/* Grab the first read from the queue. */
		R = dstate->readq_head;

		/* Allocate a buffer to read the block into. */
		if ((buf = malloc(dstate->blocklen)) == NULL)
			goto err0;

		/* Grab an idle reader. */
		reader = dstate->workers[
		    dstate->readers_idle[dstate->nreaders_idle - 1]];
		dstate->nreaders_idle -= 1;

		/* Give the reader the work. */
		if (worker_assign(reader, 0, R->blkno, 0, buf, R->reqID))
			goto err1;

		/* Remove the work from the queue. */
		dstate->readq_head = R->next;

		/* Free the dequeued read queue entry. */
		free(R);
	}

	/* Success! */
	return (0);

err1:
	dstate->nreaders_idle += 1;
	free(buf);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x18(%rcx)
movb %al, -0x29(%rbp)
jbe 0x4a4b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x4a57
jmp 0x4afd
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x23a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x4a7f
jmp 0x4b1f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq 0x18(%rdx), %rdx
subq $0x1, %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
subq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x28(%rbp), %r8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r9
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x5420
cmpl $0x0, %eax
je 0x4ae0
jmp 0x4b06
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x18(%rbp), %rdi
callq 0x2040
jmp 0x4a2c
movl $0x0, -0x4(%rbp)
jmp 0x4b26
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_append
int
dispatch_request_append(struct dispatch_state * dstate,
    struct proto_lbs_request * R)
{
	struct workctl * writer = dstate->workers[dstate->nreaders];
	uint64_t blkno;

	/* Figure out what the first available block number is. */
	if ((blkno = storage_nextblock(dstate->sstate)) == (uint64_t)(-1))
		goto err1;

	/*
	 * If the block number provided is wrong, or there's a write in
	 * progress (in which case the requestor can't possibly know what
	 * the correct next block number is), send a failure response.
	 */
	if ((R->r.append.blkno != blkno) || (dstate->writer_busy != 0)) {
		dstate->npending--;
		if (proto_lbs_response_append(dstate->writeq, R->ID, 1,
		    (uint64_t)(-1)))
			goto err1;
		goto badblkno;
	}

	/* Give the writer the work. */
	dstate->writer_busy = 1;
	if (worker_assign(writer, 1, R->r.append.blkno, R->r.append.nblks,
	    R->r.append.buf, R->ID))
		goto err1;

	/* Free the request but NOT the buffer, since the thread owns that. */
	free(R);

	/* Success! */
	return (0);

badblkno:
	/* Free request AND included buffer. */
	free(R->r.append.buf);
	free(R);

	/* Success! */
	return (0);

err1:
	/* Free request AND included buffer. */
	free(R->r.append.buf);
	free(R);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x5c20
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
jne 0x4b73
jmp 0x4c35
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x4b8b
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x4bc4
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0xfae0
cmpl $0x0, %eax
je 0x4bc2
jmp 0x4c35
jmp 0x4c16
movq -0x10(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %r8
movq -0x18(%rbp), %rax
movq (%rax), %r9
movl $0x1, %esi
callq 0x5420
cmpl $0x0, %eax
je 0x4c04
jmp 0x4c35
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
jmp 0x4c52
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
jmp 0x4c52
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/dispatch_request.c
// Function: dispatch_request_free
int
dispatch_request_free(struct dispatch_state * dstate,
    struct proto_lbs_request * R)
{
	struct workctl * deleter = dstate->workers[dstate->nreaders + 1];

	/* If the deleter is not busy, tell it to do something. */
	if (dstate->deleter_busy == 0) {
		/* Give the deleter the work. */
		dstate->deleter_busy = 1;
		if (worker_assign(deleter,
		    2, R->r.free.blkno, 0, NULL, R->ID))
			goto err1;
	}

	/*
	 * Send an ACK to the request.  FREEs are advisory, so we don't need
	 * to wait until we succeed before responding.
	 */
	dstate->npending--;
	if (proto_lbs_response_free(dstate->writeq, R->ID))
		goto err1;

	/* Free the request. */
	free(R);

	/* Success! */
	return (0);

err1:
	free(R);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x4ccb
movq -0x10(%rbp), %rax
movl $0x1, 0x14(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movq (%rax), %r9
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x5420
cmpl $0x0, %eax
je 0x4cc9
jmp 0x4d08
jmp 0x4ccb
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0xfbb0
cmpl $0x0, %eax
je 0x4cf6
jmp 0x4d08
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
jmp 0x4d18
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/worker.c
// Function: worker_assign
int
worker_assign(struct workctl * ctl, int op, uint64_t blkno, size_t nblks,
    uint8_t * buf, uint64_t reqID)
{
	int rc;

	/* Lock the control structure. */
	if ((rc = pthread_mutex_lock(&ctl->mtx)) != 0) {
		warn0("pthread_mutex_lock: %s", strerror(rc));
		goto err0;
	}

	/* Sanity check: The thread shouldn't be busy. */
	assert(ctl->haswork == 0);

	/* Record the work to be done. */
	ctl->op = op;
	ctl->blkno = blkno;
	ctl->nblks = nblks;
	ctl->buf = buf;
	ctl->reqID = reqID;

	/* The work isn't finished yet. */
	ctl->workdone = 0;

	/* Wake up the thread and unlock the control structure. */
	ctl->haswork = 1;
	if ((rc = pthread_cond_signal(&ctl->cv)) != 0) {
		warn0("pthread_cond_signal: %s", strerror(rc));
		goto err1;
	}
	if ((rc = pthread_mutex_unlock(&ctl->mtx)) != 0) {
		warn0("pthread_mutex_unlock: %s", strerror(rc));
		goto err0;
	}

	/* Success! */
	return (0);

err1:
	pthread_mutex_unlock(&ctl->mtx);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2560
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x547b
jmp 0x5452
movl -0x3c(%rbp), %edi
callq 0x2530
movq %rax, %rsi
leaq 0xd482(%rip), %rdi      # 0x128e6
movb $0x0, %al
callq 0xf2c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x558d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x5487
jmp 0x54a6
leaq 0xd4b1(%rip), %rdi      # 0x1293f
leaq 0xd4bc(%rip), %rsi      # 0x12951
movl $0xd1, %edx
leaq 0xd4b9(%rip), %rcx      # 0x1295a
callq 0x2240
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x64(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x60(%rax)
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0x22f0
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x5542
jmp 0x551c
movl -0x3c(%rbp), %edi
callq 0x2530
movq %rax, %rsi
leaq 0xd47c(%rip), %rdi      # 0x129aa
movb $0x0, %al
callq 0xf2c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x5584
movq -0x10(%rbp), %rdi
callq 0x2390
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x557b
jmp 0x5555
movl -0x3c(%rbp), %edi
callq 0x2530
movq %rax, %rsi
leaq 0xd3bf(%rip), %rdi      # 0x12926
movb $0x0, %al
callq 0xf2c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x558d
movl $0x0, -0x4(%rbp)
jmp 0x5594
movq -0x10(%rbp), %rdi
callq 0x2390
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/worker.c
// Function: worker_getdone
int
worker_getdone(struct workctl * ctl, int * op, uint64_t * blkno,
    size_t * nblks, uint8_t ** buf, uint64_t * reqID)
{
	int rc;

	/* Lock the control structure. */
	if ((rc = pthread_mutex_lock(&ctl->mtx)) != 0) {
		warn0("pthread_mutex_lock: %s", strerror(rc));
		goto err0;
	}

	/* Sanity check: This thread should have finished some work. */
	assert(ctl->haswork != 0);
	assert(ctl->workdone != 0);

	/* Copy out the work tuple. */
	*op = ctl->op;
	*blkno = ctl->blkno;
	*nblks = ctl->nblks;
	*buf = ctl->buf;
	*reqID = ctl->reqID;

	/* This thread no longer has work assigned to it. */
	ctl->haswork = 0;

	/* Unlock the thread control structure. */
	if ((rc = pthread_mutex_unlock(&ctl->mtx)) != 0) {
		warn0("pthread_mutex_unlock: %s", strerror(rc));
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2560
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x55fc
jmp 0x55d3
movl -0x3c(%rbp), %edi
callq 0x2530
movq %rax, %rsi
leaq 0xd301(%rip), %rdi      # 0x128e6
movb $0x0, %al
callq 0xf2c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x56f7
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x5608
jmp 0x5627
leaq 0xd3b3(%rip), %rdi      # 0x129c2
leaq 0xd33b(%rip), %rsi      # 0x12951
movl $0x105, %edx            # imm = 0x105
leaq 0xd3b2(%rip), %rcx      # 0x129d4
callq 0x2240
movq -0x10(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x5633
jmp 0x5652
leaq 0xd3f4(%rip), %rdi      # 0x12a2e
leaq 0xd310(%rip), %rsi      # 0x12951
movl $0x106, %edx            # imm = 0x106
leaq 0xd387(%rip), %rcx      # 0x129d4
callq 0x2240
movq -0x10(%rbp), %rax
movl 0x88(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x60(%rax)
movq -0x10(%rbp), %rdi
callq 0x2390
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x56ee
jmp 0x56c8
movl -0x3c(%rbp), %edi
callq 0x2530
movq %rax, %rsi
leaq 0xd24c(%rip), %rdi      # 0x12926
movb $0x0, %al
callq 0xf2c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x56f7
movl $0x0, -0x4(%rbp)
jmp 0x56fe
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/storage.c
// Function: storage_nextblock
uint64_t
storage_nextblock(struct storage_state * S)
{
	uint64_t nextblk;

	/* Grab a read lock. */
	if (storage_util_readlock(S))
		goto err0;

	/* Grab the next block # value. */
	nextblk = S->nextblk;

	/* Release the lock. */
	if (storage_util_unlock(S))
		goto err0;

	/* Success! */
	return (nextblk);

err0:
	/* Failure! */
	return ((uint64_t)(-1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6880
cmpl $0x0, %eax
je 0x5c3c
jmp 0x5c62
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6960
cmpl $0x0, %eax
je 0x5c58
jmp 0x5c62
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5c6a
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/storage.c
// Function: storage_done
int
storage_done(struct storage_state * S)
{
	int rc;

	/* Destroy the lock on the storage state. */
	if ((rc = pthread_rwlock_destroy(&S->lck)) != 0) {
		warn0("pthread_rwlock_destroy: %s", strerror(rc));
		goto err0;
	}

	/* Free the queue of file state structures. */
	elasticqueue_free(S->files);

	/* Free the storage state. */
	free(S);

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x2140
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x6329
jmp 0x6303
movl -0x14(%rbp), %edi
callq 0x2530
movq %rax, %rsi
leaq 0xca3c(%rip), %rdi      # 0x12d51
movb $0x0, %al
callq 0xf2c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x6348
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x7310
movq -0x10(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
jmp 0x634f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/storage_findfiles.c
// Function: fs_compar
static int
fs_compar(void * cookie, const void * _x, const void * _y)
{
	const struct storage_file * x = _x;
	const struct storage_file * y = _y;

	(void)cookie; /* UNUSED */
	if (x->fileno < y->fileno)
		return (-1);
	else if (x->fileno > y->fileno)
		return (1);
	else
		return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x67c9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67e9
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x67e2
movl $0x1, -0x4(%rbp)
jmp 0x67e9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/storage_util.c
// Function: storage_util_readlock
int
storage_util_readlock(struct storage_state * S)
{
	int rc;

	/* Try to grab the lock. */
	if ((rc = pthread_rwlock_rdlock(&S->lck)) != 0) {
		warn0("pthread_rwlock_rdlock: %s", strerror(rc));
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x2270
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x68c9
jmp 0x68a3
movl -0x14(%rbp), %edi
callq 0x2530
movq %rax, %rsi
leaq 0xc536(%rip), %rdi      # 0x12deb
movb $0x0, %al
callq 0xf2c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x68d2
movl $0x0, -0x4(%rbp)
jmp 0x68d9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/lbs/storage_util.c
// Function: storage_util_writelock
int
storage_util_writelock(struct storage_state * S)
{
	int rc;

	/* Try to grab the lock. */
	if ((rc = pthread_rwlock_wrlock(&S->lck)) != 0) {
		warn0("pthread_rwlock_wrlock: %s", strerror(rc));
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x20f0
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x6939
jmp 0x6913
movl -0x14(%rbp), %edi
callq 0x2530
movq %rax, %rsi
leaq 0xc4e0(%rip), %rdi      # 0x12e05
movb $0x0, %al
callq 0xf2c0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x6942
movl $0x0, -0x4(%rbp)
jmp 0x6949
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)