	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_i2c_pip_read             ## -- Begin function cyapa_i2c_pip_read
	.p2align	4, 0x90
_cyapa_i2c_pip_read:                    ## @cyapa_i2c_pip_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movq	%rdx, %rbx
	movq	_CYAPA_REG_MAP_SIZE@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jb	LBB0_4
## %bb.5:
	movl	(%rdi), %edi
	movq	%rbx, %rdx
	callq	_i2c_master_recv
	movslq	%eax, %rcx
	cmpq	%rbx, %rcx
	je	LBB0_7
## %bb.6:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CYAPA_REG_MAP_SIZE,8,3         ## @CYAPA_REG_MAP_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_i2c_pip_read             ; -- Begin function cyapa_i2c_pip_read
	.p2align	2
_cyapa_i2c_pip_read:                    ; @cyapa_i2c_pip_read
	.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, x2
	cbz	x2, LBB0_6
; %bb.1:
	cbz	x1, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _CYAPA_REG_MAP_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CYAPA_REG_MAP_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	b.lo	LBB0_5
; %bb.3:
	ldr	w0, [x0]
	mov	x2, x19
	bl	_i2c_master_recv
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x8, x19
	b.eq	LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w19, w0, w8, lt
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CYAPA_REG_MAP_SIZE,8,3         ; @CYAPA_REG_MAP_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
