LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/main.c
// Function: release_h
static void
release_h(int argc, char *argv[])
{
	int c;
	struct release_args args;
	memset(&args, 0, sizeof(args));
	while ((c = getopt(argc, argv, "c:v:m:d:?")) != -1) {
		switch (c) {
		case 'c':
			args.checkout = dr_newstr(optarg);
			break;
		case 'v':
			args.version = dr_newstr(optarg);
			break;
		case 'm':
			args.describe = dr_newstr(optarg);
			break;
		case 'd':
			args.fromdir = dr_newstr(optarg);
			break;
		case '?':
			exit(EINVAL);
			break;
		}
	}
	if (args.version == NULL || args.describe == NULL) {
		fprintf(stderr, "usage: %s release -v version -m releasenote -d dir\n",
			EXEC);
		exit(EINVAL);
	}
	if (args.fromdir == NULL)
		args.fromdir = dr_newstr(".");
	release(&args);
	dr_unref(args.version);
	dr_unref(args.describe);
	dr_unref(args.fromdir);
	dr_unref(args.checkout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x2140
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x9a4b(%rip), %rdx      # 0xc0a8
callq 0x2250
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x2706
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
subl $0x3f, %eax
je 0x26f7
jmp 0x267b
movl -0x3c(%rbp), %eax
subl $0x63, %eax
je 0x26a3
jmp 0x2685
movl -0x3c(%rbp), %eax
subl $0x64, %eax
je 0x26e2
jmp 0x268f
movl -0x3c(%rbp), %eax
subl $0x6d, %eax
je 0x26cd
jmp 0x2699
movl -0x3c(%rbp), %eax
subl $0x76, %eax
je 0x26b8
jmp 0x2701
movq 0xd92e(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x20(%rbp)
jmp 0x2701
movq 0xd919(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x38(%rbp)
jmp 0x2701
movq 0xd904(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x30(%rbp)
jmp 0x2701
movq 0xd8ef(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x28(%rbp)
jmp 0x2701
movl $0x16, %edi
callq 0x2270
jmp 0x264f
cmpq $0x0, -0x38(%rbp)
je 0x2714
cmpq $0x0, -0x30(%rbp)
jne 0x273d
movq 0xd8dd(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq 0xdad3(%rip), %rdx      # 0x101f8
leaq 0x9986(%rip), %rsi      # 0xc0b2
movb $0x0, %al
callq 0x21a0
movl $0x16, %edi
callq 0x2270
cmpq $0x0, -0x28(%rbp)
jne 0x2754
leaq 0x999b(%rip), %rdi      # 0xc0e6
callq 0x2aa0
movq %rax, -0x28(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2bb0
movq -0x38(%rbp), %rdi
callq 0x2ae0
movq -0x30(%rbp), %rdi
callq 0x2ae0
movq -0x28(%rbp), %rdi
callq 0x2ae0
movq -0x20(%rbp), %rdi
callq 0x2ae0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/main.c
// Function: checkout_h
static void
checkout_h(int argc, char *argv[])
{
	dr_t hash, outdir;
	if (argc < 3) {
		fprintf(stderr, "usage: %s checkout hash outdir\n", EXEC);
		exit(EINVAL);
	}
	hash = dr_newstr(argv[1]);
	outdir = dr_newstr(argv[2]);
	checkout(hash, outdir);
	dr_unref(hash);
	dr_unref(outdir);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x3, -0x4(%rbp)
jge 0x27ce
movq 0xd84c(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq 0xda42(%rip), %rdx      # 0x101f8
leaq 0x992b(%rip), %rsi      # 0xc0e8
movb $0x0, %al
callq 0x21a0
movl $0x16, %edi
callq 0x2270
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2aa0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2aa0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4e70
movq -0x18(%rbp), %rdi
callq 0x2ae0
movq -0x20(%rbp), %rdi
callq 0x2ae0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/main.c
// Function: diff_h
static void
diff_h(int argc, char *argv[])
{
	int c;
	struct diff_args args;
	memset(&args, 0, sizeof(args));
	while ((c = getopt(argc, argv, "r:a:b:o:?")) != -1){
		switch (c) {
		case 'r':
			args.r = strtol(optarg, NULL, 0);;
			break;
		case 'a':
			args.a = dr_newstr(optarg);
			break;
		case 'b':
			args.b = dr_newstr(optarg);
			break;
		case 'o':
			args.o = dr_newstr(optarg);
			break;
		case '?':
			exit(EINVAL);
			break;
		}
	}
	if (!(args.o && ((args.a && args.b) || args.r > 0))) {
		fprintf(stderr, "usage: \n"
			"\t%s diff -a from -b to -o dir\n"
			"\t%s diff -r -o dir\n",
			EXEC, EXEC);
		exit(EINVAL);
	}
	diff(&args);
	dr_unref(args.a);
	dr_unref(args.b);
	dr_unref(args.o);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x2140
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x98bb(%rip), %rdx      # 0xc108
callq 0x2250
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x28ff
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
subl $0x3f, %eax
je 0x28f0
jmp 0x286f
movl -0x3c(%rbp), %eax
subl $0x61, %eax
je 0x28b1
jmp 0x2879
movl -0x3c(%rbp), %eax
subl $0x62, %eax
je 0x28c6
jmp 0x2883
movl -0x3c(%rbp), %eax
subl $0x6f, %eax
je 0x28db
jmp 0x288d
movl -0x3c(%rbp), %eax
subl $0x72, %eax
jne 0x28fa
jmp 0x2897
movq 0xd73a(%rip), %rax      # 0xffd8
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x21c0
movl %eax, -0x38(%rbp)
jmp 0x28fa
movq 0xd720(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x30(%rbp)
jmp 0x28fa
movq 0xd70b(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x28(%rbp)
jmp 0x28fa
movq 0xd6f6(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x20(%rbp)
jmp 0x28fa
movl $0x16, %edi
callq 0x2270
jmp 0x283f
cmpq $0x0, -0x20(%rbp)
je 0x291a
cmpq $0x0, -0x30(%rbp)
je 0x2914
cmpq $0x0, -0x28(%rbp)
jne 0x294a
cmpl $0x0, -0x38(%rbp)
jg 0x294a
movq 0xd6d7(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq 0xd8cd(%rip), %rdx      # 0x101f8
movq 0xd8c6(%rip), %rcx      # 0x101f8
leaq 0x97d9(%rip), %rsi      # 0xc112
movb $0x0, %al
callq 0x21a0
movl $0x16, %edi
callq 0x2270
leaq -0x38(%rbp), %rdi
callq 0x3620
movq -0x30(%rbp), %rdi
callq 0x2ae0
movq -0x28(%rbp), %rdi
callq 0x2ae0
movq -0x20(%rbp), %rdi
callq 0x2ae0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/main.c
// Function: patch_h
static void
patch_h(int argc, char *argv[])
{
	int c;
	struct patch_args args;
	memset(&args, 0, sizeof(args));
	while ((c = getopt(argc, argv, "a:p:o:?")) != -1) {
		switch (c) {
		case 'a':
			args.hash = dr_newstr(optarg);
			break;
		case 'p':
			args.patch = dr_newstr(optarg);
			break;
		case 'o':
			args.output = dr_newstr(optarg);
			break;
		case '?':
			exit(EINVAL);
			break;
		}
	}
	if (!(args.hash && args.patch && args.output)) {
		fprintf(stderr, "usage: %s patch -a hash -p patch -o output\n",
			argv[0]);
		exit(EINVAL);
	}
	patch(&args);
	dr_unref(args.hash);
	dr_unref(args.patch);
	dr_unref(args.output);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2140
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x979f(%rip), %rdx      # 0xc14c
callq 0x2250
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x2a33
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
subl $0x3f, %eax
je 0x2a24
jmp 0x29c7
movl -0x34(%rbp), %eax
subl $0x61, %eax
je 0x29e5
jmp 0x29d1
movl -0x34(%rbp), %eax
subl $0x6f, %eax
je 0x2a0f
jmp 0x29db
movl -0x34(%rbp), %eax
subl $0x70, %eax
je 0x29fa
jmp 0x2a2e
movq 0xd5ec(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x30(%rbp)
jmp 0x2a2e
movq 0xd5d7(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x28(%rbp)
jmp 0x2a2e
movq 0xd5c2(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x2aa0
movq %rax, -0x20(%rbp)
jmp 0x2a2e
movl $0x16, %edi
callq 0x2270
jmp 0x299f
cmpq $0x0, -0x30(%rbp)
je 0x2a48
cmpq $0x0, -0x28(%rbp)
je 0x2a48
cmpq $0x0, -0x20(%rbp)
jne 0x2a71
movq 0xd5a9(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x96f4(%rip), %rsi      # 0xc154
movb $0x0, %al
callq 0x21a0
movl $0x16, %edi
callq 0x2270
leaq -0x30(%rbp), %rdi
callq 0x4710
movq -0x30(%rbp), %rdi
callq 0x2ae0
movq -0x28(%rbp), %rdi
callq 0x2ae0
movq -0x20(%rbp), %rdi
callq 0x2ae0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/./dr.h
// Function: dr_unref
static inline void
dr_unref(dr_t d)
{
	if (d == NULL)
		return ;
	if (--d->ref <= 0) {
		assert(d->ref == 0);
		free(d);
		//printf("dr_unref:%p\n", d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2af5
jmp 0x2b38
movq -0x8(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jg 0x2b38
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x2b10
jmp 0x2b2f
leaq 0x956a(%rip), %rdi      # 0xc081
leaq 0x956f(%rip), %rsi      # 0xc08d
movl $0x2d, %edx
leaq 0x956a(%rip), %rcx      # 0xc094
callq 0x2120
movq -0x8(%rbp), %rdi
callq 0x2030
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/./dr.h
// Function: dr_new
static inline dr_t
dr_new(int size, const uint8_t *data)
{
	dr_t d;
	d = (dr_t)malloc(size + sizeof(struct dr_));
	d->ref = 1;
	d->size = size;
	if (data != NULL)
		memcpy(d->buf, data, size);
	d->buf[size] = 0;
	//printf("dr_new:%p\n", d);
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movslq -0x4(%rbp), %rdi
addq $0xc, %rdi
callq 0x2200
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x2b90
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
movslq -0x4(%rbp), %rdx
callq 0x21d0
movq -0x18(%rbp), %rax
movslq -0x4(%rbp), %rcx
movb $0x0, 0x8(%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/release.c
// Function: fingerprint
static dr_t
fingerprint(struct tree *tree)
{
	int i, n;
	drb_t drb;
	dr_t finger;
	struct ref *r;
	char buf[2048];
	drb_init(&drb, 2048);
	for (i = 0; i < tree->refn; i++) {
		uint8_t *p;
		r = &tree->refs[i];
		n = snprintf(buf, sizeof(buf), "%s\t%s\n",
			r->hash->buf, r->name->buf);
		assert(n < sizeof(buf));
		p = drb_check(&drb, n);
		memcpy(p, buf, n); p += n;
		drb_end(&drb, p);
	}
	finger = drb_dump(&drb);
	r = &tree->refs[i];
	r->name = dr_newstr(FINGERPRINT_NAME);
	r->hash = db_write(r->name, finger);
	++tree->refn;
	dr_unref(finger);
	return dr_ref(r->hash);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x840, %rsp            # imm = 0x840
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x800, %esi            # imm = 0x800
callq 0x31c0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x313a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq -0x830(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r8
addq $0x8, %r8
movl $0x800, %esi            # imm = 0x800
leaq 0x9111(%rip), %rdx      # 0xc1b5
movb $0x0, %al
callq 0x2110
movl %eax, -0x10(%rbp)
movslq -0x10(%rbp), %rax
cmpq $0x800, %rax            # imm = 0x800
jae 0x30bc
jmp 0x30db
leaq 0x90f9(%rip), %rdi      # 0xc1bc
leaq 0x9102(%rip), %rsi      # 0xc1cc
movl $0x1b, %edx
leaq 0x9100(%rip), %rcx      # 0xc1d6
callq 0x2120
movl -0x10(%rbp), %esi
leaq -0x20(%rbp), %rdi
callq 0x3200
movq %rax, -0x838(%rbp)
movq -0x838(%rbp), %rdi
leaq -0x830(%rbp), %rsi
movslq -0x10(%rbp), %rdx
callq 0x21d0
movl -0x10(%rbp), %ecx
movq -0x838(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x838(%rbp)
movq -0x838(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x3280
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3054
leaq -0x20(%rbp), %rdi
callq 0x32b0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq 0x921a(%rip), %rdi      # 0xc37f
callq 0x32f0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x5f10
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x2f50
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0x3010
addq $0x840, %rsp            # imm = 0x840
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/./dr.h
// Function: drb_check
static inline uint8_t *
drb_check(drb_t *drb, int size)
{
	int seqsize = drb->seq->size;
	int needsize = drb->size + size;
	while (seqsize < needsize) {
		seqsize *= 2;
		drb->seq = dr_resize(drb->seq, seqsize);
	}
	return &drb->seq->buf[drb->size];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3256
movl -0x10(%rbp), %eax
shll %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x10(%rbp), %esi
callq 0x33a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3229
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x8, %rax
movq -0x8(%rbp), %rcx
movslq (%rcx), %rcx
addq %rcx, %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/./dr.h
// Function: dr_resize
static inline dr_t
dr_resize(dr_t d, int size)
{
	if (d->ref == 1) {
		d = realloc(d, size + sizeof(struct dr_));
		d->size = size;
	} else {
		dr_t n = dr_new(size, NULL);
		if (size > d->size)
			size = d->size;
		d->size = size;
		memcpy(n->buf, d->buf, size);
		dr_unref(d);
		d = n;
	}
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x33d9
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
addq $0xc, %rsi
callq 0x2210
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x3433
movl -0xc(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x3330
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x33ff
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movslq -0xc(%rbp), %rdx
callq 0x21d0
movq -0x8(%rbp), %rdi
callq 0x2f50
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/history.c
// Function: history
void
history(int n)
{
	dr_t h;
	int i = 0;
	struct release rel;
	h = db_readhead(&rel, NULL);
	if (h->size == 0) {
		printf("Empty db\n");
	} else {
		for (;;) {
			struct tm *t;
			char datetime[200];
			t = localtime(&rel.time);
			strftime(datetime, sizeof(datetime),
				"%a %b %d %H:%M:%S %Z", t);
			printf("release:%s\n", h->buf);
			printf("finger:%s\n", rel.finger->buf);
			printf("Version:%s\n", rel.ver->buf);
			printf("Date:%s\n", datetime);
			printf("\n\t%s\n\n", rel.note->buf);
			if (rel.prev->size <= 0 || (n > 0 && ++i >= n))
				break;
			dr_unref(h);
			h = dr_ref(rel.prev);
			release_destroy(&rel);
			memset(&rel, 0, sizeof(rel));
			db_readrel(&rel, h);
		}
	}
	dr_unref(h);
	release_destroy(&rel);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movl %edi, -0x4(%rbp)
movl $0x0, -0x14(%rbp)
leaq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6140
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x3483
leaq 0x8d7f(%rip), %rdi      # 0xc1f6
movb $0x0, %al
callq 0x2100
jmp 0x357e
jmp 0x3485
leaq -0x48(%rbp), %rdi
callq 0x2040
movq %rax, -0x50(%rbp)
leaq -0x120(%rbp), %rdi
movq -0x50(%rbp), %rcx
movl $0xc8, %esi
leaq 0x8d57(%rip), %rdx      # 0xc200
callq 0x2220
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq 0x8d58(%rip), %rdi      # 0xc215
movb $0x0, %al
callq 0x2100
movq -0x20(%rbp), %rsi
addq $0x8, %rsi
leaq 0x8d4e(%rip), %rdi      # 0xc221
movb $0x0, %al
callq 0x2100
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
leaq 0x8d43(%rip), %rdi      # 0xc22c
movb $0x0, %al
callq 0x2100
leaq -0x120(%rbp), %rsi
leaq 0x8d3a(%rip), %rdi      # 0xc238
movb $0x0, %al
callq 0x2100
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
leaq 0x8d2d(%rip), %rdi      # 0xc241
movb $0x0, %al
callq 0x2100
movq -0x40(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jle 0x3539
cmpl $0x0, -0x4(%rbp)
jle 0x353b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl -0x4(%rbp), %eax
jl 0x353b
jmp 0x357c
movq -0x10(%rbp), %rdi
callq 0x35a0
movq -0x40(%rbp), %rdi
callq 0x3600
movq %rax, -0x10(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x6f70
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x2140
movq -0x10(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x60c0
jmp 0x3485
jmp 0x357e
movq -0x10(%rbp), %rdi
callq 0x35a0
leaq -0x48(%rbp), %rdi
callq 0x6f70
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/diff.c
// Function: diff
void
diff(struct diff_args *args)
{
	dr_t head;
	struct release rel;
	if (args->r == 0)
		return diff_tree(args->a, args->b, args->o);
	head = db_readhead(&rel, NULL);
	if (head->size == 0) {
		printf("Empty db\n");
	} else {
		int i;
		for (i = 0; i < args->r || args->r < 0; i++) {
			dr_t h;
			if (rel.prev->size <= 0)
				break;
			h = dr_ref(rel.prev);
			diff_tree(h, head, args->o);
			release_destroy(&rel);
			db_readrel(&rel, h);
			dr_unref(h);
		}
	}
	dr_unref(head);
	release_destroy(&rel);
	return ;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3657
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x3730
jmp 0x371e
leaq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6140
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x3685
leaq 0x8b7d(%rip), %rdi      # 0xc1f6
movb $0x0, %al
callq 0x2100
jmp 0x370c
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %ecx
movq -0x8(%rbp), %rdx
movb $0x1, %al
cmpl (%rdx), %ecx
movb %al, -0x51(%rbp)
jl 0x36a9
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
setl %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x36b2
jmp 0x370a
movq -0x38(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jg 0x36be
jmp 0x370a
movq -0x38(%rbp), %rdi
callq 0x3d60
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x3730
leaq -0x40(%rbp), %rdi
callq 0x6f70
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x60c0
movq -0x50(%rbp), %rdi
callq 0x3d80
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x368c
jmp 0x370c
movq -0x10(%rbp), %rdi
callq 0x3d80
leaq -0x40(%rbp), %rdi
callq 0x6f70
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/diff.c
// Function: search
static int
search(dr_t old, int *SA, const uint8_t *ns, int nsize, int *pos)
{
	int n = 0, sim = 0;
	int osize = old->size;
	int m = 0, l = 0, r = osize;
	const uint8_t *p = old->buf;
	*pos = -1;
	while (l < r) {
		int c, s;
		m = (l + r) / 2;
		n = SA[m];
		c = match(&p[n], osize - n, ns, nsize, &s);
		if (c == 0) {	//contain
			*pos = n;
			sim = s;
			assert(s == nsize);
			break;
		} else {
			if (sim < s) {
				*pos = n;
				sim = s;
			}
			if (c < 0)
				l = m + 1;
			else
				r = m;
		}
	}
	return sim;
}

// 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 %r8, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x4571
movl -0x3c(%rbp), %eax
addl -0x40(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq -0x48(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
movl -0x34(%rbp), %esi
subl -0x2c(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq -0x50(%rbp), %r8
callq 0x4580
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0x453c
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x50(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x451b
jmp 0x453a
leaq 0x7e10(%rip), %rdi      # 0xc332
leaq 0x7dd1(%rip), %rsi      # 0xc2fa
movl $0x3b, %edx
leaq 0x7e08(%rip), %rcx      # 0xc33d
callq 0x2120
jmp 0x4571
movl -0x30(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x4553
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x50(%rbp), %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x4c(%rbp)
jge 0x4564
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x456a
movl -0x38(%rbp), %eax
movl %eax, -0x40(%rbp)
jmp 0x456c
jmp 0x44ad
movl -0x30(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/diff.c
// Function: match
static int
match(const uint8_t *a, int an, const uint8_t *b, int bn, int *n)
{
	int i, x = MIN(an, bn);
	for (i = 0; i < x; i++) {
		if (a[i] != b[i])
			break;
	}
	*n = i;
	if (i < x) {
		if (a[i] < b[i]) {
			return -1;
		} else if (a[i] > b[i]) {
			return 1;
		} else {
			return 0;
		}
	}
	if (x == bn)
		return 0;
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x45a6
movl -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x45ac
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x45ec
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x45df
jmp 0x45ec
jmp 0x45e1
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x45b9
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x4650
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jge 0x4622
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4668
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jle 0x4647
movl $0x1, -0x4(%rbp)
jmp 0x4668
movl $0x0, -0x4(%rbp)
jmp 0x4668
movl -0x38(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x4661
movl $0x0, -0x4(%rbp)
jmp 0x4668
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/list.c
// Function: list
void
list(struct list_args *args)
{
	int i, n;
	struct release r;
	struct tree t;
	dr_t hash = db_aliashash(args->hash);
	db_readrel(&r, args->hash);
	db_readtree(&t, r.tree);
	release_destroy(&r);
	dr_unref(hash);
	n = t.refn;
	for (i = 0; i < n; i++) {
		printf("%s ==> %s\n",
			t.refs[i].name->buf,
			t.refs[i].hash->buf);
	}
	printf("total:%d\n", n);
	tree_destroy(&t);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x6240
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq -0x40(%rbp), %rdi
callq 0x60c0
movq -0x30(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x6100
leaq -0x40(%rbp), %rdi
callq 0x6f70
movq -0x58(%rbp), %rdi
callq 0x4e10
movl -0x50(%rbp), %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x4de6
movq -0x48(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
addq $0x8, %rsi
movq -0x48(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
addq $0x8, %rdx
leaq 0x76cd(%rip), %rdi      # 0xc4a1
movb $0x0, %al
callq 0x2100
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4d98
movl -0x10(%rbp), %esi
leaq 0x763c(%rip), %rdi      # 0xc42c
movb $0x0, %al
callq 0x2100
leaq -0x50(%rbp), %rdi
callq 0x6960
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/checkout.c
// Function: checkout
void
checkout(dr_t hash, dr_t outdir)
{
	int i;
	struct release r;
	struct tree t;
	hash = db_aliashash(hash);
	db_readrel(&r, hash);
	dr_unref(hash);
	db_readtree(&t, r.tree);
	printf("checkout tree:%s->%s\n", r.tree->buf, str(outdir));
	release_destroy(&r);
	dir_ensure(str(outdir));
	if (errno == EEXIST)
		printf("warning: checkout folder '%s' is exist\n", str(outdir));
	for (i = 0; i < t.refn; i++) {
		struct ref *f;
		f = &t.refs[i];
		f->data = db_read(f->hash);
		dir_writefile(str(f->name), f->data, outdir);
	}
	tree_destroy(&t);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6240
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x60c0
movq -0x8(%rbp), %rdi
callq 0x4f80
movq -0x38(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x6100
movq -0x38(%rbp), %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
leaq 0x75e5(%rip), %rdi      # 0xc4ac
movb $0x0, %al
callq 0x2100
leaq -0x48(%rbp), %rdi
callq 0x6f70
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x5260
callq 0x2050
cmpl $0x11, (%rax)
jne 0x4f04
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq 0x75c5(%rip), %rdi      # 0xc4c2
movb $0x0, %al
callq 0x2100
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x4f65
movq -0x50(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq (%rax), %rdi
callq 0x5e90
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x8, %rdi
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rdx
callq 0x5560
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4f0b
leaq -0x58(%rbp), %rdi
callq 0x6960
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/dir.c
// Function: dir_scan
int
dir_scan(const char *path, dr_t **res, int skip)
{
	struct args args;
	args.num = 0;
	args.cap = 128;
	if (skip)
		args.prefix = strlen(path) + 1;
	else
		args.prefix = 0;
	args.list = malloc(128 * sizeof(dr_t));
	scan_r(path, &args);
	if (res == NULL) {
		int i;
		for (i = 0; i < args.num; i++)
			dr_unref(args.list[i]);
		free(args.list);
	} else {
		*res = args.list;
	}
	return args.num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x80, -0x2c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x5019
movq -0x8(%rbp), %rdi
callq 0x20d0
addq $0x1, %rax
movl %eax, -0x28(%rbp)
jmp 0x5020
movl $0x0, -0x28(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0x2200
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5090
cmpq $0x0, -0x10(%rbp)
jne 0x5078
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x506d
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5200
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5049
movq -0x20(%rbp), %rdi
callq 0x2030
jmp 0x5083
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x30(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/dir.c
// Function: scan_r
static void
scan_r(const char *prefix, struct args *args)
{
	DIR *dir;
	struct stat st;
	struct dirent *ent;
	dir = scanbegin(prefix);
	while ((ent = readdir(dir))) {
		char buf[PATH_MAX];
		if (ent->d_name[0] == '.')
			continue;
		snprintf(buf, PATH_MAX, "%s/%s", prefix, ent->d_name);
		stat(buf, &st);
		if (S_ISDIR(st.st_mode)) {
			scan_r(buf, args);
		} else if (S_ISREG(st.st_mode)) {
			args->list[args->num++] = dr_newstr(buf + args->prefix);
			if (args->num >= args->cap) {
				int size;
				args->cap *= 2;
				size = args->cap * sizeof(dr_t);
				args->list = realloc(args->list, size);
			}
		}
	}
	scanend(dir);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10c0, %rsp           # imm = 0x10C0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x58d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21f0
movq %rax, -0xb0(%rbp)
cmpq $0x0, %rax
je 0x51e0
movq -0xb0(%rbp), %rax
movsbl 0x13(%rax), %eax
cmpl $0x2e, %eax
jne 0x50dc
jmp 0x50b0
leaq -0x10b0(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq -0xb0(%rbp), %r8
addq $0x13, %r8
movl $0x1000, %esi           # imm = 0x1000
leaq 0x74d9(%rip), %rdx      # 0xc5d7
movb $0x0, %al
callq 0x2110
leaq -0x10b0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x21b0
movl -0x90(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x513f
leaq -0x10b0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5090
jmp 0x51db
movl -0x90(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x51d9
leaq -0x10b0(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rax
addq %rax, %rdi
callq 0x5950
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jl 0x51d7
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
shll %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rax
shlq $0x3, %rax
movl %eax, -0x10b4(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x10b4(%rbp), %rsi
callq 0x2210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x51d9
jmp 0x51db
jmp 0x50b0
movq -0x18(%rbp), %rdi
callq 0x5990
addq $0x10c0, %rsp           # imm = 0x10C0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/dir.c
// Function: dir_ensure
void
dir_ensure(const char *path)
{
	char buf[PATH_MAX];
	char *p, *s, *e;
	strcpy(buf, path);
	path = buf;
	p = s = (char *)path;
	errno = 0;
	while ((e = strchr(s+1, '/'))) {
		int ret;
		*e = 0;
		errno = 0;
		ret = MKDIR(p);
		if (ret == -1 && errno != EEXIST) {
			fprintf(stderr, "mkdir '%s' %s\n", p, strerror(errno));
			exit(errno);
		}
		*e = '/';
		s = e + 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1040, %rsp           # imm = 0x1040
movq %rdi, -0x8(%rbp)
leaq -0x1010(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x2080
leaq -0x1010(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1020(%rbp)
movq %rax, -0x1018(%rbp)
callq 0x2050
movl $0x0, (%rax)
movq -0x1020(%rbp), %rdi
addq $0x1, %rdi
movl $0x2f, %esi
callq 0x20f0
movq %rax, -0x1028(%rbp)
cmpq $0x0, %rax
je 0x5383
movq -0x1028(%rbp), %rax
movb $0x0, (%rax)
callq 0x2050
movl $0x0, (%rax)
movq -0x1018(%rbp), %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x2090
movl %eax, -0x102c(%rbp)
cmpl $-0x1, -0x102c(%rbp)
jne 0x5362
callq 0x2050
cmpl $0x11, (%rax)
je 0x5362
movq 0xace5(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, -0x1040(%rbp)
movq -0x1018(%rbp), %rax
movq %rax, -0x1038(%rbp)
callq 0x2050
movl (%rax), %edi
callq 0x22a0
movq -0x1040(%rbp), %rdi
movq -0x1038(%rbp), %rdx
movq %rax, %rcx
leaq 0x719b(%rip), %rsi      # 0xc4ea
movb $0x0, %al
callq 0x21a0
callq 0x2050
movl (%rax), %edi
callq 0x2270
movq -0x1028(%rbp), %rax
movb $0x2f, (%rax)
movq -0x1028(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1020(%rbp)
jmp 0x52a7
addq $0x1040, %rsp           # imm = 0x1040
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/dir.c
// Function: dir_readfile
dr_t
dir_readfile(const char *path, dr_t root)
{
	int fd;
	dr_t content;
	char buf[PATH_MAX];
	struct stat stat;
	path = changedir(buf, path, root);
	fd = open(path, O_RDONLY | O_BINARY);
	if (fd < 0)
		return NULL;
	fstat(fd, &stat);
	content = dr_new(stat.st_size, NULL);
	read(fd, content->buf, stat.st_size);
	close(fd);
	return content;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10c0, %rsp           # imm = 0x10C0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x1030(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5440
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x2230
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x53db
movq $0x0, -0x8(%rbp)
jmp 0x5427
movl -0x1c(%rbp), %edi
leaq -0x10c0(%rbp), %rsi
callq 0x22b0
movq -0x1090(%rbp), %rax
movl %eax, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x54f0
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %edi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
movq -0x1090(%rbp), %rdx
callq 0x2170
movl -0x1c(%rbp), %edi
callq 0x2150
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10c0, %rsp           # imm = 0x10C0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/dir.c
// Function: changedir
static const char *
changedir(char buf[PATH_MAX], const char *path, dr_t root)
{
	if (root != NULL) {
		int n = strlen(path);
		int sz = root->size;
		memcpy(buf, root->buf, sz);
		if (buf[sz-1] != '/') {
			buf[sz] = '/';
			sz += 1;
		}
		memcpy(&buf[sz], path, n);
		buf[sz + n] = 0;
		path = buf;
	}
	return path;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x54e6
movq -0x10(%rbp), %rdi
callq 0x20d0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
movslq -0x20(%rbp), %rdx
callq 0x21d0
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x54b5
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x2f, (%rax,%rcx)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x21d0
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/dir.c
// Function: dir_writefile
void
dir_writefile(const char *path, dr_t d, dr_t root)
{
	int fd, ret;
	char buf[PATH_MAX];
	path = changedir(buf, path, root);
	dir_ensure(path);
	fd = open(path, O_CREAT | O_RDWR | O_TRUNC | O_BINARY, 0644);
	if (fd < 0) {
		fprintf(stderr, "FATAL: write %s errno:%s\n",
			path, strerror(errno));
		exit(errno);
	}
	ret = write(fd, d->buf, d->size);
	assert(ret == d->size);
	close(fd);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1030, %rsp           # imm = 0x1030
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x1020(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5440
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5260
movq -0x8(%rbp), %rdi
movl $0x242, %esi            # imm = 0x242
movl $0x1a4, %edx            # imm = 0x1A4
movb $0x0, %al
callq 0x2230
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x5609
movq 0xaa3b(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, -0x1030(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1028(%rbp)
callq 0x2050
movl (%rax), %edi
callq 0x22a0
movq -0x1030(%rbp), %rdi
movq -0x1028(%rbp), %rdx
movq %rax, %rcx
leaq 0x6f03(%rip), %rsi      # 0xc4f9
movb $0x0, %al
callq 0x21a0
callq 0x2050
movl (%rax), %edi
callq 0x2270
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rdx
callq 0x20b0
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x5632
jmp 0x5651
leaq 0x6eda(%rip), %rdi      # 0xc513
leaq 0x6ee2(%rip), %rsi      # 0xc522
movl $0xa4, %edx
leaq 0x6edc(%rip), %rcx      # 0xc528
callq 0x2120
movl -0x1c(%rbp), %edi
callq 0x2150
addq $0x1030, %rsp           # imm = 0x1030
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/dir.c
// Function: dir_rename
void
dir_rename(const char *from, const char *to, dr_t root)
{
	int ret;
	char fbuf[PATH_MAX], tbuf[PATH_MAX];
	from = changedir(fbuf, from, root);
	to = changedir(tbuf, to, root);
	dir_ensure(to);
	ret = rename(from, to);
	assert(ret == 0);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x1020(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5440
movq %rax, -0x8(%rbp)
leaq -0x2020(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5440
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5260
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2240
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x56d8
jmp 0x56f7
leaq 0x6e76(%rip), %rdi      # 0xc555
leaq 0x6e3c(%rip), %rsi      # 0xc522
movl $0xb2, %edx
leaq 0x6e6c(%rip), %rcx      # 0xc55e
callq 0x2120
addq $0x2020, %rsp           # imm = 0x2020
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/dir.c
// Function: dir_movdir
void
dir_movdir(dr_t from, dr_t to)
{
	int i, n, ret;
	int flen, tlen;
	dr_t *list;
	char buf[PATH_MAX];
	n = dir_scan(str(from), &list, 0);
	flen = from->size;
	tlen = to->size;
	memcpy(buf, to->buf, tlen);
	for (i = 0; i < n; i++) {
		dr_t d = list[i];
		memcpy(&buf[tlen], &d->buf[flen], d->size - flen);
		buf[d->size - flen + tlen] = 0;
		dir_ensure(buf);
		ret = remove(buf);
		assert(ret == 0 || (ret == -1 && errno == ENOENT));
		ret = rename((char *)d->buf, buf);
		assert(ret == 0);
		dr_unref(d);
	}
	free(list);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1040, %rsp           # imm = 0x1040
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x4fe0
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
leaq -0x1030(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movslq -0x24(%rbp), %rdx
callq 0x21d0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x58b7
movq -0x30(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1038(%rbp)
movslq -0x24(%rbp), %rax
leaq -0x1030(%rbp), %rdi
addq %rax, %rdi
movq -0x1038(%rbp), %rsi
addq $0x8, %rsi
movslq -0x20(%rbp), %rax
addq %rax, %rsi
movq -0x1038(%rbp), %rax
movl 0x4(%rax), %eax
subl -0x20(%rbp), %eax
movslq %eax, %rdx
callq 0x21d0
movq -0x1038(%rbp), %rax
movl 0x4(%rax), %eax
subl -0x20(%rbp), %eax
addl -0x24(%rbp), %eax
cltq
movb $0x0, -0x1030(%rbp,%rax)
leaq -0x1030(%rbp), %rdi
callq 0x5260
leaq -0x1030(%rbp), %rdi
callq 0x2060
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x583b
cmpl $-0x1, -0x1c(%rbp)
jne 0x583d
callq 0x2050
cmpl $0x2, (%rax)
jne 0x583d
jmp 0x585c
leaq 0x6d4c(%rip), %rdi      # 0xc590
leaq 0x6cd7(%rip), %rsi      # 0xc522
movl $0xd0, %edx
leaq 0x6d64(%rip), %rcx      # 0xc5bb
callq 0x2120
movq -0x1038(%rbp), %rdi
addq $0x8, %rdi
leaq -0x1030(%rbp), %rsi
callq 0x2240
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x587e
jmp 0x589d
leaq 0x6cd0(%rip), %rdi      # 0xc555
leaq 0x6c96(%rip), %rsi      # 0xc522
movl $0xd2, %edx
leaq 0x6d23(%rip), %rcx      # 0xc5bb
callq 0x2120
movq -0x1038(%rbp), %rdi
callq 0x5200
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x579c
movq -0x30(%rbp), %rdi
callq 0x2030
addq $0x1040, %rsp           # imm = 0x1040
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/dir.c
// Function: scanbegin
static DIR *
scanbegin(const char *path)
{
	DIR *dir = opendir(path);
	if (dir == NULL) {
		fprintf(stderr, "FATAL: dir scan %s error:%s\n",
			path, strerror(errno));
		exit(errno);
	}
	return dir;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20c0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5937
movq 0xa701(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0x2050
movl (%rax), %edi
callq 0x22a0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq %rax, %rcx
leaq 0x6cb9(%rip), %rsi      # 0xc5dd
movb $0x0, %al
callq 0x21a0
callq 0x2050
movl (%rax), %edi
callq 0x2270
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/db.c
// Function: db_hash
dr_t
db_hash(dr_t d)
{
	int i;
	char *p;
	dr_t hash;
	uint8_t digest[HASH_SIZE];
	HASH_CTX ctx;
	hash = dr_new(HASH_SIZE * 2, NULL);
	HASH_Init(&ctx);
	HASH_Update(&ctx, d->buf, d->size);
	HASH_Final(digest, &ctx);
	p = (char *)hash->buf;
	for (i = 0; i < HASH_SIZE; i++) {
		sprintf(p, "%02x", digest[i]);
		p += 2;
	}
	return hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl $0x28, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x5a70
movq %rax, -0x20(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x8ab0
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movq -0x8(%rbp), %rax
movslq 0x4(%rax), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x8b00
leaq -0x40(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xb990
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x14, -0xc(%rbp)
jge 0x5a54
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
movzbl -0x40(%rbp,%rax), %edx
leaq 0x6bc4(%rip), %rsi      # 0xc5fa
movb $0x0, %al
callq 0x2260
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5a1c
movq -0x20(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/db.c
// Function: db_tryread
dr_t
db_tryread(dr_t name)
{
	const char *p;
	dr_t d, full;
	char path[PATH_MAX];
	full = fullname(name);
	p = (char *)full->buf;
	snprintf(path, PATH_MAX, ROOT"/%c%c/%s", p[0], p[1], &p[2]);
	d = dir_readfile(path, NULL);
	if (d != NULL) {
		dr_t hash = db_hash(d);
		if (dr_cmp(hash, full) != 0) {
			fprintf(stderr, "FATAL:db_read %s content was corrupt\n",
				name->buf);
			exit(EFAULT);
		}
		dr_unref(hash);
	}
	dr_unref(full);
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1030, %rsp           # imm = 0x1030
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5bd0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
leaq -0x1020(%rbp), %rdi
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %r8d
movq -0x10(%rbp), %r9
addq $0x2, %r9
movl $0x1000, %esi           # imm = 0x1000
leaq 0x6acc(%rip), %rdx      # 0xc5ff
movb $0x0, %al
callq 0x2110
leaq -0x1020(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5390
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5bb0
movq -0x18(%rbp), %rdi
callq 0x59b0
movq %rax, -0x1028(%rbp)
movq -0x1028(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5dd0
cmpl $0x0, %eax
je 0x5ba4
movq 0xa477(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
addq $0x8, %rdx
leaq 0x6a80(%rip), %rsi      # 0xc613
movb $0x0, %al
callq 0x21a0
movl $0xe, %edi
callq 0x2270
movq -0x1028(%rbp), %rdi
callq 0x5e30
movq -0x20(%rbp), %rdi
callq 0x5e30
movq -0x18(%rbp), %rax
addq $0x1030, %rsp           # imm = 0x1030
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/db.c
// Function: db_read
dr_t
db_read(dr_t name)
{
	dr_t d;
	d = db_tryread(name);
	if (d == NULL) {
		fprintf(stderr, "FATAL:db_read %s errno:%s\n",
			name->buf, strerror(errno));
		exit(errno);
	}
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5ae0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5efb
movq 0xa141(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
callq 0x2050
movl (%rax), %edi
callq 0x22a0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq %rax, %rcx
leaq 0x6751(%rip), %rsi      # 0xc639
movb $0x0, %al
callq 0x21a0
callq 0x2050
movl (%rax), %edi
callq 0x2270
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/findstr[P]version-database/db.c
// Function: db_write
dr_t
db_write(dr_t name, dr_t d)
{
	dr_t hash, read;
	int n, ret;
	char path[PATH_MAX] ;
	hash = db_hash(d);
	read = db_tryread(hash);
	if (read) {
		int same;
		same = dr_cmp(d, read);
		dr_unref(read);
		if (same != 0) {
			fprintf(stderr, "FATAL:db_write %s hash conflict:%s\n",
				name->buf, hash->buf);
			exit(EEXIST);
		}
	} else {
		char *p;
		p = (char *)hash->buf;
		n = sprintf(path, ROOT"/%c%c", p[0], p[1]);
		ret = MKDIR(path);
		if (ret == -1 && errno != EEXIST) {
			fprintf(stderr, "FATAL:db_write %s hash %s errno:%s\n",
				path, p, strerror(errno));
			exit(errno);
		}
		sprintf(&path[n], "/%s", &p[2]);
		dir_writefile(path, d, NULL);
	}
	return hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1060, %rsp           # imm = 0x1060
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x59b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5ae0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5fa0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5dd0
movl %eax, -0x1034(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5e30
cmpl $0x0, -0x1034(%rbp)
je 0x5f9b
movq 0xa088(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
addq $0x8, %rdx
movq -0x18(%rbp), %rcx
addq $0x8, %rcx
leaq 0x66ca(%rip), %rsi      # 0xc654
movb $0x0, %al
callq 0x21a0
movl $0x11, %edi
callq 0x2270
jmp 0x60a6
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x1040(%rbp)
leaq -0x1030(%rbp), %rdi
movq -0x1040(%rbp), %rax
movsbl (%rax), %edx
movq -0x1040(%rbp), %rax
movsbl 0x1(%rax), %ecx
leaq 0x66a6(%rip), %rsi      # 0xc678
movb $0x0, %al
callq 0x2260
movl %eax, -0x24(%rbp)
leaq -0x1030(%rbp), %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x2090
movl %eax, -0x28(%rbp)
cmpl $-0x1, -0x28(%rbp)
jne 0x606b
callq 0x2050
cmpl $0x11, (%rax)
je 0x606b
movq 0x9ff1(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, -0x1058(%rbp)
leaq -0x1030(%rbp), %rax
movq %rax, -0x1050(%rbp)
movq -0x1040(%rbp), %rax
movq %rax, -0x1048(%rbp)
callq 0x2050
movl (%rax), %edi
callq 0x22a0
movq -0x1058(%rbp), %rdi
movq -0x1050(%rbp), %rdx
movq -0x1048(%rbp), %rcx
movq %rax, %r8
leaq 0x6631(%rip), %rsi      # 0xc689
movb $0x0, %al
callq 0x21a0
callq 0x2050
movl (%rax), %edi
callq 0x2270
movslq -0x24(%rbp), %rax
leaq -0x1030(%rbp), %rdi
addq %rax, %rdi
movq -0x1040(%rbp), %rdx
addq $0x2, %rdx
leaq 0x6584(%rip), %rsi      # 0xc60f
movb $0x0, %al
callq 0x2260
leaq -0x1030(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x5560
movq -0x18(%rbp), %rax
addq $0x1060, %rsp           # imm = 0x1060
popq %rbp
retq
nopw %cs:(%rax,%rax)