	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_start
_ivtv_start:                            ## @ivtv_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_ivtv_getsda
	cmpl	$1, %eax
	je	LBB0_4
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_HI_I2C
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ivtv_setsda
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ivtv_waitsda
	testl	%eax, %eax
	je	LBB0_2
LBB0_4:
	movq	%rbx, %rdi
	callq	_ivtv_getscl
	cmpl	$1, %eax
	je	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ivtv_setscl
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ivtv_waitscl
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ivtv_setsda
	movq	%rbx, %rdi
	callq	_ivtv_scldelay
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_3
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
LBB0_3:
	callq	_IVTV_DEBUG_I2C
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDA was low at start\n"

L_.str.1:                               ## @.str.1
	.asciz	"SDA stuck low\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
L_.str.2:                               ## @.str.2
	.asciz	"SCL stuck low at start\n"

	.no_dead_strip	_ivtv_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_start
_ivtv_start:                            ; @ivtv_start
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_ivtv_getsda
	cmp	w0, #1
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_HI_I2C
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_setsda
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_waitsda
	cbz	w0, LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_ivtv_getscl
	cmp	w0, #1
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_setscl
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_waitscl
	cbz	w0, LBB0_6
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	_ivtv_setsda
	mov	x0, x19
	bl	_ivtv_scldelay
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	bl	_IVTV_DEBUG_I2C
Lloh6:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDA was low at start\n"

l_.str.1:                               ; @.str.1
	.asciz	"SDA stuck low\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
l_.str.2:                               ; @.str.2
	.asciz	"SCL stuck low at start\n"

	.no_dead_strip	_ivtv_start
.subsections_via_symbols
