	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_ack
_ivtv_ack:                              ## @ivtv_ack
	.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_getscl
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_HI_I2C
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ivtv_setscl
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ivtv_waitscl
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ivtv_setsda
	movq	%rbx, %rdi
	callq	_ivtv_scldelay
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ivtv_setscl
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ivtv_waitsda
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	callq	_IVTV_DEBUG_I2C
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ivtv_setscl
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ivtv_waitscl
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	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	"SCL was high starting an ack\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not set SCL low starting an ack\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
L_.str.2:                               ## @.str.2
	.asciz	"Slave did not ack\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to set SCL low after ACK\n"

	.no_dead_strip	_ivtv_ack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_ack
_ivtv_ack:                              ; @ivtv_ack
	.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_getscl
	cmp	w0, #1
	b.ne	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, #0
	bl	_ivtv_setscl
	mov	x0, x19
	mov	w1, #0
	bl	_ivtv_waitscl
	cbz	w0, LBB0_6
LBB0_2:
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_setsda
	mov	x0, x19
	bl	_ivtv_scldelay
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_setscl
	mov	x0, x19
	mov	w1, #0
	bl	_ivtv_waitsda
	mov	w20, #0
	cbnz	w0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IVTV_DEBUG_I2C
Lloh4:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	_ivtv_setscl
	mov	x0, x19
	mov	w1, #0
	bl	_ivtv_waitscl
	cbnz	w0, LBB0_8
; %bb.5:
Lloh7:
	adrp	x0, l_.str.3@PAGE
Lloh8:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_IVTV_DEBUG_I2C
Lloh11:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCL was high starting an ack\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not set SCL low starting an ack\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
l_.str.2:                               ; @.str.2
	.asciz	"Slave did not ack\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to set SCL low after ACK\n"

	.no_dead_strip	_ivtv_ack
.subsections_via_symbols
