	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw2100_wx_wireless_stats
_ipw2100_wx_wireless_stats:             ## @ipw2100_wx_wireless_stats
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_libipw_priv
	movl	$4, -44(%rbp)
	testq	%rax, %rax
	je	LBB0_37
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %r13
	addq	$8, %r13
	movq	_STATUS_ASSOCIATED@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, (%r14)
	je	LBB0_2
## %bb.3:
	movq	_IPW_ORD_STAT_PERCENT_MISSED_BCNS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	callq	_ipw2100_get_ordinal
	testq	%rax, %rax
	je	LBB0_4
LBB0_36:
	leaq	L_.str(%rip), %rdi
	callq	_IPW_DEBUG_WX
LBB0_37:
	xorl	%r13d, %r13d
	jmp	LBB0_38
LBB0_2:
	movq	$0, 8(%r14)
	movl	$0, 16(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r14)
	movq	_IW_QUAL_NOISE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IW_QUAL_QUAL_INVALID@GOTPCREL(%rip), %rcx
	movq	_IW_QUAL_LEVEL_INVALID@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	orl	$7, %eax
	movl	%eax, 20(%r14)
LBB0_38:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%rbx), %eax
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.6:
	movq	_IPW_ORD_RSSI_AVG_CURR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	callq	_ipw2100_get_ordinal
	testq	%rax, %rax
	jne	LBB0_36
## %bb.7:
	movslq	-52(%rbp), %rax
	movq	_IPW2100_RSSI_TO_DBM@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	addq	%rax, %rcx
	movq	%rcx, 32(%r14)
	cmpq	$9, %rax
	jg	LBB0_9
## %bb.8:
	leal	(%rax,%rax,2), %r15d
	jmp	LBB0_14
LBB0_5:
	movl	$0, 16(%r14)
	movq	$0, 32(%r14)
LBB0_34:
	movq	$0, 24(%r14)
	movq	_IW_QUAL_NOISE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	$7, %eax
	movl	%eax, 20(%r14)
	movl	-48(%rbp), %eax
	movl	%eax, 12(%r14)
	movq	_IPW_ORD_STAT_TX_FAILURES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	callq	_ipw2100_get_ordinal
	testq	%rax, %rax
	jne	LBB0_36
## %bb.35:
	movl	-56(%rbp), %eax
	movl	%eax, (%r13)
	jmp	LBB0_38
LBB0_9:
	cmpl	$14, %eax
	ja	LBB0_11
## %bb.10:
	movl	%eax, %ecx
	shll	$5, %ecx
	subl	%eax, %ecx
	subl	%eax, %ecx
	addb	$-44, %cl
	movzbl	%cl, %eax
	imull	$205, %eax, %eax
	shrl	$10, %eax
	addb	$30, %al
	movzbl	%al, %r15d
	jmp	LBB0_14
LBB0_11:
	cmpl	$19, %eax
	ja	LBB0_13
## %bb.12:
	leal	(,%rax,4), %eax
	leal	(%rax,%rax,4), %eax
	addb	$-44, %al
	movzbl	%al, %eax
	imull	$205, %eax, %eax
	shrl	$10, %eax
	addb	$60, %al
	movzbl	%al, %r15d
	jmp	LBB0_14
LBB0_13:
	leal	60(%rax), %r15d
LBB0_14:
	movq	_IPW_ORD_STAT_PERCENT_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	callq	_ipw2100_get_ordinal
	testq	%rax, %rax
	jne	LBB0_36
## %bb.15:
	movl	-60(%rbp), %eax
	cmpl	$76, %eax
	jl	LBB0_17
## %bb.16:
	addl	%eax, %eax
	movl	$180, %edi
	subl	%eax, %edi
	jmp	LBB0_24
LBB0_17:
	cmpl	$71, %eax
	jl	LBB0_19
## %bb.18:
	movl	$75, %ecx
	subl	%eax, %ecx
	leal	(%rcx,%rcx,2), %eax
	leal	(%rax,%rax), %edi
	addl	$30, %edi
	jmp	LBB0_24
LBB0_19:
	cmpl	$66, %eax
	jl	LBB0_21
## %bb.20:
	shll	$2, %eax
	movl	$340, %edi                      ## imm = 0x154
	subl	%eax, %edi
	jmp	LBB0_24
LBB0_21:
	cmpl	$51, %eax
	jl	LBB0_23
## %bb.22:
	movb	$65, %cl
	subb	%al, %cl
	movzbl	%cl, %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movzbl	%al, %eax
	imull	$137, %eax, %eax
	shrl	$11, %eax
	addb	$80, %al
	movzbl	%al, %edi
	jmp	LBB0_24
LBB0_23:
	movl	$50, %ecx
	subl	%eax, %ecx
	movl	$3435973837, %edi               ## imm = 0xCCCCCCCD
	imulq	%rcx, %rdi
	shrq	$34, %rdi
	addl	$90, %edi
LBB0_24:
	movl	-48(%rbp), %eax
	cmpl	$51, %eax
	jl	LBB0_26
## %bb.25:
	movl	$60, %ecx
	subl	%eax, %ecx
	leal	(%rcx,%rcx,2), %r12d
	jmp	LBB0_33
LBB0_26:
	cmpl	$41, %eax
	jl	LBB0_28
## %bb.27:
	movl	$50, %ecx
	subl	%eax, %ecx
	leal	(%rcx,%rcx,2), %r12d
	addl	$30, %r12d
	jmp	LBB0_33
LBB0_28:
	cmpl	$33, %eax
	jl	LBB0_30
## %bb.29:
	movb	$40, %cl
	subb	%al, %cl
	movzbl	%cl, %eax
	shll	$2, %eax
	leal	(%rax,%rax,4), %eax
	movzbl	%al, %eax
	imull	$57, %eax, %eax
	shrl	$10, %eax
	addb	$60, %al
	movzbl	%al, %r12d
	jmp	LBB0_33
LBB0_30:
	cmpl	$21, %eax
	jl	LBB0_32
## %bb.31:
	movl	$32, %r12d
	subl	%eax, %r12d
	shrl	%r12d
	addl	$80, %r12d
	jmp	LBB0_33
LBB0_32:
	movl	$20, %r12d
	subl	%eax, %r12d
	shrl	%r12d
	addl	$90, %r12d
LBB0_33:
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%r15d, %esi
	callq	_min
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, 16(%r14)
	movslq	-52(%rbp), %rax
	addq	(%rbx), %rax
	movq	%rax, 32(%r14)
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_ASSOCIATED,4,2          ## @STATUS_ASSOCIATED
	.comm	_IW_QUAL_NOISE_INVALID,4,2      ## @IW_QUAL_NOISE_INVALID
	.comm	_IW_QUAL_QUAL_INVALID,4,2       ## @IW_QUAL_QUAL_INVALID
	.comm	_IW_QUAL_LEVEL_INVALID,4,2      ## @IW_QUAL_LEVEL_INVALID
	.comm	_IPW_ORD_STAT_PERCENT_MISSED_BCNS,4,2 ## @IPW_ORD_STAT_PERCENT_MISSED_BCNS
	.comm	_IPW_ORD_RSSI_AVG_CURR,4,2      ## @IPW_ORD_RSSI_AVG_CURR
	.comm	_IPW2100_RSSI_TO_DBM,8,3        ## @IPW2100_RSSI_TO_DBM
	.comm	_IPW_ORD_STAT_PERCENT_RETRIES,4,2 ## @IPW_ORD_STAT_PERCENT_RETRIES
	.comm	_IPW_ORD_STAT_TX_FAILURES,4,2   ## @IPW_ORD_STAT_TX_FAILURES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed querying ordinals.\n"

	.no_dead_strip	_ipw2100_wx_wireless_stats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw2100_wx_wireless_stats
_ipw2100_wx_wireless_stats:             ; @ipw2100_wx_wireless_stats
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	bl	_libipw_priv
	mov	w8, #4
	str	w8, [sp, #12]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x19, x0
	ldr	w8, [x19], #8
Lloh0:
	adrp	x21, _STATUS_ASSOCIATED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _STATUS_ASSOCIATED@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _IPW_ORD_STAT_PERCENT_MISSED_BCNS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IPW_ORD_STAT_PERCENT_MISSED_BCNS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #20
	add	x3, sp, #12
	mov	x0, x20
	bl	_ipw2100_get_ordinal
	cbz	x0, LBB0_7
LBB0_3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_WX
LBB0_4:
	mov	x19, #0
	b	LBB0_6
LBB0_5:
	str	xzr, [x20, #8]
	stp	xzr, xzr, [x20, #24]
Lloh7:
	adrp	x8, _IW_QUAL_NOISE_INVALID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IW_QUAL_NOISE_INVALID@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _IW_QUAL_QUAL_INVALID@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IW_QUAL_QUAL_INVALID@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _IW_QUAL_LEVEL_INVALID@GOTPAGE
Lloh14:
	ldr	x10, [x10, _IW_QUAL_LEVEL_INVALID@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, #0x7
	stp	wzr, w8, [x20, #16]
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	ldr	w8, [x20]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
Lloh16:
	adrp	x8, _IPW_ORD_RSSI_AVG_CURR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IPW_ORD_RSSI_AVG_CURR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #28
	add	x3, sp, #12
	mov	x0, x20
	bl	_ipw2100_get_ordinal
	cbnz	x0, LBB0_3
; %bb.9:
	ldrsw	x8, [sp, #28]
Lloh19:
	adrp	x23, _IPW2100_RSSI_TO_DBM@GOTPAGE
Lloh20:
	ldr	x23, [x23, _IPW2100_RSSI_TO_DBM@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x9, x9, x8
	str	x9, [x20, #32]
	cmp	w8, #9
	b.gt	LBB0_14
; %bb.10:
	add	w21, w8, w8, lsl #1
	b	LBB0_19
LBB0_11:
	str	wzr, [x20, #16]
	str	xzr, [x20, #32]
LBB0_12:
	str	xzr, [x20, #24]
Lloh21:
	adrp	x8, _IW_QUAL_NOISE_INVALID@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IW_QUAL_NOISE_INVALID@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w8, w8, #0x7
	str	w8, [x20, #20]
	ldr	w8, [sp, #20]
	str	w8, [x20, #12]
Lloh24:
	adrp	x8, _IPW_ORD_STAT_TX_FAILURES@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IPW_ORD_STAT_TX_FAILURES@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x2, sp, #16
	add	x3, sp, #12
	mov	x0, x20
	bl	_ipw2100_get_ordinal
	cbnz	x0, LBB0_3
; %bb.13:
	ldr	w8, [sp, #16]
	str	w8, [x19]
	b	LBB0_6
LBB0_14:
	cmp	w8, #14
	b.hi	LBB0_16
; %bb.15:
	mov	w9, #30
	mul	w8, w8, w9
	sub	w8, w8, #44
	and	w8, w8, #0xfe
	mov	w9, #205
	mul	w8, w8, w9
	lsr	w8, w8, #10
	add	w21, w8, #30
	b	LBB0_19
LBB0_16:
	cmp	w8, #19
	b.hi	LBB0_18
; %bb.17:
	mov	w9, #20
	mul	w8, w8, w9
	sub	w8, w8, #44
	and	w8, w8, #0xfc
	mov	w9, #205
	mul	w8, w8, w9
	lsr	w8, w8, #10
	add	w21, w8, #60
	b	LBB0_19
LBB0_18:
	add	w21, w8, #60
LBB0_19:
Lloh27:
	adrp	x8, _IPW_ORD_STAT_PERCENT_RETRIES@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IPW_ORD_STAT_PERCENT_RETRIES@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	add	x2, sp, #24
	add	x3, sp, #12
	mov	x0, x20
	bl	_ipw2100_get_ordinal
	cbnz	x0, LBB0_3
; %bb.20:
	ldr	w8, [sp, #24]
	cmp	w8, #76
	b.lt	LBB0_22
; %bb.21:
	mov	w9, #180
	sub	w0, w9, w8, lsl #1
	b	LBB0_29
LBB0_22:
	cmp	w8, #71
	b.lt	LBB0_24
; %bb.23:
	mov	w9, #75
	sub	w8, w9, w8
	mov	w9, #6
	orr	w10, wzr, #0x1e
	madd	w0, w8, w9, w10
	b	LBB0_29
LBB0_24:
	cmp	w8, #66
	b.lt	LBB0_26
; %bb.25:
	mov	w9, #340
	sub	w0, w9, w8, lsl #2
	b	LBB0_29
LBB0_26:
	cmp	w8, #51
	b.lt	LBB0_28
; %bb.27:
	mov	w9, #65
	sub	w8, w9, w8
	add	w8, w8, w8, lsl #2
	ubfiz	w8, w8, #1, #7
	mov	w9, #137
	mul	w8, w8, w9
	lsr	w8, w8, #11
	add	w0, w8, #80
	b	LBB0_29
LBB0_28:
	mov	w9, #50
	sub	w8, w9, w8
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #34
	add	w0, w8, #90
LBB0_29:
	ldr	w8, [sp, #20]
	cmp	w8, #51
	b.lt	LBB0_31
; %bb.30:
	mov	w9, #60
	sub	w8, w9, w8
	add	w22, w8, w8, lsl #1
	b	LBB0_38
LBB0_31:
	cmp	w8, #41
	b.lt	LBB0_33
; %bb.32:
	mov	w9, #50
	sub	w8, w9, w8
	add	w8, w8, w8, lsl #1
	add	w22, w8, #30
	b	LBB0_38
LBB0_33:
	cmp	w8, #33
	b.lt	LBB0_35
; %bb.34:
	mov	w9, #40
	sub	w8, w9, w8
	add	w8, w8, w8, lsl #2
	ubfiz	w8, w8, #2, #6
	mov	w9, #57
	mul	w8, w8, w9
	lsr	w8, w8, #10
	add	w22, w8, #60
	b	LBB0_38
LBB0_35:
	cmp	w8, #21
	b.lt	LBB0_37
; %bb.36:
	mov	w9, #32
	sub	w8, w9, w8
	lsr	w8, w8, #1
	add	w22, w8, #80
	b	LBB0_38
LBB0_37:
	mov	w9, #20
	sub	w8, w9, w8
	lsr	w8, w8, #1
	add	w22, w8, #90
LBB0_38:
	mov	x1, x21
	bl	_min
	mov	x1, x0
	mov	x0, x22
	bl	_min
	str	w0, [x20, #16]
	ldrsw	x8, [sp, #28]
	ldr	x9, [x23]
	add	x8, x9, x8
	str	x8, [x20, #32]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_ASSOCIATED,4,2          ; @STATUS_ASSOCIATED
	.comm	_IW_QUAL_NOISE_INVALID,4,2      ; @IW_QUAL_NOISE_INVALID
	.comm	_IW_QUAL_QUAL_INVALID,4,2       ; @IW_QUAL_QUAL_INVALID
	.comm	_IW_QUAL_LEVEL_INVALID,4,2      ; @IW_QUAL_LEVEL_INVALID
	.comm	_IPW_ORD_STAT_PERCENT_MISSED_BCNS,4,2 ; @IPW_ORD_STAT_PERCENT_MISSED_BCNS
	.comm	_IPW_ORD_RSSI_AVG_CURR,4,2      ; @IPW_ORD_RSSI_AVG_CURR
	.comm	_IPW2100_RSSI_TO_DBM,8,3        ; @IPW2100_RSSI_TO_DBM
	.comm	_IPW_ORD_STAT_PERCENT_RETRIES,4,2 ; @IPW_ORD_STAT_PERCENT_RETRIES
	.comm	_IPW_ORD_STAT_TX_FAILURES,4,2   ; @IPW_ORD_STAT_TX_FAILURES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed querying ordinals.\n"

	.no_dead_strip	_ipw2100_wx_wireless_stats
.subsections_via_symbols
