	.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, %r15
	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(%r15), %r14
	cmpq	$0, 56(%r15)
	jle	LBB0_3
## %bb.2:
	movq	_ivtv_i2c_adap_hw_template@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	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), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_memcpy
	leaq	136(%r15), %rdi
	movq	_ivtv_i2c_algo_template@GOTPCREL(%rip), %rsi
LBB0_4:
	movl	$4, %edx
	callq	_memcpy
	movl	64(%r15), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	leaq	136(%r15), %rax
	movl	%ecx, 136(%r15)
	movq	%r15, 176(%r15)
	movq	%rax, 40(%r15)
	movq	32(%r15), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	addq	%rax, %rbx
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sprintf
	leaq	128(%r15), %rsi
	movq	%r14, %rdi
	callq	_i2c_set_adapdata
	leaq	80(%r15), %rdi
	movq	_ivtv_i2c_client_template@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%r14, 96(%r15)
	movq	72(%r15), %rax
	movq	%rax, 16(%r15)
	leaq	L_.str.3(%rip), %rdi
	callq	_IVTV_DEBUG_I2C
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_ivtv_setscl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_ivtv_setsda
	cmpq	$0, 56(%r15)
	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,4,2  ## @ivtv_i2c_adap_hw_template
	.comm	_ivtv_i2c_adap_template,4,2     ## @ivtv_i2c_adap_template
	.comm	_ivtv_i2c_algo_template,4,2     ## @ivtv_i2c_algo_template
L_.str.2:                               ## @.str.2
	.asciz	" #%d"

	.comm	_ivtv_i2c_client_template,4,2   ## @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, #56]
	add	x20, x19, #8
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.2:
Lloh8:
	adrp	x1, _ivtv_i2c_adap_hw_template@GOTPAGE
Lloh9:
	ldr	x1, [x1, _ivtv_i2c_adap_hw_template@GOTPAGEOFF]
	mov	x0, x20
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IVTV_ERR
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	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:
Lloh15:
	adrp	x1, _ivtv_i2c_adap_template@GOTPAGE
Lloh16:
	ldr	x1, [x1, _ivtv_i2c_adap_template@GOTPAGEOFF]
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	add	x0, x19, #136
Lloh17:
	adrp	x1, _ivtv_i2c_algo_template@GOTPAGE
Lloh18:
	ldr	x1, [x1, _ivtv_i2c_algo_template@GOTPAGEOFF]
LBB0_5:
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x19, #64]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	mov	x9, x19
	str	w8, [x9, #136]!
	str	x19, [x19, #176]
	str	x9, [x19, #40]
	ldr	x21, [x19, #32]
	mov	x0, x21
	bl	_strlen
	add	x0, x0, x21
	ldr	w2, [x19]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_sprintf
	add	x1, x19, #128
	mov	x0, x20
	bl	_i2c_set_adapdata
	add	x0, x19, #80
Lloh21:
	adrp	x1, _ivtv_i2c_client_template@GOTPAGE
Lloh22:
	ldr	x1, [x1, _ivtv_i2c_client_template@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	str	x20, [x19, #96]
	ldr	x8, [x19, #72]
	str	x8, [x19, #16]
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, #56]
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.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,4,2  ; @ivtv_i2c_adap_hw_template
	.comm	_ivtv_i2c_adap_template,4,2     ; @ivtv_i2c_adap_template
	.comm	_ivtv_i2c_algo_template,4,2     ; @ivtv_i2c_algo_template
l_.str.2:                               ; @.str.2
	.asciz	" #%d"

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

.subsections_via_symbols
