	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbefifo_request_reset
_sbefifo_request_reset:                 ## @sbefifo_request_reset
	.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, %r15
	movq	8(%rdi), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movl	$1, (%r15)
	movq	_SBEFIFO_UP@GOTPCREL(%rip), %r13
	movq	_SBEFIFO_REQ_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r13), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_sbefifo_regw
	testl	%eax, %eax
	je	LBB0_1
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_1:
	movq	_SBEFIFO_RESET_TIMEOUT@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_10
## %bb.2:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SBEFIFO_STS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r13), %esi
	movq	%r15, %rdi
	leaq	-48(%rbp), %rdx
	callq	_sbefifo_regr
	testl	%eax, %eax
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SBEFIFO_STS_RESET_REQ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, -48(%rbp)
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_msleep
	incq	%r12
	movq	_SBEFIFO_RESET_TIMEOUT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jl	LBB0_3
LBB0_10:
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_4:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movl	$0, (%r15)
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Requesting FIFO reset\n"

	.comm	_SBEFIFO_UP,4,2                 ## @SBEFIFO_UP
	.comm	_SBEFIFO_REQ_RESET,4,2          ## @SBEFIFO_REQ_RESET
L_.str.1:                               ## @.str.1
	.asciz	"Sending reset request failed, rc=%d\n"

	.comm	_SBEFIFO_RESET_TIMEOUT,8,3      ## @SBEFIFO_RESET_TIMEOUT
	.comm	_SBEFIFO_STS,4,2                ## @SBEFIFO_STS
L_.str.2:                               ## @.str.2
	.asciz	"Failed to read UP fifo status during reset , rc=%d\n"

	.comm	_SBEFIFO_STS_RESET_REQ,8,3      ## @SBEFIFO_STS_RESET_REQ
L_.str.3:                               ## @.str.3
	.asciz	"FIFO reset done\n"

L_.str.4:                               ## @.str.4
	.asciz	"FIFO reset timed out\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbefifo_request_reset
_sbefifo_request_reset:                 ; @sbefifo_request_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w8, #1
Lloh2:
	adrp	x22, _SBEFIFO_UP@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SBEFIFO_UP@GOTPAGEOFF]
	str	w8, [x20]
	ldr	w8, [x22]
Lloh4:
	adrp	x9, _SBEFIFO_REQ_RESET@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SBEFIFO_REQ_RESET@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	mov	w2, #1
	bl	_sbefifo_regw
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	str	x21, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_10
LBB0_2:
Lloh9:
	adrp	x23, _SBEFIFO_RESET_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x23, [x23, _SBEFIFO_RESET_TIMEOUT@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x24, #0
Lloh11:
	adrp	x25, _SBEFIFO_STS@GOTPAGE
Lloh12:
	ldr	x25, [x25, _SBEFIFO_STS@GOTPAGEOFF]
Lloh13:
	adrp	x26, _SBEFIFO_STS_RESET_REQ@GOTPAGE
Lloh14:
	ldr	x26, [x26, _SBEFIFO_STS_RESET_REQ@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	ldr	w9, [x25]
	orr	w1, w9, w8
	add	x2, sp, #8
	mov	x0, x20
	bl	_sbefifo_regr
	cbnz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [x26]
	tst	x9, x8
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	bl	_msleep
	add	x24, x24, #1
	ldr	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_4
LBB0_7:
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh17:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_8:
	mov	x21, x0
	str	x21, [sp]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_10
LBB0_9:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w21, #0
	str	wzr, [x20]
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Requesting FIFO reset\n"

	.comm	_SBEFIFO_UP,4,2                 ; @SBEFIFO_UP
	.comm	_SBEFIFO_REQ_RESET,4,2          ; @SBEFIFO_REQ_RESET
l_.str.1:                               ; @.str.1
	.asciz	"Sending reset request failed, rc=%d\n"

	.comm	_SBEFIFO_RESET_TIMEOUT,8,3      ; @SBEFIFO_RESET_TIMEOUT
	.comm	_SBEFIFO_STS,4,2                ; @SBEFIFO_STS
l_.str.2:                               ; @.str.2
	.asciz	"Failed to read UP fifo status during reset , rc=%d\n"

	.comm	_SBEFIFO_STS_RESET_REQ,8,3      ; @SBEFIFO_STS_RESET_REQ
l_.str.3:                               ; @.str.3
	.asciz	"FIFO reset done\n"

l_.str.4:                               ; @.str.4
	.asciz	"FIFO reset timed out\n"

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