	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_request
_bcm2835_request:                       ## @bcm2835_request
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_mmc_priv
	movq	%rax, %r14
	movq	56(%rax), %r12
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	$0, (%rax)
LBB0_2:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	$0, (%rax)
LBB0_4:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	$0, 16(%rax)
LBB0_6:
	movq	24(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.7:
	movq	$0, (%rcx)
LBB0_8:
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movl	12(%rax), %edi
	callq	_is_power_of_2
	testl	%eax, %eax
	je	LBB0_10
LBB0_13:
	movq	%r14, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	32(%r14), %rdi
	callq	_WARN_ON
	movq	%rbx, 32(%r14)
	movq	_SDEDM@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	48(%r14), %rdi
	callq	_readl
	movl	%eax, %r13d
	movq	_SDEDM_FSM_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r13d, %eax
	movq	_SDEDM_FSM_IDENTMODE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_18
## %bb.14:
	movq	_SDEDM_FSM_DATAMODE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_18
## %bb.15:
	movq	_SDCMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	48(%r14), %rdi
	callq	_readl
	movq	_SDCMD_CMD_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r14, %rdi
	callq	_bcm2835_dumpregs
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_EILSEQ@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subq	(%rcx), %rdx
	movq	%rdx, (%rax)
LBB0_17:
	movq	%r14, %rdi
	callq	_bcm2835_finish_request
	jmp	LBB0_34
LBB0_18:
	cmpq	$0, 40(%r14)
	je	LBB0_22
## %bb.19:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_22
## %bb.20:
	movq	(%rsi), %rax
	movq	_PIO_THRESHOLD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_22
## %bb.21:
	movq	%r14, %rdi
	callq	_bcm2835_prepare_dma
LBB0_22:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_26
## %bb.23:
	movq	32(%r14), %rax
	movq	16(%rax), %rax
	testq	%rax, %rax
	je	LBB0_26
## %bb.24:
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	andl	8(%rax), %ecx
	setne	%dl
	movl	%edx, (%r14)
	je	LBB0_27
## %bb.25:
	movq	%r14, %rdi
	callq	_bcm2835_send_command
	testq	%rax, %rax
	jne	LBB0_32
	jmp	LBB0_34
LBB0_10:
	movq	16(%rbx), %rax
	movl	12(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subq	(%rcx), %rdx
	movq	%rdx, (%rax)
LBB0_12:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_request_done               ## TAILCALL
LBB0_26:
	movl	$0, (%r14)
LBB0_27:
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_34
## %bb.28:
	movq	%r14, %rdi
	callq	_bcm2835_send_command
	testq	%rax, %rax
	je	LBB0_34
## %bb.29:
	cmpq	$0, 24(%r14)
	je	LBB0_32
## %bb.30:
	cmpq	$0, 16(%r14)
	je	LBB0_32
## %bb.31:
	movq	%r14, %rdi
	callq	_bcm2835_start_dma
LBB0_32:
	cmpl	$0, 8(%r14)
	jne	LBB0_34
## %bb.33:
	movq	%r14, %rdi
	callq	_bcm2835_finish_command
LBB0_34:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported block size (%d bytes)\n"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_SDEDM,8,3                      ## @SDEDM
	.comm	_SDEDM_FSM_MASK,4,2             ## @SDEDM_FSM_MASK
	.comm	_SDEDM_FSM_IDENTMODE,4,2        ## @SDEDM_FSM_IDENTMODE
	.comm	_SDEDM_FSM_DATAMODE,4,2         ## @SDEDM_FSM_DATAMODE
L_.str.1:                               ## @.str.1
	.asciz	"previous command (%d) not complete (EDM %08x)\n"

	.comm	_SDCMD,8,3                      ## @SDCMD
	.comm	_SDCMD_CMD_MASK,4,2             ## @SDCMD_CMD_MASK
	.comm	_EILSEQ,8,3                     ## @EILSEQ
	.comm	_PIO_THRESHOLD,8,3              ## @PIO_THRESHOLD
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.no_dead_strip	_bcm2835_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_request
_bcm2835_request:                       ; @bcm2835_request
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	bl	_mmc_priv
	mov	x19, x0
	ldr	x22, [x0, #56]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
	str	xzr, [x8]
LBB0_2:
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.3:
	str	xzr, [x8]
LBB0_4:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_6
; %bb.5:
	str	xzr, [x8, #16]
LBB0_6:
	ldr	x9, [x20, #24]
	cbz	x9, LBB0_8
; %bb.7:
	str	xzr, [x9]
LBB0_8:
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w0, [x8, #12]
	bl	_is_power_of_2
	cbz	w0, LBB0_22
LBB0_10:
	add	x21, x19, #4
	mov	x0, x21
	bl	_mutex_lock
	ldr	x0, [x19, #32]
	bl	_WARN_ON
	str	x20, [x19, #32]
	ldr	x8, [x19, #48]
Lloh0:
	adrp	x9, _SDEDM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SDEDM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh3:
	adrp	x8, _SDEDM_FSM_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDEDM_FSM_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _SDEDM_FSM_IDENTMODE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SDEDM_FSM_IDENTMODE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _SDEDM_FSM_DATAMODE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SDEDM_FSM_DATAMODE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_19
; %bb.11:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_15
; %bb.12:
	ldr	x1, [x20, #16]
	cbz	x1, LBB0_15
; %bb.13:
	ldr	x8, [x1]
Lloh12:
	adrp	x9, _PIO_THRESHOLD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PIO_THRESHOLD@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_bcm2835_prepare_dma
LBB0_15:
	ldr	x1, [x20, #8]
	cbz	x1, LBB0_25
; %bb.16:
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_25
; %bb.17:
	ldr	w8, [x8, #8]
Lloh15:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	ands	w8, w9, w8
	cset	w9, ne
	str	w9, [x19]
	cbz	w8, LBB0_26
; %bb.18:
	mov	x0, x19
	bl	_bcm2835_send_command
	cbnz	x0, LBB0_31
	b	LBB0_33
LBB0_19:
	mov	x23, x0
	ldr	x8, [x19, #48]
Lloh18:
	adrp	x9, _SDCMD@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SDCMD@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh21:
	adrp	x8, _SDCMD_CMD_MASK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SDCMD_CMD_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	and	w2, w8, w0
	str	x23, [sp]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_dev_err
	mov	x0, x19
	bl	_bcm2835_dumpregs
	ldr	x8, [x20]
	cbz	x8, LBB0_21
; %bb.20:
Lloh26:
	adrp	x9, _EILSEQ@GOTPAGE
Lloh27:
	ldr	x9, [x9, _EILSEQ@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	neg	x9, x9
	str	x9, [x8]
LBB0_21:
	mov	x0, x19
	bl	_bcm2835_finish_request
	b	LBB0_33
LBB0_22:
	ldr	x8, [x20, #16]
	ldr	w2, [x8, #12]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
	ldr	x8, [x20]
	cbz	x8, LBB0_24
; %bb.23:
Lloh31:
	adrp	x9, _EINVAL@GOTPAGE
Lloh32:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	neg	x9, x9
	str	x9, [x8]
LBB0_24:
	mov	x0, x21
	mov	x1, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_mmc_request_done
LBB0_25:
	str	wzr, [x19]
LBB0_26:
	ldr	x1, [x20]
	cbz	x1, LBB0_33
; %bb.27:
	mov	x0, x19
	bl	_bcm2835_send_command
	cbz	x0, LBB0_33
; %bb.28:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_31
; %bb.29:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_31
; %bb.30:
	mov	x0, x19
	bl	_bcm2835_start_dma
LBB0_31:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_33
; %bb.32:
	mov	x0, x19
	bl	_bcm2835_finish_command
LBB0_33:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported block size (%d bytes)\n"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_SDEDM,8,3                      ; @SDEDM
	.comm	_SDEDM_FSM_MASK,4,2             ; @SDEDM_FSM_MASK
	.comm	_SDEDM_FSM_IDENTMODE,4,2        ; @SDEDM_FSM_IDENTMODE
	.comm	_SDEDM_FSM_DATAMODE,4,2         ; @SDEDM_FSM_DATAMODE
l_.str.1:                               ; @.str.1
	.asciz	"previous command (%d) not complete (EDM %08x)\n"

	.comm	_SDCMD,8,3                      ; @SDCMD
	.comm	_SDCMD_CMD_MASK,4,2             ; @SDCMD_CMD_MASK
	.comm	_EILSEQ,8,3                     ; @EILSEQ
	.comm	_PIO_THRESHOLD,8,3              ; @PIO_THRESHOLD
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.no_dead_strip	_bcm2835_request
.subsections_via_symbols
