	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_v4l2_dev_destroy
_pvr2_v4l2_dev_destroy:                 ## @pvr2_v4l2_dev_destroy
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movl	(%rdi), %r12d
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_video_device_node_name
	movl	%eax, %r13d
	movl	%r12d, %edi
	callq	_pvr2_config_get_name
	leaq	L_.str(%rip), %rdx
	leaq	-128(%rbp), %r12
	movq	%r12, %rdi
	movl	$79, %esi
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_scnprintf
	movl	%eax, %eax
	movb	$0, -128(%rbp,%rax)
	movl	24(%rbx), %esi
	movq	%r15, %rdi
	movl	$-1, %edx
	callq	_pvr2_hdw_v4l_store_minor_number
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	%r14, %rdi
	callq	_video_unregister_device
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	callq	_pr_info
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pvrusb2: unregistered device %s [%s]"

L_.str.1:                               ## @.str.1
	.asciz	"%s\n"

	.no_dead_strip	_pvr2_v4l2_dev_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_v4l2_dev_destroy
_pvr2_v4l2_dev_destroy:                 ; @pvr2_v4l2_dev_destroy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	x20, [x8]
	ldr	w21, [x0]
	add	x22, x0, #4
	mov	x0, x22
	bl	_video_device_node_name
	mov	x23, x0
	mov	x0, x21
	bl	_pvr2_config_get_name
	mov	x4, x0
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x21, sp, #8
	add	x0, sp, #8
	mov	w1, #79
	mov	x3, x23
	bl	_scnprintf
	strb	wzr, [x21, w0, uxtw]
	ldr	w1, [x19, #24]
	mov	x0, x20
	mov	w2, #-1
	bl	_pvr2_hdw_v4l_store_minor_number
	stp	xzr, xzr, [x19, #8]
	mov	x0, x22
	bl	_video_unregister_device
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x1, sp, #8
	bl	_pr_info
	ldur	x8, [x29, #-56]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pvrusb2: unregistered device %s [%s]"

l_.str.1:                               ; @.str.1
	.asciz	"%s\n"

	.no_dead_strip	_pvr2_v4l2_dev_destroy
.subsections_via_symbols
