	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pucan_handle_can_rx
_pucan_handle_can_rx:                   ## @pucan_handle_can_rx
	.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	$24, %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, %r12
	movq	(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	12(%rsi), %edi
	callq	_le16_to_cpu
	movl	%eax, %r14d
	movq	_PUCAN_MSG_EXT_DATA_LEN@GOTPCREL(%rip), %r13
	movl	%eax, %ebx
	andl	(%r13), %ebx
	movq	%r15, %rdi
	callq	_pucan_msg_get_dlc
	movl	%eax, %edi
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	callq	_get_canfd_dlc
	movl	%eax, %edi
	callq	_can_dlc2len
	jmp	LBB0_3
LBB0_2:
	callq	_get_can_dlc
LBB0_3:
	movq	%rax, %rbx
	movq	_PUCAN_MSG_LOOPED_BACK@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_6
## %bb.4:
	movq	_PUCAN_MSG_SELF_RECEIVE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_5
LBB0_6:
	movq	(%r12), %rdi
	testl	%r14d, (%r13)
	je	LBB0_13
## %bb.7:
	leaq	-48(%rbp), %rsi
	callq	_alloc_canfd_skb
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r12
	movq	_PUCAN_MSG_BITRATE_SWITCH@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_CANFD_BRS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx
	orl	%eax, 16(%rcx)
LBB0_11:
	movq	_PUCAN_MSG_ERROR_STATE_IND@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_14
## %bb.12:
	movq	_CANFD_ESI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx
	orl	%eax, 16(%rcx)
	jmp	LBB0_14
LBB0_13:
	leaq	-48(%rbp), %rsi
	callq	_alloc_can_skb
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_8
LBB0_14:
	movl	4(%r15), %edi
	callq	_le32_to_cpu
	movq	-48(%rbp), %rcx
	movl	%eax, 12(%rcx)
	movq	%rbx, (%rcx)
	movq	_PUCAN_MSG_EXT_ID@GOTPCREL(%rip), %rdx
	testl	%r14d, (%rdx)
	je	LBB0_16
## %bb.15:
	movq	_CAN_EFF_FLAG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, %eax
	movl	%eax, 12(%rcx)
LBB0_16:
	movq	_PUCAN_MSG_RTR@GOTPCREL(%rip), %rdx
	testl	%r14d, (%rdx)
	je	LBB0_18
## %bb.17:
	movq	_CAN_RTR_FLAG@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 12(%rcx)
	jmp	LBB0_19
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_5:
	leaq	8(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r12), %rdi
	movl	8(%r15), %esi
	callq	_can_get_echo_skb
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addl	%ebx, 12(%rax)
	incl	8(%rax)
	movq	(%r12), %rdi
	callq	_netif_wake_queue
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_20
LBB0_18:
	movl	8(%rcx), %edi
	movl	(%r15), %esi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	-48(%rbp), %rax
	movq	(%rax), %rbx
LBB0_19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addl	%ebx, 4(%rax)
	incl	(%rax)
	movq	%r12, %rdi
	callq	_netif_rx
LBB0_20:
	xorl	%eax, %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PUCAN_MSG_EXT_DATA_LEN,4,2     ## @PUCAN_MSG_EXT_DATA_LEN
	.comm	_PUCAN_MSG_LOOPED_BACK,4,2      ## @PUCAN_MSG_LOOPED_BACK
	.comm	_PUCAN_MSG_SELF_RECEIVE,4,2     ## @PUCAN_MSG_SELF_RECEIVE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PUCAN_MSG_BITRATE_SWITCH,4,2   ## @PUCAN_MSG_BITRATE_SWITCH
	.comm	_CANFD_BRS,4,2                  ## @CANFD_BRS
	.comm	_PUCAN_MSG_ERROR_STATE_IND,4,2  ## @PUCAN_MSG_ERROR_STATE_IND
	.comm	_CANFD_ESI,4,2                  ## @CANFD_ESI
	.comm	_PUCAN_MSG_EXT_ID,4,2           ## @PUCAN_MSG_EXT_ID
	.comm	_CAN_EFF_FLAG,4,2               ## @CAN_EFF_FLAG
	.comm	_PUCAN_MSG_RTR,4,2              ## @PUCAN_MSG_RTR
	.comm	_CAN_RTR_FLAG,4,2               ## @CAN_RTR_FLAG
	.no_dead_strip	_pucan_handle_can_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pucan_handle_can_rx
_pucan_handle_can_rx:                   ; @pucan_handle_can_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x22, x0
	ldr	x23, [x0]
	ldr	w0, [x1, #12]
	bl	_le16_to_cpu
	mov	x21, x0
Lloh0:
	adrp	x24, _PUCAN_MSG_EXT_DATA_LEN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PUCAN_MSG_EXT_DATA_LEN@GOTPAGEOFF]
	ldr	w8, [x24]
	and	w20, w8, w0
	mov	x0, x19
	bl	_pucan_msg_get_dlc
	cbz	w20, LBB0_2
; %bb.1:
	bl	_get_canfd_dlc
	bl	_can_dlc2len
	b	LBB0_3
LBB0_2:
	bl	_get_can_dlc
LBB0_3:
	mov	x20, x0
Lloh2:
	adrp	x8, _PUCAN_MSG_LOOPED_BACK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PUCAN_MSG_LOOPED_BACK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _PUCAN_MSG_SELF_RECEIVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PUCAN_MSG_SELF_RECEIVE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_17
LBB0_5:
	ldr	w8, [x24]
	ldr	x0, [x22]
	add	x1, sp, #8
	tst	w8, w21
	b.eq	LBB0_11
; %bb.6:
	bl	_alloc_canfd_skb
	cbz	x0, LBB0_16
; %bb.7:
	mov	x22, x0
Lloh8:
	adrp	x8, _PUCAN_MSG_BITRATE_SWITCH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PUCAN_MSG_BITRATE_SWITCH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _CANFD_BRS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CANFD_BRS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	ldr	w10, [x9, #16]
	orr	w8, w10, w8
	str	w8, [x9, #16]
LBB0_9:
Lloh14:
	adrp	x8, _PUCAN_MSG_ERROR_STATE_IND@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PUCAN_MSG_ERROR_STATE_IND@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_12
; %bb.10:
Lloh17:
	adrp	x8, _CANFD_ESI@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CANFD_ESI@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	ldr	w10, [x9, #16]
	orr	w8, w10, w8
	str	w8, [x9, #16]
	b	LBB0_12
LBB0_11:
	bl	_alloc_can_skb
	mov	x22, x0
	cbz	x0, LBB0_16
LBB0_12:
	ldr	w0, [x19, #4]
	bl	_le32_to_cpu
	ldr	x8, [sp, #8]
	str	w0, [x8, #12]
	str	x20, [x8]
Lloh20:
	adrp	x9, _PUCAN_MSG_EXT_ID@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PUCAN_MSG_EXT_ID@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_14
; %bb.13:
Lloh23:
	adrp	x9, _CAN_EFF_FLAG@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CAN_EFF_FLAG@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w0, w9, w0
	str	w0, [x8, #12]
LBB0_14:
Lloh26:
	adrp	x9, _PUCAN_MSG_RTR@GOTPAGE
Lloh27:
	ldr	x9, [x9, _PUCAN_MSG_RTR@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_18
; %bb.15:
Lloh29:
	adrp	x9, _CAN_RTR_FLAG@GOTPAGE
Lloh30:
	ldr	x9, [x9, _CAN_RTR_FLAG@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w9, w0, w9
	str	w9, [x8, #12]
	b	LBB0_19
LBB0_16:
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_17:
	add	x21, x22, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x0, [x22]
	ldr	w1, [x19, #8]
	bl	_can_get_echo_skb
	ldp	w9, w8, [x23, #8]
	add	w8, w8, w20
	add	w9, w9, #1
	stp	w9, w8, [x23, #8]
	ldr	x0, [x22]
	bl	_netif_wake_queue
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	b	LBB0_20
LBB0_18:
	ldr	w0, [x8, #8]
	ldr	w1, [x19]
	mov	x2, x20
	bl	_memcpy
	ldr	x8, [sp, #8]
	ldr	x20, [x8]
LBB0_19:
	ldp	w9, w8, [x23]
	add	w8, w8, w20
	add	w9, w9, #1
	stp	w9, w8, [x23]
	mov	x0, x22
	bl	_netif_rx
LBB0_20:
	mov	w0, #0
LBB0_21:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, 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
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_PUCAN_MSG_EXT_DATA_LEN,4,2     ; @PUCAN_MSG_EXT_DATA_LEN
	.comm	_PUCAN_MSG_LOOPED_BACK,4,2      ; @PUCAN_MSG_LOOPED_BACK
	.comm	_PUCAN_MSG_SELF_RECEIVE,4,2     ; @PUCAN_MSG_SELF_RECEIVE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PUCAN_MSG_BITRATE_SWITCH,4,2   ; @PUCAN_MSG_BITRATE_SWITCH
	.comm	_CANFD_BRS,4,2                  ; @CANFD_BRS
	.comm	_PUCAN_MSG_ERROR_STATE_IND,4,2  ; @PUCAN_MSG_ERROR_STATE_IND
	.comm	_CANFD_ESI,4,2                  ; @CANFD_ESI
	.comm	_PUCAN_MSG_EXT_ID,4,2           ; @PUCAN_MSG_EXT_ID
	.comm	_CAN_EFF_FLAG,4,2               ; @CAN_EFF_FLAG
	.comm	_PUCAN_MSG_RTR,4,2              ; @PUCAN_MSG_RTR
	.comm	_CAN_RTR_FLAG,4,2               ; @CAN_RTR_FLAG
	.no_dead_strip	_pucan_handle_can_rx
.subsections_via_symbols
