	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcan_usb_fd_encode_msg
_pcan_usb_fd_encode_msg:                ## @pcan_usb_fd_encode_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	%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	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r12
	movq	8(%r12), %rdi
	addq	$40, %rdi
	movl	$4, %esi
	callq	_ALIGN
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_cpu_to_le16
	movq	%rax, (%r13)
	movq	_PUCAN_MSG_CAN_TX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_cpu_to_le16
	movq	%rax, 32(%r13)
	movl	(%r12), %edi
	movq	_CAN_EFF_FLAG@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	movl	(%rax), %eax
	andl	%edi, %eax
	movq	_PUCAN_MSG_EXT_ID@GOTPCREL(%rip), %rax
	cmovneq	(%rax), %rbx
	movq	_CAN_EFF_MASK@GOTPCREL(%rip), %rax
	cmoveq	_CAN_SFF_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 24(%r13)
	movq	%r14, %rdi
	callq	_can_is_canfd_skb
	movq	8(%r12), %r14
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%r14, %rdi
	callq	_can_len2dlc
	movq	%rax, %r14
	movq	_PUCAN_MSG_EXT_DATA_LEN@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movl	4(%r12), %eax
	movq	_CANFD_BRS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.3:
	movq	_PUCAN_MSG_BITRATE_SWITCH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	jmp	LBB0_4
LBB0_6:
	movq	_CAN_RTR_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_9
## %bb.7:
	movq	_PUCAN_MSG_RTR@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	xorl	%ecx, %ecx
LBB0_4:
	orq	%rcx, %rbx
	movq	_CANFD_ESI@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.5:
	movq	_PUCAN_MSG_ERROR_STATE_IND@GOTPCREL(%rip), %rax
LBB0_8:
	orq	(%rax), %rbx
LBB0_9:
	movq	%rbx, %rdi
	callq	_cpu_to_le16
	movq	%rax, 16(%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_PUCAN_MSG_CHANNEL_DLC
	movl	%eax, 12(%r13)
	movl	8(%r13), %edi
	movl	16(%r12), %esi
	movq	8(%r12), %rdx
	callq	_memcpy
	movq	$0, (%r13,%r15,8)
	addq	$4, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PUCAN_MSG_CAN_TX,8,3           ## @PUCAN_MSG_CAN_TX
	.comm	_CAN_EFF_FLAG,4,2               ## @CAN_EFF_FLAG
	.comm	_PUCAN_MSG_EXT_ID,8,3           ## @PUCAN_MSG_EXT_ID
	.comm	_CAN_EFF_MASK,4,2               ## @CAN_EFF_MASK
	.comm	_CAN_SFF_MASK,4,2               ## @CAN_SFF_MASK
	.comm	_PUCAN_MSG_EXT_DATA_LEN,8,3     ## @PUCAN_MSG_EXT_DATA_LEN
	.comm	_CANFD_BRS,4,2                  ## @CANFD_BRS
	.comm	_PUCAN_MSG_BITRATE_SWITCH,8,3   ## @PUCAN_MSG_BITRATE_SWITCH
	.comm	_CANFD_ESI,4,2                  ## @CANFD_ESI
	.comm	_PUCAN_MSG_ERROR_STATE_IND,8,3  ## @PUCAN_MSG_ERROR_STATE_IND
	.comm	_CAN_RTR_FLAG,4,2               ## @CAN_RTR_FLAG
	.comm	_PUCAN_MSG_RTR,8,3              ## @PUCAN_MSG_RTR
	.no_dead_strip	_pcan_usb_fd_encode_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcan_usb_fd_encode_msg
_pcan_usb_fd_encode_msg:                ; @pcan_usb_fd_encode_msg
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x24, x1
	mov	x22, x0
	ldr	x25, [x1]
	ldr	x8, [x25, #8]
	add	x0, x8, #40
	mov	w1, #4
	bl	_ALIGN
	mov	x21, x0
	bl	_cpu_to_le16
	str	x0, [x20]
Lloh0:
	adrp	x8, _PUCAN_MSG_CAN_TX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PUCAN_MSG_CAN_TX@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	bl	_cpu_to_le16
	str	x0, [x20, #32]
	ldr	w8, [x25]
Lloh3:
	adrp	x9, _CAN_EFF_FLAG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CAN_EFF_FLAG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _PUCAN_MSG_EXT_ID@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PUCAN_MSG_EXT_ID@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	tst	w9, w8
Lloh9:
	adrp	x9, _CAN_SFF_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CAN_SFF_MASK@GOTPAGEOFF]
	csel	x23, xzr, x10, eq
Lloh11:
	adrp	x10, _CAN_EFF_MASK@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CAN_EFF_MASK@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_cpu_to_le32
	str	x0, [x20, #24]
	mov	x0, x24
	bl	_can_is_canfd_skb
	ldr	x24, [x25, #8]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x24
	bl	_can_len2dlc
	mov	x24, x0
Lloh13:
	adrp	x8, _PUCAN_MSG_EXT_DATA_LEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PUCAN_MSG_EXT_DATA_LEN@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	orr	x8, x8, x23
Lloh16:
	adrp	x9, _CANFD_BRS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CANFD_BRS@GOTPAGEOFF]
	ldr	w10, [x25, #4]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x11, _PUCAN_MSG_BITRATE_SWITCH@GOTPAGE
Lloh20:
	ldr	x11, [x11, _PUCAN_MSG_BITRATE_SWITCH@GOTPAGEOFF]
Lloh21:
	ldr	x11, [x11]
	tst	w9, w10
	csel	x9, xzr, x11, eq
	orr	x23, x8, x9
Lloh22:
	adrp	x8, _CANFD_ESI@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CANFD_ESI@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_6
; %bb.2:
Lloh25:
	adrp	x8, _PUCAN_MSG_ERROR_STATE_IND@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PUCAN_MSG_ERROR_STATE_IND@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	ldr	w8, [x25]
Lloh27:
	adrp	x9, _CAN_RTR_FLAG@GOTPAGE
Lloh28:
	ldr	x9, [x9, _CAN_RTR_FLAG@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
Lloh30:
	adrp	x8, _PUCAN_MSG_RTR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PUCAN_MSG_RTR@GOTPAGEOFF]
LBB0_5:
	ldr	x8, [x8]
	orr	x23, x8, x23
LBB0_6:
	mov	x0, x23
	bl	_cpu_to_le16
	str	x0, [x20, #16]
	ldr	w0, [x22]
	mov	x1, x24
	bl	_PUCAN_MSG_CHANNEL_DLC
	str	w0, [x20, #12]
	ldr	w0, [x20, #8]
	ldr	w1, [x25, #16]
	ldr	x2, [x25, #8]
	bl	_memcpy
	str	xzr, [x20, x21, lsl #3]
	add	x8, x21, #4
	str	x8, [x19]
	mov	w0, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_PUCAN_MSG_CAN_TX,8,3           ; @PUCAN_MSG_CAN_TX
	.comm	_CAN_EFF_FLAG,4,2               ; @CAN_EFF_FLAG
	.comm	_PUCAN_MSG_EXT_ID,8,3           ; @PUCAN_MSG_EXT_ID
	.comm	_CAN_EFF_MASK,4,2               ; @CAN_EFF_MASK
	.comm	_CAN_SFF_MASK,4,2               ; @CAN_SFF_MASK
	.comm	_PUCAN_MSG_EXT_DATA_LEN,8,3     ; @PUCAN_MSG_EXT_DATA_LEN
	.comm	_CANFD_BRS,4,2                  ; @CANFD_BRS
	.comm	_PUCAN_MSG_BITRATE_SWITCH,8,3   ; @PUCAN_MSG_BITRATE_SWITCH
	.comm	_CANFD_ESI,4,2                  ; @CANFD_ESI
	.comm	_PUCAN_MSG_ERROR_STATE_IND,8,3  ; @PUCAN_MSG_ERROR_STATE_IND
	.comm	_CAN_RTR_FLAG,4,2               ; @CAN_RTR_FLAG
	.comm	_PUCAN_MSG_RTR,8,3              ; @PUCAN_MSG_RTR
	.no_dead_strip	_pcan_usb_fd_encode_msg
.subsections_via_symbols
