	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_ivtv_i2c                  ## -- Begin function init_ivtv_i2c
	.p2align	4, 0x90
_init_ivtv_i2c:                         ## @init_ivtv_i2c
	.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
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_I2C
	movq	_hw_devicenames@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	movq	%rax, %r14
	movq	_hw_addrs@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r14
	jne	LBB0_6
## %bb.1:
	leaq	8(%rbx), %r14
	cmpq	$0, 32(%rbx)
	jle	LBB0_3
## %bb.2:
	movq	_ivtv_i2c_adap_hw_template@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movups	%xmm0, (%r14)
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_IVTV_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ivtv_i2c_adap_template@GOTPCREL(%rip), %rax
	movq	16(%rax), %rcx
	movq	%rcx, 16(%r14)
	movups	(%rax), %xmm0
	movups	%xmm0, (%r14)
	movq	_ivtv_i2c_algo_template@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 72(%rbx)
LBB0_4:
	movl	40(%rbx), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	leaq	72(%rbx), %rax
	movl	%ecx, 72(%rbx)
	movq	%rbx, 80(%rbx)
	movq	%rax, 24(%rbx)
	movq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_strlen
	addq	%rax, %r15
	movl	(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_sprintf
	leaq	64(%rbx), %rsi
	movq	%r14, %rdi
	callq	_i2c_set_adapdata
	movq	%r14, 56(%rbx)
	movq	48(%rbx), %rax
	movq	%rax, 8(%rbx)
	leaq	L_.str.3(%rip), %rdi
	callq	_IVTV_DEBUG_I2C
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ivtv_setscl
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ivtv_setsda
	cmpq	$0, 32(%rbx)
	jle	LBB0_5
## %bb.7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i2c_add_adapter                ## TAILCALL
LBB0_5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i2c_bit_add_bus                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c init\n"

	.comm	_hw_devicenames,4,2             ## @hw_devicenames
	.comm	_hw_addrs,4,2                   ## @hw_addrs
L_.str.1:                               ## @.str.1
	.asciz	"Mismatched I2C hardware arrays\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ivtv_i2c_adap_hw_template,24,3 ## @ivtv_i2c_adap_hw_template
	.comm	_ivtv_i2c_adap_template,24,3    ## @ivtv_i2c_adap_template
	.comm	_ivtv_i2c_algo_template,16,3    ## @ivtv_i2c_algo_template
L_.str.2:                               ## @.str.2
	.asciz	" #%d"

	.comm	_ivtv_i2c_client_template,8,3   ## @ivtv_i2c_client_template
L_.str.3:                               ## @.str.3
	.asciz	"setting scl and sda to 1\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_ivtv_i2c                  ; -- Begin function init_ivtv_i2c
	.p2align	2
_init_ivtv_i2c:                         ; @init_ivtv_i2c
	.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	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_I2C
Lloh2:
	adrp	x8, _hw_devicenames@GOTPAGE
Lloh3:
	ldr	x8, [x8, _hw_devicenames@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	mov	x20, x0
Lloh5:
	adrp	x8, _hw_addrs@GOTPAGE
Lloh6:
	ldr	x8, [x8, _hw_addrs@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	cmp	x20, x0
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x19, #32]
	add	x20, x19, #8
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _ivtv_i2c_adap_hw_template@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ivtv_i2c_adap_hw_template@GOTPAGEOFF]
Lloh10:
	ldr	q0, [x8]
	str	q0, [x20]
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IVTV_ERR
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	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_4:
Lloh16:
	adrp	x8, _ivtv_i2c_adap_template@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ivtv_i2c_adap_template@GOTPAGEOFF]
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	str	x8, [x20, #16]
	str	q0, [x20]
Lloh18:
	adrp	x8, _ivtv_i2c_algo_template@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ivtv_i2c_algo_template@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	str	x8, [x19, #72]
LBB0_5:
	ldr	w8, [x19, #40]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	mov	x9, x19
	str	w8, [x9, #72]!
	str	x19, [x19, #80]
	str	x9, [x19, #24]
	ldr	x21, [x19, #16]
	mov	x0, x21
	bl	_strlen
	add	x0, x0, x21
	ldr	w2, [x19]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_sprintf
	add	x1, x19, #64
	mov	x0, x20
	bl	_i2c_set_adapdata
	str	x20, [x19, #56]
	ldr	x8, [x19, #48]
	str	x8, [x19, #8]
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_IVTV_DEBUG_I2C
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_setscl
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_setsda
	ldr	x8, [x19, #32]
	mov	x0, x20
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.6:
	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	_i2c_add_adapter
LBB0_7:
	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	_i2c_bit_add_bus
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c init\n"

	.comm	_hw_devicenames,4,2             ; @hw_devicenames
	.comm	_hw_addrs,4,2                   ; @hw_addrs
l_.str.1:                               ; @.str.1
	.asciz	"Mismatched I2C hardware arrays\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ivtv_i2c_adap_hw_template,24,3 ; @ivtv_i2c_adap_hw_template
	.comm	_ivtv_i2c_adap_template,24,3    ; @ivtv_i2c_adap_template
	.comm	_ivtv_i2c_algo_template,16,3    ; @ivtv_i2c_algo_template
l_.str.2:                               ; @.str.2
	.asciz	" #%d"

	.comm	_ivtv_i2c_client_template,8,3   ; @ivtv_i2c_client_template
l_.str.3:                               ; @.str.3
	.asciz	"setting scl and sda to 1\n"

.subsections_via_symbols
