	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_pciefd_handle_eack_packet
_kvaser_pciefd_handle_eack_packet:      ## @kvaser_pciefd_handle_eack_packet
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rsi), %rax
	movl	4(%rax), %edx
	movq	_KVASER_PCIEFD_PACKET_CHID_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edx
	andl	$7, %edx
	cmpq	%rdx, (%rdi)
	jbe	LBB0_1
## %bb.2:
	movq	8(%rdi), %rcx
	movq	(%rcx,%rdx,8), %r14
	movl	(%rax), %esi
	movq	_KVASER_PCIEFD_APACKET_FLU@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_KVASER_PCIEFD_KCAN_TX_NPACKETS_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_ioread32
	xorl	%ebx, %ebx
	testb	%al, %al
	jne	LBB0_7
## %bb.4:
	movq	_KVASER_PCIEFD_KCAN_CTRL_EFLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_KVASER_PCIEFD_KCAN_CTRL_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	callq	_iowrite32
	jmp	LBB0_7
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movq	_KVASER_PCIEFD_PACKET_SEQ_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	movq	(%r14), %rdi
	callq	_can_get_echo_skb
	movq	(%r14), %rdi
	addl	%eax, (%rdi)
	incl	4(%rdi)
	callq	_netif_queue_stopped
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%r14), %rdi
	callq	_netif_wake_queue
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KVASER_PCIEFD_PACKET_CHID_SHIFT,4,2 ## @KVASER_PCIEFD_PACKET_CHID_SHIFT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_KVASER_PCIEFD_APACKET_FLU,4,2  ## @KVASER_PCIEFD_APACKET_FLU
	.comm	_KVASER_PCIEFD_KCAN_TX_NPACKETS_REG,8,3 ## @KVASER_PCIEFD_KCAN_TX_NPACKETS_REG
	.comm	_KVASER_PCIEFD_KCAN_CTRL_EFLUSH,4,2 ## @KVASER_PCIEFD_KCAN_CTRL_EFLUSH
	.comm	_KVASER_PCIEFD_KCAN_CTRL_REG,8,3 ## @KVASER_PCIEFD_KCAN_CTRL_REG
	.comm	_KVASER_PCIEFD_PACKET_SEQ_MSK,4,2 ## @KVASER_PCIEFD_PACKET_SEQ_MSK
	.no_dead_strip	_kvaser_pciefd_handle_eack_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_pciefd_handle_eack_packet
_kvaser_pciefd_handle_eack_packet:      ; @kvaser_pciefd_handle_eack_packet
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _KVASER_PCIEFD_PACKET_CHID_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KVASER_PCIEFD_PACKET_CHID_SHIFT@GOTPAGEOFF]
	ldr	w10, [x8, #4]
Lloh2:
	ldr	w9, [x9]
	asr	w9, w10, w9
	and	w9, w9, #0x7
	ldr	x10, [x0]
	cmp	x10, x9
	b.ls	LBB0_4
; %bb.1:
	ldr	x10, [x0, #8]
	ldr	x19, [x10, x9, lsl #3]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _KVASER_PCIEFD_APACKET_FLU@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KVASER_PCIEFD_APACKET_FLU@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _KVASER_PCIEFD_KCAN_TX_NPACKETS_REG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _KVASER_PCIEFD_KCAN_TX_NPACKETS_REG@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread32
	tst	w0, #0xff
	b.ne	LBB0_7
; %bb.3:
Lloh9:
	adrp	x8, _KVASER_PCIEFD_KCAN_CTRL_EFLUSH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KVASER_PCIEFD_KCAN_CTRL_EFLUSH@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _KVASER_PCIEFD_KCAN_CTRL_REG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _KVASER_PCIEFD_KCAN_CTRL_REG@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	b	LBB0_7
LBB0_4:
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_5:
Lloh18:
	adrp	x9, _KVASER_PCIEFD_PACKET_SEQ_MSK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _KVASER_PCIEFD_PACKET_SEQ_MSK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	and	w1, w9, w8
	ldr	x0, [x19]
	bl	_can_get_echo_skb
	ldr	x8, [x19]
	ldr	d0, [x8]
	movi.2s	v1, #1
	mov.s	v1[0], w0
	add.2s	v0, v0, v1
	str	d0, [x8]
	mov	x0, x8
	bl	_netif_queue_stopped
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x0, [x19]
	bl	_netif_wake_queue
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_KVASER_PCIEFD_PACKET_CHID_SHIFT,4,2 ; @KVASER_PCIEFD_PACKET_CHID_SHIFT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_KVASER_PCIEFD_APACKET_FLU,4,2  ; @KVASER_PCIEFD_APACKET_FLU
	.comm	_KVASER_PCIEFD_KCAN_TX_NPACKETS_REG,8,3 ; @KVASER_PCIEFD_KCAN_TX_NPACKETS_REG
	.comm	_KVASER_PCIEFD_KCAN_CTRL_EFLUSH,4,2 ; @KVASER_PCIEFD_KCAN_CTRL_EFLUSH
	.comm	_KVASER_PCIEFD_KCAN_CTRL_REG,8,3 ; @KVASER_PCIEFD_KCAN_CTRL_REG
	.comm	_KVASER_PCIEFD_PACKET_SEQ_MSK,4,2 ; @KVASER_PCIEFD_PACKET_SEQ_MSK
	.no_dead_strip	_kvaser_pciefd_handle_eack_packet
.subsections_via_symbols
