	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_gphy_aci_scan
_b43_gphy_aci_scan:                     ## @b43_gphy_aci_scan
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movl	$0, -64(%rbp)
	movq	8(%rdi), %rcx
	movq	_B43_PHYTYPE_G@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.1:
	movq	%rdi, %r12
	cmpq	$0, 16(%rdi)
	jle	LBB0_13
## %bb.2:
	movl	(%r12), %ebx
	movq	%r12, %rdi
	callq	_b43_phy_lock
	movq	%r12, %rdi
	callq	_b43_radio_lock
	movq	%r12, %rdi
	movl	$2050, %esi                     ## imm = 0x802
	movl	$65532, %edx                    ## imm = 0xFFFC
	callq	_b43_phy_mask
	movq	_B43_PHY_G_CRS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$32767, %edx                    ## imm = 0x7FFF
	callq	_b43_phy_mask
	movl	$1, %r14d
	movq	%r12, %rdi
	movl	$3, %esi
	movl	$8, %edx
	movl	$1, %ecx
	callq	_b43_set_all_gains
	movl	%ebx, %eax
	addl	$-5, %eax
	cmovel	%r14d, %eax
	movq	%rbx, -120(%rbp)                ## 8-byte Spill
	leal	5(%rbx), %ecx
	cmpl	$13, %ecx
	movl	$13, %r13d
	cmovbl	%ecx, %r13d
	cmpl	%r13d, %eax
	jbe	LBB0_3
LBB0_7:
	movq	%r12, %rdi
	movq	-120(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_b43_switch_channel
	movq	%r12, %rdi
	movl	$2050, %esi                     ## imm = 0x802
	movl	$65532, %edx                    ## imm = 0xFFFC
	movl	$3, %ecx
	callq	_b43_phy_maskset
	movq	%r12, %rdi
	movl	$1027, %esi                     ## imm = 0x403
	movl	$65528, %edx                    ## imm = 0xFFF8
	callq	_b43_phy_mask
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_b43_phy_set
	movq	%r12, %rdi
	callq	_b43_set_original_gains
	movl	$4, %r13d
	xorl	%ebx, %ebx
	leaq	L_.memset_pattern(%rip), %r15
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r14
	decl	%r13d
	addq	$4, %rbx
	cmpq	$13, %r14
	je	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$8, %r14d
	movl	$8, %eax
	cmovbl	%r14d, %eax
	cmpl	$0, -112(%rbp,%r14,4)
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	leal	5(%rax), %ecx
	cmpq	%rcx, %r14
	jae	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	addl	%r13d, %eax
	movl	%eax, %eax
	leaq	4(,%rax,4), %rdx
	leaq	(%rbx,%rbp), %rdi
	addq	$-112, %rdi
	movq	%r15, %rsi
	callq	_memset_pattern16
	jmp	LBB0_11
LBB0_12:
	movq	%r12, %rdi
	callq	_b43_radio_unlock
	movq	%r12, %rdi
	callq	_b43_phy_unlock
	movq	-120(%rbp), %rax                ## 8-byte Reload
	decl	%eax
	movl	-112(%rbp,%rax,4), %eax
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%eax, %r14d
	incl	%r13d
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movl	%ecx, %ebx
	subl	%eax, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	decl	%ebx
	cmpq	%r14, %r13
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	negl	%eax
	cmovsl	%ebx, %eax
	cmpl	$3, %eax
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_b43_gphy_aci_detect
	movl	%eax, -116(%rbp,%r14,4)
	jmp	LBB0_6
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_B43_PHYTYPE_G,8,3              ## @B43_PHYTYPE_G
	.comm	_B43_PHY_G_CRS,4,2              ## @B43_PHY_G_CRS
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1

	.no_dead_strip	_b43_gphy_aci_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43_gphy_aci_scan
_b43_gphy_aci_scan:                     ; @b43_gphy_aci_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	mov	w0, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	str	wzr, [sp, #48]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	str	q0, [sp]
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _B43_PHYTYPE_G@GOTPAGE
Lloh4:
	ldr	x9, [x9, _B43_PHYTYPE_G@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.1:
	ldr	x8, [x19, #16]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.2:
	ldr	w20, [x19]
	mov	x0, x19
	bl	_b43_phy_lock
	mov	x0, x19
	bl	_b43_radio_lock
	mov	x0, x19
	mov	w1, #2050
	mov	w2, #65532
	bl	_b43_phy_mask
Lloh6:
	adrp	x22, _B43_PHY_G_CRS@GOTPAGE
Lloh7:
	ldr	x22, [x22, _B43_PHY_G_CRS@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #32767
	bl	_b43_phy_mask
	mov	w23, #8
	mov	x0, x19
	mov	w1, #3
	mov	w2, #8
	mov	w3, #1
	bl	_b43_set_all_gains
	subs	w8, w20, #5
	csinc	w21, w8, wzr, ne
	add	w8, w20, #5
	mov	w9, #13
	cmp	w8, #13
	csel	w8, w8, w9, lo
	cmp	w21, w8
	b.ls	LBB0_11
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	bl	_b43_switch_channel
	mov	x0, x19
	mov	w1, #2050
	mov	w2, #65532
	mov	w3, #3
	bl	_b43_phy_maskset
	mov	x0, x19
	mov	w1, #1027
	mov	w2, #65528
	bl	_b43_phy_mask
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #32768
	bl	_b43_phy_set
	mov	x0, x19
	bl	_b43_set_original_gains
	mov	w24, #0
	mov	x25, #-13
	mov	w26, #4
	mov	x21, sp
Lloh8:
	adrp	x22, l_.memset_pattern@PAGE
Lloh9:
	add	x22, x22, l_.memset_pattern@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	sub	w26, w26, #1
	add	w24, w24, #1
	add	x21, x21, #4
	adds	x25, x25, #1
	b.hs	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x9, x25, #13
	cmp	w24, #8
	csel	w8, w24, w23, lo
	cmp	w9, #8
	csel	w10, w9, w23, lo
	ldr	w11, [x21]
	add	w10, w10, #5
	cmp	w11, #0
	ccmp	x9, x10, #2, ne
	b.hs	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w8, w26
	lsl	x8, x8, #2
	add	x2, x8, #4
	mov	x0, x21
	mov	x1, x22
	bl	_memset_pattern16
	b	LBB0_4
LBB0_7:
	mov	x0, x19
	bl	_b43_radio_unlock
	mov	x0, x19
	bl	_b43_phy_unlock
	sub	w8, w20, #1
	mov	x9, sp
	ldr	w0, [x9, w8, uxtw #2]
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldr	x8, [sp, #56]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.10:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_11:
	add	w24, w8, #1
	sub	w25, w20, w21
	mov	x8, sp
	sub	x26, x8, #4
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x21, x21, #1
	sub	w25, w25, #1
	cmp	x24, x21
	b.eq	LBB0_3
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	cmp	w25, #0
	cneg	w8, w25, mi
	cmp	w8, #3
	b.lo	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_b43_gphy_aci_detect
	str	w0, [x26, x21, lsl #2]
	b	LBB0_12
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_B43_PHYTYPE_G,8,3              ; @B43_PHYTYPE_G
	.comm	_B43_PHY_G_CRS,4,2              ; @B43_PHY_G_CRS
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1

	.no_dead_strip	_b43_gphy_aci_scan
.subsections_via_symbols
