	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifo_icap_set_configuration    ## -- Begin function fifo_icap_set_configuration
	.p2align	4, 0x90
_fifo_icap_set_configuration:           ## @fifo_icap_set_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_fifo_icap_busy
	testq	%rax, %rax
	je	LBB0_1
## %bb.21:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_19
LBB0_1:
	xorl	%r13d, %r13d
	testq	%r15, %r15
	jle	LBB0_12
## %bb.2:
	xorl	%ebx, %ebx
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##     Child Loop BB0_7 Depth 2
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%rbx, %rbx
	jne	LBB0_5
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%r14, %rdi
	callq	_fifo_icap_write_fifo_vacancy
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%rax, %rbx
	leaq	1(%r13), %rax
	movq	_XHI_MAX_RETRIES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r13
	movq	%rax, %r13
	jl	LBB0_4
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	testq	%r15, %r15
	jle	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %r14
	movq	(%r12), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_fifo_icap_fifo_write
	leaq	-1(%r15), %rax
	decq	%rbx
	addq	$8, %r12
	cmpq	$1, %r14
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	cmpq	$1, %r15
	movq	%rax, %r15
	ja	LBB0_7
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rax, %r15
	callq	_fifo_icap_start_config
	testq	%r15, %r15
	jne	LBB0_3
## %bb.10:
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	callq	_fifo_icap_start_config
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_12:
	decq	%r13
	movq	_XHI_MAX_RETRIES@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_fifo_icap_busy
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	incq	%r13
	cmpq	(%rbx), %r13
	jl	LBB0_13
LBB0_15:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	testq	%r15, %r15
	je	LBB0_16
LBB0_18:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_19:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fifo_set_configuration\n"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifo_icap_set_configuration    ; -- Begin function fifo_icap_set_configuration
	.p2align	2
_fifo_icap_set_configuration:           ; @fifo_icap_set_configuration
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_fifo_icap_busy
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_17
LBB0_2:
Lloh4:
	adrp	x23, _XHI_MAX_RETRIES@GOTPAGE
Lloh5:
	ldr	x23, [x23, _XHI_MAX_RETRIES@GOTPAGEOFF]
	cmp	x20, #1
	b.lt	LBB0_11
; %bb.3:
	mov	x24, #0
	mov	x22, #0
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	cbnz	x22, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_fifo_icap_write_fifo_vacancy
	mov	x22, x0
	add	x8, x24, #1
	ldr	x9, [x23]
	cmp	x24, x9
	mov	x24, x8
	b.lt	LBB0_4
	b	LBB0_16
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x20, #1
	b.lt	LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x20
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x21], #8
	mov	x0, x19
	bl	_fifo_icap_fifo_write
	sub	x20, x25, #1
	subs	x22, x22, #1
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	cmp	x25, #1
	mov	x25, x20
	b.hi	LBB0_8
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_fifo_icap_start_config
	cbnz	x20, LBB0_4
	b	LBB0_12
LBB0_11:
	mov	x24, #0
LBB0_12:
	sub	x21, x24, #1
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_fifo_icap_busy
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x23]
	add	x21, x21, #1
	cmp	x21, x8
	b.lt	LBB0_13
LBB0_15:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	cbz	x20, LBB0_19
LBB0_16:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_19:
	mov	w0, #0
	b	LBB0_18
LBB0_20:
	mov	x0, x19
	bl	_fifo_icap_start_config
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fifo_set_configuration\n"

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

.subsections_via_symbols
