	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx25821_dev_unregister         ## -- Begin function cx25821_dev_unregister
	.p2align	4, 0x90
_cx25821_dev_unregister:                ## @cx25821_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
	movl	12(%rdi), %r15d
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_pci_resource_len
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_release_mem_region
	movq	_MAX_VID_CAP_CHANNEL_NUM@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	cmpl	$2, %eax
	jl	LBB0_6
## %bb.2:
	movq	_SRAM_CH08@GOTPCREL(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	leal	-1(%rax), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%r12), %ebx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cx25821_video_unregister
	movl	(%r15), %eax
	jmp	LBB0_5
LBB0_6:
	movq	(%r14), %rdi
	callq	_cx25821_i2c_unregister
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cx25821_iounmap                ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_VID_CAP_CHANNEL_NUM,4,2    ## @MAX_VID_CAP_CHANNEL_NUM
	.comm	_SRAM_CH08,4,2                  ## @SRAM_CH08
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx25821_dev_unregister         ; -- Begin function cx25821_dev_unregister
	.p2align	2
_cx25821_dev_unregister:                ; @cx25821_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
	ldr	w20, [x0, #12]
	cbz	w20, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #8]
	mov	w1, #0
	bl	_pci_resource_len
	mov	x1, x0
	mov	x0, x20
	bl	_release_mem_region
Lloh0:
	adrp	x21, _MAX_VID_CAP_CHANNEL_NUM@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_VID_CAP_CHANNEL_NUM@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.2:
	mov	w20, #0
Lloh2:
	adrp	x22, _SRAM_CH08@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SRAM_CH08@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w20, w20, #1
	sub	w9, w8, #1
	cmp	w20, w9
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x22]
	cmp	w20, w9
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_cx25821_video_unregister
	ldr	w8, [x21]
	b	LBB0_3
LBB0_6:
	ldr	x0, [x19]
	bl	_cx25821_i2c_unregister
	mov	x0, x19
	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	_cx25821_iounmap
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_VID_CAP_CHANNEL_NUM,4,2    ; @MAX_VID_CAP_CHANNEL_NUM
	.comm	_SRAM_CH08,4,2                  ; @SRAM_CH08
.subsections_via_symbols
