	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_gphy_aci_detect
_b43_gphy_aci_detect:                   ## @b43_gphy_aci_detect
	.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	%esi, %r12d
	movq	%rdi, %r15
	movq	(%rdi), %r14
	movl	$1027, %esi                     ## imm = 0x403
	callq	_b43_phy_read
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_b43_switch_channel
	movl	%ebx, %edx
	andl	$65528, %edx                    ## imm = 0xFFF8
	orl	$5, %edx
	movq	%r15, %rdi
	movl	$1027, %esi                     ## imm = 0x403
	callq	_b43_phy_write
	cmpq	$0, (%r14)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movl	$1162, %esi                     ## imm = 0x48A
	callq	_b43_phy_read
                                        ## kill: def $eax killed $eax def $rax
LBB0_2:
	andl	$63, %eax
	xorl	%ecx, %ecx
	cmpl	$33, %eax
	setb	%cl
	shll	$6, %ecx
	leal	(%rcx,%rax), %r12d
	addl	$-64, %r12d
	xorl	%ebx, %ebx
	movl	$100, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$1151, %esi                     ## imm = 0x47F
	callq	_b43_phy_read
                                        ## kill: def $eax killed $eax def $rax
	shrl	$8, %eax
	andl	$63, %eax
	xorl	%ecx, %ecx
	cmpl	$33, %eax
	setb	%cl
	shll	$6, %ecx
	addl	%ecx, %eax
	addl	$-64, %eax
	xorl	%ecx, %ecx
	cmpl	%r12d, %eax
	setl	%cl
	addl	%ecx, %ebx
	cmpl	$20, %ebx
	movl	$1, %eax
	cmovael	%eax, %r13d
	decl	%r14d
	jne	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	movl	$1027, %esi                     ## imm = 0x403
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_b43_phy_write
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_b43_gphy_aci_detect
.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_detect
_b43_gphy_aci_detect:                   ; @b43_gphy_aci_detect
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
	ldr	x22, [x0]
	mov	w1, #1027
	bl	_b43_phy_read
	mov	x20, x0
	mov	x0, x19
	mov	x1, x21
	bl	_b43_switch_channel
	and	w8, w20, #0xfff8
	mov	w9, #5
	orr	w2, w8, w9
	mov	x0, x19
	mov	w1, #1027
	bl	_b43_phy_write
	ldr	x8, [x22]
	mov	x0, x20
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1162
	bl	_b43_phy_read
LBB0_2:
	mov	w22, #0
	mov	w21, #0
	and	w8, w0, #0x3f
	mov	w23, #-64
	cmp	w8, #32
	csel	w24, w23, wzr, hi
	bfxil	w24, w0, #0, #6
	mov	w25, #100
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #1151
	bl	_b43_phy_read
	ubfx	w8, w0, #8, #6
	cmp	w8, #32
	csel	w8, w23, wzr, hi
	bfxil	w8, w0, #8, #6
	cmp	w8, w24
	cinc	w22, w22, lt
	cmp	w22, #19
	csinc	w21, w21, wzr, ls
	subs	w25, w25, #1
	b.ne	LBB0_3
; %bb.4:
	mov	x0, x19
	mov	w1, #1027
	mov	x2, x20
	bl	_b43_phy_write
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_b43_gphy_aci_detect
.subsections_via_symbols
