	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfa_ioc_ct_sync_complete
_bfa_ioc_ct_sync_complete:              ## @bfa_ioc_ct_sync_complete
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_readl
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_bfa_ioc_ct_get_sync_reqd
	movl	%eax, %r15d
	movl	%r12d, %edi
	callq	_bfa_ioc_ct_get_sync_ackd
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_bfa_ioc_ct_sync_pos
	testl	%r15d, %eax
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_bfa_ioc_ct_sync_pos
	movl	%ebx, %edi
	testl	%ebx, %eax
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_bfa_ioc_ct_sync_pos
	movl	%eax, %edi
	orl	%ebx, %edi
LBB0_6:
	cmpl	%edi, %r15d
	jne	LBB0_8
LBB0_7:
	movl	%r12d, %edi
	callq	_bfa_ioc_ct_clear_sync_ackd
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_writel
	movq	_BFI_IOC_FAIL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	8(%r14), %esi
	callq	_writel
	movl	(%rbx), %edi
	addq	$4, %r14
	movl	$1, %r15d
	jmp	LBB0_10
LBB0_1:
	movl	$1, %r15d
	jmp	LBB0_11
LBB0_3:
	movl	%ebx, %edi
	cmpl	%edi, %r15d
	je	LBB0_7
LBB0_8:
	xorl	%r15d, %r15d
	cmpl	%edi, %ebx
	je	LBB0_11
## %bb.9:
	orl	%r12d, %edi
	xorl	%r15d, %r15d
LBB0_10:
	movl	(%r14), %esi
	callq	_writel
LBB0_11:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BFI_IOC_FAIL,4,2               ## @BFI_IOC_FAIL
	.no_dead_strip	_bfa_ioc_ct_sync_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfa_ioc_ct_sync_complete
_bfa_ioc_ct_sync_complete:              ; @bfa_ioc_ct_sync_complete
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0]
	bl	_readl
	mov	x20, x0
	bl	_bfa_ioc_ct_get_sync_reqd
	mov	x21, x0
	mov	x0, x20
	bl	_bfa_ioc_ct_get_sync_ackd
	cbz	w0, LBB0_6
; %bb.1:
	mov	x22, x0
	mov	x0, x19
	bl	_bfa_ioc_ct_sync_pos
	tst	w0, w21
	b.eq	LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_bfa_ioc_ct_sync_pos
	mov	x8, x22
	tst	w0, w22
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_bfa_ioc_ct_sync_pos
	orr	w8, w0, w22
LBB0_4:
	cmp	w21, w8
	b.ne	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_bfa_ioc_ct_clear_sync_ackd
	ldr	w1, [x19]
	bl	_writel
Lloh0:
	adrp	x20, _BFI_IOC_FAIL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BFI_IOC_FAIL@GOTPAGEOFF]
	ldr	w0, [x20]
	ldr	w1, [x19, #8]
	bl	_writel
	ldr	w0, [x20]
	add	x19, x19, #4
	mov	w21, #1
	b	LBB0_11
LBB0_6:
	mov	w21, #1
	b	LBB0_12
LBB0_7:
	mov	x8, x22
	cmp	w21, w8
	b.eq	LBB0_5
LBB0_8:
	cmp	w22, w8
	b.ne	LBB0_10
; %bb.9:
	mov	w21, #0
	b	LBB0_12
LBB0_10:
	mov	w21, #0
	orr	w0, w8, w20
LBB0_11:
	ldr	w1, [x19]
	bl	_writel
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BFI_IOC_FAIL,4,2               ; @BFI_IOC_FAIL
	.no_dead_strip	_bfa_ioc_ct_sync_complete
.subsections_via_symbols
