	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_pciefd_prepare_tx_packet
_kvaser_pciefd_prepare_tx_packet:       ## @kvaser_pciefd_prepare_tx_packet
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdx), %r12
	movl	(%rsi), %r13d
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_CAN_CTRLMODE_ONE_SHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_KVASER_PCIEFD_TPACKET_SMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	orl	%eax, 4(%rcx)
LBB0_2:
	movl	(%r12), %eax
	movq	_CAN_RTR_FLAG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_KVASER_PCIEFD_RPACKET_RTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	orl	%eax, (%rcx)
	movl	(%r12), %eax
LBB0_4:
	movq	_CAN_EFF_FLAG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.6:
	movq	_KVASER_PCIEFD_RPACKET_IDE@GOTPCREL(%rip), %rax
	movq	(%r15), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	%edx, (%rcx)
	movl	(%r12), %eax
	jmp	LBB0_7
LBB0_5:
	movq	(%r15), %rcx
	movl	(%rcx), %edx
LBB0_7:
	movq	_CAN_EFF_MASK@GOTPCREL(%rip), %rsi
	andl	(%rsi), %eax
	orl	%edx, %eax
	movl	%eax, (%rcx)
	movl	4(%r12), %edi
	callq	_can_len2dlc
	movq	_KVASER_PCIEFD_RPACKET_DLC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	(%r15), %rcx
	orl	4(%rcx), %eax
	movq	_KVASER_PCIEFD_TPACKET_AREQ@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 4(%rcx)
	movq	%r14, %rdi
	callq	_can_is_canfd_skb
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	_KVASER_PCIEFD_RPACKET_FDF@GOTPCREL(%rip), %rdx
	movq	(%r15), %rax
	movl	4(%rax), %ecx
	orl	(%rdx), %ecx
	movl	%ecx, 4(%rax)
	movl	8(%r12), %edx
	movq	_CANFD_BRS@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_11
## %bb.10:
	movq	_KVASER_PCIEFD_RPACKET_BRS@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 4(%rax)
	movl	8(%r12), %edx
LBB0_11:
	movq	_CANFD_ESI@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_13
## %bb.12:
	movq	_KVASER_PCIEFD_RPACKET_ESI@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 4(%rax)
	jmp	LBB0_13
LBB0_8:
	movq	(%r15), %rax
	movl	4(%rax), %ecx
LBB0_13:
	movq	_KVASER_PCIEFD_PACKET_SEQ_MSK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %r13d
	orl	%ecx, %r13d
	movl	%r13d, 4(%rax)
	movl	8(%r15), %edi
	movl	4(%r12), %ebx
	movl	12(%r12), %esi
	movl	%ebx, %edx
	callq	_memcpy
	movl	%ebx, %edi
	movl	$4, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DIV_ROUND_UP                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CAN_CTRLMODE_ONE_SHOT,4,2      ## @CAN_CTRLMODE_ONE_SHOT
	.comm	_KVASER_PCIEFD_TPACKET_SMS,4,2  ## @KVASER_PCIEFD_TPACKET_SMS
	.comm	_CAN_RTR_FLAG,4,2               ## @CAN_RTR_FLAG
	.comm	_KVASER_PCIEFD_RPACKET_RTR,4,2  ## @KVASER_PCIEFD_RPACKET_RTR
	.comm	_CAN_EFF_FLAG,4,2               ## @CAN_EFF_FLAG
	.comm	_KVASER_PCIEFD_RPACKET_IDE,4,2  ## @KVASER_PCIEFD_RPACKET_IDE
	.comm	_CAN_EFF_MASK,4,2               ## @CAN_EFF_MASK
	.comm	_KVASER_PCIEFD_RPACKET_DLC_SHIFT,4,2 ## @KVASER_PCIEFD_RPACKET_DLC_SHIFT
	.comm	_KVASER_PCIEFD_TPACKET_AREQ,4,2 ## @KVASER_PCIEFD_TPACKET_AREQ
	.comm	_KVASER_PCIEFD_RPACKET_FDF,4,2  ## @KVASER_PCIEFD_RPACKET_FDF
	.comm	_CANFD_BRS,4,2                  ## @CANFD_BRS
	.comm	_KVASER_PCIEFD_RPACKET_BRS,4,2  ## @KVASER_PCIEFD_RPACKET_BRS
	.comm	_CANFD_ESI,4,2                  ## @CANFD_ESI
	.comm	_KVASER_PCIEFD_RPACKET_ESI,4,2  ## @KVASER_PCIEFD_RPACKET_ESI
	.comm	_KVASER_PCIEFD_PACKET_SEQ_MSK,4,2 ## @KVASER_PCIEFD_PACKET_SEQ_MSK
	.no_dead_strip	_kvaser_pciefd_prepare_tx_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_pciefd_prepare_tx_packet
_kvaser_pciefd_prepare_tx_packet:       ; @kvaser_pciefd_prepare_tx_packet
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x2]
	ldr	w23, [x1]
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w8, [x21, #4]
Lloh0:
	adrp	x9, _CAN_CTRLMODE_ONE_SHOT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CAN_CTRLMODE_ONE_SHOT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _KVASER_PCIEFD_TPACKET_SMS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KVASER_PCIEFD_TPACKET_SMS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	w10, [x9, #4]
	orr	w8, w10, w8
	str	w8, [x9, #4]
LBB0_2:
	ldr	w8, [x22]
Lloh6:
	adrp	x9, _CAN_RTR_FLAG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CAN_RTR_FLAG@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _KVASER_PCIEFD_RPACKET_RTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KVASER_PCIEFD_RPACKET_RTR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	ldr	w8, [x22]
LBB0_4:
Lloh12:
	adrp	x9, _CAN_EFF_FLAG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CAN_EFF_FLAG@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh15:
	adrp	x8, _KVASER_PCIEFD_RPACKET_IDE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KVASER_PCIEFD_RPACKET_IDE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	w10, [x9]
	orr	w10, w10, w8
	str	w10, [x9]
	ldr	w8, [x22]
	b	LBB0_7
LBB0_6:
	ldr	x9, [x19]
	ldr	w10, [x9]
LBB0_7:
Lloh18:
	adrp	x11, _CAN_EFF_MASK@GOTPAGE
Lloh19:
	ldr	x11, [x11, _CAN_EFF_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	and	w8, w11, w8
	orr	w8, w10, w8
	str	w8, [x9]
	ldr	w0, [x22, #4]
	bl	_can_len2dlc
Lloh21:
	adrp	x8, _KVASER_PCIEFD_RPACKET_DLC_SHIFT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _KVASER_PCIEFD_RPACKET_DLC_SHIFT@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	ldr	x9, [x19]
	ldr	w10, [x9, #4]
	orr	w8, w10, w8
Lloh24:
	adrp	x10, _KVASER_PCIEFD_TPACKET_AREQ@GOTPAGE
Lloh25:
	ldr	x10, [x10, _KVASER_PCIEFD_TPACKET_AREQ@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	orr	w8, w10, w8
	str	w8, [x9, #4]
	mov	x0, x20
	bl	_can_is_canfd_skb
	cbz	x0, LBB0_12
; %bb.8:
Lloh27:
	adrp	x8, _KVASER_PCIEFD_RPACKET_FDF@GOTPAGE
Lloh28:
	ldr	x8, [x8, _KVASER_PCIEFD_RPACKET_FDF@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x8]
	ldr	x8, [x19]
	ldr	w10, [x8, #4]
	orr	w9, w10, w9
	str	w9, [x8, #4]
	ldr	w10, [x22, #8]
Lloh30:
	adrp	x11, _CANFD_BRS@GOTPAGE
Lloh31:
	ldr	x11, [x11, _CANFD_BRS@GOTPAGEOFF]
Lloh32:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_10
; %bb.9:
Lloh33:
	adrp	x10, _KVASER_PCIEFD_RPACKET_BRS@GOTPAGE
Lloh34:
	ldr	x10, [x10, _KVASER_PCIEFD_RPACKET_BRS@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8, #4]
	ldr	w10, [x22, #8]
LBB0_10:
Lloh36:
	adrp	x11, _CANFD_ESI@GOTPAGE
Lloh37:
	ldr	x11, [x11, _CANFD_ESI@GOTPAGEOFF]
Lloh38:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_13
; %bb.11:
Lloh39:
	adrp	x10, _KVASER_PCIEFD_RPACKET_ESI@GOTPAGE
Lloh40:
	ldr	x10, [x10, _KVASER_PCIEFD_RPACKET_ESI@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x10]
	orr	w9, w9, w10
	str	w9, [x8, #4]
	b	LBB0_13
LBB0_12:
	ldr	x8, [x19]
	ldr	w9, [x8, #4]
LBB0_13:
Lloh42:
	adrp	x10, _KVASER_PCIEFD_PACKET_SEQ_MSK@GOTPAGE
Lloh43:
	ldr	x10, [x10, _KVASER_PCIEFD_PACKET_SEQ_MSK@GOTPAGEOFF]
Lloh44:
	ldr	w10, [x10]
	and	w10, w10, w23
	orr	w9, w9, w10
	str	w9, [x8, #4]
	ldr	w20, [x22, #4]
	ldr	w0, [x19, #8]
	ldr	w1, [x22, #12]
	mov	x2, x20
	bl	_memcpy
	mov	x0, x20
	mov	w1, #4
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_DIV_ROUND_UP
	.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
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_CAN_CTRLMODE_ONE_SHOT,4,2      ; @CAN_CTRLMODE_ONE_SHOT
	.comm	_KVASER_PCIEFD_TPACKET_SMS,4,2  ; @KVASER_PCIEFD_TPACKET_SMS
	.comm	_CAN_RTR_FLAG,4,2               ; @CAN_RTR_FLAG
	.comm	_KVASER_PCIEFD_RPACKET_RTR,4,2  ; @KVASER_PCIEFD_RPACKET_RTR
	.comm	_CAN_EFF_FLAG,4,2               ; @CAN_EFF_FLAG
	.comm	_KVASER_PCIEFD_RPACKET_IDE,4,2  ; @KVASER_PCIEFD_RPACKET_IDE
	.comm	_CAN_EFF_MASK,4,2               ; @CAN_EFF_MASK
	.comm	_KVASER_PCIEFD_RPACKET_DLC_SHIFT,4,2 ; @KVASER_PCIEFD_RPACKET_DLC_SHIFT
	.comm	_KVASER_PCIEFD_TPACKET_AREQ,4,2 ; @KVASER_PCIEFD_TPACKET_AREQ
	.comm	_KVASER_PCIEFD_RPACKET_FDF,4,2  ; @KVASER_PCIEFD_RPACKET_FDF
	.comm	_CANFD_BRS,4,2                  ; @CANFD_BRS
	.comm	_KVASER_PCIEFD_RPACKET_BRS,4,2  ; @KVASER_PCIEFD_RPACKET_BRS
	.comm	_CANFD_ESI,4,2                  ; @CANFD_ESI
	.comm	_KVASER_PCIEFD_RPACKET_ESI,4,2  ; @KVASER_PCIEFD_RPACKET_ESI
	.comm	_KVASER_PCIEFD_PACKET_SEQ_MSK,4,2 ; @KVASER_PCIEFD_PACKET_SEQ_MSK
	.no_dead_strip	_kvaser_pciefd_prepare_tx_packet
.subsections_via_symbols
