	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76_set_channel               ## -- Begin function mt76_set_channel
	.p2align	4, 0x90
_mt76_set_channel:                      ## @mt76_set_channel
	.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
	movq	%rdi, %r14
	movq	24(%rdi), %r12
	movq	_IEEE80211_CONF_OFFCHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	(%r12), %r13d
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1717986919, %rax, %rbx         ## imm = 0x66666667
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$33, %rbx
	addl	%eax, %ebx
	movl	16(%rdi), %r15d
	callq	_mt76_has_tx_pending
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	%r15d, %edi
	movl	%ebx, %edx
	callq	_wait_event_timeout
	movq	8(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	*%rax
LBB0_2:
	movl	4(%r12), %eax
	movl	%eax, 4(%r14)
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.3:
	movl	(%r14), %eax
	jmp	LBB0_5
LBB0_4:
	movl	4(%r12), %eax
	movl	%eax, (%r14)
LBB0_5:
	movl	4(%r12), %esi
	cmpl	%eax, %esi
	jne	LBB0_7
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	callq	_mt76_channel_state
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memset                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CONF_OFFCHANNEL,4,2  ## @IEEE80211_CONF_OFFCHANNEL
	.comm	_HZ,4,2                         ## @HZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76_set_channel               ; -- Begin function mt76_set_channel
	.p2align	2
_mt76_set_channel:                      ; @mt76_set_channel
	.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
	mov	x19, x0
	ldr	x22, [x0, #24]
Lloh0:
	adrp	x8, _IEEE80211_CONF_OFFCHANNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_CONF_OFFCHANNEL@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh2:
	ldr	w8, [x8]
	and	w23, w8, w9
Lloh3:
	adrp	x8, _HZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w20, w8, w9
	ldr	w21, [x0, #16]
	bl	_mt76_has_tx_pending
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x21
	mov	x2, x20
	bl	_wait_event_timeout
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	blr	x8
LBB0_2:
	ldr	w8, [x22, #4]
	str	w8, [x19, #4]
	cbz	w23, LBB0_4
; %bb.3:
	ldr	w8, [x19]
	b	LBB0_5
LBB0_4:
	ldr	w8, [x22, #4]
	str	w8, [x19]
LBB0_5:
	ldr	w1, [x22, #4]
	cmp	w1, w8
	b.ne	LBB0_7
; %bb.6:
	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_7:
	mov	x0, x19
	bl	_mt76_channel_state
	mov	w1, #0
	mov	w2, #4
	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
	b	_memset
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CONF_OFFCHANNEL,4,2  ; @IEEE80211_CONF_OFFCHANNEL
	.comm	_HZ,4,2                         ; @HZ
.subsections_via_symbols
