// File: /workspace/github_c_makefile_star2_O2/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, 0x14(%rsp)
movq %rdx, %r15
movq %rsi, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x8(%rdx), %rax
movl (%rax), %ecx
andl $0x3f, %ecx
pushq $0x3e
popq %rbp
cmpl $0x12, %ecx
jne 0x1e1f2
cmpl $0x3c, 0x10(%rax)
je 0x1e216
leaq 0x8(%r15), %r12
movq %r12, %rdi
callq 0x1e455
movq (%r12), %rax
movl (%rax), %ecx
andl $0x3f, %ecx
xorl %ebx, %ebx
movb $0x1, %dl
cmpl $0x12, %ecx
jne 0x1e21d
cmpl $0x3c, 0x10(%rax)
jne 0x1e21d
xorl %edx, %edx
movq %rax, %r15
movl %ebp, %ebx
movl %edx, 0x4(%rsp)
movq 0x8(%r15), %r15
leaq 0x45144(%rip), %r12     # 0x63370
leaq 0x623ad(%rip), %rbp     # 0x805e0
movq %r15, 0x20(%rsp)
cmpq %rbp, %r15
je 0x1e28d
movq (%r15), %rax
andl $0x3f, %eax
cmpq $0x12, %rax
jne 0x1e251
cmpl %ebx, 0x10(%r15)
jne 0x1e260
jmp 0x1e28d
cmpl $0x10, %eax
jne 0x1e260
movq 0x10(%r15), %r13
addq $0x4, %r13
jmp 0x1e26b
movq %r15, %rdi
callq 0x294bb
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
jmp 0x1e238
movb $0x0, (%r12)
cmpb $0x0, 0x4(%rsp)
movq 0x20(%rsp), %rbp
jne 0x1e2c1
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x1e2af
cmpl %ebx, 0x10(%r15)
je 0x1e2c1
movq (%rbp), %rdi
leaq 0x20fe8(%rip), %rsi     # 0x3f2a2
xorl %eax, %eax
callq 0x1120e
leaq 0x450a8(%rip), %rdi     # 0x63370
callq 0xe0d0
movq %rax, %r15
incl %r15d
cmpb $0x2f, 0x45096(%rip)    # 0x63370
jne 0x1e31c
movq (%rbp), %rdi
leaq 0x1b5e6(%rip), %rsi     # 0x398cd
leaq 0x3f0c2(%rip), %r8      # 0x5d3b0
movl %r15d, %edx
movq 0x18(%rsp), %rcx
callq 0x1e499
testl %eax, %eax
jne 0x1e446
movq (%rbp), %rdi
leaq 0x20e6b(%rip), %rsi     # 0x3f179
leaq 0x4505b(%rip), %rdx     # 0x63370
xorl %eax, %eax
callq 0x1132a
movl 0x14(%rsp), %eax
cmpl $0x2, %eax
movq 0x18(%rsp), %rbx
je 0x1e33d
cmpl $0x1, %eax
jne 0x1e357
movq 0x8(%rsp), %rax
movq 0x18(%rax), %r14
jmp 0x1e41b
leaq 0x1b589(%rip), %rax     # 0x398cd
movq %rax, 0x3f065(%rip)     # 0x5d3b0
leaq 0x3f05e(%rip), %r14     # 0x5d3b0
jmp 0x1e41b
movq 0x8(%rsp), %rax
movq 0x10(%rax), %r12
testq %r12, %r12
jne 0x1e3fa
movq 0x8(%rax), %r14
pushq $0x2f
popq %rsi
movq %r14, %rdi
callq 0xe110
testq %rax, %rax
je 0x1e3ea
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)
movb (%r12), %al
movq 0x8(%rsp), %rcx
cmpb $0x2e, %al
jne 0x1e3f6
cmpb $0x2f, 0x1(%r12)
jne 0x1e3f6
incq %r12
movb 0x1(%r12), %al
incq %r12
cmpb $0x2f, %al
je 0x1e3dc
jmp 0x1e3cd
leaq 0x1b4dc(%rip), %r12     # 0x398cd
movq 0x8(%rsp), %rcx
movq %r12, 0x10(%rcx)
movq %r12, 0x3efaf(%rip)     # 0x5d3b0
leaq 0x3f910(%rip), %rax     # 0x5dd18
leaq 0x3f911(%rip), %rcx     # 0x5dd20
cmpb $0x0, 0x4(%rsp)
cmoveq %rax, %rcx
movq (%rcx), %r14
addq $0x8, %r14
movq -0x8(%r14), %rsi
testq %rsi, %rsi
je 0x1e303
movq (%rbp), %rdi
movl %r15d, %edx
movq %rbx, %rcx
movq %r14, %r8
callq 0x1e499
addq $0x8, %r14
testl %eax, %eax
je 0x1e41f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq