	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __bba_get_linkstateasync
___bba_get_linkstateasync:              ## @__bba_get_linkstateasync
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movq	%r14, %rdi
	callq	___linkstate
	testb	$-16, %al
	je	LBB0_3
## %bb.1:
	movl	%eax, %ecx
	andl	$8, %ecx
	je	LBB0_3
## %bb.2:
	movb	$1, %bl
	jmp	LBB0_8
LBB0_3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$-9999, %ebx                    ## imm = 0xD8F1
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movq	%r14, %rdi
	callq	___linkstate
	decl	%ebx
	testb	$-16, %al
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %ecx
	andl	$8, %ecx
	je	LBB0_4
## %bb.7:
	notl	%ebx
	cmpl	$9999, %ebx                     ## imm = 0x270F
	setb	%bl
LBB0_8:
	andl	$4, %eax
	xorl	%edi, %edi
	cmpl	$1, %eax
	adcl	$1, %edi
	movq	_TB_USPERSEC@GOTPCREL(%rip), %rax
	imull	(%rax), %edi
	callq	_udelay
	jmp	LBB0_10
LBB0_9:
	negl	%ebx
	cmpl	$9999, %ebx                     ## imm = 0x270F
	setb	%bl
LBB0_10:
	movzbl	%bl, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TB_USPERSEC,4,2                ## @TB_USPERSEC
	.no_dead_strip	___bba_get_linkstateasync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __bba_get_linkstateasync
___bba_get_linkstateasync:              ; @__bba_get_linkstateasync
	.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
	mov	w0, #500
	bl	_udelay
	mov	x0, x19
	bl	___linkstate
	tst	w0, #0xf0
	b.eq	LBB0_3
; %bb.1:
	tbz	w0, #3, LBB0_3
; %bb.2:
	mov	w19, #1
	b	LBB0_8
LBB0_3:
	mov	w20, #0
	mov	w21, #9999
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w20, w21
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #500
	bl	_udelay
	mov	x0, x19
	bl	___linkstate
	add	w20, w20, #1
	tst	w0, #0xf0
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	tbz	w0, #3, LBB0_4
; %bb.7:
	sub	w8, w20, #1
	mov	w9, #9999
	cmp	w8, w9
	cset	w19, lo
LBB0_8:
	tst	w0, #0x4
	mov	w8, #1
	cinc	w8, w8, eq
Lloh0:
	adrp	x9, _TB_USPERSEC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TB_USPERSEC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w0, w9, w8
	bl	_udelay
	b	LBB0_10
LBB0_9:
	mov	w8, #9999
	cmp	w20, w8
	cset	w19, lo
LBB0_10:
	mov	x0, 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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TB_USPERSEC,4,2                ; @TB_USPERSEC
	.no_dead_strip	___bba_get_linkstateasync
.subsections_via_symbols
