	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcf_readbytes
_pcf_readbytes:                         ## @pcf_readbytes
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	$-1, %eax
	testl	%edx, %edx
	js	LBB0_19
## %bb.1:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	leal	-1(%rdx), %r12d
	movl	%edx, %r15d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	leal	1(%rdx), %r14d
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	cmpq	%r13, %r14
	je	LBB0_18
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	callq	_wait_for_pin
	testl	%eax, %eax
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_I2C_PCF_LRB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r13, %r15
	jne	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r13, %r12
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_I2C_PCF_ESO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_set_pcf
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r13, %r15
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_i2c_stop
	jmp	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_i2c_repstart
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_i2c_inb
	testq	%r13, %r13
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movb	%al, -1(%rcx,%r13)
	jmp	LBB0_17
LBB0_3:
	movq	_EINTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_19
## %bb.4:
	leaq	L_.str(%rip), %r14
	jmp	LBB0_5
LBB0_18:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	jmp	LBB0_19
LBB0_8:
	leaq	L_.str.1(%rip), %r14
LBB0_5:
	movq	%rbx, %rdi
	callq	_i2c_stop
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_dev_err
	movl	$-1, %eax
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINTR,4,2                      ## @EINTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pcf_readbytes timed out.\n"

	.comm	_I2C_PCF_LRB,4,2                ## @I2C_PCF_LRB
L_.str.1:                               ## @.str.1
	.asciz	"i2c_read: i2c_inb, No ack.\n"

	.comm	_I2C_PCF_ESO,4,2                ## @I2C_PCF_ESO
	.no_dead_strip	_pcf_readbytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcf_readbytes
_pcf_readbytes:                         ; @pcf_readbytes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	tbnz	w2, #31, LBB0_17
; %bb.1:
	mov	x22, x3
	mov	x21, x2
	mov	x24, #0
	str	x0, [sp]                        ; 8-byte Folded Spill
	ldr	x20, [x0, #8]
	sub	w25, w2, #1
	mov	w26, w2
	add	w27, w2, #1
	sub	x28, x1, #1
Lloh0:
	adrp	x23, _I2C_PCF_LRB@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I2C_PCF_LRB@GOTPAGEOFF]
Lloh2:
	adrp	x19, _I2C_PCF_ESO@GOTPAGE
Lloh3:
	ldr	x19, [x19, _I2C_PCF_ESO@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	cmp	x27, x24
	b.eq	LBB0_18
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	mov	x0, x20
	bl	_wait_for_pin
	cbnz	w0, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	and	w8, w9, w8
	cmp	w8, #0
	ccmp	x26, x24, #4, ne
	b.ne	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x25, x24
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x19]
	mov	x0, x20
	mov	w1, #1
	bl	_set_pcf
	b	LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x26, x24
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	cbz	w22, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_i2c_stop
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_i2c_repstart
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_i2c_inb
	cbz	x24, LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	strb	w0, [x28, x24]
	b	LBB0_2
LBB0_13:
Lloh4:
	adrp	x8, _EINTR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	mov	x21, x0
	cmn	w0, w8
	b.eq	LBB0_18
; %bb.14:
Lloh7:
	adrp	x19, l_.str@PAGE
Lloh8:
	add	x19, x19, l_.str@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh9:
	adrp	x19, l_.str.1@PAGE
Lloh10:
	add	x19, x19, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x20
	bl	_i2c_stop
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	mov	x1, x19
	bl	_dev_err
LBB0_17:
	mov	w21, #-1
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINTR,4,2                      ; @EINTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcf_readbytes timed out.\n"

	.comm	_I2C_PCF_LRB,4,2                ; @I2C_PCF_LRB
l_.str.1:                               ; @.str.1
	.asciz	"i2c_read: i2c_inb, No ack.\n"

	.comm	_I2C_PCF_ESO,4,2                ; @I2C_PCF_ESO
	.no_dead_strip	_pcf_readbytes
.subsections_via_symbols
