	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bochs_hw_setmode               ## -- Begin function bochs_hw_setmode
	.p2align	4, 0x90
_bochs_hw_setmode:                      ## @bochs_hw_setmode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rsi), %ecx
	movl	%ecx, (%rdi)
	movl	4(%rsi), %r8d
	movl	%r8d, 4(%rdi)
	movl	$32, 8(%rdi)
	leal	(,%rcx,4), %esi
	movl	%esi, 12(%rdi)
	movl	20(%rdi), %eax
	cltd
	idivl	%esi
	movl	%eax, 16(%rdi)
	leaq	L_.str(%rip), %rdi
	movl	%ecx, %esi
	movl	%r8d, %edx
	movl	$32, %ecx
	movl	%eax, %r8d
	callq	_DRM_DEBUG_DRIVER
	movq	%rbx, %rdi
	movl	$960, %esi                      ## imm = 0x3C0
	movl	$32, %edx
	callq	_bochs_vga_writeb
	movq	_VBE_DISPI_INDEX_ENABLE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_BPP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edx
	movq	%rbx, %rdi
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_XRES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_YRES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_BANK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_VIRT_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_VIRT_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %edx
	movq	%rbx, %rdi
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_X_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bochs_dispi_write
	movq	_VBE_DISPI_INDEX_Y_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bochs_dispi_write
	movl	(%r14), %esi
	movq	_VBE_DISPI_ENABLED@GOTPCREL(%rip), %rax
	movq	_VBE_DISPI_LFB_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_bochs_dispi_write              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%dx%d @ %d bpp, vy %d\n"

	.comm	_VBE_DISPI_INDEX_ENABLE,4,2     ## @VBE_DISPI_INDEX_ENABLE
	.comm	_VBE_DISPI_INDEX_BPP,4,2        ## @VBE_DISPI_INDEX_BPP
	.comm	_VBE_DISPI_INDEX_XRES,4,2       ## @VBE_DISPI_INDEX_XRES
	.comm	_VBE_DISPI_INDEX_YRES,4,2       ## @VBE_DISPI_INDEX_YRES
	.comm	_VBE_DISPI_INDEX_BANK,4,2       ## @VBE_DISPI_INDEX_BANK
	.comm	_VBE_DISPI_INDEX_VIRT_WIDTH,4,2 ## @VBE_DISPI_INDEX_VIRT_WIDTH
	.comm	_VBE_DISPI_INDEX_VIRT_HEIGHT,4,2 ## @VBE_DISPI_INDEX_VIRT_HEIGHT
	.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
	.comm	_VBE_DISPI_ENABLED,4,2          ## @VBE_DISPI_ENABLED
	.comm	_VBE_DISPI_LFB_ENABLED,4,2      ## @VBE_DISPI_LFB_ENABLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bochs_hw_setmode               ; -- Begin function bochs_hw_setmode
	.p2align	2
_bochs_hw_setmode:                      ; @bochs_hw_setmode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldp	w8, w2, [x1]
	stp	w8, w2, [x0]
	mov	w9, #32
	lsl	w10, w8, #2
	stp	w9, w10, [x0, #8]
	ldr	w9, [x0, #20]
	sdiv	w4, w9, w10
	str	w4, [x0, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x8
	mov	w3, #32
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x19
	mov	w1, #960
	mov	w2, #32
	bl	_bochs_vga_writeb
Lloh2:
	adrp	x20, _VBE_DISPI_INDEX_ENABLE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _VBE_DISPI_INDEX_ENABLE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_bochs_dispi_write
Lloh4:
	adrp	x8, _VBE_DISPI_INDEX_BPP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VBE_DISPI_INDEX_BPP@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	mov	x0, x19
	bl	_bochs_dispi_write
Lloh7:
	adrp	x8, _VBE_DISPI_INDEX_XRES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VBE_DISPI_INDEX_XRES@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_bochs_dispi_write
Lloh10:
	adrp	x8, _VBE_DISPI_INDEX_YRES@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VBE_DISPI_INDEX_YRES@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	mov	x0, x19
	bl	_bochs_dispi_write
Lloh13:
	adrp	x8, _VBE_DISPI_INDEX_BANK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VBE_DISPI_INDEX_BANK@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bochs_dispi_write
Lloh16:
	adrp	x8, _VBE_DISPI_INDEX_VIRT_WIDTH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VBE_DISPI_INDEX_VIRT_WIDTH@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_bochs_dispi_write
Lloh19:
	adrp	x8, _VBE_DISPI_INDEX_VIRT_HEIGHT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VBE_DISPI_INDEX_VIRT_HEIGHT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [x19, #16]
	mov	x0, x19
	bl	_bochs_dispi_write
Lloh22:
	adrp	x8, _VBE_DISPI_INDEX_X_OFFSET@GOTPAGE
Lloh23:
	ldr	x8, [x8, _VBE_DISPI_INDEX_X_OFFSET@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bochs_dispi_write
Lloh25:
	adrp	x8, _VBE_DISPI_INDEX_Y_OFFSET@GOTPAGE
Lloh26:
	ldr	x8, [x8, _VBE_DISPI_INDEX_Y_OFFSET@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bochs_dispi_write
	ldr	w1, [x20]
Lloh28:
	adrp	x8, _VBE_DISPI_ENABLED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _VBE_DISPI_ENABLED@GOTPAGEOFF]
Lloh30:
	adrp	x9, _VBE_DISPI_LFB_ENABLED@GOTPAGE
Lloh31:
	ldr	x9, [x9, _VBE_DISPI_LFB_ENABLED@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_bochs_dispi_write
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh32
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%dx%d @ %d bpp, vy %d\n"

	.comm	_VBE_DISPI_INDEX_ENABLE,4,2     ; @VBE_DISPI_INDEX_ENABLE
	.comm	_VBE_DISPI_INDEX_BPP,4,2        ; @VBE_DISPI_INDEX_BPP
	.comm	_VBE_DISPI_INDEX_XRES,4,2       ; @VBE_DISPI_INDEX_XRES
	.comm	_VBE_DISPI_INDEX_YRES,4,2       ; @VBE_DISPI_INDEX_YRES
	.comm	_VBE_DISPI_INDEX_BANK,4,2       ; @VBE_DISPI_INDEX_BANK
	.comm	_VBE_DISPI_INDEX_VIRT_WIDTH,4,2 ; @VBE_DISPI_INDEX_VIRT_WIDTH
	.comm	_VBE_DISPI_INDEX_VIRT_HEIGHT,4,2 ; @VBE_DISPI_INDEX_VIRT_HEIGHT
	.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
	.comm	_VBE_DISPI_ENABLED,4,2          ; @VBE_DISPI_ENABLED
	.comm	_VBE_DISPI_LFB_ENABLED,4,2      ; @VBE_DISPI_LFB_ENABLED
.subsections_via_symbols
