	.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
	movq	%rdi, %r14
	movq	_CHANNEL_CHAN@GOTPCREL(%rip), %rax
	movzwl	(%rax), %ecx
	notl	%ecx
	movq	(%rdi), %rdx
	movq	_CHANNEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andw	(%rdx,%rax,2), %cx
	movw	%cx, (%rdx,%rax,2)
	movq	_CHANNEL_TUNE@GOTPCREL(%rip), %rdi
	orl	%ecx, %esi
	orw	(%rdi), %si
	movw	%si, (%rdx,%rax,2)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_si470x_set_register
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_tune_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r15
	addq	%rbx, %r15
	movq	_STATUSRSSI@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	_STATUSRSSI_STC@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_si470x_get_register
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_time_after
	movl	%eax, %ebx
	movq	(%r14), %rax
	movq	(%r13), %rsi
	movzwl	(%rax,%rsi,2), %eax
	andl	(%r12), %eax
	movl	%eax, %ecx
	orl	%ebx, %ecx
	je	LBB0_2
## %bb.4:
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.7:
	movq	8(%r14), %rdi
	movq	_tune_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_8:
	movq	_CHANNEL_TUNE@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	notl	%eax
	movq	(%r14), %rcx
	movq	_CHANNEL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	andw	%ax, (%rcx,%rsi,2)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_si470x_set_register            ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHANNEL_CHAN,2,1               ## @CHANNEL_CHAN
	.comm	_CHANNEL,8,3                    ## @CHANNEL
	.comm	_CHANNEL_TUNE,2,1               ## @CHANNEL_TUNE
	.comm	_jiffies,8,3                    ## @jiffies
	.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, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x9, _CHANNEL_CHAN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHANNEL_CHAN@GOTPAGEOFF]
	ldr	x10, [x0]
Lloh2:
	adrp	x22, _CHANNEL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CHANNEL@GOTPAGEOFF]
	ldr	x8, [x22]
	lsl	x11, x8, #1
	ldrh	w12, [x10, x11]
	ldrh	w9, [x9]
	bic	w9, w12, w9
	strh	w9, [x10, x11]
Lloh4:
	adrp	x23, _CHANNEL_TUNE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _CHANNEL_TUNE@GOTPAGEOFF]
	ldrh	w12, [x23]
	orr	w9, w9, w1
	orr	w9, w9, w12
	strh	w9, [x10, x11]
	mov	x1, x8
	bl	_si470x_set_register
	tbnz	w0, #31, LBB0_9
; %bb.1:
Lloh6:
	adrp	x25, _jiffies@GOTPAGE
Lloh7:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
	ldr	x20, [x25]
Lloh8:
	adrp	x24, _tune_timeout@GOTPAGE
Lloh9:
	ldr	x24, [x24, _tune_timeout@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_msecs_to_jiffies
	add	x20, x0, x20
Lloh10:
	adrp	x26, _STATUSRSSI@GOTPAGE
Lloh11:
	ldr	x26, [x26, _STATUSRSSI@GOTPAGEOFF]
	ldr	x1, [x26]
Lloh12:
	adrp	x27, _STATUSRSSI_STC@GOTPAGE
Lloh13:
	ldr	x27, [x27, _STATUSRSSI_STC@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_si470x_get_register
	tbnz	w0, #31, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x25]
	mov	x1, x20
	bl	_time_after
	ldr	x8, [x19]
	ldr	x1, [x26]
	ldrh	w8, [x8, x1, lsl #1]
	ldr	w9, [x27]
	and	w8, w9, w8
	orr	w9, w8, w0
	cbz	w9, LBB0_2
; %bb.4:
	mov	x21, x0
	cbnz	w8, LBB0_6
; %bb.5:
	ldr	x0, [x19, #8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_6:
	cbz	w21, LBB0_8
; %bb.7:
	ldr	x0, [x19, #8]
	ldr	w8, [x24]
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_8:
	ldr	x8, [x19]
	ldr	x1, [x22]
	lsl	x9, x1, #1
	ldrh	w10, [x8, x9]
	ldrh	w11, [x23]
	bic	w10, w10, w11
	strh	w10, [x8, x9]
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_si470x_set_register
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CHANNEL_CHAN,2,1               ; @CHANNEL_CHAN
	.comm	_CHANNEL,8,3                    ; @CHANNEL
	.comm	_CHANNEL_TUNE,2,1               ; @CHANNEL_TUNE
	.comm	_jiffies,8,3                    ; @jiffies
	.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
