	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bluecard_interrupt
_bluecard_interrupt:                    ## @bluecard_interrupt
	.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
	xorl	%edi, %edi
	cmpl	$0, 28(%rsi)
	sete	%dil
	callq	_BUG_ON
	movq	_CARD_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%rbx), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	movq	16(%rbx), %rax
	movl	(%rax), %r15d
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_REG_CONTROL_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	notl	%edi
	andl	(%rbx), %edi
	movl	%edi, (%rbx)
	movq	_REG_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	callq	_outb
	movq	_REG_INTERRUPT@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	%r15, %rdi
	callq	_inb
	movl	%eax, %r12d
	leal	-1(%r12), %eax
	cmpb	$-3, %al
	ja	LBB0_10
## %bb.2:
	testb	$4, %r12b
	jne	LBB0_3
## %bb.4:
	testb	$8, %r12b
	jne	LBB0_5
LBB0_6:
	testb	$1, %r12b
	jne	LBB0_7
LBB0_8:
	testb	$2, %r12b
	je	LBB0_10
LBB0_9:
	movq	_XMIT_BUF_TWO_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%rbx), %rsi
	callq	_set_bit
	movq	(%r13), %rsi
	addq	%r15, %rsi
	movl	$2, %edi
	callq	_outb
	movq	%rbx, %rdi
	callq	_bluecard_write_wakeup
LBB0_10:
	movl	(%rbx), %edi
	movq	_REG_CONTROL_INTERRUPT@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	%edi, (%rbx)
	movq	_REG_CONTROL@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	%r15, %rsi
	callq	_outb
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_11:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bluecard_receive
	movq	(%r13), %rsi
	addq	%r15, %rsi
	movl	$4, %edi
	callq	_outb
	movq	_REG_COMMAND_RX_BUF_ONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_REG_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	callq	_outb
	testb	$8, %r12b
	je	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_bluecard_receive
	movq	(%r13), %rsi
	addq	%r15, %rsi
	movl	$8, %edi
	callq	_outb
	movq	_REG_COMMAND_RX_BUF_TWO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_REG_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	callq	_outb
	testb	$1, %r12b
	je	LBB0_8
LBB0_7:
	movq	_XMIT_BUF_ONE_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%rbx), %rsi
	callq	_set_bit
	movq	(%r13), %rsi
	addq	%r15, %rsi
	movl	$1, %edi
	callq	_outb
	movq	%rbx, %rdi
	callq	_bluecard_write_wakeup
	testb	$2, %r12b
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_CARD_READY,4,2                 ## @CARD_READY
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_REG_CONTROL_INTERRUPT,4,2      ## @REG_CONTROL_INTERRUPT
	.comm	_REG_CONTROL,8,3                ## @REG_CONTROL
	.comm	_REG_INTERRUPT,8,3              ## @REG_INTERRUPT
	.comm	_REG_COMMAND_RX_BUF_ONE,4,2     ## @REG_COMMAND_RX_BUF_ONE
	.comm	_REG_COMMAND,8,3                ## @REG_COMMAND
	.comm	_REG_COMMAND_RX_BUF_TWO,4,2     ## @REG_COMMAND_RX_BUF_TWO
	.comm	_XMIT_BUF_ONE_READY,4,2         ## @XMIT_BUF_ONE_READY
	.comm	_XMIT_BUF_TWO_READY,4,2         ## @XMIT_BUF_TWO_READY
	.no_dead_strip	_bluecard_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bluecard_interrupt
_bluecard_interrupt:                    ; @bluecard_interrupt
	.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	x19, x1
	ldr	w8, [x1, #28]
	cmp	w8, #0
	cset	w0, eq
	bl	_BUG_ON
Lloh0:
	adrp	x8, _CARD_READY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CARD_READY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #24
	bl	_test_bit
	cbz	w0, LBB0_8
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	w22, [x8]
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock
Lloh3:
	adrp	x23, _REG_CONTROL_INTERRUPT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _REG_CONTROL_INTERRUPT@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	w9, [x19]
	bic	w0, w9, w8
	str	w0, [x19]
Lloh5:
	adrp	x24, _REG_CONTROL@GOTPAGE
Lloh6:
	ldr	x24, [x24, _REG_CONTROL@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x1, x8, x22
	bl	_outb
Lloh7:
	adrp	x25, _REG_INTERRUPT@GOTPAGE
Lloh8:
	ldr	x25, [x25, _REG_INTERRUPT@GOTPAGEOFF]
	ldr	x8, [x25]
	add	x0, x8, x22
	bl	_inb
	sub	w8, w0, #1
	cmp	w8, #253
	b.hi	LBB0_7
; %bb.2:
	mov	x21, x0
Lloh9:
	adrp	x26, _REG_COMMAND@GOTPAGE
Lloh10:
	ldr	x26, [x26, _REG_COMMAND@GOTPAGEOFF]
	tbnz	w0, #2, LBB0_9
; %bb.3:
	tbnz	w21, #3, LBB0_10
LBB0_4:
	tbnz	w21, #0, LBB0_11
LBB0_5:
	tbz	w21, #1, LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _XMIT_BUF_TWO_READY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _XMIT_BUF_TWO_READY@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	ldr	x8, [x25]
	add	x1, x8, x22
	mov	w0, #2
	bl	_outb
	mov	x0, x19
	bl	_bluecard_write_wakeup
LBB0_7:
	ldr	w8, [x23]
	ldr	w9, [x19]
	orr	w0, w9, w8
	str	w0, [x19]
	ldr	x8, [x24]
	add	x1, x8, x22
	bl	_outb
	mov	x0, x20
	bl	_spin_unlock
LBB0_8:
Lloh14:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	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
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	bl	_bluecard_receive
	ldr	x8, [x25]
	add	x1, x8, x22
	mov	w0, #4
	bl	_outb
Lloh17:
	adrp	x8, _REG_COMMAND_RX_BUF_ONE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_COMMAND_RX_BUF_ONE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	x8, [x26]
	add	x1, x8, x22
	bl	_outb
	tbz	w21, #3, LBB0_4
LBB0_10:
	mov	x0, x19
	mov	w1, #16
	bl	_bluecard_receive
	ldr	x8, [x25]
	add	x1, x8, x22
	mov	w0, #8
	bl	_outb
Lloh20:
	adrp	x8, _REG_COMMAND_RX_BUF_TWO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REG_COMMAND_RX_BUF_TWO@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	x8, [x26]
	add	x1, x8, x22
	bl	_outb
	tbz	w21, #0, LBB0_5
LBB0_11:
Lloh23:
	adrp	x8, _XMIT_BUF_ONE_READY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _XMIT_BUF_ONE_READY@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	ldr	x8, [x25]
	add	x1, x8, x22
	mov	w0, #1
	bl	_outb
	mov	x0, x19
	bl	_bluecard_write_wakeup
	tbnz	w21, #1, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_CARD_READY,4,2                 ; @CARD_READY
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_REG_CONTROL_INTERRUPT,4,2      ; @REG_CONTROL_INTERRUPT
	.comm	_REG_CONTROL,8,3                ; @REG_CONTROL
	.comm	_REG_INTERRUPT,8,3              ; @REG_INTERRUPT
	.comm	_REG_COMMAND_RX_BUF_ONE,4,2     ; @REG_COMMAND_RX_BUF_ONE
	.comm	_REG_COMMAND,8,3                ; @REG_COMMAND
	.comm	_REG_COMMAND_RX_BUF_TWO,4,2     ; @REG_COMMAND_RX_BUF_TWO
	.comm	_XMIT_BUF_ONE_READY,4,2         ; @XMIT_BUF_ONE_READY
	.comm	_XMIT_BUF_TWO_READY,4,2         ; @XMIT_BUF_TWO_READY
	.no_dead_strip	_bluecard_interrupt
.subsections_via_symbols
