// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser_string.c
// Function: prv_val_real
static subtilis_exp_t *prv_val_real(subtilis_parser_t *p, subtilis_token_t *t,
				    subtilis_exp_t *e, subtilis_error_t *err)
{
	const char *str;
	char *copy;
	char *ptr;
	size_t str_size;
	size_t str_reg;
	double ret_val = 0.0;

	if (e->type.type == SUBTILIS_TYPE_CONST_STRING) {
		str = subtilis_buffer_get_string(&e->exp.str);
		str_size = subtilis_buffer_get_size(&e->exp.str) - 1;
		if (str_size < 2 || (strcmp(str, "0x") && strcmp(str, "0X"))) {
			copy = malloc(str_size + 1);
			if (!copy) {
				subtilis_error_set_oom(err);
				subtilis_exp_delete(e);
				return NULL;
			}
			strcpy(copy, str);
			ptr = strchr(copy, 'e');
			if (ptr) {
				*ptr = 0;
			} else {
				ptr = strchr(copy, 'E');
				if (ptr)
					*ptr = 0;
			}
			ret_val = strtod(copy, NULL);
			if (isinf(ret_val)) {
				subtilis_error_set_number_too_long(
				    err, copy, p->l->stream->name, p->l->line);
				free(copy);
				subtilis_exp_delete(e);
				return NULL;
			}
			free(copy);
		}
		subtilis_exp_delete(e);
		return subtilis_exp_new_real(ret_val, err);
	} else if (e->type.type == SUBTILIS_TYPE_STRING) {
		str_reg = e->exp.ir_op.reg;
		subtilis_exp_delete(e);
		return subtilis_builtin_ir_call_str_to_fp(p, str_reg, err);
	}

	subtilis_error_set_string_expected(err, p->l->stream->name, p->l->line);
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x3384d
movq -0x20(%rbp), %rdi
addq $0x148, %rdi            # imm = 0x148
callq 0x16760
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
addq $0x148, %rdi            # imm = 0x148
callq 0x16270
subq $0x1, %rax
movq %rax, -0x48(%rbp)
cmpq $0x2, -0x48(%rbp)
jb 0x336d2
movq -0x30(%rbp), %rdi
leaq 0x77485(%rip), %rsi     # 0xaab30
callq 0x12140
cmpl $0x0, %eax
je 0x33830
movq -0x30(%rbp), %rdi
leaq 0x7746f(%rip), %rsi     # 0xaab33
callq 0x12140
cmpl $0x0, %eax
je 0x33830
movq -0x48(%rbp), %rdi
addq $0x1, %rdi
callq 0x121b0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x3371a
movq -0x28(%rbp), %rdi
movl $0x1, %esi
leaq 0x77416(%rip), %rdx     # 0xaab10
movl $0x1d8, %ecx            # imm = 0x1D8
callq 0x158e0
movq -0x20(%rbp), %rdi
callq 0x36ee0
movq $0x0, -0x8(%rbp)
jmp 0x338bf
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x12060
movq -0x38(%rbp), %rdi
movl $0x65, %esi
callq 0x120e0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x33749
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
jmp 0x3376b
movq -0x38(%rbp), %rdi
movl $0x45, %esi
callq 0x120e0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x33769
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
jmp 0x3376b
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12090
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm1
movaps %xmm1, %xmm0
movaps 0x77374(%rip), %xmm2    # 0xaab00
pand %xmm2, %xmm0
movq %xmm1, %rdx
movl $0x1, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovll %eax, %ecx
movsd 0x77342(%rip), %xmm1    # 0xaaaf0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setnp %sil
sete %dl
testb %sil, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x33827
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0x8, %esi
leaq 0x77a86(%rip), %rcx     # 0xab276
leaq 0x77319(%rip), %rax     # 0xaab10
movq %rax, (%rsp)
movl $0x1e8, 0x8(%rsp)       # imm = 0x1E8
callq 0x156d0
movq -0x38(%rbp), %rdi
callq 0x12290
movq -0x20(%rbp), %rdi
callq 0x36ee0
movq $0x0, -0x8(%rbp)
jmp 0x338bf
movq -0x38(%rbp), %rdi
callq 0x12290
movq -0x20(%rbp), %rdi
callq 0x36ee0
movsd -0x58(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x37880
movq %rax, -0x8(%rbp)
jmp 0x338bf
movq -0x20(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x33885
movq -0x20(%rbp), %rax
movq 0x148(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0x36ee0
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x43f70
movq %rax, -0x8(%rbp)
jmp 0x338bf
jmp 0x33887
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %ecx
movl $0x49, %esi
leaq 0x77264(%rip), %r8      # 0xaab10
movl $0x1f7, %r9d            # imm = 0x1F7
callq 0x15930
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)