	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifo_icap_get_configuration    ## -- Begin function fifo_icap_get_configuration
	.p2align	4, 0x90
_fifo_icap_get_configuration:           ## @fifo_icap_get_configuration
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_fifo_icap_busy
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_1:
	testq	%rbx, %rbx
	jle	LBB0_14
## %bb.2:
	xorl	%r14d, %r14d
	movq	_XHI_MAX_READ_TRANSACTION_WORDS@GOTPCREL(%rip), %rax
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##       Child Loop BB0_9 Depth 3
                                        ##       Child Loop BB0_13 Depth 3
	movq	(%rax), %r12
	cmpq	%r12, %rbx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	cmovlq	%rbx, %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_fifo_icap_set_read_size
	movq	%r15, %rdi
	callq	_fifo_icap_start_readback
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	movq	_XHI_MAX_RETRIES@GOTPCREL(%rip), %r12
	jle	LBB0_5
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_9 Depth 3
                                        ##       Child Loop BB0_13 Depth 3
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	testq	%rbx, %rbx
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=3
	movq	%r15, %rdi
	callq	_fifo_icap_read_fifo_occupancy
	movq	%rax, %rbx
	leaq	1(%r14), %rax
	cmpq	(%r12), %r14
	movq	%rax, %r14
	jl	LBB0_9
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %rbx
	cmovgeq	%rax, %rbx
	subq	%rbx, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_7
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_6 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%r15, %rdi
	callq	_fifo_icap_fifo_read
	cltq
	movq	%rax, (%r13)
	addq	$8, %r13
	decq	%rbx
	jne	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=2
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	jg	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	subq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	testq	%rbx, %rbx
	movq	_XHI_MAX_READ_TRANSACTION_WORDS@GOTPCREL(%rip), %rax
	jg	LBB0_6
LBB0_14:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$24, %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	"fifo_get_configuration\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_XHI_MAX_READ_TRANSACTION_WORDS,8,3 ## @XHI_MAX_READ_TRANSACTION_WORDS
	.comm	_XHI_MAX_RETRIES,8,3            ## @XHI_MAX_RETRIES
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"done fifo_get_configuration\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifo_icap_get_configuration    ; -- Begin function fifo_icap_get_configuration
	.p2align	2
_fifo_icap_get_configuration:           ; @fifo_icap_get_configuration
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x20
	bl	_fifo_icap_busy
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_14
LBB0_2:
	cmp	x19, #1
	b.lt	LBB0_12
; %bb.3:
	mov	x23, #0
Lloh4:
	adrp	x24, _XHI_MAX_READ_TRANSACTION_WORDS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _XHI_MAX_READ_TRANSACTION_WORDS@GOTPAGEOFF]
Lloh6:
	adrp	x25, _XHI_MAX_RETRIES@GOTPAGE
Lloh7:
	ldr	x25, [x25, _XHI_MAX_RETRIES@GOTPAGEOFF]
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_6 Depth 3
                                        ;       Child Loop BB0_9 Depth 3
	ldr	x8, [x24]
	cmp	x19, x8
	csel	x22, x19, x8, lt
	mov	x0, x20
	mov	x1, x22
	bl	_fifo_icap_set_read_size
	mov	x0, x20
	bl	_fifo_icap_start_readback
	mov	x26, x22
	cmp	x22, #1
	b.lt	LBB0_11
LBB0_5:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_6 Depth 3
                                        ;       Child Loop BB0_9 Depth 3
	mov	x0, #0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cbnz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=3
	mov	x0, x20
	bl	_fifo_icap_read_fifo_occupancy
	add	x8, x23, #1
	ldr	x9, [x25]
	cmp	x23, x9
	mov	x23, x8
	b.lt	LBB0_6
	b	LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=2
	cmp	x0, x26
	csel	x27, x0, x26, lt
	sub	x26, x26, x27
	cbz	x27, LBB0_10
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mov	x0, x20
	bl	_fifo_icap_fifo_read
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	str	x8, [x21], #8
	subs	x27, x27, #1
	b.ne	LBB0_9
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	x26, #1
	b.ge	LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	x19, x19, x22
	cmp	x19, #1
	b.ge	LBB0_4
LBB0_12:
	ldr	w0, [x20]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_15
LBB0_13:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fifo_get_configuration\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_XHI_MAX_READ_TRANSACTION_WORDS,8,3 ; @XHI_MAX_READ_TRANSACTION_WORDS
	.comm	_XHI_MAX_RETRIES,8,3            ; @XHI_MAX_RETRIES
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"done fifo_get_configuration\n"

.subsections_via_symbols
