	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ican3_set_bus_state
_ican3_set_bus_state:                   ## @ican3_set_bus_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	%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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	12(%rdi), %eax
	decl	%eax
	andl	$63, %eax
	movl	16(%rdi), %ecx
	shll	$6, %ecx
	addl	$192, %ecx
	movzbl	%cl, %r12d
	orl	%eax, %r12d
	movl	20(%rdi), %eax
	movl	24(%rdi), %ecx
	addl	%ecx, %eax
	decl	%eax
	andl	$15, %eax
	movl	28(%rdi), %ecx
	shll	$4, %ecx
	addl	$112, %ecx
	andl	$112, %ecx
	movq	_CAN_CTRLMODE_3_SAMPLES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rdi)
	leal	(%rcx,%rax), %edx
	leal	128(%rcx,%rax), %r13d
	cmovel	%edx, %r13d
	movq	(%rdi), %rax
	movq	_ICAN3_FWTYPE_ICANOS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_MSG_CBTRREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$4, %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movq	-64(%rbp), %rax
	movq	$0, (%rax)
	movl	%r12d, 8(%rax)
	movl	%r13d, 12(%rax)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ican3_send_msg
	testl	%eax, %eax
	jne	LBB0_16
LBB0_3:
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.4:
	movq	_MSG_COFFREQ@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_5:
	movq	_ICAN3_FWTYPE_CAL_CANOPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_MSG_LMTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.7:
	movl	$4, %edi
	callq	_cpu_to_le16
	movq	_LMTS_BUSON_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-64(%rbp), %rdx
	movl	%ecx, (%rdx)
	movl	$0, 4(%rdx)
	movl	%r12d, 8(%rdx)
	movl	%r13d, 12(%rdx)
	jmp	LBB0_12
LBB0_8:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_9:
	movq	_MSG_CONREQ@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	xorl	%edi, %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	jmp	LBB0_15
LBB0_11:
	movl	$2, %edi
	callq	_cpu_to_le16
	movq	_LMTS_BUSOFF_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-64(%rbp), %rdx
	movl	%ecx, (%rdx)
	movl	$0, 4(%rdx)
LBB0_12:
	movq	%rax, -56(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ican3_send_msg
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.13:
	testl	%eax, %eax
	jne	LBB0_16
## %bb.14:
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_MSG_NMTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$11, %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movq	_NMTS_CREATE_NODE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rdi
	movl	%eax, (%rdi)
	movabsq	$8589934592, %rax               ## imm = 0x200000000
	movq	%rax, 4(%rdi)
	movl	$1, 12(%rdi)
	addq	$16, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	%rbx, %rdi
	movq	%r14, %rsi
LBB0_15:
	callq	_ican3_send_msg
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAN_CTRLMODE_3_SAMPLES,4,2     ## @CAN_CTRLMODE_3_SAMPLES
	.comm	_ICAN3_FWTYPE_ICANOS,8,3        ## @ICAN3_FWTYPE_ICANOS
	.comm	_MSG_CBTRREQ,4,2                ## @MSG_CBTRREQ
	.comm	_MSG_CONREQ,4,2                 ## @MSG_CONREQ
	.comm	_MSG_COFFREQ,4,2                ## @MSG_COFFREQ
	.comm	_ICAN3_FWTYPE_CAL_CANOPEN,8,3   ## @ICAN3_FWTYPE_CAL_CANOPEN
	.comm	_MSG_LMTS,4,2                   ## @MSG_LMTS
	.comm	_LMTS_BUSON_REQ,4,2             ## @LMTS_BUSON_REQ
	.comm	_LMTS_BUSOFF_REQ,4,2            ## @LMTS_BUSOFF_REQ
	.comm	_MSG_NMTS,4,2                   ## @MSG_NMTS
	.comm	_NMTS_CREATE_NODE_REQ,4,2       ## @NMTS_CREATE_NODE_REQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"locnod1"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_ican3_set_bus_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ican3_set_bus_state
lCPI0_0:
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ican3_set_bus_state:                   ; @ican3_set_bus_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x19, x0
	ldp	w9, w8, [x0, #8]
	sub	w8, w8, #1
	ldp	w10, w11, [x0, #16]
	lsl	w10, w10, #6
	add	w10, w10, #192
	and	w21, w10, #0xc0
	bfxil	w21, w8, #0, #6
	ldp	w8, w10, [x0, #24]
	add	w8, w11, w8
	sub	w8, w8, #1
	lsl	w10, w10, #4
	add	w10, w10, #112
	and	w10, w10, #0x70
	bfxil	w10, w8, #0, #4
Lloh0:
	adrp	x8, _CAN_CTRLMODE_3_SAMPLES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAN_CTRLMODE_3_SAMPLES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w11, w10, #0x80
	tst	w8, w9
	csel	w22, w10, w11, eq
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _ICAN3_FWTYPE_ICANOS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ICAN3_FWTYPE_ICANOS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	cbz	w20, LBB0_3
; %bb.2:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh6:
	adrp	x8, _MSG_CBTRREQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSG_CBTRREQ@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	w0, #4
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	ldr	x8, [sp, #8]
	str	xzr, [x8]
	stp	w21, w22, [x8, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ican3_send_msg
	cbnz	w0, LBB0_13
LBB0_3:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh9:
	adrp	x8, _MSG_CONREQ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSG_CONREQ@GOTPAGEOFF]
Lloh11:
	adrp	x9, _MSG_COFFREQ@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MSG_COFFREQ@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	w0, #0
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	b	LBB0_12
LBB0_4:
Lloh13:
	adrp	x9, _ICAN3_FWTYPE_CAL_CANOPEN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ICAN3_FWTYPE_CAL_CANOPEN@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh16:
	adrp	x8, _MSG_LMTS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MSG_LMTS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	cbz	w20, LBB0_8
; %bb.6:
	mov	w0, #4
	bl	_cpu_to_le16
Lloh19:
	adrp	x8, _LMTS_BUSON_REQ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LMTS_BUSON_REQ@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	stp	w8, wzr, [x9]
	stp	w21, w22, [x9, #8]
	b	LBB0_9
LBB0_7:
Lloh22:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_8:
	mov	w0, #2
	bl	_cpu_to_le16
Lloh25:
	adrp	x8, _LMTS_BUSOFF_REQ@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LMTS_BUSOFF_REQ@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	stp	w8, wzr, [x9]
LBB0_9:
	str	x0, [sp, #16]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ican3_send_msg
	cbz	w20, LBB0_13
; %bb.10:
	cbnz	w0, LBB0_13
; %bb.11:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh28:
	adrp	x8, _MSG_NMTS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MSG_NMTS@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	w0, #11
	bl	_cpu_to_le16
	str	x0, [sp, #16]
Lloh31:
	adrp	x8, _NMTS_CREATE_NODE_REQ@GOTPAGE
Lloh32:
	ldr	x8, [x8, _NMTS_CREATE_NODE_REQ@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	str	w8, [x9]
Lloh34:
	adrp	x8, lCPI0_0@PAGE
Lloh35:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x9, #4]
	mov	w8, #1
	str	w8, [x9, #12]
	add	x0, x9, #16
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
LBB0_12:
	add	x1, sp, #8
	mov	x0, x19
	bl	_ican3_send_msg
LBB0_13:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdr	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_CAN_CTRLMODE_3_SAMPLES,4,2     ; @CAN_CTRLMODE_3_SAMPLES
	.comm	_ICAN3_FWTYPE_ICANOS,8,3        ; @ICAN3_FWTYPE_ICANOS
	.comm	_MSG_CBTRREQ,4,2                ; @MSG_CBTRREQ
	.comm	_MSG_CONREQ,4,2                 ; @MSG_CONREQ
	.comm	_MSG_COFFREQ,4,2                ; @MSG_COFFREQ
	.comm	_ICAN3_FWTYPE_CAL_CANOPEN,8,3   ; @ICAN3_FWTYPE_CAL_CANOPEN
	.comm	_MSG_LMTS,4,2                   ; @MSG_LMTS
	.comm	_LMTS_BUSON_REQ,4,2             ; @LMTS_BUSON_REQ
	.comm	_LMTS_BUSOFF_REQ,4,2            ; @LMTS_BUSOFF_REQ
	.comm	_MSG_NMTS,4,2                   ; @MSG_NMTS
	.comm	_NMTS_CREATE_NODE_REQ,4,2       ; @NMTS_CREATE_NODE_REQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"locnod1"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_ican3_set_bus_state
.subsections_via_symbols
