	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_sendbyte
_ivtv_sendbyte:                         ## @ivtv_sendbyte
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_HI_I2C
	movl	$8, %r12d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ivtv_setscl
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ivtv_waitscl
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %eax
	shrb	$7, %al
	movzbl	%al, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ivtv_setsda
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ivtv_waitsda
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_ivtv_setscl
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_ivtv_waitscl
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	addb	%r15b, %r15b
	decl	%r12d
	jne	LBB0_1
## %bb.9:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ivtv_setscl
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ivtv_waitscl
	testl	%eax, %eax
	je	LBB0_10
## %bb.12:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ivtv_ack                       ## TAILCALL
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_3
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_3
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
LBB0_3:
	callq	_IVTV_DEBUG_I2C
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_11:
	subl	(%rax), %ebx
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	callq	_IVTV_DEBUG_I2C
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Error setting SCL low\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
L_.str.2:                               ## @.str.2
	.asciz	"Error setting SDA\n"

L_.str.3:                               ## @.str.3
	.asciz	"Slave not ready for bit\n"

	.no_dead_strip	_ivtv_sendbyte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_sendbyte
_ivtv_sendbyte:                         ; @ivtv_sendbyte
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_HI_I2C
	mov	w22, #8
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_ivtv_setscl
	mov	x0, x19
	mov	w1, #0
	bl	_ivtv_waitscl
	cbz	w0, LBB0_7
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ubfx	w21, w20, #7, #1
	mov	x0, x19
	mov	x1, x21
	bl	_ivtv_setsda
	mov	x0, x19
	mov	x1, x21
	bl	_ivtv_waitsda
	cbz	w0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_setscl
	mov	x0, x19
	mov	w1, #1
	bl	_ivtv_waitscl
	cbz	w0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	lsl	w20, w20, #1
	subs	w22, w22, #1
	b.ne	LBB0_1
; %bb.5:
	mov	x0, x19
	mov	w1, #0
	bl	_ivtv_setscl
	mov	x0, x19
	mov	w1, #0
	bl	_ivtv_waitscl
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	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	_ivtv_ack
LBB0_7:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_10:
	bl	_IVTV_DEBUG_I2C
Lloh8:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh10:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Error setting SCL low\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
l_.str.2:                               ; @.str.2
	.asciz	"Error setting SDA\n"

l_.str.3:                               ; @.str.3
	.asciz	"Slave not ready for bit\n"

	.no_dead_strip	_ivtv_sendbyte
.subsections_via_symbols
