// File: /workspace/github_c_makefile_star2_O0/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
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3cce9
jmp 0x3cd08
leaq 0x12251(%rip), %rdi     # 0x4ef41
leaq 0x121fe(%rip), %rsi     # 0x4eef5
movl $0x41c, %edx            # imm = 0x41C
leaq 0x1227f(%rip), %rcx     # 0x4ef82
callq 0xa0b0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3cd15
jmp 0x3cd34
leaq 0x12231(%rip), %rdi     # 0x4ef4d
leaq 0x121d2(%rip), %rsi     # 0x4eef5
movl $0x41d, %edx            # imm = 0x41D
leaq 0x12253(%rip), %rcx     # 0x4ef82
callq 0xa0b0
cmpq $0x0, -0x10(%rbp)
je 0x3cd3d
jmp 0x3cd5c
leaq 0x122ad(%rip), %rdi     # 0x4eff1
leaq 0x121aa(%rip), %rsi     # 0x4eef5
movl $0x41e, %edx            # imm = 0x41E
leaq 0x1222b(%rip), %rcx     # 0x4ef82
callq 0xa0b0
cmpq $0x0, -0x28(%rbp)
jne 0x3cd6a
cmpq $0x0, -0x30(%rbp)
je 0x3cd6c
jmp 0x3cd8b
leaq 0x1228c(%rip), %rdi     # 0x4efff
leaq 0x1217b(%rip), %rsi     # 0x4eef5
movl $0x41f, %edx            # imm = 0x41F
leaq 0x121fc(%rip), %rcx     # 0x4ef82
callq 0xa0b0
movl $0x58, %edi
callq 0xa130
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x3cdd1
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x3ce33
movl $0x48, %edi
callq 0xa130
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3cdf3
jmp 0x3ce12
leaq 0x12223(%rip), %rdi     # 0x4f01d
leaq 0x120f4(%rip), %rsi     # 0x4eef5
movl $0x42b, %edx            # imm = 0x42B
leaq 0x12175(%rip), %rcx     # 0x4ef82
callq 0xa0b0
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x2eec1(%rip), %rdx    # 0xdf60
leaq -0x2ca88(%rip), %r8     # 0x103a0
movq %rdx, %rsi
movq %r8, %rcx
callq 0xd210
cmpq $0x0, -0x20(%rbp)
je 0x3ce48
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x3ceaf
movl $0x48, %edi
callq 0xa130
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x3ce6a
jmp 0x3ce89
leaq 0x121b8(%rip), %rdi     # 0x4f029
leaq 0x1207d(%rip), %rsi     # 0x4eef5
movl $0x437, %edx            # imm = 0x437
leaq 0x120fe(%rip), %rcx     # 0x4ef82
callq 0xa0b0
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x2ef38(%rip), %rsi    # 0xdf60
xorl %eax, %eax
movl %eax, %edx
leaq -0x2cb03(%rip), %rcx    # 0x103a0
leaq 0x66(%rip), %r8         # 0x3cf10
callq 0xd210
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x2cb2e(%rip), %rdx    # 0x103a0
callq 0xc760
movq -0x10(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0xfd00
movq -0x38(%rbp), %rdi
addq $0x30, %rdi
leaq -0x48(%rbp), %rsi
leaq 0xb48f(%rip), %rdx      # 0x48382
movl $0x1, %ecx
callq 0x10ce0
leaq -0x48(%rbp), %rdi
callq 0x10320
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq