	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_pciefd_packet_to_state
_kvaser_pciefd_packet_to_state:         ## @kvaser_pciefd_packet_to_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	(%rdi), %rbx
	movl	(%rbx), %eax
	movq	_KVASER_PCIEFD_SPACK_BOFF@GOTPCREL(%rip), %r9
	movq	_CAN_STATE_BUS_OFF@GOTPCREL(%rip), %r11
	testl	%eax, (%r9)
	jne	LBB0_12
## %bb.1:
	movq	_KVASER_PCIEFD_SPACK_IRM@GOTPCREL(%rip), %rdi
	testl	%eax, (%rdi)
	jne	LBB0_12
## %bb.2:
	movl	(%rsi), %r10d
	cmpl	$254, %r10d
	jg	LBB0_12
## %bb.3:
	movl	4(%rsi), %r9d
	cmpl	$254, %r9d
	jg	LBB0_12
## %bb.4:
	movl	4(%rbx), %edi
	movq	_KVASER_PCIEFD_SPACK_EPLR@GOTPCREL(%rip), %rax
	movq	_CAN_STATE_ERROR_PASSIVE@GOTPCREL(%rip), %r11
	testl	%edi, (%rax)
	je	LBB0_5
LBB0_12:
	movl	(%r11), %edi
	movl	%edi, (%rdx)
	movl	(%rsi), %ebx
	xorl	%eax, %eax
	cmpl	4(%rsi), %ebx
	cmovll	%eax, %edi
	movl	%edi, (%rcx)
	movl	(%rsi), %ecx
	cmpl	4(%rsi), %ecx
	jg	LBB0_14
## %bb.13:
	movl	(%rdx), %eax
LBB0_14:
	movl	%eax, (%r8)
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	cmpl	$127, %r10d
	jg	LBB0_12
## %bb.6:
	cmpl	$127, %r9d
	jg	LBB0_12
## %bb.7:
	movq	_KVASER_PCIEFD_SPACK_EWLR@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_CAN_STATE_ERROR_WARNING@GOTPCREL(%rip), %r11
	jmp	LBB0_12
LBB0_9:
	movq	_CAN_STATE_ERROR_WARNING@GOTPCREL(%rip), %rdi
	movq	%rdi, %r11
	cmpl	$96, %r9d
	jge	LBB0_11
## %bb.10:
	movq	_CAN_STATE_ERROR_ACTIVE@GOTPCREL(%rip), %r11
LBB0_11:
	cmpl	$96, %r10d
	cmovgeq	%rdi, %r11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_KVASER_PCIEFD_SPACK_BOFF,4,2   ## @KVASER_PCIEFD_SPACK_BOFF
	.comm	_KVASER_PCIEFD_SPACK_IRM,4,2    ## @KVASER_PCIEFD_SPACK_IRM
	.comm	_CAN_STATE_BUS_OFF,4,2          ## @CAN_STATE_BUS_OFF
	.comm	_KVASER_PCIEFD_SPACK_EPLR,4,2   ## @KVASER_PCIEFD_SPACK_EPLR
	.comm	_CAN_STATE_ERROR_PASSIVE,4,2    ## @CAN_STATE_ERROR_PASSIVE
	.comm	_KVASER_PCIEFD_SPACK_EWLR,4,2   ## @KVASER_PCIEFD_SPACK_EWLR
	.comm	_CAN_STATE_ERROR_WARNING,4,2    ## @CAN_STATE_ERROR_WARNING
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ## @CAN_STATE_ERROR_ACTIVE
	.no_dead_strip	_kvaser_pciefd_packet_to_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_pciefd_packet_to_state
_kvaser_pciefd_packet_to_state:         ; @kvaser_pciefd_packet_to_state
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _KVASER_PCIEFD_SPACK_BOFF@GOTPAGE
Lloh1:
	ldr	x10, [x10, _KVASER_PCIEFD_SPACK_BOFF@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x10, _KVASER_PCIEFD_SPACK_IRM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _KVASER_PCIEFD_SPACK_IRM@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_4
; %bb.2:
	ldr	w9, [x1]
	cmp	w9, #254
	b.gt	LBB0_4
; %bb.3:
	ldr	w11, [x1, #4]
	cmp	w11, #254
	b.le	LBB0_8
LBB0_4:
Lloh6:
	adrp	x8, _CAN_STATE_BUS_OFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAN_STATE_BUS_OFF@GOTPAGEOFF]
LBB0_5:
	mov	w9, #0
	ldr	w8, [x8]
	str	w8, [x2]
	ldp	w10, w11, [x1]
	cmp	w10, w11
	csel	w8, wzr, w8, lt
	str	w8, [x3]
	ldp	w8, w10, [x1]
	cmp	w8, w10
	b.gt	LBB0_7
; %bb.6:
	ldr	w9, [x2]
LBB0_7:
	str	w9, [x4]
	ret
LBB0_8:
	ldr	w10, [x8, #4]
Lloh8:
	adrp	x8, _KVASER_PCIEFD_SPACK_EPLR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KVASER_PCIEFD_SPACK_EPLR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_10
; %bb.9:
Lloh11:
	adrp	x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGEOFF]
	b	LBB0_5
LBB0_10:
Lloh13:
	adrp	x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGEOFF]
	cmp	w9, #127
	b.gt	LBB0_5
; %bb.11:
	cmp	w11, #127
	b.gt	LBB0_5
; %bb.12:
Lloh15:
	adrp	x8, _KVASER_PCIEFD_SPACK_EWLR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KVASER_PCIEFD_SPACK_EWLR@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w11, #95
	mov	w11, #95
Lloh18:
	adrp	x12, _CAN_STATE_ERROR_ACTIVE@GOTPAGE
Lloh19:
	ldr	x12, [x12, _CAN_STATE_ERROR_ACTIVE@GOTPAGEOFF]
Lloh20:
	adrp	x13, _CAN_STATE_ERROR_WARNING@GOTPAGE
Lloh21:
	ldr	x13, [x13, _CAN_STATE_ERROR_WARNING@GOTPAGEOFF]
	ccmp	w9, w11, #0, le
	csel	x9, x13, x12, gt
	tst	w8, w10
Lloh22:
	adrp	x8, _CAN_STATE_ERROR_WARNING@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CAN_STATE_ERROR_WARNING@GOTPAGEOFF]
	csel	x8, x8, x9, ne
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_KVASER_PCIEFD_SPACK_BOFF,4,2   ; @KVASER_PCIEFD_SPACK_BOFF
	.comm	_KVASER_PCIEFD_SPACK_IRM,4,2    ; @KVASER_PCIEFD_SPACK_IRM
	.comm	_CAN_STATE_BUS_OFF,4,2          ; @CAN_STATE_BUS_OFF
	.comm	_KVASER_PCIEFD_SPACK_EPLR,4,2   ; @KVASER_PCIEFD_SPACK_EPLR
	.comm	_CAN_STATE_ERROR_PASSIVE,4,2    ; @CAN_STATE_ERROR_PASSIVE
	.comm	_KVASER_PCIEFD_SPACK_EWLR,4,2   ; @KVASER_PCIEFD_SPACK_EWLR
	.comm	_CAN_STATE_ERROR_WARNING,4,2    ; @CAN_STATE_ERROR_WARNING
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ; @CAN_STATE_ERROR_ACTIVE
	.no_dead_strip	_kvaser_pciefd_packet_to_state
.subsections_via_symbols
