// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/builtins_ir.c
// Function: prv_compute_whole_part
static void
prv_compute_whole_part(subtilis_parser_t *p, subtilis_ir_operand_t str_data,
		       subtilis_ir_operand_t ptr, subtilis_ir_operand_t ret_val,
		       subtilis_ir_operand_t factor, subtilis_error_t *err)
{
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t condee;
	subtilis_ir_operand_t byte;
	subtilis_ir_operand_t bytef;
	subtilis_ir_operand_t product;
	subtilis_ir_operand_t new_ptr;
	subtilis_ir_operand_t whole_start_label;
	subtilis_ir_operand_t process_whole_label;
	subtilis_ir_operand_t skip_whole_label;

	whole_start_label.label = subtilis_ir_section_new_label(p->current);
	process_whole_label.label = subtilis_ir_section_new_label(p->current);
	skip_whole_label.label = subtilis_ir_section_new_label(p->current);

	factor.reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_MOVFP, factor, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	new_ptr.reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_MOV, ptr, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, whole_start_label.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op1.integer = 1;
	subtilis_ir_section_add_instr_reg(
	    p->current, SUBTILIS_OP_INSTR_SUBI_I32, new_ptr, new_ptr, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	condee.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_GTE_I32, new_ptr, str_data, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC,
					  condee, process_whole_label,
					  skip_whole_label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, process_whole_label.label,
				      err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op1.integer = 0;
	byte.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I8, new_ptr, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op1.integer = '0';
	subtilis_ir_section_add_instr_reg(
	    p->current, SUBTILIS_OP_INSTR_SUBI_I32, byte, byte, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	bytef.reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_MOV_I32_FP, byte, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	product.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_MUL_REAL, bytef, factor, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op1.real = 10.0;
	subtilis_ir_section_add_instr_reg(
	    p->current, SUBTILIS_OP_INSTR_MULI_REAL, factor, factor, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_reg(p->current,
					  SUBTILIS_OP_INSTR_ADD_REAL, ret_val,
					  ret_val, product, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_no_reg(p->current, SUBTILIS_OP_INSTR_JMP,
					     whole_start_label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, skip_whole_label.label, err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %rdi, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rdx
movl $0x1e, %esi
callq 0x38490
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x41fa2
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rdx
movl $0x1d, %esi
callq 0x38490
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x41fce
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x68(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x39960
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x41ff1
jmp 0x42216
movl $0x1, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r9
movq -0x60(%rbp), %rdx
movq -0x60(%rbp), %rcx
movq -0x38(%rbp), %r8
movl $0xb, %esi
callq 0x38360
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x42028
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r8
movq -0x60(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x3f, %esi
callq 0x38230
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x42058
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r9
movq -0x40(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq -0x78(%rbp), %r8
movl $0x43, %esi
callq 0x38360
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x42088
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x70(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x39960
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x420ab
jmp 0x42216
movl $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r8
movq -0x60(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x11, %esi
callq 0x38230
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x420e2
jmp 0x42216
movl $0x30, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r9
movq -0x48(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %r8
movl $0xb, %esi
callq 0x38360
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x42119
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %rcx
movq -0x48(%rbp), %rdx
movl $0x51, %esi
callq 0x38490
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x42145
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r8
movq -0x50(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x5, %esi
callq 0x38230
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x42175
jmp 0x42216
movsd 0x6a0b3(%rip), %xmm0    # 0xac230
movsd %xmm0, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r9
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
movl $0xe, %esi
callq 0x38360
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x421af
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r9
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x58(%rbp), %r8
movl $0x1, %esi
callq 0x38360
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x421dc
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %rcx
movq -0x68(%rbp), %rdx
movl $0x45, %esi
callq 0x38540
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x42201
jmp 0x42216
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x78(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x39960
addq $0x80, %rsp
popq %rbp
retq
nop