	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_pciefd_rx_error_frame
_kvaser_pciefd_rx_error_frame:          ## @kvaser_pciefd_rx_error_frame
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	40(%rdi), %r14
	movq	$0, -64(%rbp)
	movl	16(%rdi), %r13d
	movq	(%rsi), %rax
	movzbl	(%rax), %ecx
	movl	%ecx, -48(%rbp)
	movl	(%rax), %eax
	movq	_KVASER_PCIEFD_SPACK_RXERR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movzbl	%al, %eax
	movl	%eax, -44(%rbp)
	leaq	-48(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	leaq	-68(%rbp), %r8
	movq	%r15, %rdi
	callq	_kvaser_pciefd_packet_to_state
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	_alloc_can_err_skb
	movq	%rax, %r12
	movl	-52(%rbp), %edx
	cmpl	%r13d, %edx
	je	LBB0_6
## %bb.1:
	movq	-64(%rbp), %rsi
	movl	-72(%rbp), %ecx
	movl	-68(%rbp), %r8d
	movq	%rbx, %rdi
	callq	_kvaser_pciefd_change_state
	movq	_CAN_STATE_BUS_OFF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_6
## %bb.2:
	movl	-52(%rbp), %eax
	movq	_CAN_STATE_ERROR_ACTIVE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.3:
	cmpq	$0, 32(%rbx)
	je	LBB0_6
## %bb.4:
	incl	24(%rbx)
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:
	movq	_CAN_ERR_RESTARTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx
	orl	%eax, 16(%rcx)
LBB0_6:
	incl	48(%rbx)
	incl	20(%rbx)
	incl	12(%r14)
	movl	-48(%rbp), %eax
	movl	%eax, 8(%rbx)
	movl	-44(%rbp), %eax
	movl	%eax, 12(%rbx)
	testq	%r12, %r12
	je	LBB0_7
## %bb.8:
	movq	%r12, %rdi
	callq	_skb_hwtstamps
	movq	%rax, %r13
	imull	$1000, 8(%r15), %edi            ## imm = 0x3E8
	movq	(%rbx), %rax
	movl	(%rax), %esi
	callq	_div_u64
	movl	%eax, %edi
	callq	_ns_to_ktime
	movl	%eax, (%r13)
	movq	_CAN_ERR_BUSERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx
	orl	%eax, 16(%rcx)
	movl	-48(%rbp), %eax
	movq	(%rcx), %rdx
	movl	%eax, 24(%rdx)
	movl	-44(%rbp), %eax
	movl	%eax, 28(%rdx)
	incl	4(%r14)
	movl	8(%rcx), %eax
	addl	%eax, (%r14)
	movq	%r12, %rdi
	callq	_netif_rx
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	incl	8(%r14)
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KVASER_PCIEFD_SPACK_RXERR_SHIFT,4,2 ## @KVASER_PCIEFD_SPACK_RXERR_SHIFT
	.comm	_CAN_STATE_BUS_OFF,4,2          ## @CAN_STATE_BUS_OFF
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ## @CAN_STATE_ERROR_ACTIVE
	.comm	_CAN_ERR_RESTARTED,4,2          ## @CAN_ERR_RESTARTED
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CAN_ERR_BUSERROR,4,2           ## @CAN_ERR_BUSERROR
	.no_dead_strip	_kvaser_pciefd_rx_error_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_pciefd_rx_error_frame
_kvaser_pciefd_rx_error_frame:          ; @kvaser_pciefd_rx_error_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x1
	mov	x20, x0
	ldr	x19, [x0, #40]
	str	xzr, [sp]
	ldr	w23, [x0, #16]
	ldr	x8, [x1]
	ldrb	w9, [x8]
	str	w9, [sp, #24]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _KVASER_PCIEFD_SPACK_RXERR_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KVASER_PCIEFD_SPACK_RXERR_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	asr	w8, w8, w9
	and	w8, w8, #0xff
	str	w8, [sp, #28]
	add	x1, sp, #24
	add	x2, sp, #20
	add	x3, sp, #16
	add	x4, sp, #12
	mov	x0, x22
	bl	_kvaser_pciefd_packet_to_state
	mov	x1, sp
	mov	x0, x19
	bl	_alloc_can_err_skb
	mov	x21, x0
	ldr	w2, [sp, #20]
	cmp	w2, w23
	b.eq	LBB0_6
; %bb.1:
	ldr	x1, [sp]
	ldp	w4, w3, [sp, #12]
	mov	x0, x20
	bl	_kvaser_pciefd_change_state
Lloh3:
	adrp	x8, _CAN_STATE_BUS_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAN_STATE_BUS_OFF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_6
; %bb.2:
	ldr	w8, [sp, #20]
Lloh6:
	adrp	x9, _CAN_STATE_ERROR_ACTIVE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CAN_STATE_ERROR_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.3:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	w8, [x20, #24]
	add	w8, w8, #1
	str	w8, [x20, #24]
	cbz	x21, LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _CAN_ERR_RESTARTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CAN_ERR_RESTARTED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [sp]
	ldr	w10, [x9, #16]
	orr	w8, w10, w8
	str	w8, [x9, #16]
LBB0_6:
	ldr	w8, [x20, #48]
	add	w8, w8, #1
	str	w8, [x20, #48]
	ldr	w8, [x20, #20]
	add	w8, w8, #1
	str	w8, [x20, #20]
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	ldr	d0, [sp, #24]
	str	d0, [x20, #8]
	cbz	x21, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_skb_hwtstamps
	mov	x23, x0
	ldr	w8, [x22, #8]
	mov	w9, #1000
	mul	w0, w8, w9
	ldr	x8, [x20]
	ldr	w1, [x8]
	bl	_div_u64
	bl	_ns_to_ktime
	str	w0, [x23]
Lloh12:
	adrp	x8, _CAN_ERR_BUSERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CAN_ERR_BUSERROR@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	x9, [sp]
	ldr	w10, [x9, #16]
	orr	w8, w10, w8
	str	w8, [x9, #16]
	ldr	x8, [x9]
	ldr	d0, [sp, #24]
	str	d0, [x8, #24]
	add	x8, x9, #8
	ldr	d0, [x19]
	movi.2s	v1, #1
	ld1.s	{ v1 }[0], [x8]
	add.2s	v0, v0, v1
	str	d0, [x19]
	mov	x0, x21
	bl	_netif_rx
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_KVASER_PCIEFD_SPACK_RXERR_SHIFT,4,2 ; @KVASER_PCIEFD_SPACK_RXERR_SHIFT
	.comm	_CAN_STATE_BUS_OFF,4,2          ; @CAN_STATE_BUS_OFF
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ; @CAN_STATE_ERROR_ACTIVE
	.comm	_CAN_ERR_RESTARTED,4,2          ; @CAN_ERR_RESTARTED
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CAN_ERR_BUSERROR,4,2           ; @CAN_ERR_BUSERROR
	.no_dead_strip	_kvaser_pciefd_rx_error_frame
.subsections_via_symbols
