	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx_vga_hw_init
_zx_vga_hw_init:                        ## @zx_vga_hw_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_clk_get_rate
	shrq	$3, %rax
	movabsq	$2361183241434822607, %rcx      ## imm = 0x20C49BA5E353F7CF
	mulq	%rcx
	movq	%rdx, %rdi
	shrq	$4, %rdi
	movl	$1600, %esi                     ## imm = 0x640
	callq	_DIV_ROUND_UP
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %esi
	movq	_VGA_CLK_DIV_FS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_zx_writel
	movq	_VGA_AUTO_DETECT_PARA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movl	$128, %esi
	callq	_zx_writel
	movq	_VGA_AUTO_DETECT_SEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movq	_VGA_DETECT_SEL_NO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_zx_writel
	movq	_VGA_DEVICE_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movq	_DDC_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_zx_writel
	movq	_VGA_CMD_CFG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movq	_VGA_CMD_TRANS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_zx_writel_mask                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VGA_CLK_DIV_FS,8,3             ## @VGA_CLK_DIV_FS
	.comm	_VGA_AUTO_DETECT_PARA,8,3       ## @VGA_AUTO_DETECT_PARA
	.comm	_VGA_AUTO_DETECT_SEL,8,3        ## @VGA_AUTO_DETECT_SEL
	.comm	_VGA_DETECT_SEL_NO_DEVICE,4,2   ## @VGA_DETECT_SEL_NO_DEVICE
	.comm	_VGA_DEVICE_ADDR,8,3            ## @VGA_DEVICE_ADDR
	.comm	_DDC_ADDR,4,2                   ## @DDC_ADDR
	.comm	_VGA_CMD_CFG,8,3                ## @VGA_CMD_CFG
	.comm	_VGA_CMD_TRANS,4,2              ## @VGA_CMD_TRANS
	.no_dead_strip	_zx_vga_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx_vga_hw_init
_zx_vga_hw_init:                        ; @zx_vga_hw_init
	.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
	ldr	w0, [x0, #8]
	bl	_clk_get_rate
	lsr	x8, x0, #3
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	umulh	x8, x8, x9
	lsr	x0, x8, #4
	mov	w1, #1600
	bl	_DIV_ROUND_UP
	sub	w1, w0, #1
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _VGA_CLK_DIV_FS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VGA_CLK_DIV_FS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_zx_writel
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _VGA_AUTO_DETECT_PARA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VGA_AUTO_DETECT_PARA@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	w1, #128
	bl	_zx_writel
Lloh6:
	adrp	x8, _VGA_AUTO_DETECT_SEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VGA_AUTO_DETECT_SEL@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh8:
	ldr	x8, [x8]
	add	x0, x8, x9
Lloh9:
	adrp	x8, _VGA_DETECT_SEL_NO_DEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VGA_DETECT_SEL_NO_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_zx_writel
Lloh12:
	adrp	x8, _VGA_DEVICE_ADDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VGA_DEVICE_ADDR@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh14:
	ldr	x8, [x8]
	add	x0, x8, x9
Lloh15:
	adrp	x8, _DDC_ADDR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DDC_ADDR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_zx_writel
	ldr	x8, [x19]
Lloh18:
	adrp	x9, _VGA_CMD_CFG@GOTPAGE
Lloh19:
	ldr	x9, [x9, _VGA_CMD_CFG@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x0, x9, x8
Lloh21:
	adrp	x8, _VGA_CMD_TRANS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VGA_CMD_TRANS@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x2, x1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_zx_writel_mask
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VGA_CLK_DIV_FS,8,3             ; @VGA_CLK_DIV_FS
	.comm	_VGA_AUTO_DETECT_PARA,8,3       ; @VGA_AUTO_DETECT_PARA
	.comm	_VGA_AUTO_DETECT_SEL,8,3        ; @VGA_AUTO_DETECT_SEL
	.comm	_VGA_DETECT_SEL_NO_DEVICE,4,2   ; @VGA_DETECT_SEL_NO_DEVICE
	.comm	_VGA_DEVICE_ADDR,8,3            ; @VGA_DEVICE_ADDR
	.comm	_DDC_ADDR,4,2                   ; @DDC_ADDR
	.comm	_VGA_CMD_CFG,8,3                ; @VGA_CMD_CFG
	.comm	_VGA_CMD_TRANS,4,2              ; @VGA_CMD_TRANS
	.no_dead_strip	_zx_vga_hw_init
.subsections_via_symbols
