	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_transfer_pio
_bcm2835_transfer_pio:                  ## @bcm2835_transfer_pio
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	16(%rdi), %r14
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	xorl	%esi, %esi
	andl	(%rax), %r15d
	setne	%sil
	callq	_bcm2835_transfer_block_pio
	movq	_SDHSTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_SDHSTS_CRC16_ERROR@GOTPCREL(%rip), %rcx
	movq	_SDHSTS_CRC7_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_SDHSTS_FIFO_ERROR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_2
## %bb.1:
	movq	_EILSEQ@GOTPCREL(%rip), %r12
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_2:
	movq	_SDHSTS_CMD_TIME_OUT@GOTPCREL(%rip), %rcx
	movq	_SDHSTS_REW_TIME_OUT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_5
## %bb.3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %r12
	leaq	L_.str.3(%rip), %rsi
LBB0_4:
	testl	%r15d, %r15d
	leaq	L_.str.1(%rip), %rcx
	leaq	L_.str.2(%rip), %rdx
	cmovneq	%rcx, %rdx
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_dev_err
	xorl	%eax, %eax
	subl	(%r12), %eax
	movq	(%rbx), %rcx
	movl	%eax, 4(%rcx)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_SDHSTS,8,3                     ## @SDHSTS
	.comm	_SDHSTS_CRC16_ERROR,4,2         ## @SDHSTS_CRC16_ERROR
	.comm	_SDHSTS_CRC7_ERROR,4,2          ## @SDHSTS_CRC7_ERROR
	.comm	_SDHSTS_FIFO_ERROR,4,2          ## @SDHSTS_FIFO_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s transfer error - HSTS %08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"read"

L_.str.2:                               ## @.str.2
	.asciz	"write"

	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_SDHSTS_CMD_TIME_OUT,4,2        ## @SDHSTS_CMD_TIME_OUT
	.comm	_SDHSTS_REW_TIME_OUT,4,2        ## @SDHSTS_REW_TIME_OUT
L_.str.3:                               ## @.str.3
	.asciz	"%s timeout error - HSTS %08x\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_bcm2835_transfer_pio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_transfer_pio
_bcm2835_transfer_pio:                  ; @bcm2835_transfer_pio
	.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	x19, x0
	ldr	x20, [x0, #16]
	ldr	x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ands	w21, w9, w8
	cset	w1, ne
	bl	_bcm2835_transfer_block_pio
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _SDHSTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SDHSTS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x3, x0
Lloh6:
	adrp	x8, _SDHSTS_CRC16_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDHSTS_CRC16_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _SDHSTS_CRC7_ERROR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SDHSTS_CRC7_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _SDHSTS_FIFO_ERROR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SDHSTS_FIFO_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh15:
	adrp	x22, _EILSEQ@GOTPAGE
Lloh16:
	ldr	x22, [x22, _EILSEQ@GOTPAGEOFF]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh19:
	adrp	x8, _SDHSTS_CMD_TIME_OUT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SDHSTS_CMD_TIME_OUT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _SDHSTS_REW_TIME_OUT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SDHSTS_REW_TIME_OUT@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w3
	b.eq	LBB0_5
; %bb.3:
Lloh25:
	adrp	x22, _ETIMEDOUT@GOTPAGE
Lloh26:
	ldr	x22, [x22, _ETIMEDOUT@GOTPAGEOFF]
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_4:
Lloh29:
	adrp	x8, l_.str.2@PAGE
Lloh30:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh31:
	adrp	x9, l_.str.1@PAGE
Lloh32:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w21, #0
	csel	x2, x9, x8, ne
	mov	x0, x20
	bl	_dev_err
	ldr	w8, [x22]
	neg	w8, w8
	ldr	x9, [x19]
	str	w8, [x9, #4]
LBB0_5:
	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
	ret
	.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
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_SDHSTS,8,3                     ; @SDHSTS
	.comm	_SDHSTS_CRC16_ERROR,4,2         ; @SDHSTS_CRC16_ERROR
	.comm	_SDHSTS_CRC7_ERROR,4,2          ; @SDHSTS_CRC7_ERROR
	.comm	_SDHSTS_FIFO_ERROR,4,2          ; @SDHSTS_FIFO_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s transfer error - HSTS %08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"read"

l_.str.2:                               ; @.str.2
	.asciz	"write"

	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_SDHSTS_CMD_TIME_OUT,4,2        ; @SDHSTS_CMD_TIME_OUT
	.comm	_SDHSTS_REW_TIME_OUT,4,2        ; @SDHSTS_REW_TIME_OUT
l_.str.3:                               ; @.str.3
	.asciz	"%s timeout error - HSTS %08x\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_bcm2835_transfer_pio
.subsections_via_symbols
