	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_readbyte
_ivtv_readbyte:                         ## @ivtv_readbyte
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r13
	movb	$0, (%rsi)
	movl	$1, %esi
	callq	_ivtv_setsda
	movq	%r13, %rdi
	callq	_ivtv_scldelay
	movl	$8, %r12d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_ivtv_setscl
	movq	%r13, %rdi
	callq	_ivtv_scldelay
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_ivtv_setscl
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_ivtv_waitscl
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movzbl	(%r14), %ebx
	addb	%bl, %bl
	movq	%r13, %rdi
	callq	_ivtv_getsda
	orb	%bl, %al
	movb	%al, (%r14)
	decl	%r12d
	jne	LBB0_1
## %bb.4:
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_ivtv_setscl
	movq	%r13, %rdi
	callq	_ivtv_scldelay
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_ivtv_setsda
	movq	%r13, %rdi
	callq	_ivtv_scldelay
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_ivtv_setscl
	movq	%r13, %rdi
	callq	_ivtv_scldelay
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_ivtv_setscl
	movq	%r13, %rdi
	callq	_ivtv_scldelay
	movzbl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_IVTV_DEBUG_HI_I2C
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_I2C
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error setting SCL high\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
L_.str.1:                               ## @.str.1
	.asciz	"read %x\n"

	.no_dead_strip	_ivtv_readbyte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_readbyte
_ivtv_readbyte:                         ; @ivtv_readbyte
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	strb	wzr, [x1]
	mov	w1, #1
	bl	_ivtv_setsda
	mov	x0, x20
	bl	_ivtv_scldelay
	mov	w22, #8
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #0
	bl	_ivtv_setscl
	mov	x0, x20
	bl	_ivtv_scldelay
	mov	x0, x20
	mov	w1, #1
	bl	_ivtv_setscl
	mov	x0, x20
	mov	w1, #1
	bl	_ivtv_waitscl
	cbz	w0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrb	w23, [x19]
	mov	x0, x20
	bl	_ivtv_getsda
	orr	w8, w0, w23, lsl #1
	strb	w8, [x19]
	subs	w22, w22, #1
	b.ne	LBB0_1
; %bb.3:
	mov	x0, x20
	mov	w1, #0
	bl	_ivtv_setscl
	mov	x0, x20
	bl	_ivtv_scldelay
	mov	x0, x20
	mov	x1, x21
	bl	_ivtv_setsda
	mov	x0, x20
	bl	_ivtv_scldelay
	mov	x0, x20
	mov	w1, #1
	bl	_ivtv_setscl
	mov	x0, x20
	bl	_ivtv_scldelay
	mov	x0, x20
	mov	w1, #0
	bl	_ivtv_setscl
	mov	x0, x20
	bl	_ivtv_scldelay
	ldrb	w1, [x19]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IVTV_DEBUG_HI_I2C
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_I2C
Lloh4:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error setting SCL high\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
l_.str.1:                               ; @.str.1
	.asciz	"read %x\n"

	.no_dead_strip	_ivtv_readbyte
.subsections_via_symbols
