	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ems_usb_rx_can_msg
_ems_usb_rx_can_msg:                    ## @ems_usb_rx_can_msg
	.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, %rbx
	movq	(%rdi), %r15
	leaq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	_alloc_can_skb
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r14
	movl	24(%rbx), %edi
	callq	_le32_to_cpu
	movq	-32(%rbp), %rcx
	movl	%eax, 16(%rcx)
	movl	8(%rbx), %edi
	andl	$15, %edi
	callq	_get_can_dlc
                                        ## kill: def $eax killed $eax def $rax
	movq	-32(%rbp), %rcx
	movl	%eax, (%rcx)
	movq	(%rbx), %rdx
	movq	_CPC_MSG_TYPE_EXT_CAN_FRAME@GOTPCREL(%rip), %rdi
	movq	_CPC_MSG_TYPE_EXT_RTR_FRAME@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	cmpq	(%rdi), %rdx
	je	LBB0_3
## %bb.2:
	cmpq	%rsi, %rdx
	jne	LBB0_4
LBB0_3:
	movq	_CAN_EFF_FLAG@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	%edi, 16(%rcx)
LBB0_4:
	movq	_CPC_MSG_TYPE_RTR_FRAME@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rdx
	je	LBB0_11
## %bb.5:
	cmpq	%rsi, %rdx
	je	LBB0_11
## %bb.6:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.7:
	movq	16(%rbx), %rdx
	movq	8(%rcx), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rdi,4), %eax
	movl	%eax, (%rsi,%rdi,4)
	incq	%rdi
	movslq	(%rcx), %rax
	cmpq	%rax, %rdi
	jl	LBB0_8
	jmp	LBB0_9
LBB0_11:
	movq	_CAN_RTR_FLAG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, 16(%rcx)
LBB0_9:
	incl	4(%r15)
	addl	%eax, (%r15)
	movq	%r14, %rdi
	callq	_netif_rx
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CPC_MSG_TYPE_EXT_CAN_FRAME,8,3 ## @CPC_MSG_TYPE_EXT_CAN_FRAME
	.comm	_CPC_MSG_TYPE_EXT_RTR_FRAME,8,3 ## @CPC_MSG_TYPE_EXT_RTR_FRAME
	.comm	_CAN_EFF_FLAG,4,2               ## @CAN_EFF_FLAG
	.comm	_CPC_MSG_TYPE_RTR_FRAME,8,3     ## @CPC_MSG_TYPE_RTR_FRAME
	.comm	_CAN_RTR_FLAG,4,2               ## @CAN_RTR_FLAG
	.no_dead_strip	_ems_usb_rx_can_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ems_usb_rx_can_msg
_ems_usb_rx_can_msg:                    ; @ems_usb_rx_can_msg
	.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	x21, x1
	ldr	x19, [x0]
	add	x1, sp, #8
	mov	x0, x19
	bl	_alloc_can_skb
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	w0, [x21, #24]
	bl	_le32_to_cpu
	ldr	x8, [sp, #8]
	str	w0, [x8, #16]
	ldr	w8, [x21, #8]
	and	w0, w8, #0xf
	bl	_get_can_dlc
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [sp, #8]
	str	w0, [x8]
	ldr	x9, [x21]
Lloh0:
	adrp	x10, _CPC_MSG_TYPE_EXT_CAN_FRAME@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CPC_MSG_TYPE_EXT_CAN_FRAME@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x10]
Lloh3:
	adrp	x10, _CPC_MSG_TYPE_EXT_RTR_FRAME@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CPC_MSG_TYPE_EXT_RTR_FRAME@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x11
	ccmp	x9, x10, #4, ne
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x11, _CAN_EFF_FLAG@GOTPAGE
Lloh7:
	ldr	x11, [x11, _CAN_EFF_FLAG@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	ldr	w12, [x8, #16]
	orr	w11, w12, w11
	str	w11, [x8, #16]
LBB0_3:
Lloh9:
	adrp	x11, _CPC_MSG_TYPE_RTR_FRAME@GOTPAGE
Lloh10:
	ldr	x11, [x11, _CPC_MSG_TYPE_RTR_FRAME@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	x9, x11
	ccmp	x9, x10, #4, ne
	b.ne	LBB0_5
; %bb.4:
Lloh12:
	adrp	x9, _CAN_RTR_FLAG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CAN_RTR_FLAG@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	ldr	w10, [x8, #16]
	orr	w9, w10, w9
	str	w9, [x8, #16]
	b	LBB0_8
LBB0_5:
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x9, #0
	ldr	x10, [x21, #16]
	ldr	x11, [x8, #8]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x12, x9, #2
	ldr	w13, [x10, x12]
	str	w13, [x11, x12]
	add	x9, x9, #1
	ldrsw	x0, [x8]
	cmp	x9, x0
	b.lt	LBB0_7
LBB0_8:
	ldr	d0, [x19]
	movi.2s	v1, #1
	mov.s	v1[0], w0
	add.2s	v0, v0, v1
	str	d0, [x19]
	mov	x0, x20
	bl	_netif_rx
LBB0_9:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CPC_MSG_TYPE_EXT_CAN_FRAME,8,3 ; @CPC_MSG_TYPE_EXT_CAN_FRAME
	.comm	_CPC_MSG_TYPE_EXT_RTR_FRAME,8,3 ; @CPC_MSG_TYPE_EXT_RTR_FRAME
	.comm	_CAN_EFF_FLAG,4,2               ; @CAN_EFF_FLAG
	.comm	_CPC_MSG_TYPE_RTR_FRAME,8,3     ; @CPC_MSG_TYPE_RTR_FRAME
	.comm	_CAN_RTR_FLAG,4,2               ; @CAN_RTR_FLAG
	.no_dead_strip	_ems_usb_rx_can_msg
.subsections_via_symbols
