	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	_hw_devicenames@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$1, %r14d
	movl	%ebx, %ecx
	shll	%cl, %r14d
	movl	%esi, %r15d
	movq	(%rax,%r15,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_hw_addrs@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	movl	$-1, %r12d
	cmpl	%ebx, %eax
	jbe	LBB0_21
## %bb.1:
	leaq	16(%r13), %rbx
	movq	_IVTV_HW_TUNER@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_8
## %bb.2:
	movq	8(%r13), %rax
	movq	16(%rax), %r8
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_v4l2_i2c_new_subdev
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	%r14d, (%rax)
LBB0_4:
	movq	8(%r13), %rax
	movq	8(%rax), %r8
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_v4l2_i2c_new_subdev
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	%r14d, (%rax)
LBB0_6:
	movq	8(%r13), %rax
	movq	(%rax), %r8
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_v4l2_i2c_new_subdev
	testq	%rax, %rax
	je	LBB0_20
## %bb.7:
	movl	%r14d, (%rax)
	jmp	LBB0_20
LBB0_8:
	movq	_IVTV_HW_IR_ANY@GOTPCREL(%rip), %rdx
	movq	_hw_addrs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %ecx
	testl	%r14d, (%rdx)
	je	LBB0_9
## %bb.22:
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ivtv_i2c_new_ir                ## TAILCALL
LBB0_9:
	testl	%ecx, %ecx
	je	LBB0_21
## %bb.10:
	movq	_IVTV_HW_UPD64031A@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r14d
	je	LBB0_12
## %bb.11:
	movq	_IVTV_HW_UPD6408X@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r14d
	je	LBB0_12
## %bb.13:
	movq	_IVTV_HW_CX25840@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r14d
	jne	LBB0_15
## %bb.14:
	movl	4(%r13), %ecx
	movl	%ecx, -56(%rbp)
	movl	(%rax,%r15,4), %r9d
	movq	$0, (%rsp)
	leaq	-56(%rbp), %r8
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_v4l2_i2c_new_subdev_cfg
	jmp	LBB0_17
LBB0_12:
	movl	%ecx, %edi
	callq	_I2C_ADDRS
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	movq	%rax, %r8
	jmp	LBB0_16
LBB0_15:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%r8d, %r8d
LBB0_16:
	callq	_v4l2_i2c_new_subdev
LBB0_17:
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movl	%r14d, (%rax)
LBB0_19:
	xorl	%r12d, %r12d
LBB0_20:
	cmpq	$1, %rax
	sbbl	%r12d, %r12d
LBB0_21:
	movl	%r12d, %eax
	addq	$24, %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	_hw_addrs,8,3                   ## @hw_addrs
	.comm	_IVTV_HW_TUNER,4,2              ## @IVTV_HW_TUNER
	.comm	_IVTV_HW_IR_ANY,4,2             ## @IVTV_HW_IR_ANY
	.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
.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	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
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _hw_devicenames@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hw_devicenames@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x20, [x8, w1, uxtw #3]
Lloh3:
	adrp	x24, _hw_addrs@GOTPAGE
Lloh4:
	ldr	x24, [x24, _hw_addrs@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, w23
	b.ls	LBB0_14
; %bb.1:
	add	x22, x21, #16
	mov	w8, #1
	lsl	w19, w8, w23
Lloh5:
	adrp	x8, _IVTV_HW_TUNER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IVTV_HW_TUNER@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_9
; %bb.2:
	ldr	x8, [x21, #8]
	ldr	x4, [x8, #16]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	w3, #0
	bl	_v4l2_i2c_new_subdev
	cbz	x0, LBB0_4
; %bb.3:
	str	w19, [x0]
LBB0_4:
	ldr	x8, [x21, #8]
	ldr	x4, [x8, #8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	w3, #0
	bl	_v4l2_i2c_new_subdev
	cbz	x0, LBB0_6
; %bb.5:
	str	w19, [x0]
LBB0_6:
	ldr	x8, [x21, #8]
	ldr	x4, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	w3, #0
	bl	_v4l2_i2c_new_subdev
	cbz	x0, LBB0_8
LBB0_7:
	str	w19, [x0]
LBB0_8:
	cmp	x0, #0
	csetm	w0, eq
	b	LBB0_15
LBB0_9:
Lloh8:
	adrp	x9, _IVTV_HW_IR_ANY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IVTV_HW_IR_ANY@GOTPAGEOFF]
	mov	w8, w23
Lloh10:
	ldr	w10, [x9]
	ldr	x9, [x24]
	ldr	w3, [x9, x8, lsl #2]
	tst	w10, w19
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	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
	add	sp, sp, #80
	b	_ivtv_i2c_new_ir
LBB0_11:
	cbz	w3, LBB0_14
; %bb.12:
Lloh11:
	adrp	x10, _IVTV_HW_UPD64031A@GOTPAGE
Lloh12:
	ldr	x10, [x10, _IVTV_HW_UPD64031A@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _IVTV_HW_UPD6408X@GOTPAGE
Lloh15:
	ldr	x11, [x11, _IVTV_HW_UPD6408X@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	cmp	w19, w10
	ccmp	w19, w11, #4, ne
	b.ne	LBB0_16
; %bb.13:
	mov	x0, x3
	bl	_I2C_ADDRS
	mov	x4, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	w3, #0
	b	LBB0_19
LBB0_14:
	mov	w0, #-1
LBB0_15:
	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
	add	sp, sp, #80
	ret
LBB0_16:
Lloh17:
	adrp	x10, _IVTV_HW_CX25840@GOTPAGE
Lloh18:
	ldr	x10, [x10, _IVTV_HW_CX25840@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	cmp	w19, w10
	b.ne	LBB0_18
; %bb.17:
	ldr	w10, [x21, #4]
	str	w10, [sp, #8]
	ldr	w5, [x9, x8, lsl #2]
	add	x4, sp, #8
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	w3, #0
	mov	x6, #0
	bl	_v4l2_i2c_new_subdev_cfg
	b	LBB0_20
LBB0_18:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	x4, #0
LBB0_19:
	bl	_v4l2_i2c_new_subdev
LBB0_20:
	cbnz	x0, LBB0_7
	b	LBB0_8
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_hw_devicenames,8,3             ; @hw_devicenames
	.comm	_hw_addrs,8,3                   ; @hw_addrs
	.comm	_IVTV_HW_TUNER,4,2              ; @IVTV_HW_TUNER
	.comm	_IVTV_HW_IR_ANY,4,2             ; @IVTV_HW_IR_ANY
	.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
.subsections_via_symbols
