	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_card_setup             ## -- Begin function cx231xx_card_setup
	.p2align	4, 0x90
_cx231xx_card_setup:                    ## @cx231xx_card_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_cx231xx_set_model
	movq	_cx231xx_boards@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	4(%rax,%rcx,8), %edx
	movl	%edx, 64(%rbx)
	movl	(%rax,%rcx,8), %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, 8(%rbx)
LBB0_2:
	movq	32(%rbx), %rax
	movq	_CX231XX_AVDECODER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	leaq	24(%rbx), %r14
	movq	_I2C_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cx231xx_get_i2c_adap
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	$68, %ecx
	xorl	%r8d, %r8d
	callq	_v4l2_i2c_new_subdev
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	12(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_5:
	movq	_core@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_load_fw@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_cx25840_call
LBB0_6:
	movq	40(%rbx), %rax
	movq	_TUNER_ABSENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.7:
	movl	48(%rbx), %esi
	movq	%rbx, %rdi
	callq	_cx231xx_get_i2c_adap
	leaq	24(%rbx), %rdi
	movl	8(%rbx), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%rax, %rsi
	xorl	%r8d, %r8d
	callq	_v4l2_i2c_new_subdev
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rbx, %rdi
	callq	_cx231xx_config_tuner
	jmp	LBB0_10
LBB0_8:
	movl	12(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
LBB0_10:
	movq	(%rbx), %rax
	addq	$-128, %rax
	cmpq	$4, %rax
	ja	LBB0_13
## %bb.11:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1048, %edi                     ## imm = 0x418
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	%rax, %r14
	movq	_I2C_1_MUX_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cx231xx_get_i2c_adap
	leaq	1032(%r14), %rsi
	movq	%rax, 1040(%r14)
	movl	$80, 1032(%r14)
	movq	%r14, %r15
	addq	$4, %r15
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movl	$1024, %ecx                     ## imm = 0x400
	callq	_read_eeprom
	addl	$768, %r15d                     ## imm = 0x300
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_tveeprom_hauppauge_analog
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	12(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cx231xx_boards,8,3             ## @cx231xx_boards
	.comm	_CX231XX_AVDECODER,8,3          ## @CX231XX_AVDECODER
	.comm	_I2C_0,4,2                      ## @I2C_0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cx25840"

L_.str.1:                               ## @.str.1
	.asciz	"cx25840 subdev registration failure\n"

	.comm	_core,4,2                       ## @core
	.comm	_load_fw,4,2                    ## @load_fw
	.comm	_TUNER_ABSENT,8,3               ## @TUNER_ABSENT
L_.str.2:                               ## @.str.2
	.asciz	"tuner"

L_.str.3:                               ## @.str.3
	.asciz	"tuner subdev registration failure\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.4:                               ## @.str.4
	.asciz	"failed to allocate memory to read eeprom\n"

	.comm	_I2C_1_MUX_1,4,2                ## @I2C_1_MUX_1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_card_setup             ; -- Begin function cx231xx_card_setup
	.p2align	2
_cx231xx_card_setup:                    ; @cx231xx_card_setup
	.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
	bl	_cx231xx_set_model
Lloh0:
	adrp	x8, _cx231xx_boards@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cx231xx_boards@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x19]
	add	x8, x8, x9, lsl #3
	ldp	w8, w9, [x8]
	str	w9, [x19, #64]
	cbz	w8, LBB0_2
; %bb.1:
	str	w8, [x19, #8]
LBB0_2:
	ldr	x8, [x19, #32]
Lloh3:
	adrp	x9, _CX231XX_AVDECODER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CX231XX_AVDECODER@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	add	x20, x19, #24
Lloh6:
	adrp	x8, _I2C_0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_0@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cx231xx_get_i2c_adap
	mov	x1, x0
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	w3, #68
	mov	x4, #0
	bl	_v4l2_i2c_new_subdev
	str	x0, [x19, #56]
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x19, #12]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_5:
Lloh13:
	adrp	x8, _core@GOTPAGE
Lloh14:
	ldr	x8, [x8, _core@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _load_fw@GOTPAGE
Lloh17:
	ldr	x8, [x8, _load_fw@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_cx25840_call
LBB0_6:
	ldr	x8, [x19, #40]
Lloh19:
	adrp	x9, _TUNER_ABSENT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _TUNER_ABSENT@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.7:
	ldr	w1, [x19, #48]
	mov	x0, x19
	bl	_cx231xx_get_i2c_adap
	mov	x1, x0
	add	x0, x19, #24
	ldr	w3, [x19, #8]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x4, #0
	bl	_v4l2_i2c_new_subdev
	str	x0, [x19, #16]
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_cx231xx_config_tuner
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19, #12]
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_10:
	ldr	x8, [x19]
	sub	x8, x8, #128
	cmp	x8, #4
	b.hi	LBB0_13
; %bb.11:
Lloh26:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	w0, #1048
	bl	_kzalloc
	cbz	x0, LBB0_14
; %bb.12:
	mov	x20, x0
Lloh29:
	adrp	x8, _I2C_1_MUX_1@GOTPAGE
Lloh30:
	ldr	x8, [x8, _I2C_1_MUX_1@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cx231xx_get_i2c_adap
	add	x1, x20, #1032
	str	x0, [x20, #1040]
	mov	w8, #80
	str	w8, [x20, #1032]
	add	x21, x20, #4
	mov	x0, x19
	mov	x2, x21
	mov	w3, #1024
	bl	_read_eeprom
	add	w1, w21, #768
	mov	x0, x20
	bl	_tveeprom_hauppauge_analog
	mov	x0, x20
	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	_kfree
LBB0_13:
	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
LBB0_14:
	ldr	w0, [x19, #12]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	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	_dev_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_cx231xx_boards,8,3             ; @cx231xx_boards
	.comm	_CX231XX_AVDECODER,8,3          ; @CX231XX_AVDECODER
	.comm	_I2C_0,4,2                      ; @I2C_0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cx25840"

l_.str.1:                               ; @.str.1
	.asciz	"cx25840 subdev registration failure\n"

	.comm	_core,4,2                       ; @core
	.comm	_load_fw,4,2                    ; @load_fw
	.comm	_TUNER_ABSENT,8,3               ; @TUNER_ABSENT
l_.str.2:                               ; @.str.2
	.asciz	"tuner"

l_.str.3:                               ; @.str.3
	.asciz	"tuner subdev registration failure\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.4:                               ; @.str.4
	.asciz	"failed to allocate memory to read eeprom\n"

	.comm	_I2C_1_MUX_1,4,2                ; @I2C_1_MUX_1
.subsections_via_symbols
