	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fm_v4l2_fops_open
_fm_v4l2_fops_open:                     ## @fm_v4l2_fops_open
	.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	_radio_disconnected@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_fmerr
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	callq	_video_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	callq	_fmc_prepare
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	_fmdbg
	movq	_FM_MODE_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_fmc_set_mode
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movl	$1, (%r15)
	jmp	LBB0_12
LBB0_9:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
LBB0_11:
	callq	_fmerr
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_radio_disconnected,4,2         ## @radio_disconnected
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FM device is already opened\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
L_.str.1:                               ## @.str.1
	.asciz	"Unable to prepare FM CORE\n"

L_.str.2:                               ## @.str.2
	.asciz	"Load FM RX firmware..\n"

	.comm	_FM_MODE_RX,4,2                 ## @FM_MODE_RX
L_.str.3:                               ## @.str.3
	.asciz	"Unable to load FM RX firmware\n"

	.no_dead_strip	_fm_v4l2_fops_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fm_v4l2_fops_open
_fm_v4l2_fops_open:                     ; @fm_v4l2_fops_open
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x21, _radio_disconnected@GOTPAGE
Lloh1:
	ldr	x21, [x21, _radio_disconnected@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fmerr
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	bl	_video_drvdata
	mov	x19, x0
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_6
; %bb.3:
Lloh6:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_fmc_prepare
	tbnz	w0, #31, LBB0_9
; %bb.7:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fmdbg
Lloh10:
	adrp	x8, _FM_MODE_RX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FM_MODE_RX@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_fmc_set_mode
	mov	x20, x0
	tbnz	w0, #31, LBB0_10
; %bb.8:
	mov	w8, #1
	str	w8, [x21]
	b	LBB0_12
LBB0_9:
	mov	x20, x0
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_11:
	bl	_fmerr
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_radio_disconnected,4,2         ; @radio_disconnected
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FM device is already opened\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
l_.str.1:                               ; @.str.1
	.asciz	"Unable to prepare FM CORE\n"

l_.str.2:                               ; @.str.2
	.asciz	"Load FM RX firmware..\n"

	.comm	_FM_MODE_RX,4,2                 ; @FM_MODE_RX
l_.str.3:                               ; @.str.3
	.asciz	"Unable to load FM RX firmware\n"

	.no_dead_strip	_fm_v4l2_fops_open
.subsections_via_symbols
