// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/parser_output.c
// Function: prv_vdu_2bytes
static void prv_vdu_2bytes(subtilis_parser_t *p, subtilis_exp_t *e,
			   subtilis_error_t *err)
{
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t op2;

	if (e->type.type == SUBTILIS_TYPE_INTEGER) {
		op2.integer = 0xff;
		op1.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_ANDI_I32, e->exp.ir_op, op2,
		    err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_VDU, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		if (!p->settings.ignore_graphics_errors) {
			subtilis_exp_handle_errors(p, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
		op2.integer = 8;
		op1.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_LSRI_I32, e->exp.ir_op, op2,
		    err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_VDU, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	} else if (e->type.type == SUBTILIS_TYPE_CONST_INTEGER) {
		op1.integer = e->exp.ir_op.integer & 0xff;
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_VDUI, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		if (!p->settings.ignore_graphics_errors) {
			subtilis_exp_handle_errors(p, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
		op1.integer = (e->exp.ir_op.integer >> 8) & 0xff;
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_VDUI, op1, err);
	} else {
		subtilis_error_set_assertion_failed(err);
		return;
	}
	if (!p->settings.ignore_graphics_errors)
		subtilis_exp_handle_errors(p, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl (%rsi), %eax
cmpl $0x1, %eax
je 0x2571f
cmpl $0x5, %eax
jne 0x25741
movq 0x48(%r14), %rdi
movq 0x148(%r15), %rdx
pushq $0x25
popq %rsi
movl $0xff, %ecx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x2573b
movq 0x48(%r14), %rdi
pushq $0x71
popq %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2a997
cmpl $0x0, (%rbx)
jne 0x2573b
cmpb $0x0, 0xb9(%r14)
jne 0x256e8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29c49
cmpl $0x0, (%rbx)
jne 0x2573b
movq 0x48(%r14), %rdi
movq 0x148(%r15), %rdx
pushq $0x4e
popq %rsi
pushq $0x8
popq %rcx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x2573b
movq 0x48(%r14), %rdi
pushq $0x71
popq %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2a997
cmpl $0x0, (%rbx)
jne 0x2573b
jmp 0x2578c
movzbl 0x148(%r15), %edx
movq 0x48(%r14), %rdi
pushq $0x70
popq %rsi
movq %rbx, %rcx
callq 0x2a997
cmpl $0x0, (%rbx)
je 0x2575b
popq %rbx
popq %r14
popq %r15
retq
leaq 0x482b7(%rip), %rdx     # 0x6d9ff
pushq $0xf
popq %rsi
pushq $0x5d
popq %rcx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1429e
cmpb $0x0, 0xb9(%r14)
jne 0x25775
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29c49
cmpl $0x0, (%rbx)
jne 0x2573b
movzbl 0x149(%r15), %edx
movq 0x48(%r14), %rdi
pushq $0x70
popq %rsi
movq %rbx, %rcx
callq 0x2a997
cmpb $0x0, 0xb9(%r14)
jne 0x2573b
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x29c49