	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si470x_set_chan
_si470x_set_chan:                       ## @si470x_set_chan
	.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, %r14d
	movq	%rdi, %rbx
	movq	_POWERCFG@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	callq	*(%rdi)
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	8(%rbx), %rcx
	movq	(%r15), %rax
	movq	_POWERCFG_ENABLE@GOTPCREL(%rip), %rdx
	movq	_POWERCFG_DMUTE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	movl	(%rcx,%rax,4), %edx
	notl	%edx
	xorl	%eax, %eax
	testl	%edx, %esi
	jne	LBB0_8
## %bb.2:
	movq	_CHANNEL_CHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	_CHANNEL@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	andl	(%rcx,%rsi,4), %eax
	movq	_CHANNEL_TUNE@GOTPCREL(%rip), %r12
	orw	(%r12), %r14w
	movzwl	%r14w, %edx
	orl	%eax, %edx
	movl	%edx, (%rcx,%rsi,4)
	movq	%rbx, %rdi
	callq	*16(%rbx)
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	leaq	28(%rbx), %r14
	movq	%r14, %rdi
	callq	_reinit_completion
	movq	_tune_timeout@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	movq	%rax, %r14
	movq	8(%rbx), %rax
	movq	_STATUSRSSI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_STATUSRSSI_STC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax,%rcx,4)
	je	LBB0_4
## %bb.5:
	testq	%r14, %r14
	je	LBB0_6
LBB0_7:
	movzwl	(%r12), %eax
	notl	%eax
	movq	8(%rbx), %rcx
	movq	(%r15), %rsi
	andl	%eax, (%rcx,%rsi,4)
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	24(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
	testq	%r14, %r14
	jne	LBB0_7
LBB0_6:
	leaq	24(%rbx), %rdi
	movl	(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_POWERCFG,8,3                   ## @POWERCFG
	.comm	_POWERCFG_ENABLE,4,2            ## @POWERCFG_ENABLE
	.comm	_POWERCFG_DMUTE,4,2             ## @POWERCFG_DMUTE
	.comm	_CHANNEL_CHAN,4,2               ## @CHANNEL_CHAN
	.comm	_CHANNEL,8,3                    ## @CHANNEL
	.comm	_CHANNEL_TUNE,2,1               ## @CHANNEL_TUNE
	.comm	_tune_timeout,4,2               ## @tune_timeout
	.comm	_STATUSRSSI,8,3                 ## @STATUSRSSI
	.comm	_STATUSRSSI_STC,4,2             ## @STATUSRSSI_STC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tune does not complete\n"

L_.str.1:                               ## @.str.1
	.asciz	"tune timed out after %u ms\n"

	.no_dead_strip	_si470x_set_chan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si470x_set_chan
_si470x_set_chan:                       ; @si470x_set_chan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _POWERCFG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _POWERCFG@GOTPAGEOFF]
	ldr	x1, [x21]
	blr	x8
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	ldr	w9, [x8, x9, lsl #2]
Lloh2:
	adrp	x10, _POWERCFG_ENABLE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _POWERCFG_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
Lloh5:
	adrp	x11, _POWERCFG_DMUTE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _POWERCFG_DMUTE@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
	orr	w10, w11, w10
	bics	wzr, w10, w9
	b.ne	LBB0_8
; %bb.2:
Lloh8:
	adrp	x9, _CHANNEL_CHAN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CHANNEL_CHAN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x22, _CHANNEL@GOTPAGE
Lloh12:
	ldr	x22, [x22, _CHANNEL@GOTPAGEOFF]
	ldr	x1, [x22]
	lsl	x10, x1, #2
	ldr	w11, [x8, x10]
	bic	w9, w11, w9
Lloh13:
	adrp	x21, _CHANNEL_TUNE@GOTPAGE
Lloh14:
	ldr	x21, [x21, _CHANNEL_TUNE@GOTPAGEOFF]
	ldrh	w11, [x21]
	orr	w11, w11, w20
	orr	w9, w9, w11
	str	w9, [x8, x10]
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	tbnz	w0, #31, LBB0_9
; %bb.3:
	add	x20, x19, #28
	mov	x0, x20
	bl	_reinit_completion
Lloh15:
	adrp	x23, _tune_timeout@GOTPAGE
Lloh16:
	ldr	x23, [x23, _tune_timeout@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x20
	bl	_wait_for_completion_timeout
	mov	x20, x0
	ldr	x8, [x19, #8]
Lloh17:
	adrp	x9, _STATUSRSSI@GOTPAGE
Lloh18:
	ldr	x9, [x9, _STATUSRSSI@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
Lloh20:
	adrp	x9, _STATUSRSSI_STC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _STATUSRSSI_STC@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
	add	x0, x19, #24
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_5:
	cbnz	x20, LBB0_7
; %bb.6:
	add	x0, x19, #24
	ldr	w8, [x23]
	str	x8, [sp]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_7:
	ldr	x1, [x22]
	lsl	x8, x1, #2
	ldp	x9, x2, [x19, #8]
	ldr	w10, [x9, x8]
	ldrh	w11, [x21]
	bic	w10, w10, w11
	str	w10, [x9, x8]
	mov	x0, x19
	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
	add	sp, sp, #80
	br	x2
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_POWERCFG,8,3                   ; @POWERCFG
	.comm	_POWERCFG_ENABLE,4,2            ; @POWERCFG_ENABLE
	.comm	_POWERCFG_DMUTE,4,2             ; @POWERCFG_DMUTE
	.comm	_CHANNEL_CHAN,4,2               ; @CHANNEL_CHAN
	.comm	_CHANNEL,8,3                    ; @CHANNEL
	.comm	_CHANNEL_TUNE,2,1               ; @CHANNEL_TUNE
	.comm	_tune_timeout,4,2               ; @tune_timeout
	.comm	_STATUSRSSI,8,3                 ; @STATUSRSSI
	.comm	_STATUSRSSI_STC,4,2             ; @STATUSRSSI_STC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tune does not complete\n"

l_.str.1:                               ; @.str.1
	.asciz	"tune timed out after %u ms\n"

	.no_dead_strip	_si470x_set_chan
.subsections_via_symbols
