	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_normal_mode
_set_normal_mode:                       ## @set_normal_mode
	.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	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_SUN4I_MODE_MAX_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_SUN4I_REG_MSEL_ADDR@GOTPCREL(%rip), %r13
	movq	_SUN4I_MSEL_RESET_MODE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	(%r12), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	(%r13), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	addl	$-1, %r14d
	jae	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	andl	(%r12), %ebx
	jne	LBB0_1
LBB0_3:
	movq	(%r13), %rdi
	addq	(%r15), %rdi
	callq	_readl
	testl	%eax, (%r12)
	je	LBB0_4
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUN4I_MODE_MAX_RETRIES,4,2     ## @SUN4I_MODE_MAX_RETRIES
	.comm	_SUN4I_REG_MSEL_ADDR,8,3        ## @SUN4I_REG_MSEL_ADDR
	.comm	_SUN4I_MSEL_RESET_MODE,4,2      ## @SUN4I_MSEL_RESET_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting controller into normal mode failed!\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_set_normal_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_normal_mode
_set_normal_mode:                       ; @set_normal_mode
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
Lloh0:
	adrp	x8, _SUN4I_MODE_MAX_RETRIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SUN4I_MODE_MAX_RETRIES@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
Lloh3:
	adrp	x23, _SUN4I_REG_MSEL_ADDR@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SUN4I_REG_MSEL_ADDR@GOTPAGEOFF]
Lloh5:
	adrp	x22, _SUN4I_MSEL_RESET_MODE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SUN4I_MSEL_RESET_MODE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x22]
	bic	w21, w0, w8
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	subs	w24, w24, #1
	b.lo	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x22]
	and	w8, w8, w21
	cbnz	w8, LBB0_1
LBB0_3:
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.4:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN4I_MODE_MAX_RETRIES,4,2     ; @SUN4I_MODE_MAX_RETRIES
	.comm	_SUN4I_REG_MSEL_ADDR,8,3        ; @SUN4I_REG_MSEL_ADDR
	.comm	_SUN4I_MSEL_RESET_MODE,4,2      ; @SUN4I_MSEL_RESET_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting controller into normal mode failed!\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_set_normal_mode
.subsections_via_symbols
