	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx23885_dev_unregister
_cx23885_dev_unregister:                ## @cx23885_dev_unregister
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	36(%rdi), %edi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movl	%eax, %r14d
	movl	36(%rbx), %edi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_release_mem_region
	leaq	32(%rbx), %rdi
	callq	_atomic_dec_and_test
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	movq	_cx23885_boards@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	_CX23885_ANALOG_VIDEO@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_cx23885_video_unregister
	movq	(%r14), %rax
	movq	(%rbx), %rcx
LBB0_3:
	leaq	(%rcx,%rcx,2), %rdx
	movq	8(%rax,%rdx,8), %rdx
	movq	_CX23885_MPEG_DVB@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rdx
	jne	LBB0_5
## %bb.4:
	leaq	28(%rbx), %rdi
	callq	_cx23885_dvb_unregister
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rdx
	movq	8(%rax,%rdx,8), %rdx
LBB0_5:
	movq	_CX23885_MPEG_ENCODER@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rdx
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_cx23885_417_unregister
	movq	(%r14), %rax
	movq	(%rbx), %rcx
LBB0_7:
	leaq	(%rcx,%rcx,2), %rcx
	movq	16(%rax,%rcx,8), %rax
	cmpq	(%r15), %rax
	jne	LBB0_9
## %bb.8:
	leaq	24(%rbx), %rdi
	callq	_cx23885_dvb_unregister
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	16(%rax,%rcx,8), %rax
LBB0_9:
	cmpq	(%r12), %rax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_cx23885_417_unregister
LBB0_11:
	movq	16(%rbx), %rdi
	addq	$8, %rdi
	callq	_cx23885_i2c_unregister
	movq	16(%rbx), %rdi
	addq	$4, %rdi
	callq	_cx23885_i2c_unregister
	movq	16(%rbx), %rdi
	callq	_cx23885_i2c_unregister
	movl	8(%rbx), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_iounmap                        ## TAILCALL
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cx23885_boards,8,3             ## @cx23885_boards
	.comm	_CX23885_ANALOG_VIDEO,8,3       ## @CX23885_ANALOG_VIDEO
	.comm	_CX23885_MPEG_DVB,8,3           ## @CX23885_MPEG_DVB
	.comm	_CX23885_MPEG_ENCODER,8,3       ## @CX23885_MPEG_ENCODER
	.no_dead_strip	_cx23885_dev_unregister
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx23885_dev_unregister
_cx23885_dev_unregister:                ; @cx23885_dev_unregister
	.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
	mov	x19, x0
	ldr	w0, [x0, #36]
	mov	w1, #0
	bl	_pci_resource_start
	mov	x20, x0
	ldr	w0, [x19, #36]
	mov	w1, #0
	bl	_pci_resource_len
	mov	x1, x0
	mov	x0, x20
	bl	_release_mem_region
	add	x0, x19, #32
	bl	_atomic_dec_and_test
	cbz	w0, LBB0_12
; %bb.1:
Lloh0:
	adrp	x20, _cx23885_boards@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cx23885_boards@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x19]
	mov	w10, #24
	mul	x10, x9, x10
	ldr	x10, [x8, x10]
Lloh2:
	adrp	x11, _CX23885_ANALOG_VIDEO@GOTPAGE
Lloh3:
	ldr	x11, [x11, _CX23885_ANALOG_VIDEO@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_cx23885_video_unregister
	ldr	x8, [x20]
	ldr	x9, [x19]
LBB0_3:
	mov	w10, #24
	madd	x10, x9, x10, x8
	ldr	x10, [x10, #8]
Lloh5:
	adrp	x21, _CX23885_MPEG_DVB@GOTPAGE
Lloh6:
	ldr	x21, [x21, _CX23885_MPEG_DVB@GOTPAGEOFF]
	ldr	x11, [x21]
	cmp	x10, x11
	b.ne	LBB0_5
; %bb.4:
	add	x0, x19, #28
	bl	_cx23885_dvb_unregister
	ldr	x8, [x20]
	ldr	x9, [x19]
	mov	w10, #24
	madd	x10, x9, x10, x8
	ldr	x10, [x10, #8]
LBB0_5:
Lloh7:
	adrp	x22, _CX23885_MPEG_ENCODER@GOTPAGE
Lloh8:
	ldr	x22, [x22, _CX23885_MPEG_ENCODER@GOTPAGEOFF]
	ldr	x11, [x22]
	cmp	x10, x11
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_cx23885_417_unregister
	ldr	x8, [x20]
	ldr	x9, [x19]
LBB0_7:
	mov	w10, #24
	madd	x8, x9, x10, x8
	ldr	x8, [x8, #16]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	add	x0, x19, #24
	bl	_cx23885_dvb_unregister
	ldr	x8, [x20]
	ldr	x9, [x19]
	mov	w10, #24
	madd	x8, x9, x10, x8
	ldr	x8, [x8, #16]
LBB0_9:
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_cx23885_417_unregister
LBB0_11:
	ldr	x8, [x19, #16]
	add	x0, x8, #8
	bl	_cx23885_i2c_unregister
	ldr	x8, [x19, #16]
	add	x0, x8, #4
	bl	_cx23885_i2c_unregister
	ldr	x0, [x19, #16]
	bl	_cx23885_i2c_unregister
	ldr	w0, [x19, #8]
	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
	b	_iounmap
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_cx23885_boards,8,3             ; @cx23885_boards
	.comm	_CX23885_ANALOG_VIDEO,8,3       ; @CX23885_ANALOG_VIDEO
	.comm	_CX23885_MPEG_DVB,8,3           ; @CX23885_MPEG_DVB
	.comm	_CX23885_MPEG_ENCODER,8,3       ; @CX23885_MPEG_ENCODER
	.no_dead_strip	_cx23885_dev_unregister
.subsections_via_symbols
