	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_i2c_core_init             ## -- Begin function pvr2_i2c_core_init
	.p2align	4, 0x90
_pvr2_i2c_core_init:                    ## @pvr2_i2c_core_init
	.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
	movq	_PVR2_I2C_FUNC_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testq	%r8, %r8
	je	LBB0_8
## %bb.1:
	leaq	-1(%r8), %rcx
	movl	%r8d, %eax
	andl	$3, %eax
	cmpq	$3, %rcx
	jae	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_5
LBB0_3:
	andl	$-4, %r8d
	xorl	%ecx, %ecx
	movq	_pvr2_i2c_basic_op@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rdi
	movq	24(%rbx), %rdx
	movq	%rdi, (%rdx,%rcx,8)
	movq	(%rsi), %rdx
	movq	24(%rbx), %rdi
	movq	%rdx, 8(%rdi,%rcx,8)
	movq	(%rsi), %rdx
	movq	24(%rbx), %rdi
	movq	%rdx, 16(%rdi,%rcx,8)
	movq	(%rsi), %rdx
	movq	24(%rbx), %rdi
	movq	%rdx, 24(%rdi,%rcx,8)
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_pvr2_i2c_basic_op@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rsi
	movq	24(%rbx), %rdi
	movq	%rsi, (%rdi,%rcx,8)
	incq	%rcx
	decq	%rax
	jne	LBB0_7
LBB0_8:
	movq	_ir_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %eax
	cmpl	$1, %eax
	je	LBB0_11
## %bb.9:
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movl	80(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	movq	_i2c_black_hole@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	8(%rbx), %rax
	movq	_PVR2_IR_SCHEME_24XXX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.12:
	movq	_i2c_24xxx_ir@GOTPCREL(%rip), %rax
LBB0_13:
	movq	(%rax), %rax
	movq	24(%rbx), %rcx
	movq	%rax, 192(%rcx)
LBB0_14:
	movq	88(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_16
## %bb.15:
	movq	_i2c_hack_cx25840@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rbx), %rcx
	movq	%rax, 544(%rcx)
	movq	88(%rbx), %rax
LBB0_16:
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.17:
	movq	_i2c_hack_wm8775@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rbx), %rcx
	movq	%rax, 216(%rcx)
LBB0_18:
	leaq	32(%rbx), %r14
	movq	_pvr2_i2c_adap_template@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movups	%xmm1, 48(%rbx)
	movups	%xmm0, 32(%rbx)
	movq	_pvr2_i2c_algo_template@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	68(%rbx), %r15
	movl	%eax, 68(%rbx)
	movl	56(%rbx), %edi
	movl	80(%rbx), %esi
	movl	$4, %edx
	callq	_strscpy
	movq	72(%rbx), %rax
	movq	%rax, 48(%rbx)
	movq	%r15, 40(%rbx)
	movq	%rbx, 32(%rbx)
	movl	$1, 16(%rbx)
	leaq	64(%rbx), %rsi
	movq	%r14, %rdi
	callq	_i2c_set_adapdata
	movq	%r14, %rdi
	callq	_i2c_add_adapter
	movq	24(%rbx), %rax
	movq	192(%rax), %rax
	movq	_i2c_24xxx_ir@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.19:
	movq	%rbx, %rdi
	movl	$113, %esi
	callq	_do_i2c_probe
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	_PVR2_TRACE_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_pvr2_trace
	movq	24(%rbx), %rax
	movq	$0, 192(%rax)
	movq	_PVR2_IR_SCHEME_24XXX_MCE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_21:
	movq	_i2c_scan@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_23
## %bb.22:
	movq	%rbx, %rdi
	callq	_do_i2c_scan
LBB0_23:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pvr2_i2c_register_ir           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_I2C_FUNC_CNT,4,2          ## @PVR2_I2C_FUNC_CNT
	.comm	_pvr2_i2c_basic_op,8,3          ## @pvr2_i2c_basic_op
	.comm	_ir_mode,8,3                    ## @ir_mode
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: IR disabled\n"

	.comm	_i2c_black_hole,8,3             ## @i2c_black_hole
	.comm	_PVR2_IR_SCHEME_24XXX,8,3       ## @PVR2_IR_SCHEME_24XXX
	.comm	_i2c_24xxx_ir,8,3               ## @i2c_24xxx_ir
	.comm	_i2c_hack_cx25840,8,3           ## @i2c_hack_cx25840
	.comm	_i2c_hack_wm8775,8,3            ## @i2c_hack_wm8775
	.comm	_pvr2_i2c_adap_template,32,3    ## @pvr2_i2c_adap_template
	.comm	_pvr2_i2c_algo_template,4,2     ## @pvr2_i2c_algo_template
	.comm	_PVR2_TRACE_INFO,4,2            ## @PVR2_TRACE_INFO
L_.str.1:                               ## @.str.1
	.asciz	"Device has newer IR hardware; disabling unneeded virtual IR device"

	.comm	_PVR2_IR_SCHEME_24XXX_MCE,8,3   ## @PVR2_IR_SCHEME_24XXX_MCE
	.comm	_i2c_scan,8,3                   ## @i2c_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_i2c_core_init             ; -- Begin function pvr2_i2c_core_init
	.p2align	2
_pvr2_i2c_core_init:                    ; @pvr2_i2c_core_init
	.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
Lloh0:
	adrp	x8, _PVR2_I2C_FUNC_CNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVR2_I2C_FUNC_CNT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cbz	w9, LBB0_3
; %bb.1:
	mov	x8, #0
	lsl	x9, x9, #3
Lloh3:
	adrp	x10, _pvr2_i2c_basic_op@GOTPAGE
Lloh4:
	ldr	x10, [x10, _pvr2_i2c_basic_op@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	ldr	x12, [x19, #24]
	str	x11, [x12, x8]
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_2
LBB0_3:
Lloh5:
	adrp	x8, _ir_mode@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ir_mode@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.4:
	cbnz	w8, LBB0_9
; %bb.5:
	ldr	w1, [x19, #80]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
Lloh10:
	adrp	x8, _i2c_black_hole@GOTPAGE
Lloh11:
	ldr	x8, [x8, _i2c_black_hole@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _PVR2_IR_SCHEME_24XXX@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PVR2_IR_SCHEME_24XXX@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
Lloh15:
	adrp	x8, _i2c_24xxx_ir@GOTPAGE
Lloh16:
	ldr	x8, [x8, _i2c_24xxx_ir@GOTPAGEOFF]
LBB0_8:
	ldr	x8, [x8]
	ldr	x9, [x19, #24]
	str	x8, [x9, #192]
LBB0_9:
	ldr	x8, [x19, #88]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_11
; %bb.10:
Lloh17:
	adrp	x8, _i2c_hack_cx25840@GOTPAGE
Lloh18:
	ldr	x8, [x8, _i2c_hack_cx25840@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	x9, [x19, #24]
	str	x8, [x9, #544]
	ldr	x8, [x19, #88]
LBB0_11:
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.12:
Lloh20:
	adrp	x8, _i2c_hack_wm8775@GOTPAGE
Lloh21:
	ldr	x8, [x8, _i2c_hack_wm8775@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	x9, [x19, #24]
	str	x8, [x9, #216]
LBB0_13:
	add	x20, x19, #32
Lloh23:
	adrp	x8, _pvr2_i2c_adap_template@GOTPAGE
Lloh24:
	ldr	x8, [x8, _pvr2_i2c_adap_template@GOTPAGEOFF]
	ldp	q1, q0, [x8]
	stp	q1, q0, [x19, #32]
Lloh25:
	adrp	x8, _pvr2_i2c_algo_template@GOTPAGE
Lloh26:
	ldr	x8, [x8, _pvr2_i2c_algo_template@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	mov	x21, x19
	str	w8, [x21, #68]!
	ldr	w0, [x19, #56]
	ldr	w1, [x19, #80]
	mov	w2, #4
	bl	_strscpy
	ldr	x8, [x19, #72]
	stp	x21, x8, [x19, #40]
	str	x19, [x19, #32]
	mov	w8, #1
	str	w8, [x19, #16]
	add	x1, x19, #64
	mov	x0, x20
	bl	_i2c_set_adapdata
	mov	x0, x20
	bl	_i2c_add_adapter
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #192]
Lloh28:
	adrp	x9, _i2c_24xxx_ir@GOTPAGE
Lloh29:
	ldr	x9, [x9, _i2c_24xxx_ir@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.14:
	mov	x0, x19
	mov	w1, #113
	bl	_do_i2c_probe
	cbz	x0, LBB0_16
; %bb.15:
Lloh31:
	adrp	x8, _PVR2_TRACE_INFO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PVR2_TRACE_INFO@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_pvr2_trace
	ldr	x8, [x19, #24]
	str	xzr, [x8, #192]
Lloh36:
	adrp	x8, _PVR2_IR_SCHEME_24XXX_MCE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _PVR2_IR_SCHEME_24XXX_MCE@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_16:
Lloh39:
	adrp	x8, _i2c_scan@GOTPAGE
Lloh40:
	ldr	x8, [x8, _i2c_scan@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.17:
	mov	x0, x19
	bl	_do_i2c_scan
LBB0_18:
	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	_pvr2_i2c_register_ir
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_I2C_FUNC_CNT,4,2          ; @PVR2_I2C_FUNC_CNT
	.comm	_pvr2_i2c_basic_op,8,3          ; @pvr2_i2c_basic_op
	.comm	_ir_mode,8,3                    ; @ir_mode
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: IR disabled\n"

	.comm	_i2c_black_hole,8,3             ; @i2c_black_hole
	.comm	_PVR2_IR_SCHEME_24XXX,8,3       ; @PVR2_IR_SCHEME_24XXX
	.comm	_i2c_24xxx_ir,8,3               ; @i2c_24xxx_ir
	.comm	_i2c_hack_cx25840,8,3           ; @i2c_hack_cx25840
	.comm	_i2c_hack_wm8775,8,3            ; @i2c_hack_wm8775
	.comm	_pvr2_i2c_adap_template,32,3    ; @pvr2_i2c_adap_template
	.comm	_pvr2_i2c_algo_template,4,2     ; @pvr2_i2c_algo_template
	.comm	_PVR2_TRACE_INFO,4,2            ; @PVR2_TRACE_INFO
l_.str.1:                               ; @.str.1
	.asciz	"Device has newer IR hardware; disabling unneeded virtual IR device"

	.comm	_PVR2_IR_SCHEME_24XXX_MCE,8,3   ; @PVR2_IR_SCHEME_24XXX_MCE
	.comm	_i2c_scan,8,3                   ; @i2c_scan
.subsections_via_symbols
