	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_i2c_register              ## -- Begin function ivtv_i2c_register
	.p2align	4, 0x90
_ivtv_i2c_register:                     ## @ivtv_i2c_register
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ecx
	movq	%rdi, %r13
	leaq	16(%rdi), %r14
	movq	_hw_devicenames@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	%esi, %eax
	movl	$1, %r15d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r15d
	movq	(%rdx,%rax,8), %r12
	movq	_IVTV_HW_TUNER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	jne	LBB0_7
## %bb.1:
	movq	8(%r13), %rax
	movq	16(%rax), %r8
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_v4l2_i2c_new_subdev
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	%r15d, (%rax)
LBB0_3:
	movq	8(%r13), %rax
	movq	8(%rax), %r8
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_v4l2_i2c_new_subdev
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	%r15d, (%rax)
LBB0_5:
	movq	8(%r13), %rax
	movq	(%rax), %r8
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_v4l2_i2c_new_subdev
	testq	%rax, %rax
	je	LBB0_20
## %bb.6:
	movl	%r15d, (%rax)
	jmp	LBB0_20
LBB0_7:
	movq	_IVTV_HW_IR_ANY@GOTPCREL(%rip), %rdx
	movq	_hw_addrs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %ecx
	testl	%r15d, (%rdx)
	je	LBB0_8
## %bb.22:
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ivtv_i2c_new_ir                ## TAILCALL
LBB0_8:
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.10:
	movq	_IVTV_HW_UPD64031A@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_12
## %bb.11:
	movq	_IVTV_HW_UPD6408X@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_12
## %bb.13:
	movq	_IVTV_HW_CX25840@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_15
## %bb.14:
	leaq	L_.str(%rip), %rax
	movq	%rax, -72(%rbp)
	leaq	-48(%rbp), %rdi
	movq	%rdi, -64(%rbp)
	movl	%ecx, -56(%rbp)
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	4(%r13), %eax
	movl	%eax, -48(%rbp)
	leaq	-72(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_v4l2_i2c_new_subdev_board
	jmp	LBB0_17
LBB0_9:
	movl	$-1, %ebx
	jmp	LBB0_21
LBB0_12:
	movl	%ecx, %edi
	callq	_I2C_ADDRS
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	movq	%rax, %r8
	jmp	LBB0_16
LBB0_15:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	xorl	%r8d, %r8d
LBB0_16:
	callq	_v4l2_i2c_new_subdev
LBB0_17:
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movl	%r15d, (%rax)
LBB0_19:
	xorl	%ebx, %ebx
LBB0_20:
	cmpq	$1, %rax
	sbbl	%ebx, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hw_devicenames,8,3             ## @hw_devicenames
	.comm	_IVTV_HW_TUNER,4,2              ## @IVTV_HW_TUNER
	.comm	_IVTV_HW_IR_ANY,4,2             ## @IVTV_HW_IR_ANY
	.comm	_hw_addrs,8,3                   ## @hw_addrs
	.comm	_IVTV_HW_UPD64031A,4,2          ## @IVTV_HW_UPD64031A
	.comm	_IVTV_HW_UPD6408X,4,2           ## @IVTV_HW_UPD6408X
	.comm	_IVTV_HW_CX25840,4,2            ## @IVTV_HW_CX25840
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cx25840"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_i2c_register              ; -- Begin function ivtv_i2c_register
	.p2align	2
_ivtv_i2c_register:                     ; @ivtv_i2c_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x0
	add	x20, x0, #16
Lloh0:
	adrp	x8, _hw_devicenames@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hw_devicenames@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x22, [x8, w1, uxtw #3]
	mov	w8, #1
	lsl	w19, w8, w1
Lloh3:
	adrp	x8, _IVTV_HW_TUNER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IVTV_HW_TUNER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_9
; %bb.1:
	ldr	x8, [x21, #8]
	ldr	x4, [x8, #16]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	mov	w3, #0
	bl	_v4l2_i2c_new_subdev
	cbz	x0, LBB0_3
; %bb.2:
	str	w19, [x0]
LBB0_3:
	ldr	x8, [x21, #8]
	ldr	x4, [x8, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	mov	w3, #0
	bl	_v4l2_i2c_new_subdev
	cbz	x0, LBB0_5
; %bb.4:
	str	w19, [x0]
LBB0_5:
	ldr	x8, [x21, #8]
	ldr	x4, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	mov	w3, #0
	bl	_v4l2_i2c_new_subdev
	cbz	x0, LBB0_7
LBB0_6:
	str	w19, [x0]
LBB0_7:
	cmp	x0, #0
	csetm	w0, eq
LBB0_8:
	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
	add	sp, sp, #80
	ret
LBB0_9:
	mov	w8, w1
Lloh6:
	adrp	x9, _IVTV_HW_IR_ANY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IVTV_HW_IR_ANY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _hw_addrs@GOTPAGE
Lloh10:
	ldr	x10, [x10, _hw_addrs@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	ldr	w3, [x10, x8, lsl #2]
	tst	w9, w19
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	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
	add	sp, sp, #80
	b	_ivtv_i2c_new_ir
LBB0_11:
	cbz	w3, LBB0_14
; %bb.12:
Lloh12:
	adrp	x8, _IVTV_HW_UPD64031A@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IVTV_HW_UPD64031A@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _IVTV_HW_UPD6408X@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IVTV_HW_UPD6408X@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w19, w8
	ccmp	w19, w9, #4, ne
	b.ne	LBB0_15
; %bb.13:
	mov	x0, x3
	bl	_I2C_ADDRS
	mov	x4, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	mov	w3, #0
	b	LBB0_18
LBB0_14:
	mov	w0, #-1
	b	LBB0_8
LBB0_15:
Lloh18:
	adrp	x8, _IVTV_HW_CX25840@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IVTV_HW_CX25840@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_17
; %bb.16:
Lloh21:
	adrp	x8, l_.str@PAGE
Lloh22:
	add	x8, x8, l_.str@PAGEOFF
	add	x9, sp, #24
	stp	x8, x9, [sp]
	str	w3, [sp, #16]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w8, [x21, #4]
	str	w8, [sp, #24]
	mov	x2, sp
	mov	x0, x21
	mov	x1, x20
	mov	x3, #0
	bl	_v4l2_i2c_new_subdev_board
	cbnz	x0, LBB0_6
	b	LBB0_7
LBB0_17:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	mov	x4, #0
LBB0_18:
	bl	_v4l2_i2c_new_subdev
	cbnz	x0, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_hw_devicenames,8,3             ; @hw_devicenames
	.comm	_IVTV_HW_TUNER,4,2              ; @IVTV_HW_TUNER
	.comm	_IVTV_HW_IR_ANY,4,2             ; @IVTV_HW_IR_ANY
	.comm	_hw_addrs,8,3                   ; @hw_addrs
	.comm	_IVTV_HW_UPD64031A,4,2          ; @IVTV_HW_UPD64031A
	.comm	_IVTV_HW_UPD6408X,4,2           ; @IVTV_HW_UPD6408X
	.comm	_IVTV_HW_CX25840,4,2            ; @IVTV_HW_CX25840
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cx25840"

.subsections_via_symbols
