// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/preprocessor/evaluator.c
// Function: eval_literal_string
static int _eval_literal_string(
	PPGeneratorContext *genctx,
	ParserASTNode *node
) {
	assert(genctx);
	assert(node);
	assert(node->type == _NODE_LITERAL_STRING);

	LexerToken *token = node->token;
	ResizableString rstr;
	rstr_init(&rstr);
	util_get_str_val(&rstr, token->content, token->len);
	const char *cstr = RSTR_CSTR(&rstr);
	int cstr_len = RSTR_LEN(&rstr);
	int result = 0;
	if (util_is_literal_int_bin(cstr, cstr_len)) {
		result = util_get_int_bin_val(cstr, cstr_len);
	} else if (util_is_literal_int_oct(cstr, cstr_len)) {
		result = util_get_int_oct_val(cstr, cstr_len);
	} else if (util_is_literal_int_dec(cstr, cstr_len)) {
		result = util_get_int_dec_val(cstr, cstr_len);
	} else if (util_is_literal_int_hex(cstr, cstr_len)) {
		result = util_get_int_hex_val(cstr, cstr_len);
	} else {
		result = 0;
	}
	rstr_free(&rstr);

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3c9a9
jmp 0x3c9c8
leaq 0x12214(%rip), %rdi     # 0x4ebc4
leaq 0x12214(%rip), %rsi     # 0x4ebcb
movl $0x461, %edx            # imm = 0x461
leaq 0x124cf(%rip), %rcx     # 0x4ee92
callq 0xa0b0
cmpq $0x0, -0x10(%rbp)
je 0x3c9d1
jmp 0x3c9f0
leaq 0xe6af(%rip), %rdi      # 0x4b087
leaq 0x121ec(%rip), %rsi     # 0x4ebcb
movl $0x462, %edx            # imm = 0x462
leaq 0x124a7(%rip), %rcx     # 0x4ee92
callq 0xa0b0
movq -0x10(%rbp), %rax
cmpl $0x302, (%rax)          # imm = 0x302
jne 0x3c9fe
jmp 0x3ca1d
leaq 0x124cd(%rip), %rdi     # 0x4eed2
leaq 0x121bf(%rip), %rsi     # 0x4ebcb
movl $0x463, %edx            # imm = 0x463
leaq 0x1247a(%rip), %rcx     # 0x4ee92
callq 0xa0b0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xfca0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
leaq -0x28(%rbp), %rdi
callq 0x13770
cmpq $0x0, -0x20(%rbp)
jne 0x3ca5e
leaq 0xae2f(%rip), %rax      # 0x47887
movq %rax, -0x40(%rbp)
jmp 0x3ca66
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x13070
testb $0x1, %al
jne 0x3ca8d
jmp 0x3ca9e
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x13be0
movl %eax, -0x38(%rbp)
jmp 0x3cb14
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x131f0
testb $0x1, %al
jne 0x3cab0
jmp 0x3cac1
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x13e90
movl %eax, -0x38(%rbp)
jmp 0x3cb12
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x13350
testb $0x1, %al
jne 0x3cad3
jmp 0x3cae4
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x14120
movl %eax, -0x38(%rbp)
jmp 0x3cb10
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x13560
testb $0x1, %al
jne 0x3caf6
jmp 0x3cb07
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x14490
movl %eax, -0x38(%rbp)
jmp 0x3cb0e
movl $0x0, -0x38(%rbp)
jmp 0x3cb10
jmp 0x3cb12
jmp 0x3cb14
leaq -0x28(%rbp), %rdi
callq 0x10320
movl -0x38(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)