	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sta_compare
_sta_compare:                           ## @sta_compare
	.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
	movl	12(%rdi), %eax
	movl	12(%rsi), %edx
	xorl	%eax, %edx
	movq	_IEEE80211_CAPINFO_PRIVACY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %edx
	je	LBB0_3
## %bb.1:
	andl	%eax, %ecx
	xorl	%ebx, %ebx
	cmpl	$1, %ecx
LBB0_2:
	sbbl	%ebx, %ebx
	orl	$1, %ebx
	jmp	LBB0_9
LBB0_3:
	movq	%rsi, %r13
	movq	%rdi, %r14
	movl	(%rsi), %ebx
	subl	(%rdi), %ebx
	movl	%ebx, %eax
	negl	%eax
	cmovsl	%ebx, %eax
	cmpl	$1, %eax
	ja	LBB0_9
## %bb.4:
	leaq	4(%r14), %r12
	leaq	4(%r13), %r15
	movl	(%r12), %edi
	movq	_STA_RSSI_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MIN
	movl	%eax, %ebx
	movl	(%r15), %edi
	movq	_STA_RSSI_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MIN
	subl	%ebx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	$4, %ecx
	ja	LBB0_8
## %bb.5:
	movq	%r12, %rdi
	callq	_maxrate
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_maxrate
	subl	%eax, %ebx
	jne	LBB0_9
## %bb.6:
	movl	8(%r14), %edi
	callq	_IEEE80211_IS_CHAN_5GHZ
	movl	%eax, %ebx
	movl	8(%r13), %edi
	callq	_IEEE80211_IS_CHAN_5GHZ
	xorl	%ebx, %eax
	testb	$1, %al
	jne	LBB0_7
LBB0_8:
	movl	(%r12), %ebx
	subl	(%r15), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	8(%r14), %edi
	callq	_IEEE80211_IS_CHAN_5GHZ
	andl	$1, %eax
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CAPINFO_PRIVACY,4,2  ## @IEEE80211_CAPINFO_PRIVACY
	.comm	_STA_RSSI_MAX,4,2               ## @STA_RSSI_MAX
	.no_dead_strip	_sta_compare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sta_compare
_sta_compare:                           ; @sta_compare
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x0, #12]
	ldr	w9, [x1, #12]
	eor	w10, w9, w8
Lloh0:
	adrp	x9, _IEEE80211_CAPINFO_PRIVACY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_CAPINFO_PRIVACY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.1:
	tst	w9, w8
LBB0_2:
	mov	w8, #-1
	cneg	w0, w8, ne
	b	LBB0_8
LBB0_3:
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
	ldr	w9, [x0]
	subs	w0, w8, w9
	cneg	w8, w0, mi
	cmp	w8, #1
	b.hi	LBB0_8
; %bb.4:
	add	x21, x19, #4
	add	x22, x20, #4
	ldr	w0, [x21]
Lloh3:
	adrp	x24, _STA_RSSI_MAX@GOTPAGE
Lloh4:
	ldr	x24, [x24, _STA_RSSI_MAX@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_MIN
	mov	x23, x0
	ldr	w0, [x22]
	ldr	w1, [x24]
	bl	_MIN
	subs	w8, w0, w23
	cneg	w8, w8, mi
	cmp	w8, #4
	b.hi	LBB0_7
; %bb.5:
	mov	x0, x21
	bl	_maxrate
	mov	x23, x0
	mov	x0, x22
	bl	_maxrate
	subs	w0, w23, w0
	b.ne	LBB0_8
; %bb.6:
	ldr	w0, [x19, #8]
	bl	_IEEE80211_IS_CHAN_5GHZ
	mov	x23, x0
	ldr	w0, [x20, #8]
	bl	_IEEE80211_IS_CHAN_5GHZ
	eor	w8, w0, w23
	tbnz	w8, #0, LBB0_9
LBB0_7:
	ldr	w8, [x21]
	ldr	w9, [x22]
	sub	w0, w8, w9
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	w0, [x19, #8]
	bl	_IEEE80211_IS_CHAN_5GHZ
	tst	w0, #0x1
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CAPINFO_PRIVACY,4,2  ; @IEEE80211_CAPINFO_PRIVACY
	.comm	_STA_RSSI_MAX,4,2               ; @STA_RSSI_MAX
	.no_dead_strip	_sta_compare
.subsections_via_symbols
