// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/gen.c
// Function: pp_gen_new_context
PPGeneratorContext * pp_gen_new_context(
	ParserContext *psrctx,
	const char *include_paths,
	Map *map_kv,
	Map *map_kv_with_params,
	FILE *out,
	ResizableString *result
) {
	assert(psrctx);
	assert(psrctx->ast);
	assert(include_paths);
	assert(out != NULL || result != NULL);

	PPGeneratorContext *ctx = (PPGeneratorContext *)malloc(sizeof(PPGeneratorContext));

	ctx->psrctx = psrctx;
	ctx->out = out;
	ctx->result = result;

	if (map_kv != NULL) {
		ctx->map_kv = map_kv;
	} else {
		ctx->map_kv = (Map *)malloc(sizeof(Map));
		assert(ctx->map_kv);
		map_init(
			ctx->map_kv,
			map_rstr_comparer, map_rstr_comparer,
			(MapReleaser) rstr_delete, (MapReleaser) rstr_delete
		);
	}

	if (map_kv_with_params != NULL) {
		ctx->map_kv_with_params = map_kv_with_params;
	} else {
		ctx->map_kv_with_params = (Map *)malloc(sizeof(Map));
		assert(ctx->map_kv_with_params);
		map_init(
			ctx->map_kv_with_params,
			map_rstr_comparer, NULL,
			(MapReleaser) rstr_delete, (MapReleaser) _delete_gen_func_macro
		);
	}

	ctx->cstr_include_paths = include_paths;

	llst_init(
		&(ctx->include_paths),
		NULL,
		(LinkedListReleaser) rstr_delete
	);

	ResizableString rstr_inc_paths;
	rstr_init_with_cstr(&rstr_inc_paths, include_paths);

	rstr_split(
		&(ctx->include_paths),
		&rstr_inc_paths,
		";",
		true
	);

	rstr_free(&rstr_inc_paths);

	return ctx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x281f8
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x28217
testq %rsi, %rsi
je 0x28236
movq %r9, %r13
movq %r8, %r15
movq %rcx, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
movq %r8, %rax
orq %r9, %rax
je 0x28255
movq %rdx, %r12
movl $0x58, %edi
callq 0xa130
movq %rax, %r14
movq %rbx, (%rax)
movq %r15, 0x8(%rax)
movq %r13, 0x10(%rax)
testq %r12, %r12
je 0x28120
movq %r12, 0x18(%r14)
jmp 0x28153
movl $0x48, %edi
callq 0xa130
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x28274
leaq -0x1b4d6(%rip), %rdx    # 0xcc68
leaq -0x1998b(%rip), %rcx    # 0xe7ba
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %r8
callq 0xc400
movq -0x38(%rbp), %rax
testq %rax, %rax
je 0x28162
movq %rax, 0x20(%r14)
jmp 0x28198
movl $0x48, %edi
callq 0xa130
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x28293
leaq -0x1b518(%rip), %rsi    # 0xcc68
leaq -0x199cd(%rip), %rcx    # 0xe7ba
leaq 0x124(%rip), %r8        # 0x282b2
movq %rax, %rdi
xorl %edx, %edx
callq 0xc400
movq -0x30(%rbp), %r12
movq %r12, 0x28(%r14)
movq %r14, %rbx
addq $0x30, %rbx
leaq -0x199f4(%rip), %rdx    # 0xe7ba
movq %rbx, %rdi
xorl %esi, %esi
callq 0xbc84
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0xe2a3
leaq 0x70ad(%rip), %rdx      # 0x2f27b
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0xedfc
movq %r15, %rdi
callq 0xe772
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd779(%rip), %rdi      # 0x35978
leaq 0xd726(%rip), %rsi      # 0x3592c
leaq 0xd7ac(%rip), %rcx      # 0x359b9
movl $0x41c, %edx            # imm = 0x41C
callq 0xa0b0
leaq 0xd766(%rip), %rdi      # 0x35984
leaq 0xd707(%rip), %rsi      # 0x3592c
leaq 0xd78d(%rip), %rcx      # 0x359b9
movl $0x41d, %edx            # imm = 0x41D
callq 0xa0b0
leaq 0xd7eb(%rip), %rdi      # 0x35a28
leaq 0xd6e8(%rip), %rsi      # 0x3592c
leaq 0xd76e(%rip), %rcx      # 0x359b9
movl $0x41e, %edx            # imm = 0x41E
callq 0xa0b0
leaq 0xd7da(%rip), %rdi      # 0x35a36
leaq 0xd6c9(%rip), %rsi      # 0x3592c
leaq 0xd74f(%rip), %rcx      # 0x359b9
movl $0x41f, %edx            # imm = 0x41F
callq 0xa0b0
leaq 0xd7d9(%rip), %rdi      # 0x35a54
leaq 0xd6aa(%rip), %rsi      # 0x3592c
leaq 0xd730(%rip), %rcx      # 0x359b9
movl $0x42b, %edx            # imm = 0x42B
callq 0xa0b0
leaq 0xd7c6(%rip), %rdi      # 0x35a60
leaq 0xd68b(%rip), %rsi      # 0x3592c
leaq 0xd711(%rip), %rcx      # 0x359b9
movl $0x437, %edx            # imm = 0x437
callq 0xa0b0