// File: /workspace/github_c_makefile_star2_O2/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 0x26d8c
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x26dab
testq %rsi, %rsi
je 0x26dca
movq %r9, %r13
movq %r8, %r15
movq %rcx, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
movq %r8, %rax
orq %r9, %rax
je 0x26de9
movq %rdx, %r12
pushq $0x58
popq %rdi
callq 0xa120
movq %rax, %r14
movq %rbx, (%rax)
movq %r15, 0x8(%rax)
movq %r13, 0x10(%rax)
testq %r12, %r12
je 0x26cba
movq %r12, 0x18(%r14)
jmp 0x26ceb
pushq $0x48
popq %rdi
callq 0xa120
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x26e08
leaq -0x1a397(%rip), %rdx    # 0xc93f
leaq -0x189e3(%rip), %rcx    # 0xe2fa
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %r8
callq 0xc13c
movq -0x38(%rbp), %rax
testq %rax, %rax
je 0x26cfa
movq %rax, 0x20(%r14)
jmp 0x26d2e
pushq $0x48
popq %rdi
callq 0xa120
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x26e27
leaq -0x1a3d7(%rip), %rsi    # 0xc93f
leaq -0x18a23(%rip), %rcx    # 0xe2fa
leaq 0x122(%rip), %r8        # 0x26e46
movq %rax, %rdi
xorl %edx, %edx
callq 0xc13c
movq -0x30(%rbp), %r12
movq %r12, 0x28(%r14)
movq %r14, %rbx
addq $0x30, %rbx
leaq -0x18a4a(%rip), %rdx    # 0xe2fa
movq %rbx, %rdi
xorl %esi, %esi
callq 0xba38
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0xde49
leaq 0x752b(%rip), %rdx      # 0x2e28f
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe92b
movq %r15, %rdi
callq 0xe2b9
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdc75(%rip), %rdi      # 0x34a08
leaq 0xdc22(%rip), %rsi      # 0x349bc
leaq 0xdca8(%rip), %rcx      # 0x34a49
movl $0x41c, %edx            # imm = 0x41C
callq 0xa0b0
leaq 0xdc62(%rip), %rdi      # 0x34a14
leaq 0xdc03(%rip), %rsi      # 0x349bc
leaq 0xdc89(%rip), %rcx      # 0x34a49
movl $0x41d, %edx            # imm = 0x41D
callq 0xa0b0
leaq 0xdce7(%rip), %rdi      # 0x34ab8
leaq 0xdbe4(%rip), %rsi      # 0x349bc
leaq 0xdc6a(%rip), %rcx      # 0x34a49
movl $0x41e, %edx            # imm = 0x41E
callq 0xa0b0
leaq 0xdcd6(%rip), %rdi      # 0x34ac6
leaq 0xdbc5(%rip), %rsi      # 0x349bc
leaq 0xdc4b(%rip), %rcx      # 0x34a49
movl $0x41f, %edx            # imm = 0x41F
callq 0xa0b0
leaq 0xdcd5(%rip), %rdi      # 0x34ae4
leaq 0xdba6(%rip), %rsi      # 0x349bc
leaq 0xdc2c(%rip), %rcx      # 0x34a49
movl $0x42b, %edx            # imm = 0x42B
callq 0xa0b0
leaq 0xdcc2(%rip), %rdi      # 0x34af0
leaq 0xdb87(%rip), %rsi      # 0x349bc
leaq 0xdc0d(%rip), %rcx      # 0x34a49
movl $0x437, %edx            # imm = 0x437
callq 0xa0b0