	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pd_video_release
_pd_video_release:                      ## @pd_video_release
	.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, %r13
	movq	(%rdi), %r15
	movq	16(%r15), %r14
	movl	$0, -44(%rbp)
	movq	%r15, %rdi
	callq	_logs
	leaq	4(%r14), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r15), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_POSEIDON_STATE_ANALOG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 32(%r14)
	movq	%r13, %rbx
	leaq	36(%r14), %r13
	movq	%r13, %rdi
	callq	_usb_transfer_stop
	movq	%r13, %rdi
	movq	%rbx, %r13
	callq	_free_all_urb
	movq	_PLAY_SERVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLG_TUNE_PLAY_SVC_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	callq	_send_set_req
	movq	$0, 40(%r14)
	decl	36(%r14)
	jmp	LBB0_4
LBB0_2:
	movq	_V4L2_BUF_TYPE_VBI_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_POSEIDON_STATE_VBI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 32(%r14)
	movq	$0, 24(%r14)
	decl	16(%r14)
LBB0_4:
	leaq	8(%r15), %rbx
	movq	%rbx, %rdi
	callq	_videobuf_stop
	movq	%rbx, %rdi
	callq	_videobuf_mmap_free
	movl	8(%r14), %edi
	callq	_usb_autopm_put_interface
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_kfree
	movq	$0, (%r13)
	movq	_poseidon_delete@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kref_put
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_POSEIDON_STATE_ANALOG,4,2      ## @POSEIDON_STATE_ANALOG
	.comm	_PLAY_SERVICE,4,2               ## @PLAY_SERVICE
	.comm	_TLG_TUNE_PLAY_SVC_STOP,4,2     ## @TLG_TUNE_PLAY_SVC_STOP
	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,8,3  ## @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_POSEIDON_STATE_VBI,4,2         ## @POSEIDON_STATE_VBI
	.comm	_poseidon_delete,4,2            ## @poseidon_delete
	.no_dead_strip	_pd_video_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pd_video_release
_pd_video_release:                      ; @pd_video_release
	.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, x0
	ldr	x21, [x0]
	ldr	x19, [x21, #16]
	str	wzr, [sp, #12]
	mov	x0, x21
	bl	_logs
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _POSEIDON_STATE_ANALOG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _POSEIDON_STATE_ANALOG@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
	bic	w8, w9, w8
	str	w8, [x19, #32]
	add	x23, x19, #36
	mov	x0, x23
	bl	_usb_transfer_stop
	mov	x0, x23
	bl	_free_all_urb
Lloh6:
	adrp	x8, _PLAY_SERVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PLAY_SERVICE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _TLG_TUNE_PLAY_SVC_STOP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TLG_TUNE_PLAY_SVC_STOP@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_send_set_req
	str	xzr, [x19, #40]
	ldr	w8, [x19, #36]
	sub	w8, w8, #1
	str	w8, [x19, #36]
	b	LBB0_4
LBB0_2:
Lloh12:
	adrp	x9, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh15:
	adrp	x8, _POSEIDON_STATE_VBI@GOTPAGE
Lloh16:
	ldr	x8, [x8, _POSEIDON_STATE_VBI@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
	bic	w8, w9, w8
	str	w8, [x19, #32]
	str	xzr, [x19, #24]
	ldr	w8, [x19, #16]
	sub	w8, w8, #1
	str	w8, [x19, #16]
LBB0_4:
	add	x23, x21, #8
	mov	x0, x23
	bl	_videobuf_stop
	mov	x0, x23
	bl	_videobuf_mmap_free
	ldr	w0, [x19, #8]
	bl	_usb_autopm_put_interface
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x21
	bl	_kfree
	str	xzr, [x20]
Lloh18:
	adrp	x8, _poseidon_delete@GOTPAGE
Lloh19:
	ldr	x8, [x8, _poseidon_delete@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kref_put
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_POSEIDON_STATE_ANALOG,4,2      ; @POSEIDON_STATE_ANALOG
	.comm	_PLAY_SERVICE,4,2               ; @PLAY_SERVICE
	.comm	_TLG_TUNE_PLAY_SVC_STOP,4,2     ; @TLG_TUNE_PLAY_SVC_STOP
	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,8,3  ; @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_POSEIDON_STATE_VBI,4,2         ; @POSEIDON_STATE_VBI
	.comm	_poseidon_delete,4,2            ; @poseidon_delete
	.no_dead_strip	_pd_video_release
.subsections_via_symbols
