	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcf_sendbytes
_pcf_sendbytes:                         ## @pcf_sendbytes
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r13
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%rbx,%r14), %edx
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movl	%eax, %edi
	callq	_DEB2
	movsbl	(%rbx,%r14), %esi
	movq	%r13, %rdi
	callq	_i2c_outb
	movq	%r13, %rdi
	leaq	-52(%rbp), %rsi
	callq	_wait_for_pin
	testl	%eax, %eax
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_I2C_PCF_LRB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -52(%rbp)
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	cmpq	%r14, %r12
	jne	LBB0_3
## %bb.10:
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%r13, %rdi
	testl	%ecx, %ecx
	je	LBB0_13
## %bb.12:
	callq	_i2c_stop
	jmp	LBB0_14
LBB0_13:
	callq	_i2c_repstart
	jmp	LBB0_14
LBB0_4:
	movq	_EINTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %ebx
	addl	%eax, %ecx
	je	LBB0_14
## %bb.5:
	movq	%r13, %rdi
	callq	_i2c_stop
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_8:
	movq	%r13, %rdi
	callq	_i2c_stop
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %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	"i2c_write: writing %2.2X\n"

	.comm	_EINTR,4,2                      ## @EINTR
L_.str.1:                               ## @.str.1
	.asciz	"i2c_write: error - timeout.\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_I2C_PCF_LRB,4,2                ## @I2C_PCF_LRB
L_.str.2:                               ## @.str.2
	.asciz	"i2c_write: error - no ack.\n"

	.no_dead_strip	_pcf_sendbytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcf_sendbytes
_pcf_sendbytes:                         ; @pcf_sendbytes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	ldr	x20, [x0, #8]
	cmp	w2, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x2
	mov	x23, x1
	mov	x21, x0
	mov	w25, w2
Lloh0:
	adrp	x26, _I2C_PCF_LRB@GOTPAGE
Lloh1:
	ldr	x26, [x26, _I2C_PCF_LRB@GOTPAGEOFF]
Lloh2:
	adrp	x24, l_.str@PAGE
Lloh3:
	add	x24, x24, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w2, [x23]
	mov	x0, x21
	mov	x1, x24
	bl	_dev_dbg
	bl	_DEB2
	ldrsb	w1, [x23]
	mov	x0, x20
	bl	_i2c_outb
	add	x1, sp, #12
	mov	x0, x20
	bl	_wait_for_pin
	cbnz	w0, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	subs	x25, x25, #1
	b.ne	LBB0_2
; %bb.5:
	mov	x0, x20
	cbz	w22, LBB0_8
LBB0_6:
	bl	_i2c_stop
	b	LBB0_13
LBB0_7:
	mov	w19, #0
	mov	x0, x20
	cbnz	w22, LBB0_6
LBB0_8:
	bl	_i2c_repstart
	b	LBB0_13
LBB0_9:
Lloh4:
	adrp	x8, _EINTR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	mov	x19, x0
	cmn	w0, w8
	b.eq	LBB0_13
; %bb.10:
	mov	x0, x20
	bl	_i2c_stop
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:
	mov	x0, x20
	bl	_i2c_stop
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_12:
	mov	x0, x21
	bl	_dev_err
Lloh11:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.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	"i2c_write: writing %2.2X\n"

	.comm	_EINTR,4,2                      ; @EINTR
l_.str.1:                               ; @.str.1
	.asciz	"i2c_write: error - timeout.\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_I2C_PCF_LRB,4,2                ; @I2C_PCF_LRB
l_.str.2:                               ; @.str.2
	.asciz	"i2c_write: error - no ack.\n"

	.no_dead_strip	_pcf_sendbytes
.subsections_via_symbols
