// File: /workspace/github_c_makefile_star2_O0/lmcilroy[P]lzm/lzm.c
// Function: process_dir
static unsigned int
process_dir(struct compress_args * const args)
{
	char *path_argv[2];
	FTS *fts;
	FTSENT *entry;
	int ret = 0;
	int err;

	path_argv[0] = args->filename;
	path_argv[1] = NULL;

	fts = fts_open(path_argv, FTS_PHYSICAL | FTS_NOCHDIR, NULL);
	if (fts == NULL) {
		ret = errno;
		fprintf(stderr, "Dir %s: could not open: %s",
		    args->filename, strerror(ret));
		return ret;
	}

	while ((entry = fts_read(fts))) {
		switch(entry->fts_info) {
		case FTS_D:
		case FTS_DP:
		case FTS_DC:
		case FTS_SL:
		case FTS_SLNONE:
		case FTS_DOT:
			continue;

		case FTS_ERR:
		case FTS_DNR:
		case FTS_NS:
			err = errno;
			fprintf(stderr, "File %s: unable to access: %s",
			    entry->fts_path, strerror(err));
			if (ret == 0)
				ret = err;
			continue;

		case FTS_F:
			args->filename = entry->fts_path;
			args->st = entry->fts_statp;
			err = process_file(args);
			if (ret == 0)
				ret = err;
			continue;
		}
	}

	fts_close(fts);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x14, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1180
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x19a4
callq 0x1040
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movq 0x8693(%rip), %rax      # 0x9ff8
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movl -0x34(%rbp), %edi
callq 0x1250
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq %rax, %rcx
leaq 0x5be9(%rip), %rsi      # 0x757b
movb $0x0, %al
callq 0x1190
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1abf
jmp 0x19a6
movq -0x28(%rbp), %rdi
callq 0x10f0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x1ab0
movq -0x30(%rbp), %rax
movzwl 0x62(%rax), %eax
movl %eax, -0x4c(%rbp)
decl %eax
subl $0x2, %eax
jb 0x1a17
jmp 0x19d1
movl -0x4c(%rbp), %eax
subl $0x4, %eax
je 0x1a19
jmp 0x19db
movl -0x4c(%rbp), %eax
addl $-0x5, %eax
subl $0x2, %eax
jb 0x1a17
jmp 0x19e8
movl -0x4c(%rbp), %eax
subl $0x7, %eax
je 0x1a19
jmp 0x19f2
movl -0x4c(%rbp), %eax
subl $0x8, %eax
je 0x1a6f
jmp 0x19fc
movl -0x4c(%rbp), %eax
subl $0xa, %eax
je 0x1a19
jmp 0x1a06
movl -0x4c(%rbp), %eax
addl $-0xc, %eax
subl $0x1, %eax
ja 0x1aab
jmp 0x1a17
jmp 0x19a6
callq 0x1040
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq 0x85ce(%rip), %rax      # 0x9ff8
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x58(%rbp)
movl -0x38(%rbp), %edi
callq 0x1250
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rdx
movq %rax, %rcx
leaq 0x5b3f(%rip), %rsi      # 0x7596
movb $0x0, %al
callq 0x1190
cmpl $0x0, -0x34(%rbp)
jne 0x1a6a
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x19a6
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x1ad0
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x1aa6
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x19a6
jmp 0x19a6
movq -0x28(%rbp), %rdi
callq 0x10d0
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)