	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_usb_hydra_bus_status_to_can_state
_kvaser_usb_hydra_bus_status_to_can_state: ## @kvaser_usb_hydra_bus_status_to_can_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %r14
	movq	_KVASER_USB_HYDRA_BUS_BUS_OFF@GOTPCREL(%rip), %rcx
	testl	%esi, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_CAN_STATE_BUS_OFF@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_2:
	movq	_KVASER_USB_HYDRA_BUS_ERR_PASS@GOTPCREL(%rip), %rcx
	movq	_CAN_STATE_ERROR_PASSIVE@GOTPCREL(%rip), %rbx
	testl	%esi, (%rcx)
	je	LBB0_3
LBB0_10:
	movl	(%rbx), %eax
	movl	%eax, (%r14)
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	_KVASER_USB_HYDRA_BUS_ERR_ACT@GOTPCREL(%rip), %rcx
	cmpl	%esi, (%rcx)
	jne	LBB0_11
## %bb.4:
	movq	%rdx, %rax
	movl	(%rdx), %edx
	movl	4(%rax), %ecx
	cmpl	$127, %edx
	jg	LBB0_6
## %bb.5:
	cmpl	$128, %ecx
	jge	LBB0_6
## %bb.7:
	movq	_CAN_STATE_ERROR_WARNING@GOTPCREL(%rip), %rax
	movq	%rax, %rbx
	cmpl	$96, %ecx
	jge	LBB0_9
## %bb.8:
	movq	_CAN_STATE_ERROR_ACTIVE@GOTPCREL(%rip), %rbx
LBB0_9:
	cmpl	$96, %edx
	cmovgeq	%rax, %rbx
	jmp	LBB0_10
LBB0_6:
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_warn
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_KVASER_USB_HYDRA_BUS_BUS_OFF,4,2 ## @KVASER_USB_HYDRA_BUS_BUS_OFF
	.comm	_CAN_STATE_BUS_OFF,4,2          ## @CAN_STATE_BUS_OFF
	.comm	_KVASER_USB_HYDRA_BUS_ERR_PASS,4,2 ## @KVASER_USB_HYDRA_BUS_ERR_PASS
	.comm	_CAN_STATE_ERROR_PASSIVE,4,2    ## @CAN_STATE_ERROR_PASSIVE
	.comm	_KVASER_USB_HYDRA_BUS_ERR_ACT,4,2 ## @KVASER_USB_HYDRA_BUS_ERR_ACT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERR_ACTIVE but err tx=%u or rx=%u >=128\n"

	.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_usb_hydra_bus_status_to_can_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_usb_hydra_bus_status_to_can_state
_kvaser_usb_hydra_bus_status_to_can_state: ; @kvaser_usb_hydra_bus_status_to_can_state
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x3
Lloh0:
	adrp	x9, _KVASER_USB_HYDRA_BUS_BUS_OFF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KVASER_USB_HYDRA_BUS_BUS_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CAN_STATE_BUS_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAN_STATE_BUS_OFF@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x9, _KVASER_USB_HYDRA_BUS_ERR_PASS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _KVASER_USB_HYDRA_BUS_ERR_PASS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w1
	b.eq	LBB0_6
LBB0_3:
Lloh8:
	adrp	x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh10:
	adrp	x9, _KVASER_USB_HYDRA_BUS_ERR_ACT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _KVASER_USB_HYDRA_BUS_ERR_ACT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w9, w1
	b.ne	LBB0_5
; %bb.7:
	mov	x8, x2
	ldr	w2, [x2]
	ldr	w3, [x8, #4]
	cmp	w2, #127
	b.gt	LBB0_10
; %bb.8:
	cmp	w3, #128
	b.ge	LBB0_10
; %bb.9:
	cmp	w3, #95
	mov	w8, #95
	ccmp	w2, w8, #0, le
Lloh13:
	adrp	x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGEOFF]
Lloh15:
	adrp	x9, _CAN_STATE_ERROR_WARNING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CAN_STATE_ERROR_WARNING@GOTPAGEOFF]
	csel	x8, x9, x8, gt
	b	LBB0_4
LBB0_10:
	ldr	w0, [x0]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_warn
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_KVASER_USB_HYDRA_BUS_BUS_OFF,4,2 ; @KVASER_USB_HYDRA_BUS_BUS_OFF
	.comm	_CAN_STATE_BUS_OFF,4,2          ; @CAN_STATE_BUS_OFF
	.comm	_KVASER_USB_HYDRA_BUS_ERR_PASS,4,2 ; @KVASER_USB_HYDRA_BUS_ERR_PASS
	.comm	_CAN_STATE_ERROR_PASSIVE,4,2    ; @CAN_STATE_ERROR_PASSIVE
	.comm	_KVASER_USB_HYDRA_BUS_ERR_ACT,4,2 ; @KVASER_USB_HYDRA_BUS_ERR_ACT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERR_ACTIVE but err tx=%u or rx=%u >=128\n"

	.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_usb_hydra_bus_status_to_can_state
.subsections_via_symbols
