	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx18_serialized_open
_cx18_serialized_open:                  ## @cx18_serialized_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	%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	%rsi, %r14
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movl	12(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_CX18_DEBUG_FILE
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %r13
	addq	$8, %r13
	leaq	8(%rbx), %rsi
	movq	%r13, %rdi
	callq	_v4l2_fh_init
	movq	%r15, 24(%r12)
	movq	(%rbx), %rax
	movq	%rax, (%r12)
	movslq	8(%r15), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 8(%r15)
	movq	%rax, 16(%r12)
	movq	%r14, %rbx
	movq	%r13, (%r14)
	movq	%r13, %rdi
	callq	_v4l2_fh_add
	movq	(%r12), %rax
	movq	_CX18_ENC_STREAM_TYPE_RAD@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.4:
	movq	%rbx, %rdi
	callq	_v4l2_fh_is_singular_file
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	_CX18_F_I_RADIO_USER@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_6
LBB0_8:
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_set_bit
	movq	%r15, %rdi
	callq	_cx18_mute
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_radio@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_cx18_call_all
	movq	%r15, %rdi
	callq	_cx18_audio_set_io
	movq	%r15, %rdi
	callq	_cx18_unmute
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_CX18_DEBUG_WARN
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	4(%r15), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jle	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	_v4l2_fh_del
	movq	%r13, %rdi
	callq	_v4l2_fh_exit
	movq	%r12, %rdi
	callq	_kfree
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open %s\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"nomem on v4l2 open\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CX18_ENC_STREAM_TYPE_RAD,8,3   ## @CX18_ENC_STREAM_TYPE_RAD
	.comm	_CX18_F_I_RADIO_USER,4,2        ## @CX18_F_I_RADIO_USER
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_tuner,4,2                      ## @tuner
	.comm	_s_radio,4,2                    ## @s_radio
	.no_dead_strip	_cx18_serialized_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx18_serialized_open
_cx18_serialized_open:                  ; @cx18_serialized_open
	.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	x22, x1
	mov	x23, x0
	ldr	x19, [x0, #16]
	ldr	w1, [x0, #12]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_CX18_DEBUG_FILE
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	add	x21, x0, #8
	add	x1, x23, #8
	mov	x0, x21
	bl	_v4l2_fh_init
	ldr	x8, [x23]
	str	x8, [x20]
	ldrsw	x8, [x19, #8]
	add	w9, w8, #1
	str	w9, [x19, #8]
	stp	x8, x19, [x20, #16]
	str	x21, [x22]
	mov	x0, x21
	bl	_v4l2_fh_add
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _CX18_ENC_STREAM_TYPE_RAD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_RAD@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x22
	bl	_v4l2_fh_is_singular_file
	cbz	x0, LBB0_8
; %bb.3:
Lloh8:
	adrp	x22, _CX18_F_I_RADIO_USER@GOTPAGE
Lloh9:
	ldr	x22, [x22, _CX18_F_I_RADIO_USER@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_test_bit
	cbz	w0, LBB0_9
LBB0_4:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_set_bit
	mov	x0, x19
	bl	_cx18_mute
Lloh10:
	adrp	x8, _tuner@GOTPAGE
Lloh11:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _s_radio@GOTPAGE
Lloh14:
	ldr	x8, [x8, _s_radio@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_cx18_call_all
	mov	x0, x19
	bl	_cx18_audio_set_io
	mov	x0, x19
	bl	_cx18_unmute
LBB0_5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_CX18_DEBUG_WARN
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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_9:
	add	x0, x19, #4
	bl	_atomic_read
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.10:
	mov	x0, x21
	bl	_v4l2_fh_del
	mov	x0, x21
	bl	_v4l2_fh_exit
	mov	x0, x20
	bl	_kfree
Lloh20:
	adrp	x8, _EBUSY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open %s\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"nomem on v4l2 open\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CX18_ENC_STREAM_TYPE_RAD,8,3   ; @CX18_ENC_STREAM_TYPE_RAD
	.comm	_CX18_F_I_RADIO_USER,4,2        ; @CX18_F_I_RADIO_USER
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_tuner,4,2                      ; @tuner
	.comm	_s_radio,4,2                    ; @s_radio
	.no_dead_strip	_cx18_serialized_open
.subsections_via_symbols
