// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/pre-process.c
// Function: handle_include_path
static int handle_include_path(struct stream *stream, struct token **list, struct token *token, int how)
{
	const char *filename;
	struct token *next;
	const char **path;
	int expect;
	int flen;

	next = token->next;
	expect = '>';
	if (!match_op(next, '<')) {
		expand_list(&token->next);
		expect = 0;
		next = token;
		if (match_op(token->next, '<')) {
			next = token->next;
			expect = '>';
		}
	}

	token = next->next;
	filename = token_name_sequence(token, expect, token);
	flen = strlen(filename) + 1;

	/* Absolute path? */
	if (filename[0] == '/') {
		if (try_include(token->pos, "", filename, flen, list, includepath))
			return 0;
		goto out;
	}

	switch (how) {
	case 1:
		path = stream->next_path;
		break;
	case 2:
		includepath[0] = "";
		path = includepath;
		break;
	default:
		/* Dir of input file is first dir to search for quoted includes */
		set_stream_include_path(stream);
		path = expect ? angle_includepath : quote_includepath;
		break;
	}
	/* Check the standard include paths.. */
	if (do_include_path(path, list, token, filename, flen))
		return 0;
out:
	error_die(token->pos, "unable to open '%s'", filename);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, 0x1c(%rsp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movq 0x8(%rdx), %rax
movl (%rax), %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x20d09
cmpl $0x3c, 0x10(%rax)
je 0x20d33
leaq 0x8(%r15), %r12
movq %r12, %rdi
callq 0x20fa2
movq (%r12), %rax
movl (%rax), %ecx
andl $0x3f, %ecx
movl $0x0, 0xc(%rsp)
movb $0x1, %dl
cmpl $0x12, %ecx
jne 0x20d40
cmpl $0x3c, 0x10(%rax)
jne 0x20d40
movl $0x3e, 0xc(%rsp)
xorl %edx, %edx
movq %rax, %r15
movl %edx, 0x18(%rsp)
movq 0x8(%r15), %rbp
leaq 0x65891(%rip), %r15     # 0x865e0
cmpq %r15, %rbp
je 0x20dcb
movq %rbx, 0x20(%rsp)
leaq 0x48610(%rip), %r12     # 0x69370
leaq 0x65879(%rip), %rbx     # 0x865e0
movq %rbp, %r15
movq (%r15), %rax
andl $0x3f, %eax
cmpq $0x12, %rax
jne 0x20d82
movl 0xc(%rsp), %eax
cmpl %eax, 0x10(%r15)
jne 0x20d91
jmp 0x20dc4
cmpl $0x10, %eax
jne 0x20d91
movq 0x10(%r15), %r13
addq $0x4, %r13
jmp 0x20d9c
movq %r15, %rdi
callq 0x2df90
movq %rax, %r13
movq %r13, %rdi
callq 0xe0d0
movslq %eax, %r14
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0xe1e0
addq %r14, %r12
movq 0x8(%r15), %r15
cmpq %rbx, %r15
jne 0x20d6a
movq %rbx, %r15
movq 0x20(%rsp), %rbx
jmp 0x20dd2
leaq 0x4859e(%rip), %r12     # 0x69370
movb $0x0, (%r12)
cmpb $0x0, 0x18(%rsp)
jne 0x20e05
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x20df3
movl 0xc(%rsp), %eax
cmpl %eax, 0x10(%r15)
je 0x20e05
movq (%rbp), %rdi
leaq 0x25444(%rip), %rsi     # 0x46242
xorl %eax, %eax
callq 0x11a80
leaq 0x48564(%rip), %rdi     # 0x69370
callq 0xe0d0
movq %rax, %r15
incl %r15d
cmpb $0x2f, 0x48552(%rip)    # 0x69370
jne 0x20e5e
movq (%rbp), %rdi
leaq 0x1faa2(%rip), %rsi     # 0x408cd
leaq 0x4257e(%rip), %r8      # 0x633b0
movl %r15d, %edx
movq %rbx, %rcx
callq 0x21004
testl %eax, %eax
jne 0x20f93
movq (%rbp), %rdi
leaq 0x252c9(%rip), %rsi     # 0x46119
leaq 0x48519(%rip), %rdx     # 0x69370
xorl %eax, %eax
callq 0x11b9c
movl 0x1c(%rsp), %eax
cmpl $0x2, %eax
je 0x20e7a
cmpl $0x1, %eax
jne 0x20e94
movq 0x10(%rsp), %rax
movq 0x18(%rax), %r14
jmp 0x20f68
leaq 0x1fa4c(%rip), %rax     # 0x408cd
movq %rax, 0x42528(%rip)     # 0x633b0
leaq 0x42521(%rip), %r14     # 0x633b0
jmp 0x20f68
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r12
testq %r12, %r12
jne 0x20f47
movq 0x8(%rax), %r14
movq %r14, %rdi
movl $0x2f, %esi
callq 0xe110
testq %rax, %rax
je 0x20f37
movq %rax, %r13
subl %r14d, %r13d
shlq $0x20, %r13
movabsq $0x200000000, %rdi      # imm = 0x200000000
addq %r13, %rdi
sarq $0x20, %rdi
callq 0xe200
movq %rax, %r12
movq %r14, %rsi
movabsq $0x100000000, %r14      # imm = 0x100000000
addq %r13, %r14
sarq $0x20, %r14
movq %rax, %rdi
movq %r14, %rdx
callq 0xe1e0
movb $0x0, (%r12,%r14)
cmpb $0x2e, (%r12)
jne 0x20f3e
cmpb $0x2f, 0x1(%r12)
movq 0x10(%rsp), %rcx
jne 0x20f43
incq %r12
movzbl 0x1(%r12), %eax
incq %r12
cmpl $0x2f, %eax
je 0x20f1a
cmpl $0x2e, %eax
jne 0x20f43
cmpb $0x2f, 0x1(%r12)
je 0x20f17
jmp 0x20f43
leaq 0x1f98f(%rip), %r12     # 0x408cd
movq 0x10(%rsp), %rcx
movq %r12, 0x10(%rcx)
movq %r12, 0x42462(%rip)     # 0x633b0
leaq 0x42dc3(%rip), %rax     # 0x63d18
leaq 0x42dc4(%rip), %rcx     # 0x63d20
cmpb $0x0, 0x18(%rsp)
cmoveq %rax, %rcx
movq (%rcx), %r14
addq $0x8, %r14
movq -0x8(%r14), %rsi
testq %rsi, %rsi
je 0x20e45
movq (%rbp), %rdi
movl %r15d, %edx
movq %rbx, %rcx
movq %r14, %r8
callq 0x21004
addq $0x8, %r14
testl %eax, %eax
je 0x20f6c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq