	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tc574_wait_for_completion
_tc574_wait_for_completion:             ## @tc574_wait_for_completion
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_EL3_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rdi), %rsi
	movl	%r14d, %edi
	callq	_outw
	movl	$1501, %ebx                     ## imm = 0x5DD
	movq	_EL3_STATUS@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	cmpl	$2, %ebx
	jb	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_inw
	testl	$4096, %eax                     ## imm = 0x1000
	jne	LBB0_1
## %bb.3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netdev_notice                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EL3_CMD,8,3                    ## @EL3_CMD
	.comm	_EL3_STATUS,8,3                 ## @EL3_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"command 0x%04x did not complete!\n"

	.no_dead_strip	_tc574_wait_for_completion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tc574_wait_for_completion
_tc574_wait_for_completion:             ; @tc574_wait_for_completion
	.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, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _EL3_CMD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EL3_CMD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	bl	_outw
	mov	w21, #1501
Lloh3:
	adrp	x22, _EL3_STATUS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _EL3_STATUS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	sub	w21, w21, #1
	cmp	w21, #2
	b.lo	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_inw
	tbnz	w0, #12, LBB0_1
; %bb.3:
	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
LBB0_4:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	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
	b	_netdev_notice
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EL3_CMD,8,3                    ; @EL3_CMD
	.comm	_EL3_STATUS,8,3                 ; @EL3_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"command 0x%04x did not complete!\n"

	.no_dead_strip	_tc574_wait_for_completion
.subsections_via_symbols
