	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orinoco_set_monitor_channel
_orinoco_set_monitor_channel:           ## @orinoco_set_monitor_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_wiphy_priv
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_cfg80211_get_chandef_type
	movq	_NL80211_CHAN_NO_HT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.4:
	movq	(%rbx), %rax
	movq	(%rax), %rcx
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_1
## %bb.5:
	movl	8(%rax), %edi
	callq	_ieee80211_frequency_to_channel
	testl	%eax, %eax
	jle	LBB0_1
## %bb.6:
	movl	%eax, %r14d
	movq	_NUM_CHANNELS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jg	LBB0_1
## %bb.7:
	movl	(%r15), %eax
	leal	-1(%r14), %ecx
	movzbl	%cl, %ecx
	btl	%ecx, %eax
	jae	LBB0_1
## %bb.8:
	leaq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	_orinoco_lock
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%r14d, 4(%r15)
	movq	8(%r15), %rax
	movq	_NL80211_IFTYPE_MONITOR@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	addq	$16, %rdi
	movq	16(%r15), %rax
	movq	_HERMES_CMD_TEST@GOTPCREL(%rip), %rcx
	movq	_HERMES_TEST_SET_CHANNEL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	*(%rax)
	movl	%eax, %ebx
LBB0_12:
	leaq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	_orinoco_unlock
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NL80211_CHAN_NO_HT,8,3         ## @NL80211_CHAN_NO_HT
	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.comm	_NUM_CHANNELS,4,2               ## @NUM_CHANNELS
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_NL80211_IFTYPE_MONITOR,8,3     ## @NL80211_IFTYPE_MONITOR
	.comm	_HERMES_CMD_TEST,4,2            ## @HERMES_CMD_TEST
	.comm	_HERMES_TEST_SET_CHANNEL,4,2    ## @HERMES_TEST_SET_CHANNEL
	.no_dead_strip	_orinoco_set_monitor_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orinoco_set_monitor_channel
_orinoco_set_monitor_channel:           ; @orinoco_set_monitor_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	bl	_wiphy_priv
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_cfg80211_get_chandef_type
Lloh0:
	adrp	x8, _NL80211_CHAN_NO_HT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NL80211_CHAN_NO_HT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.2:
	ldr	x8, [x20]
	ldr	x9, [x8]
Lloh3:
	adrp	x10, _NL80211_BAND_2GHZ@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.3:
	ldr	w0, [x8, #8]
	bl	_ieee80211_frequency_to_channel
Lloh6:
	adrp	x8, _NUM_CHANNELS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NUM_CHANNELS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
	subs	w8, w0, #1
	ccmp	w0, w9, #0, ge
	b.gt	LBB0_7
; %bb.4:
	ldr	w9, [x19]
	lsr	w8, w9, w8
	tbz	w8, #0, LBB0_7
; %bb.5:
	mov	x20, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_orinoco_lock
	cbz	x0, LBB0_10
; %bb.6:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
	str	w20, [x19, #4]
	ldr	x8, [x19, #8]
Lloh13:
	adrp	x9, _NL80211_IFTYPE_MONITOR@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NL80211_IFTYPE_MONITOR@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x19
	ldr	x8, [x0, #16]!
Lloh16:
	adrp	x9, _HERMES_CMD_TEST@GOTPAGE
Lloh17:
	ldr	x9, [x9, _HERMES_CMD_TEST@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _HERMES_TEST_SET_CHANNEL@GOTPAGE
Lloh20:
	ldr	x10, [x10, _HERMES_TEST_SET_CHANNEL@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	orr	w1, w10, w9
	mov	x2, x20
	mov	x3, #0
	blr	x8
	mov	x20, x0
	b	LBB0_13
LBB0_12:
	mov	w20, #0
LBB0_13:
	add	x1, sp, #8
	mov	x0, x19
	bl	_orinoco_unlock
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NL80211_CHAN_NO_HT,8,3         ; @NL80211_CHAN_NO_HT
	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.comm	_NUM_CHANNELS,4,2               ; @NUM_CHANNELS
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_NL80211_IFTYPE_MONITOR,8,3     ; @NL80211_IFTYPE_MONITOR
	.comm	_HERMES_CMD_TEST,4,2            ; @HERMES_CMD_TEST
	.comm	_HERMES_TEST_SET_CHANNEL,4,2    ; @HERMES_TEST_SET_CHANNEL
	.no_dead_strip	_orinoco_set_monitor_channel
.subsections_via_symbols
