	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bochs_hw_setbase               ## -- Begin function bochs_hw_setbase
	.p2align	4, 0x90
_bochs_hw_setbase:                      ## @bochs_hw_setbase
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r9d
	movq	%rdi, %r15
	movl	%ecx, (%rdi)
	movl	%ecx, %eax
	imull	%edx, %eax
	cltq
	addq	%r8, %rax
	movslq	4(%rdi), %rdi
	leal	7(%rdi), %edx
	testq	%rdi, %rdi
	cmovnsl	%edi, %edx
	sarl	$3, %edx
	imull	%esi, %edx
	movslq	%edx, %r10
	addq	%rax, %r10
	movslq	%ecx, %rbx
	movq	%r10, %rax
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%r10, %rax
	xorl	%edx, %edx
	divq	%rbx
	movq	%rax, %r14
	jmp	LBB0_3
LBB0_1:
	movl	%r10d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	movl	%eax, %r14d
LBB0_3:
	shlq	$3, %rdx
	movq	%rdx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%rdx, %rax
	xorl	%edx, %edx
	divq	%rdi
	movq	%rax, %r12
	jmp	LBB0_6
LBB0_4:
	movl	%edx, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %r12d
LBB0_6:
	shll	$3, %ecx
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%eax, %r13d
	movl	%r14d, (%rsp)
	leaq	L_.str(%rip), %rdi
	movl	%r9d, %edx
	movq	%r8, %rcx
	movq	%r10, %r8
	movl	%r12d, %r9d
	callq	_DRM_DEBUG_DRIVER
	movq	_VBE_DISPI_INDEX_VIRT_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_X_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_Y_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bochs_dispi_write              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"x %d, y %d, addr %llx -> offset %lx, vx %d, vy %d\n"

	.comm	_VBE_DISPI_INDEX_VIRT_WIDTH,4,2 ## @VBE_DISPI_INDEX_VIRT_WIDTH
	.comm	_VBE_DISPI_INDEX_X_OFFSET,4,2   ## @VBE_DISPI_INDEX_X_OFFSET
	.comm	_VBE_DISPI_INDEX_Y_OFFSET,4,2   ## @VBE_DISPI_INDEX_Y_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bochs_hw_setbase               ; -- Begin function bochs_hw_setbase
	.p2align	2
_bochs_hw_setbase:                      ; @bochs_hw_setbase
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x8, x4
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x19, x0
	str	w3, [x0]
	mul	w9, w3, w2
	add	x9, x4, w9, sxtw
	ldrsw	x10, [x0, #4]
	add	w11, w10, #7
	cmp	w10, #0
	csel	w11, w11, w10, lt
	asr	w11, w11, #3
	mul	w11, w11, w1
	add	x4, x9, w11, sxtw
	sxtw	x9, w3
	udiv	x20, x4, x9
	msub	x9, x20, x9, x4
	lsl	x9, x9, #3
	lsl	w11, w3, #3
	sdiv	w21, w11, w10
	udiv	x22, x9, x10
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x8
	mov	x5, x22
	mov	x6, x20
	bl	_DRM_DEBUG_DRIVER
Lloh2:
	adrp	x8, _VBE_DISPI_INDEX_VIRT_WIDTH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VBE_DISPI_INDEX_VIRT_WIDTH@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_bochs_dispi_write
Lloh5:
	adrp	x8, _VBE_DISPI_INDEX_X_OFFSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VBE_DISPI_INDEX_X_OFFSET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_bochs_dispi_write
Lloh8:
	adrp	x8, _VBE_DISPI_INDEX_Y_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VBE_DISPI_INDEX_Y_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_bochs_dispi_write
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"x %d, y %d, addr %llx -> offset %lx, vx %d, vy %d\n"

	.comm	_VBE_DISPI_INDEX_VIRT_WIDTH,4,2 ; @VBE_DISPI_INDEX_VIRT_WIDTH
	.comm	_VBE_DISPI_INDEX_X_OFFSET,4,2   ; @VBE_DISPI_INDEX_X_OFFSET
	.comm	_VBE_DISPI_INDEX_Y_OFFSET,4,2   ; @VBE_DISPI_INDEX_Y_OFFSET
.subsections_via_symbols
