	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_irq
_bcm2835_irq:                           ## @bcm2835_irq
	.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, %r12
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	16(%rsi), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	movq	_SDHSTS@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	24(%r12), %rdi
	callq	_readl
	movq	_SDHSTS_BUSY_IRPT@GOTPCREL(%rip), %rcx
	movq	_SDHSTS_BLOCK_IRPT@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	orl	(%rcx), %edi
	movq	_SDHSTS_SDIO_IRPT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	movq	_SDHSTS_DATA_FLAG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	movl	%eax, %ebx
	movq	(%r14), %rsi
	addq	24(%r12), %rsi
	callq	_writel
	testl	%ebx, (%r13)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_bcm2835_check_data_error
	movl	$1, (%r12)
	movq	_IRQ_WAKE_THREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_2:
	movq	_SDHSTS_BUSY_IRPT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.3:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_bcm2835_check_cmd_error
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movl	$1, 4(%r12)
	movq	_IRQ_WAKE_THREAD@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r15d
LBB0_7:
	movq	_SDHSTS_DATA_FLAG@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_10
## %bb.8:
	movq	_SDHCFG_DATA_IRPT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r12)
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_bcm2835_data_irq
	movl	$1, 12(%r12)
	movq	_IRQ_WAKE_THREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_SDHSTS,8,3                     ## @SDHSTS
	.comm	_SDHSTS_BUSY_IRPT,4,2           ## @SDHSTS_BUSY_IRPT
	.comm	_SDHSTS_BLOCK_IRPT,4,2          ## @SDHSTS_BLOCK_IRPT
	.comm	_SDHSTS_SDIO_IRPT,4,2           ## @SDHSTS_SDIO_IRPT
	.comm	_SDHSTS_DATA_FLAG,4,2           ## @SDHSTS_DATA_FLAG
	.comm	_IRQ_WAKE_THREAD,4,2            ## @IRQ_WAKE_THREAD
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_SDHCFG_DATA_IRPT_EN,4,2        ## @SDHCFG_DATA_IRPT_EN
	.no_dead_strip	_bcm2835_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_irq
_bcm2835_irq:                           ; @bcm2835_irq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	add	x19, x1, #16
	mov	x0, x19
	bl	_spin_lock
	ldr	x8, [x20, #24]
Lloh3:
	adrp	x23, _SDHSTS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SDHSTS@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	mov	x22, x0
Lloh5:
	adrp	x25, _SDHSTS_BUSY_IRPT@GOTPAGE
Lloh6:
	ldr	x25, [x25, _SDHSTS_BUSY_IRPT@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh7:
	adrp	x26, _SDHSTS_BLOCK_IRPT@GOTPAGE
Lloh8:
	ldr	x26, [x26, _SDHSTS_BLOCK_IRPT@GOTPAGEOFF]
	ldr	w9, [x26]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _SDHSTS_SDIO_IRPT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SDHSTS_SDIO_IRPT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x24, _SDHSTS_DATA_FLAG@GOTPAGE
Lloh13:
	ldr	x24, [x24, _SDHSTS_DATA_FLAG@GOTPAGEOFF]
	orr	w8, w8, w9
	ldr	w9, [x24]
	orr	w0, w8, w9
	ldr	x8, [x20, #24]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x26]
Lloh14:
	adrp	x23, _IRQ_WAKE_THREAD@GOTPAGE
Lloh15:
	ldr	x23, [x23, _IRQ_WAKE_THREAD@GOTPAGEOFF]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x22
	bl	_bcm2835_check_data_error
	mov	w8, #1
	str	w8, [x20]
	ldr	w21, [x23]
LBB0_2:
	ldr	w8, [x25]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.3:
	mov	x0, x20
	mov	x1, x22
	bl	_bcm2835_check_cmd_error
	cbz	w0, LBB0_5
; %bb.4:
Lloh16:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	b	LBB0_6
LBB0_5:
	mov	w8, #1
	str	w8, [x20, #4]
	ldr	w21, [x23]
LBB0_6:
	ldr	w8, [x24]
	tst	w8, w22
	b.eq	LBB0_9
; %bb.7:
	ldr	w8, [x20, #8]
Lloh19:
	adrp	x9, _SDHCFG_DATA_IRPT_EN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SDHCFG_DATA_IRPT_EN@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x20
	mov	x1, x22
	bl	_bcm2835_data_irq
	mov	w8, #1
	str	w8, [x20, #12]
	ldr	w21, [x23]
LBB0_9:
	mov	x0, x19
	bl	_spin_unlock
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_SDHSTS,8,3                     ; @SDHSTS
	.comm	_SDHSTS_BUSY_IRPT,4,2           ; @SDHSTS_BUSY_IRPT
	.comm	_SDHSTS_BLOCK_IRPT,4,2          ; @SDHSTS_BLOCK_IRPT
	.comm	_SDHSTS_SDIO_IRPT,4,2           ; @SDHSTS_SDIO_IRPT
	.comm	_SDHSTS_DATA_FLAG,4,2           ; @SDHSTS_DATA_FLAG
	.comm	_IRQ_WAKE_THREAD,4,2            ; @IRQ_WAKE_THREAD
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_SDHCFG_DATA_IRPT_EN,4,2        ; @SDHCFG_DATA_IRPT_EN
	.no_dead_strip	_bcm2835_irq
.subsections_via_symbols
