	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_hw_freq_seek
_vidioc_s_hw_freq_seek:                 ## @vidioc_s_hw_freq_seek
	.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	%rdx, %r14
	movq	%rdi, %rbx
	callq	_video_drvdata
	cmpq	$0, (%r14)
	je	LBB0_1
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_25:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$0, 16(%r14)
	je	LBB0_2
## %bb.4:
	movq	%rax, %r15
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_6:
	movq	_AMRADIO_SET_SEARCH_LVL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	_vidioc_s_hw_freq_seek.buf(%rip), %rcx
	movq	%r15, %rdi
	xorl	%edx, %edx
	movl	$8, %r8d
	xorl	%r9d, %r9d
	callq	_amradio_send_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.7:
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_amradio_set_freq
	cmpq	$0, 8(%r14)
	jne	LBB0_8
## %bb.9:
	movq	_AMRADIO_SET_SEARCH_DOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_AMRADIO_SET_SEARCH_UP@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_amradio_send_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.11:
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movl	$30000, %edi                    ## imm = 0x7530
	callq	_msecs_to_jiffies
	movq	%rax, %r14
	addq	%rbx, %r14
	movq	(%r13), %rdi
	movq	%r14, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_12
LBB0_15:
	movq	_ENODATA@GOTPCREL(%rip), %rax
LBB0_16:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_24:
	movq	_AMRADIO_STOP_SEARCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_amradio_send_cmd
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_amradio_set_freq
	jmp	LBB0_25
LBB0_12:
	movq	_AMRADIO_GET_READY_FLAG@GOTPCREL(%rip), %r12
	movq	_AMRADIO_GET_FREQ@GOTPCREL(%rip), %rbx
	jmp	LBB0_13
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	(%r13), %rdi
	movq	%r14, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_15
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rdi
	callq	_schedule_timeout_interruptible
	testq	%rax, %rax
	jne	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%r12), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_amradio_send_cmd
	testl	%eax, %eax
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%rbx), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_amradio_send_cmd
	movq	8(%r15), %rax
	movl	4(%rax), %ecx
	movl	8(%rax), %eax
	testl	%ecx, %ecx
	jne	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_13 Depth=1
	testl	%eax, %eax
	je	LBB0_18
## %bb.22:
	xorl	%ecx, %ecx
	jmp	LBB0_23
LBB0_14:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_20:
	shll	$8, %ecx
LBB0_23:
	orl	%ecx, %eax
	imull	$200, %eax, %eax
	addl	$-3200, %eax                    ## imm = 0xF380
	movl	%eax, (%r15)
	movq	_AMRADIO_STOP_SEARCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_amradio_send_cmd
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_amradio_set_freq
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @vidioc_s_hw_freq_seek.buf
_vidioc_s_hw_freq_seek.buf:
	.long	61                              ## 0x3d
	.long	50                              ## 0x32
	.long	15                              ## 0xf
	.long	8                               ## 0x8
	.long	61                              ## 0x3d
	.long	50                              ## 0x32
	.long	15                              ## 0xf
	.long	8                               ## 0x8

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_EWOULDBLOCK,4,2                ## @EWOULDBLOCK
	.comm	_AMRADIO_SET_SEARCH_LVL,4,2     ## @AMRADIO_SET_SEARCH_LVL
	.comm	_AMRADIO_SET_SEARCH_UP,4,2      ## @AMRADIO_SET_SEARCH_UP
	.comm	_AMRADIO_SET_SEARCH_DOWN,4,2    ## @AMRADIO_SET_SEARCH_DOWN
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_AMRADIO_GET_READY_FLAG,4,2     ## @AMRADIO_GET_READY_FLAG
	.comm	_AMRADIO_GET_FREQ,4,2           ## @AMRADIO_GET_FREQ
	.comm	_AMRADIO_STOP_SEARCH,4,2        ## @AMRADIO_STOP_SEARCH
	.no_dead_strip	_vidioc_s_hw_freq_seek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_hw_freq_seek
_vidioc_s_hw_freq_seek:                 ; @vidioc_s_hw_freq_seek
	.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	x20, x2
	mov	x21, x0
	bl	_video_drvdata
	ldr	x8, [x20]
	cbz	x8, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x21
	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_4:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_1
; %bb.5:
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _EWOULDBLOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EWOULDBLOCK@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
	mov	x19, x0
Lloh7:
	adrp	x8, _AMRADIO_SET_SEARCH_LVL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AMRADIO_SET_SEARCH_LVL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x3, _vidioc_s_hw_freq_seek.buf@PAGE
Lloh11:
	add	x3, x3, _vidioc_s_hw_freq_seek.buf@PAGEOFF
	mov	w2, #0
	mov	w4, #8
	mov	w5, #0
	bl	_amradio_send_cmd
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.8:
	ldr	w1, [x19]
	mov	x0, x19
	bl	_amradio_set_freq
Lloh12:
	adrp	x8, _AMRADIO_SET_SEARCH_UP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AMRADIO_SET_SEARCH_UP@GOTPAGEOFF]
	ldr	x9, [x20, #8]
Lloh14:
	adrp	x10, _AMRADIO_SET_SEARCH_DOWN@GOTPAGE
Lloh15:
	ldr	x10, [x10, _AMRADIO_SET_SEARCH_DOWN@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_amradio_send_cmd
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.9:
Lloh16:
	adrp	x21, _jiffies@GOTPAGE
Lloh17:
	ldr	x21, [x21, _jiffies@GOTPAGEOFF]
	ldr	x20, [x21]
	mov	w0, #30000
	bl	_msecs_to_jiffies
	add	x20, x0, x20
	ldr	x0, [x21]
	mov	x1, x20
	bl	_time_after
Lloh18:
	adrp	x22, _AMRADIO_STOP_SEARCH@GOTPAGE
Lloh19:
	ldr	x22, [x22, _AMRADIO_STOP_SEARCH@GOTPAGEOFF]
	cbz	x0, LBB0_13
LBB0_10:
Lloh20:
	adrp	x8, _ENODATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_amradio_send_cmd
	ldr	w1, [x19]
	mov	x0, x19
	bl	_amradio_set_freq
	b	LBB0_3
LBB0_13:
Lloh22:
	adrp	x23, _AMRADIO_GET_READY_FLAG@GOTPAGE
Lloh23:
	ldr	x23, [x23, _AMRADIO_GET_READY_FLAG@GOTPAGEOFF]
Lloh24:
	adrp	x24, _AMRADIO_GET_FREQ@GOTPAGE
Lloh25:
	ldr	x24, [x24, _AMRADIO_GET_FREQ@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x21]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_10
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_msecs_to_jiffies
	bl	_schedule_timeout_interruptible
	cbnz	x0, LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	mov	w5, #1
	bl	_amradio_send_cmd
	cbnz	w0, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	mov	w5, #1
	bl	_amradio_send_cmd
	ldr	x8, [x19, #8]
	ldp	w9, w8, [x8, #4]
	cbnz	w9, LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	cbz	w8, LBB0_14
; %bb.19:
	mov	w9, #0
	b	LBB0_22
LBB0_20:
Lloh26:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_11
LBB0_21:
	lsl	w9, w9, #8
LBB0_22:
	orr	w8, w8, w9
	mov	w9, #200
	mul	w8, w8, w9
	sub	w8, w8, #3200
	str	w8, [x19]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_amradio_send_cmd
	ldr	w1, [x19]
	mov	x0, x19
	bl	_amradio_set_freq
	mov	w21, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @vidioc_s_hw_freq_seek.buf
_vidioc_s_hw_freq_seek.buf:
	.long	61                              ; 0x3d
	.long	50                              ; 0x32
	.long	15                              ; 0xf
	.long	8                               ; 0x8
	.long	61                              ; 0x3d
	.long	50                              ; 0x32
	.long	15                              ; 0xf
	.long	8                               ; 0x8

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_EWOULDBLOCK,4,2                ; @EWOULDBLOCK
	.comm	_AMRADIO_SET_SEARCH_LVL,4,2     ; @AMRADIO_SET_SEARCH_LVL
	.comm	_AMRADIO_SET_SEARCH_UP,4,2      ; @AMRADIO_SET_SEARCH_UP
	.comm	_AMRADIO_SET_SEARCH_DOWN,4,2    ; @AMRADIO_SET_SEARCH_DOWN
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_AMRADIO_GET_READY_FLAG,4,2     ; @AMRADIO_GET_READY_FLAG
	.comm	_AMRADIO_GET_FREQ,4,2           ; @AMRADIO_GET_FREQ
	.comm	_AMRADIO_STOP_SEARCH,4,2        ; @AMRADIO_STOP_SEARCH
	.no_dead_strip	_vidioc_s_hw_freq_seek
.subsections_via_symbols
