	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sti_hqvdp_init
_sti_hqvdp_init:                        ## @sti_hqvdp_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_sti_hqvdp_vtg_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rdi)
	movq	_NB_VDP_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	shll	$2, %ebx
	movl	16(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	_GFP_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	-24(%rbp), %rdx
	movl	%ebx, %esi
	callq	_dma_alloc_wc
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	-24(%rbp), %rcx
	movq	%rcx, 8(%r14)
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sti_hqvdp_vtg_cb,4,2           ## @sti_hqvdp_vtg_cb
	.comm	_NB_VDP_CMD,4,2                 ## @NB_VDP_CMD
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate memory for VDP cmd\n"

	.no_dead_strip	_sti_hqvdp_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sti_hqvdp_init
_sti_hqvdp_init:                        ; @sti_hqvdp_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _sti_hqvdp_vtg_cb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sti_hqvdp_vtg_cb@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #20]
Lloh3:
	adrp	x8, _NB_VDP_CMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NB_VDP_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w20, w8, #2
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w0, [x0, #16]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x2, sp, #8
	mov	x1, x20
	bl	_dma_alloc_wc
	str	w0, [x19]
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [sp, #8]
	str	x8, [x19, #8]
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	b	LBB0_3
LBB0_2:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_sti_hqvdp_vtg_cb,4,2           ; @sti_hqvdp_vtg_cb
	.comm	_NB_VDP_CMD,4,2                 ; @NB_VDP_CMD
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate memory for VDP cmd\n"

	.no_dead_strip	_sti_hqvdp_init
.subsections_via_symbols
