	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rdi), %r14
	movq	%r14, %rdi
	movl	$24, %esi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r12
	movq	_ETH_P_CAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, (%r12)
	movq	%r12, %rdi
	movl	$24, %esi
	callq	_skb_put
	movq	%rax, %rbx
	movl	20(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, 16(%rbx)
	movq	_u8@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r15), %esi
	movl	$8, %edx
	callq	_min_t
	movl	%eax, (%rbx)
	movq	(%r15), %rcx
	movq	_CPC_MSG_TYPE_EXT_CAN_FRAME@GOTPCREL(%rip), %rsi
	movq	_CPC_MSG_TYPE_EXT_RTR_FRAME@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	(%rsi), %rcx
	je	LBB0_3
## %bb.2:
	cmpq	%rdx, %rcx
	jne	LBB0_4
LBB0_3:
	movq	_CAN_EFF_FLAG@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	%esi, 16(%rbx)
LBB0_4:
	movq	_CPC_MSG_TYPE_RTR_FRAME@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	je	LBB0_11
## %bb.5:
	cmpq	%rdx, %rcx
	je	LBB0_11
## %bb.6:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.7:
	movq	8(%r15), %rax
	movq	8(%rbx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdx,4), %esi
	movl	%esi, (%rcx,%rdx,4)
	incq	%rdx
	movslq	(%rbx), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_8
	jmp	LBB0_9
LBB0_11:
	movq	_CAN_RTR_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
LBB0_9:
	movq	%r12, %rdi
	callq	_netif_rx
	incl	4(%r14)
	movl	(%rbx), %eax
	addl	%eax, (%r14)
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_P_CAN,4,2                  ## @ETH_P_CAN
	.comm	_u8,4,2                         ## @u8
	.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:
	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	x22, x1
	ldr	x19, [x0]
	mov	x0, x19
	mov	w1, #24
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _ETH_P_CAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_P_CAN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_htons
	str	w0, [x20]
	mov	x0, x20
	mov	w1, #24
	bl	_skb_put
	mov	x21, x0
	ldr	w0, [x22, #20]
	bl	_le32_to_cpu
	str	w0, [x21, #16]
Lloh3:
	adrp	x8, _u8@GOTPAGE
Lloh4:
	ldr	x8, [x8, _u8@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x22, #16]
	mov	w2, #8
	bl	_min_t
	str	w0, [x21]
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _CPC_MSG_TYPE_EXT_CAN_FRAME@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CPC_MSG_TYPE_EXT_CAN_FRAME@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x9]
Lloh9:
	adrp	x9, _CPC_MSG_TYPE_EXT_RTR_FRAME@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CPC_MSG_TYPE_EXT_RTR_FRAME@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_3
; %bb.2:
Lloh12:
	adrp	x10, _CAN_EFF_FLAG@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CAN_EFF_FLAG@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	ldr	w11, [x21, #16]
	orr	w10, w11, w10
	str	w10, [x21, #16]
LBB0_3:
Lloh15:
	adrp	x10, _CPC_MSG_TYPE_RTR_FRAME@GOTPAGE
Lloh16:
	ldr	x10, [x10, _CPC_MSG_TYPE_RTR_FRAME@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_5
; %bb.4:
Lloh18:
	adrp	x8, _CAN_RTR_FLAG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CAN_RTR_FLAG@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x21, #16]
	orr	w8, w9, w8
	str	w8, [x21, #16]
	b	LBB0_8
LBB0_5:
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x8, #0
	ldr	x9, [x22, #8]
	ldr	x10, [x21, #8]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x11, x8, #2
	ldr	w12, [x9, x11]
	str	w12, [x10, x11]
	add	x8, x8, #1
	ldrsw	x11, [x21]
	cmp	x8, x11
	b.lt	LBB0_7
LBB0_8:
	mov	x0, x20
	bl	_netif_rx
	ldr	d0, [x19]
	movi.2s	v1, #1
	ld1.s	{ v1 }[0], [x21]
	add.2s	v0, v0, v1
	str	d0, [x19]
LBB0_9:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_P_CAN,4,2                  ; @ETH_P_CAN
	.comm	_u8,4,2                         ; @u8
	.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
