	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cosa_interrupt
_cosa_interrupt:                        ## @cosa_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	$100, %ebx
	movq	_SR_CMD_FROM_SRP_MASK@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_cosa_getstatus
	movl	%eax, %ecx
	andl	(%r15), %ecx
	cmpl	$128, %ecx
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$129, %ecx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$130, %ecx
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	subl	$1, %ebx
	jb	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$100, %edi
	callq	_udelay
	jmp	LBB0_1
LBB0_5:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rx_interrupt
	jmp	LBB0_10
LBB0_6:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_eot_interrupt
	jmp	LBB0_10
LBB0_4:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_tx_interrupt
	jmp	LBB0_10
LBB0_9:
	movl	4(%r14), %esi
	movzbl	%al, %edx
	leaq	L_.str(%rip), %rdi
	movl	$101, %ecx
	xorl	%eax, %eax
	callq	_pr_info
LBB0_10:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SR_CMD_FROM_SRP_MASK,4,2       ## @SR_CMD_FROM_SRP_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cosa%d: unknown status 0x%02x in IRQ after %d retries\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_cosa_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cosa_interrupt
_cosa_interrupt:                        ; @cosa_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	w20, #100
Lloh0:
	adrp	x21, _SR_CMD_FROM_SRP_MASK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SR_CMD_FROM_SRP_MASK@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_cosa_getstatus
	mov	x8, x0
	ldr	w9, [x21]
	and	w9, w9, w0
	cmp	w9, #128
	b.eq	LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w9, #129
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w9, #130
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w20, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #100
	bl	_udelay
	sub	w20, w20, #1
	b	LBB0_1
LBB0_6:
	mov	x0, x19
	mov	x1, x8
	bl	_rx_interrupt
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	mov	x1, x8
	bl	_eot_interrupt
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	mov	x1, x8
	bl	_tx_interrupt
	b	LBB0_10
LBB0_9:
	ldr	w1, [x19, #4]
	and	w8, w8, #0xff
	mov	w9, #101
	stp	x8, x9, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
LBB0_10:
Lloh4:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SR_CMD_FROM_SRP_MASK,4,2       ; @SR_CMD_FROM_SRP_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cosa%d: unknown status 0x%02x in IRQ after %d retries\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_cosa_interrupt
.subsections_via_symbols
