	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7164_finidev
_saa7164_finidev:                       ## @saa7164_finidev
	.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, %r14
	callq	_pci_get_drvdata
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_SAA7164_BOARD_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.1:
	movq	_fw_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.2:
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_kthread_stop
	movq	$0, 48(%rbx)
LBB0_4:
	cmpq	$0, 40(%rbx)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_saa7164_api_set_debug
LBB0_6:
	movq	32(%rbx), %rax
	movq	_SAA7164_PORT_ENC1@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rdi
	leaq	(%rax,%rcx,4), %rsi
	addq	$16, %rsi
	callq	_saa7164_histogram_print
	movq	32(%rbx), %rax
	movq	(%r13), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rdi
	leaq	(%rax,%rcx,4), %rsi
	addq	$12, %rsi
	callq	_saa7164_histogram_print
	movq	32(%rbx), %rax
	movq	(%r13), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rdi
	leaq	(%rax,%rcx,4), %rsi
	addq	$8, %rsi
	callq	_saa7164_histogram_print
	movq	32(%rbx), %rax
	movq	(%r13), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rdi
	leaq	(%rax,%rcx,4), %rsi
	addq	$4, %rsi
	callq	_saa7164_histogram_print
	movq	(%r13), %rax
	leaq	(%rax,%rax,4), %rdi
	shlq	$2, %rdi
	addq	32(%rbx), %rdi
	movq	%rdi, %rsi
	callq	_saa7164_histogram_print
	movq	32(%rbx), %rax
	movq	_SAA7164_PORT_VBI1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rdi
	leaq	(%rax,%rcx,4), %rsi
	addq	$4, %rsi
	callq	_saa7164_histogram_print
	movq	_SAA7164_PORT_VBI2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,4), %rdi
	shlq	$2, %rdi
	addq	32(%rbx), %rdi
	movq	%rdi, %rsi
	callq	_saa7164_histogram_print
	movq	%rbx, %rdi
	callq	_saa7164_shutdown
	movq	_saa7164_boards@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rsi
	shlq	$4, %rsi
	movq	_SAA7164_MPEG_DVB@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	cmpq	%rdx, (%rax,%rsi)
	jne	LBB0_8
## %bb.7:
	movq	_SAA7164_PORT_TS1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,4), %rdi
	shlq	$2, %rdi
	addq	32(%rbx), %rdi
	callq	_saa7164_dvb_unregister
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	movq	(%r12), %rdx
LBB0_8:
	leaq	(%rcx,%rcx,2), %rsi
	shlq	$4, %rsi
	cmpq	%rdx, 8(%rax,%rsi)
	jne	LBB0_10
## %bb.9:
	movq	_SAA7164_PORT_TS2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,4), %rdi
	shlq	$2, %rdi
	addq	32(%rbx), %rdi
	callq	_saa7164_dvb_unregister
	movq	(%r15), %rax
	movq	(%rbx), %rcx
LBB0_10:
	leaq	(%rcx,%rcx,2), %rsi
	shlq	$4, %rsi
	movq	_SAA7164_MPEG_ENCODER@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	cmpq	%rdx, 16(%rax,%rsi)
	jne	LBB0_12
## %bb.11:
	movq	(%r13), %rax
	leaq	(%rax,%rax,4), %rdi
	shlq	$2, %rdi
	addq	32(%rbx), %rdi
	callq	_saa7164_encoder_unregister
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	movq	(%r12), %rdx
LBB0_12:
	leaq	(%rcx,%rcx,2), %rsi
	shlq	$4, %rsi
	cmpq	%rdx, 24(%rax,%rsi)
	jne	LBB0_14
## %bb.13:
	movq	_SAA7164_PORT_ENC2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,4), %rdi
	shlq	$2, %rdi
	addq	32(%rbx), %rdi
	callq	_saa7164_encoder_unregister
	movq	(%r15), %rax
	movq	(%rbx), %rcx
LBB0_14:
	leaq	(%rcx,%rcx,2), %rsi
	shlq	$4, %rsi
	movq	_SAA7164_MPEG_VBI@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	cmpq	%rdx, 32(%rax,%rsi)
	jne	LBB0_16
## %bb.15:
	movq	_SAA7164_PORT_VBI1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,4), %rdi
	shlq	$2, %rdi
	addq	32(%rbx), %rdi
	callq	_saa7164_vbi_unregister
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	movq	(%r12), %rdx
LBB0_16:
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	cmpq	%rdx, 40(%rax,%rcx)
	jne	LBB0_18
## %bb.17:
	movq	_SAA7164_PORT_VBI2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,4), %rdi
	shlq	$2, %rdi
	addq	32(%rbx), %rdi
	callq	_saa7164_vbi_unregister
LBB0_18:
	movq	24(%rbx), %rdi
	callq	_saa7164_i2c_unregister
	movq	24(%rbx), %rdi
	addq	$4, %rdi
	callq	_saa7164_i2c_unregister
	movq	24(%rbx), %rdi
	addq	$8, %rdi
	callq	_saa7164_i2c_unregister
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	cmpl	$0, 8(%rbx)
	je	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	callq	_pci_disable_msi
	movl	$0, 8(%rbx)
LBB0_20:
	movq	%r14, %rdi
	callq	_pci_disable_device
	movq	_devlist@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	16(%rbx), %rdi
	callq	_list_del
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_saa7164_dev_unregister
	movq	%rbx, %rdi
	addq	$12, %rdi
	callq	_v4l2_device_unregister
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7164_BOARD_UNKNOWN,8,3      ## @SAA7164_BOARD_UNKNOWN
	.comm	_fw_debug,8,3                   ## @fw_debug
	.comm	_SAA7164_PORT_ENC1,8,3          ## @SAA7164_PORT_ENC1
	.comm	_SAA7164_PORT_VBI1,8,3          ## @SAA7164_PORT_VBI1
	.comm	_SAA7164_PORT_VBI2,8,3          ## @SAA7164_PORT_VBI2
	.comm	_saa7164_boards,8,3             ## @saa7164_boards
	.comm	_SAA7164_MPEG_DVB,8,3           ## @SAA7164_MPEG_DVB
	.comm	_SAA7164_PORT_TS1,8,3           ## @SAA7164_PORT_TS1
	.comm	_SAA7164_PORT_TS2,8,3           ## @SAA7164_PORT_TS2
	.comm	_SAA7164_MPEG_ENCODER,8,3       ## @SAA7164_MPEG_ENCODER
	.comm	_SAA7164_PORT_ENC2,8,3          ## @SAA7164_PORT_ENC2
	.comm	_SAA7164_MPEG_VBI,8,3           ## @SAA7164_MPEG_VBI
	.comm	_devlist,4,2                    ## @devlist
	.no_dead_strip	_saa7164_finidev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7164_finidev
_saa7164_finidev:                       ; @saa7164_finidev
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	bl	_pci_get_drvdata
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SAA7164_BOARD_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SAA7164_BOARD_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _fw_debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _fw_debug@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_kthread_stop
	str	xzr, [x19, #48]
LBB0_4:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #0
	bl	_saa7164_api_set_debug
LBB0_6:
	ldr	x8, [x19, #32]
Lloh6:
	adrp	x24, _SAA7164_PORT_ENC1@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SAA7164_PORT_ENC1@GOTPAGEOFF]
	ldr	x9, [x24]
	mov	w23, #20
	madd	x0, x9, x23, x8
	add	x1, x0, #16
	bl	_saa7164_histogram_print
	ldr	x8, [x19, #32]
	ldr	x9, [x24]
	madd	x0, x9, x23, x8
	add	x1, x0, #12
	bl	_saa7164_histogram_print
	ldr	x8, [x19, #32]
	ldr	x9, [x24]
	madd	x0, x9, x23, x8
	add	x1, x0, #8
	bl	_saa7164_histogram_print
	ldr	x8, [x19, #32]
	ldr	x9, [x24]
	madd	x0, x9, x23, x8
	add	x1, x0, #4
	bl	_saa7164_histogram_print
	ldr	x8, [x19, #32]
	ldr	x9, [x24]
	madd	x0, x9, x23, x8
	mov	x1, x0
	bl	_saa7164_histogram_print
	ldr	x8, [x19, #32]
Lloh8:
	adrp	x22, _SAA7164_PORT_VBI1@GOTPAGE
Lloh9:
	ldr	x22, [x22, _SAA7164_PORT_VBI1@GOTPAGEOFF]
	ldr	x9, [x22]
	madd	x0, x9, x23, x8
	add	x1, x0, #4
	bl	_saa7164_histogram_print
	ldr	x8, [x19, #32]
Lloh10:
	adrp	x21, _SAA7164_PORT_VBI2@GOTPAGE
Lloh11:
	ldr	x21, [x21, _SAA7164_PORT_VBI2@GOTPAGEOFF]
	ldr	x9, [x21]
	madd	x0, x9, x23, x8
	mov	x1, x0
	bl	_saa7164_histogram_print
	mov	x0, x19
	bl	_saa7164_shutdown
Lloh12:
	adrp	x23, _saa7164_boards@GOTPAGE
Lloh13:
	ldr	x23, [x23, _saa7164_boards@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x9, [x19]
	mov	w10, #48
	mul	x10, x9, x10
	ldr	x11, [x8, x10]
Lloh14:
	adrp	x25, _SAA7164_MPEG_DVB@GOTPAGE
Lloh15:
	ldr	x25, [x25, _SAA7164_MPEG_DVB@GOTPAGEOFF]
	ldr	x10, [x25]
	cmp	x11, x10
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x19, #32]
Lloh16:
	adrp	x9, _SAA7164_PORT_TS1@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SAA7164_PORT_TS1@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	mov	w10, #20
	madd	x0, x9, x10, x8
	bl	_saa7164_dvb_unregister
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	x10, [x25]
LBB0_8:
	mov	w11, #48
	madd	x11, x9, x11, x8
	ldr	x11, [x11, #8]
	cmp	x11, x10
	b.ne	LBB0_10
; %bb.9:
	ldr	x8, [x19, #32]
Lloh19:
	adrp	x9, _SAA7164_PORT_TS2@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SAA7164_PORT_TS2@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	mov	w10, #20
	madd	x0, x9, x10, x8
	bl	_saa7164_dvb_unregister
	ldr	x8, [x23]
	ldr	x9, [x19]
LBB0_10:
	mov	w10, #48
	madd	x10, x9, x10, x8
	ldr	x11, [x10, #16]
Lloh22:
	adrp	x25, _SAA7164_MPEG_ENCODER@GOTPAGE
Lloh23:
	ldr	x25, [x25, _SAA7164_MPEG_ENCODER@GOTPAGEOFF]
	ldr	x10, [x25]
	cmp	x11, x10
	b.ne	LBB0_12
; %bb.11:
	ldr	x8, [x19, #32]
	ldr	x9, [x24]
	mov	w10, #20
	madd	x0, x9, x10, x8
	bl	_saa7164_encoder_unregister
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	x10, [x25]
LBB0_12:
	mov	w11, #48
	madd	x11, x9, x11, x8
	ldr	x11, [x11, #24]
	cmp	x11, x10
	b.ne	LBB0_14
; %bb.13:
	ldr	x8, [x19, #32]
Lloh24:
	adrp	x9, _SAA7164_PORT_ENC2@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SAA7164_PORT_ENC2@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	mov	w10, #20
	madd	x0, x9, x10, x8
	bl	_saa7164_encoder_unregister
	ldr	x8, [x23]
	ldr	x9, [x19]
LBB0_14:
	mov	w10, #48
	madd	x10, x9, x10, x8
	ldr	x11, [x10, #32]
Lloh27:
	adrp	x24, _SAA7164_MPEG_VBI@GOTPAGE
Lloh28:
	ldr	x24, [x24, _SAA7164_MPEG_VBI@GOTPAGEOFF]
	ldr	x10, [x24]
	cmp	x11, x10
	b.ne	LBB0_16
; %bb.15:
	ldr	x8, [x19, #32]
	ldr	x9, [x22]
	mov	w10, #20
	madd	x0, x9, x10, x8
	bl	_saa7164_vbi_unregister
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	x10, [x24]
LBB0_16:
	mov	w11, #48
	madd	x8, x9, x11, x8
	ldr	x8, [x8, #40]
	cmp	x8, x10
	b.ne	LBB0_18
; %bb.17:
	ldr	x8, [x19, #32]
	ldr	x9, [x21]
	mov	w10, #20
	madd	x0, x9, x10, x8
	bl	_saa7164_vbi_unregister
LBB0_18:
	ldr	x0, [x19, #24]
	bl	_saa7164_i2c_unregister
	ldr	x8, [x19, #24]
	add	x0, x8, #4
	bl	_saa7164_i2c_unregister
	ldr	x8, [x19, #24]
	add	x0, x8, #8
	bl	_saa7164_i2c_unregister
	ldr	w0, [x20]
	mov	x1, x19
	bl	_free_irq
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_20
; %bb.19:
	mov	x0, x20
	bl	_pci_disable_msi
	str	wzr, [x19, #8]
LBB0_20:
	mov	x0, x20
	bl	_pci_disable_device
Lloh29:
	adrp	x20, _devlist@GOTPAGE
Lloh30:
	ldr	x20, [x20, _devlist@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #16
	bl	_list_del
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	bl	_saa7164_dev_unregister
	add	x0, x19, #12
	bl	_v4l2_device_unregister
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7164_BOARD_UNKNOWN,8,3      ; @SAA7164_BOARD_UNKNOWN
	.comm	_fw_debug,8,3                   ; @fw_debug
	.comm	_SAA7164_PORT_ENC1,8,3          ; @SAA7164_PORT_ENC1
	.comm	_SAA7164_PORT_VBI1,8,3          ; @SAA7164_PORT_VBI1
	.comm	_SAA7164_PORT_VBI2,8,3          ; @SAA7164_PORT_VBI2
	.comm	_saa7164_boards,8,3             ; @saa7164_boards
	.comm	_SAA7164_MPEG_DVB,8,3           ; @SAA7164_MPEG_DVB
	.comm	_SAA7164_PORT_TS1,8,3           ; @SAA7164_PORT_TS1
	.comm	_SAA7164_PORT_TS2,8,3           ; @SAA7164_PORT_TS2
	.comm	_SAA7164_MPEG_ENCODER,8,3       ; @SAA7164_MPEG_ENCODER
	.comm	_SAA7164_PORT_ENC2,8,3          ; @SAA7164_PORT_ENC2
	.comm	_SAA7164_MPEG_VBI,8,3           ; @SAA7164_MPEG_VBI
	.comm	_devlist,4,2                    ; @devlist
	.no_dead_strip	_saa7164_finidev
.subsections_via_symbols
