	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_device
_reset_device:                          ## @reset_device
	.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, %r14
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	_TALITOS_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_has_ftr_sec1
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movq	_TALITOS2_MCR_SWR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_TALITOS1_MCR_SWR@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r12d
	movq	_TALITOS_MCR@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%r15), %rdi
	movl	%r12d, %esi
	callq	_setbits32
	movq	(%r13), %rdi
	addq	(%r15), %rdi
	callq	_in_be32
	testl	%r12d, %eax
	je	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movq	(%r13), %rdi
	addq	(%r15), %rdi
	callq	_in_be32
	testl	%r12d, %eax
	jne	LBB0_4
## %bb.7:
	movl	$1, %ebx
	jmp	LBB0_8
LBB0_5:
	xorl	%ebx, %ebx
LBB0_8:
	movq	8(%r15), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_10
## %bb.9:
	movq	_TALITOS_MCR_RCA1@GOTPCREL(%rip), %rax
	movq	_TALITOS_MCR_RCA3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	(%r13), %rdi
	addq	(%r15), %rdi
	callq	_setbits32
LBB0_10:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jne	LBB0_12
## %bb.11:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TALITOS_TIMEOUT,4,2            ## @TALITOS_TIMEOUT
	.comm	_TALITOS1_MCR_SWR,4,2           ## @TALITOS1_MCR_SWR
	.comm	_TALITOS2_MCR_SWR,4,2           ## @TALITOS2_MCR_SWR
	.comm	_TALITOS_MCR,8,3                ## @TALITOS_MCR
	.comm	_TALITOS_MCR_RCA1,4,2           ## @TALITOS_MCR_RCA1
	.comm	_TALITOS_MCR_RCA3,4,2           ## @TALITOS_MCR_RCA3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to reset device\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_reset_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_device
_reset_device:                          ; @reset_device
	.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	_dev_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _TALITOS_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TALITOS_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	bl	_has_ftr_sec1
Lloh3:
	adrp	x8, _TALITOS1_MCR_SWR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TALITOS1_MCR_SWR@GOTPAGEOFF]
Lloh5:
	adrp	x9, _TALITOS2_MCR_SWR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TALITOS2_MCR_SWR@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x9, x8, eq
	ldr	w21, [x8]
	ldr	x8, [x20]
Lloh7:
	adrp	x23, _TALITOS_MCR@GOTPAGE
Lloh8:
	ldr	x23, [x23, _TALITOS_MCR@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	mov	x1, x21
	bl	_setbits32
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_in_be32
	tst	w0, w21
	b.eq	LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	subs	w22, w22, #1
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_cpu_relax
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_in_be32
	tst	w0, w21
	b.ne	LBB0_1
; %bb.3:
	mov	w22, #1
LBB0_4:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _TALITOS_MCR_RCA1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TALITOS_MCR_RCA1@GOTPAGEOFF]
Lloh11:
	adrp	x9, _TALITOS_MCR_RCA3@GOTPAGE
Lloh12:
	ldr	x9, [x9, _TALITOS_MCR_RCA3@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w9, w8
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_setbits32
LBB0_6:
	cbz	w22, LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TALITOS_TIMEOUT,4,2            ; @TALITOS_TIMEOUT
	.comm	_TALITOS1_MCR_SWR,4,2           ; @TALITOS1_MCR_SWR
	.comm	_TALITOS2_MCR_SWR,4,2           ; @TALITOS2_MCR_SWR
	.comm	_TALITOS_MCR,8,3                ; @TALITOS_MCR
	.comm	_TALITOS_MCR_RCA1,4,2           ; @TALITOS_MCR_RCA1
	.comm	_TALITOS_MCR_RCA3,4,2           ; @TALITOS_MCR_RCA3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to reset device\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_reset_device
.subsections_via_symbols
