	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbefifo_read_response
_sbefifo_read_response:                 ## @sbefifo_read_response
	.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	$40, %rsp
	.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), %rbx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_iov_iter_count
	leaq	L_.str(%rip), %rsi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_vdbg
	movq	_SBEFIFO_TIMEOUT_START_RSP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%rax, %rcx
	callq	_sbefifo_wait
	testl	%eax, %eax
	js	LBB0_13
## %bb.1:
	movq	_SBEFIFO_TIMEOUT_IN_RSP@GOTPCREL(%rip), %rax
	leaq	L_.str.1(%rip), %r14
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	%r15, %r13
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r15
	movl	-44(%rbp), %edi
	callq	_sbefifo_populated
	movq	%rax, %rbx
	movl	-44(%rbp), %edi
	callq	_sbefifo_eot_set
	movl	%eax, %r12d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_vdbg
	testq	%rbx, %rbx
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %r14d
	subq	%rbx, %r14
	movq	%r13, %r15
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_vdbg
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=2
	addl	%r12d, %r12d
	incq	%r14
	cmpq	$1, %r14
	je	LBB0_11
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	leaq	-60(%rbp), %rsi
	callq	_sbefifo_down_read
	testl	%eax, %eax
	js	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	testb	$-128, %r12b
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%rbx, %rdi
	callq	_iov_iter_count
	cmpl	$4, %eax
	jb	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	leaq	-60(%rbp), %rdi
	movl	$4, %esi
	movq	%rbx, %rdx
	callq	_copy_to_iter
	cmpl	$3, %eax
	ja	LBB0_5
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %r15
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	xorl	%esi, %esi
	leaq	-44(%rbp), %rdx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	callq	_sbefifo_wait
	movl	%eax, %r13d
	testl	%eax, %eax
	movq	_SBEFIFO_TIMEOUT_IN_RSP@GOTPCREL(%rip), %rax
	leaq	L_.str.1(%rip), %r14
	jns	LBB0_2
	jmp	LBB0_20
LBB0_13:
	movl	%eax, %r13d
	jmp	LBB0_20
LBB0_14:
	testq	%r14, %r14
	je	LBB0_16
## %bb.15:
	negq	%r14
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_dev_warn
	movl	$1, (%r15)
LBB0_16:
	movq	_SBEFIFO_DOWN@GOTPCREL(%rip), %rax
	movq	_SBEFIFO_EOT_ACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_sbefifo_regw
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.3(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
	movl	$1, (%r15)
LBB0_18:
	movq	_EOVERFLOW@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	cmovel	%eax, %r13d
	jmp	LBB0_20
LBB0_19:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_20:
	movl	%r13d, %eax
	addq	$40, %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	"reading response, buflen = %zd\n"

	.comm	_SBEFIFO_TIMEOUT_START_RSP,4,2  ## @SBEFIFO_TIMEOUT_START_RSP
	.comm	_SBEFIFO_TIMEOUT_IN_RSP,4,2     ## @SBEFIFO_TIMEOUT_IN_RSP
L_.str.1:                               ## @.str.1
	.asciz	"  chunk size %zd eot_set=0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"FIFO read hit EOT with still %zd data\n"

	.comm	_SBEFIFO_DOWN,4,2               ## @SBEFIFO_DOWN
	.comm	_SBEFIFO_EOT_ACK,4,2            ## @SBEFIFO_EOT_ACK
L_.str.3:                               ## @.str.3
	.asciz	"FSI error %d ack'ing EOT\n"

	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_EFAULT,4,2                     ## @EFAULT
L_.str.4:                               ## @.str.4
	.asciz	"Response overflowed !\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbefifo_read_response
_sbefifo_read_response:                 ; @sbefifo_read_response
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	mov	x0, x1
	bl	_iov_iter_count
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_vdbg
Lloh2:
	adrp	x8, _SBEFIFO_TIMEOUT_START_RSP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SBEFIFO_TIMEOUT_START_RSP@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x3, x0
	add	x2, sp, #28
	mov	x0, x19
	mov	w1, #0
	bl	_sbefifo_wait
	tbnz	w0, #31, LBB0_17
; %bb.1:
	mov	w27, #0
Lloh5:
	adrp	x28, _SBEFIFO_TIMEOUT_IN_RSP@GOTPAGE
Lloh6:
	ldr	x28, [x28, _SBEFIFO_TIMEOUT_IN_RSP@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str.1@PAGE
Lloh8:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh9:
	adrp	x23, l_.str.4@PAGE
Lloh10:
	add	x23, x23, l_.str.4@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x2, sp, #28
	mov	x0, x19
	mov	w1, #0
	mov	x3, x24
	bl	_sbefifo_wait
	tbnz	w0, #31, LBB0_17
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w0, [x28]
	bl	_msecs_to_jiffies
	mov	x24, x0
	ldr	w0, [sp, #28]
	bl	_sbefifo_populated
	mov	x26, x0
	ldr	w0, [sp, #28]
	bl	_sbefifo_eot_set
	mov	x25, x0
	stp	x26, x25, [sp]
	mov	x0, x20
	mov	x1, x22
	bl	_dev_vdbg
	cbz	x26, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #1
	sub	x26, x8, x26
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x20
	mov	x1, x23
	bl	_dev_vdbg
	mov	w27, #1
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	lsl	w25, w25, #1
	add	x26, x26, #1
	cmp	x26, #1
	b.eq	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x1, sp, #24
	mov	x0, x19
	bl	_sbefifo_down_read
	tbnz	w0, #31, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	tbnz	w25, #7, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x21
	bl	_iov_iter_count
	cmp	w0, #4
	b.lo	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	add	x0, sp, #24
	mov	w1, #4
	mov	x2, x21
	bl	_copy_to_iter
	cmp	w0, #3
	b.hi	LBB0_6
; %bb.11:
Lloh11:
	adrp	x8, _EFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_12:
	cbz	x26, LBB0_14
; %bb.13:
	neg	x2, x26
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	mov	w8, #1
	str	w8, [x19]
LBB0_14:
Lloh16:
	adrp	x8, _SBEFIFO_DOWN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SBEFIFO_DOWN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _SBEFIFO_EOT_ACK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SBEFIFO_EOT_ACK@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	mov	w2, #0
	bl	_sbefifo_regw
	cbz	w0, LBB0_16
; %bb.15:
	mov	x2, x0
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	w8, #1
	str	w8, [x19]
LBB0_16:
Lloh24:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w27, #0
	csneg	w0, wzr, w8, eq
LBB0_17:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reading response, buflen = %zd\n"

	.comm	_SBEFIFO_TIMEOUT_START_RSP,4,2  ; @SBEFIFO_TIMEOUT_START_RSP
	.comm	_SBEFIFO_TIMEOUT_IN_RSP,4,2     ; @SBEFIFO_TIMEOUT_IN_RSP
l_.str.1:                               ; @.str.1
	.asciz	"  chunk size %zd eot_set=0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"FIFO read hit EOT with still %zd data\n"

	.comm	_SBEFIFO_DOWN,4,2               ; @SBEFIFO_DOWN
	.comm	_SBEFIFO_EOT_ACK,4,2            ; @SBEFIFO_EOT_ACK
l_.str.3:                               ; @.str.3
	.asciz	"FSI error %d ack'ing EOT\n"

	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_EFAULT,4,2                     ; @EFAULT
l_.str.4:                               ; @.str.4
	.asciz	"Response overflowed !\n"

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