	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4ican_set_bittiming
_sun4ican_set_bittiming:                ## @sun4ican_set_bittiming
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movl	12(%rax), %eax
	movl	16(%r15), %ecx
	decl	%eax
	andl	$1023, %eax                     ## imm = 0x3FF
	shll	$14, %ecx
	addl	$49152, %ecx                    ## imm = 0xC000
	movzwl	%cx, %ecx
	orl	%eax, %ecx
	movl	24(%r15), %eax
	addl	20(%r15), %eax
	shll	$16, %eax
	addl	$983040, %eax                   ## imm = 0xF0000
	andl	$983040, %eax                   ## imm = 0xF0000
	orl	%ecx, %eax
	movl	28(%r15), %ecx
	shll	$20, %ecx
	addl	$7340032, %ecx                  ## imm = 0x700000
	andl	$7340032, %ecx                  ## imm = 0x700000
	movq	_CAN_CTRLMODE_3_SAMPLES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	8(%r15), %edx
	leal	(%rax,%rcx), %edx
	leal	8388608(%rcx,%rax), %ebx
	cmovel	%edx, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_netdev_dbg
	movq	_SUN4I_REG_BTIME_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAN_CTRLMODE_3_SAMPLES,4,2     ## @CAN_CTRLMODE_3_SAMPLES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting BITTIMING=0x%08x\n"

	.comm	_SUN4I_REG_BTIME_ADDR,8,3       ## @SUN4I_REG_BTIME_ADDR
	.no_dead_strip	_sun4ican_set_bittiming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4ican_set_bittiming
_sun4ican_set_bittiming:                ; @sun4ican_set_bittiming
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldp	w9, w8, [x0, #8]
	sub	w8, w8, #1
	ldp	w10, w11, [x0, #16]
	lsl	w10, w10, #14
	add	w10, w10, #12, lsl #12          ; =49152
	and	w10, w10, #0xc000
	bfxil	w10, w8, #0, #10
	ldp	w8, w12, [x0, #24]
	add	w8, w8, w11
	lsl	w8, w8, #16
	add	w8, w8, #240, lsl #12           ; =983040
	and	w8, w8, #0xf0000
	orr	w8, w10, w8
	lsl	w10, w12, #20
	add	w10, w10, #1792, lsl #12        ; =7340032
	and	w10, w10, #0x700000
	orr	w8, w8, w10
Lloh0:
	adrp	x10, _CAN_CTRLMODE_3_SAMPLES@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CAN_CTRLMODE_3_SAMPLES@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	orr	w11, w8, #0x800000
	tst	w10, w9
	csel	w21, w8, w11, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_netdev_dbg
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _SUN4I_REG_BTIME_ADDR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SUN4I_REG_BTIME_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CAN_CTRLMODE_3_SAMPLES,4,2     ; @CAN_CTRLMODE_3_SAMPLES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting BITTIMING=0x%08x\n"

	.comm	_SUN4I_REG_BTIME_ADDR,8,3       ; @SUN4I_REG_BTIME_ADDR
	.no_dead_strip	_sun4ican_set_bittiming
.subsections_via_symbols
