	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfin_port_start
_bfin_port_start:                       ## @bfin_port_start
	.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	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	cmpq	$0, 16(%rbx)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_6
LBB0_2:
	movq	_CH_ATAPI_RX@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_request_dma
	testq	%rax, %rax
	js	LBB0_5
## %bb.3:
	movq	_CH_ATAPI_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_request_dma
	testq	%rax, %rax
	jns	LBB0_6
## %bb.4:
	movl	(%r14), %edi
	callq	_free_dma
LBB0_5:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
LBB0_6:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in atapi port start\n"

	.comm	_CH_ATAPI_RX,4,2                ## @CH_ATAPI_RX
L_.str.1:                               ## @.str.1
	.asciz	"BFIN ATAPI RX DMA"

	.comm	_CH_ATAPI_TX,4,2                ## @CH_ATAPI_TX
L_.str.2:                               ## @.str.2
	.asciz	"BFIN ATAPI TX DMA"

L_.str.3:                               ## @.str.3
	.asciz	"Unable to request ATAPI DMA! Continue in PIO mode.\n"

	.no_dead_strip	_bfin_port_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfin_port_start
_bfin_port_start:                       ; @bfin_port_start
	.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]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
LBB0_2:
Lloh2:
	adrp	x20, _CH_ATAPI_RX@GOTPAGE
Lloh3:
	ldr	x20, [x20, _CH_ATAPI_RX@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_request_dma
	tbnz	x0, #63, LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _CH_ATAPI_TX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CH_ATAPI_TX@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_request_dma
	tbz	x0, #63, LBB0_6
; %bb.4:
	ldr	w0, [x20]
	bl	_free_dma
LBB0_5:
	stp	xzr, xzr, [x19, #8]
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in atapi port start\n"

	.comm	_CH_ATAPI_RX,4,2                ; @CH_ATAPI_RX
l_.str.1:                               ; @.str.1
	.asciz	"BFIN ATAPI RX DMA"

	.comm	_CH_ATAPI_TX,4,2                ; @CH_ATAPI_TX
l_.str.2:                               ; @.str.2
	.asciz	"BFIN ATAPI TX DMA"

l_.str.3:                               ; @.str.3
	.asciz	"Unable to request ATAPI DMA! Continue in PIO mode.\n"

	.no_dead_strip	_bfin_port_start
.subsections_via_symbols
