	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_hw_wait_for_synth
_ath5k_hw_wait_for_synth:               ## @ath5k_hw_wait_for_synth
	.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), %rax
	movq	_AR5K_AR5210@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.5:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1500, %esi                     ## imm = 0x5DC
	jmp	LBB0_6
LBB0_1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_AR5K_PHY_RX_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ath5k_hw_reg_read
	movq	_AR5K_PHY_RX_DELAY_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	(%r14), %rcx
	movq	_AR5K_MODE_11B@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.2:
	shll	$2, %eax
	cltq
	imulq	$780903145, %rax, %rax          ## imm = 0x2E8BA2E9
	jmp	LBB0_4
LBB0_3:
	cltq
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
LBB0_4:
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movq	8(%rbx), %rdx
	movq	_AR5K_BWMODE_10MHZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	sete	%cl
	shll	%cl, %eax
	movq	_AR5K_BWMODE_5MHZ@GOTPCREL(%rip), %rcx
	leal	(,%rax,4), %edi
	cmpq	(%rcx), %rdx
	cmovnel	%eax, %edi
	leal	(%rdi,%rdi), %esi
	addl	$100, %esi
                                        ## kill: def $edi killed $edi killed $rdi
	addl	$100, %edi
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_usleep_range                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_AR5210,8,3                ## @AR5K_AR5210
	.comm	_AR5K_PHY_RX_DELAY,4,2          ## @AR5K_PHY_RX_DELAY
	.comm	_AR5K_PHY_RX_DELAY_M,4,2        ## @AR5K_PHY_RX_DELAY_M
	.comm	_AR5K_MODE_11B,8,3              ## @AR5K_MODE_11B
	.comm	_AR5K_BWMODE_10MHZ,8,3          ## @AR5K_BWMODE_10MHZ
	.comm	_AR5K_BWMODE_5MHZ,8,3           ## @AR5K_BWMODE_5MHZ
	.no_dead_strip	_ath5k_hw_wait_for_synth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_hw_wait_for_synth
_ath5k_hw_wait_for_synth:               ; @ath5k_hw_wait_for_synth
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AR5K_AR5210@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR5K_AR5210@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #1000
	mov	w1, #1500
	b	LBB0_3
LBB0_2:
	mov	x20, x1
	mov	x19, x0
Lloh3:
	adrp	x8, _AR5K_PHY_RX_DELAY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR5K_PHY_RX_DELAY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ath5k_hw_reg_read
Lloh6:
	adrp	x8, _AR5K_PHY_RX_DELAY_M@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR5K_PHY_RX_DELAY_M@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w0
	ldr	x9, [x20]
Lloh9:
	adrp	x10, _AR5K_MODE_11B@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AR5K_MODE_11B@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x10
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x9, w8, w9
	lsr	x10, x9, #63
	asr	x9, x9, #34
	add	w9, w9, w10
	lsl	w8, w8, #2
	mov	w10, #41705
	movk	w10, #11915, lsl #16
	smull	x8, w8, w10
	lsr	x10, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w10
	csel	w8, w9, w8, ne
	ldr	x9, [x19, #8]
Lloh12:
	adrp	x10, _AR5K_BWMODE_10MHZ@GOTPAGE
Lloh13:
	ldr	x10, [x10, _AR5K_BWMODE_10MHZ@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x9, x10
	cset	w10, eq
	lsl	w8, w8, w10
Lloh15:
	adrp	x10, _AR5K_BWMODE_5MHZ@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AR5K_BWMODE_5MHZ@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	lsl	w11, w8, #2
	cmp	x9, x10
	csel	w8, w11, w8, eq
	add	w0, w8, #100
	lsl	w8, w8, #1
	add	w1, w8, #100
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_usleep_range
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_AR5210,8,3                ; @AR5K_AR5210
	.comm	_AR5K_PHY_RX_DELAY,4,2          ; @AR5K_PHY_RX_DELAY
	.comm	_AR5K_PHY_RX_DELAY_M,4,2        ; @AR5K_PHY_RX_DELAY_M
	.comm	_AR5K_MODE_11B,8,3              ; @AR5K_MODE_11B
	.comm	_AR5K_BWMODE_10MHZ,8,3          ; @AR5K_BWMODE_10MHZ
	.comm	_AR5K_BWMODE_5MHZ,8,3           ; @AR5K_BWMODE_5MHZ
	.no_dead_strip	_ath5k_hw_wait_for_synth
.subsections_via_symbols
