	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cas_txmac_interrupt
_cas_txmac_interrupt:                   ## @cas_txmac_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
	movq	%rdi, %r15
	movq	_REG_MAC_TX_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%rsi), %rdi
	callq	_readl
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	movl	%eax, %ebx
	movq	_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	16(%r14), %ecx
	leaq	L_.str(%rip), %r8
	movq	%r14, %rdi
	movl	%ebx, %r9d
	callq	_netif_printk
	movq	_MAC_TX_DEFER_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	je	LBB0_3
## %bb.2:
	notl	%eax
	testl	%eax, %ebx
	je	LBB0_14
LBB0_3:
	movq	(%r14), %rdi
	callq	_spin_lock
	movq	_MAC_TX_UNDERRUN@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_err
	movq	8(%r14), %rax
	incl	12(%rax)
LBB0_5:
	movq	_MAC_TX_MAX_PACKET_ERR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_err
	movq	8(%r14), %rax
	incl	8(%rax)
LBB0_7:
	movq	_MAC_TX_COLL_NORMAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_9
## %bb.8:
	movq	8(%r14), %rax
	addl	$65536, (%rax)                  ## imm = 0x10000
LBB0_9:
	movq	_MAC_TX_COLL_EXCESS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.10:
	movq	8(%r14), %rax
	addl	$65536, 4(%rax)                 ## imm = 0x10000
	addl	$65536, (%rax)                  ## imm = 0x10000
LBB0_11:
	movq	_MAC_TX_COLL_LATE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_13
## %bb.12:
	movq	8(%r14), %rax
	addl	$65536, 4(%rax)                 ## imm = 0x10000
	addl	$65536, (%rax)                  ## imm = 0x10000
LBB0_13:
	movq	(%r14), %rdi
	callq	_spin_unlock
LBB0_14:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_MAC_TX_STATUS,8,3          ## @REG_MAC_TX_STATUS
	.comm	_intr,4,2                       ## @intr
	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"txmac interrupt, txmac_stat: 0x%x\n"

	.comm	_MAC_TX_DEFER_TIMER,4,2         ## @MAC_TX_DEFER_TIMER
	.comm	_MAC_TX_UNDERRUN,4,2            ## @MAC_TX_UNDERRUN
L_.str.1:                               ## @.str.1
	.asciz	"TX MAC xmit underrun\n"

	.comm	_MAC_TX_MAX_PACKET_ERR,4,2      ## @MAC_TX_MAX_PACKET_ERR
L_.str.2:                               ## @.str.2
	.asciz	"TX MAC max packet size error\n"

	.comm	_MAC_TX_COLL_NORMAL,4,2         ## @MAC_TX_COLL_NORMAL
	.comm	_MAC_TX_COLL_EXCESS,4,2         ## @MAC_TX_COLL_EXCESS
	.comm	_MAC_TX_COLL_LATE,4,2           ## @MAC_TX_COLL_LATE
	.no_dead_strip	_cas_txmac_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cas_txmac_interrupt
_cas_txmac_interrupt:                   ; @cas_txmac_interrupt
	.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, x1
	mov	x21, x0
	ldr	x8, [x1, #24]
Lloh0:
	adrp	x9, _REG_MAC_TX_STATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _REG_MAC_TX_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	cbz	w0, LBB0_13
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _intr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _intr@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _KERN_DEBUG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KERN_DEBUG@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ldr	w3, [x19, #16]
Lloh9:
	adrp	x4, l_.str@PAGE
Lloh10:
	add	x4, x4, l_.str@PAGEOFF
	mov	x0, x19
	mov	x5, x20
	bl	_netif_printk
Lloh11:
	adrp	x8, _MAC_TX_DEFER_TIMER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAC_TX_DEFER_TIMER@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w9, w8, w20
	cmp	w9, #0
	bic	w8, w20, w8
	ccmp	w8, #0, #0, ne
	b.eq	LBB0_13
; %bb.2:
	ldr	x0, [x19]
	bl	_spin_lock
Lloh14:
	adrp	x8, _MAC_TX_UNDERRUN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAC_TX_UNDERRUN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_netdev_err
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #12]
	add	w9, w9, #1
	str	w9, [x8, #12]
LBB0_4:
Lloh19:
	adrp	x8, _MAC_TX_MAX_PACKET_ERR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MAC_TX_MAX_PACKET_ERR@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_netdev_err
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
LBB0_6:
Lloh24:
	adrp	x8, _MAC_TX_COLL_NORMAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MAC_TX_COLL_NORMAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	add	w9, w9, #16, lsl #12            ; =65536
	str	w9, [x8]
LBB0_8:
Lloh27:
	adrp	x8, _MAC_TX_COLL_EXCESS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MAC_TX_COLL_EXCESS@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
	ldr	x8, [x19, #8]
	ldr	d0, [x8]
	movi.2s	v1, #1, lsl #16
	add.2s	v0, v0, v1
	str	d0, [x8]
LBB0_10:
Lloh30:
	adrp	x8, _MAC_TX_COLL_LATE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MAC_TX_COLL_LATE@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
	ldr	x8, [x19, #8]
	ldr	d0, [x8]
	movi.2s	v1, #1, lsl #16
	add.2s	v0, v0, v1
	str	d0, [x8]
LBB0_12:
	ldr	x0, [x19]
	bl	_spin_unlock
LBB0_13:
	mov	w0, #0
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_MAC_TX_STATUS,8,3          ; @REG_MAC_TX_STATUS
	.comm	_intr,4,2                       ; @intr
	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"txmac interrupt, txmac_stat: 0x%x\n"

	.comm	_MAC_TX_DEFER_TIMER,4,2         ; @MAC_TX_DEFER_TIMER
	.comm	_MAC_TX_UNDERRUN,4,2            ; @MAC_TX_UNDERRUN
l_.str.1:                               ; @.str.1
	.asciz	"TX MAC xmit underrun\n"

	.comm	_MAC_TX_MAX_PACKET_ERR,4,2      ; @MAC_TX_MAX_PACKET_ERR
l_.str.2:                               ; @.str.2
	.asciz	"TX MAC max packet size error\n"

	.comm	_MAC_TX_COLL_NORMAL,4,2         ; @MAC_TX_COLL_NORMAL
	.comm	_MAC_TX_COLL_EXCESS,4,2         ; @MAC_TX_COLL_EXCESS
	.comm	_MAC_TX_COLL_LATE,4,2           ; @MAC_TX_COLL_LATE
	.no_dead_strip	_cas_txmac_interrupt
.subsections_via_symbols
