	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyapa_do_i2c_pip_cmd_polling
_cyapa_do_i2c_pip_cmd_polling:          ## @cyapa_do_i2c_pip_cmd_polling
	.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	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %rbx
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r15
	callq	_atomic_inc
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_cyapa_i2c_pip_write
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_atomic_dec
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%r13d, %r13d
	cmovsl	%r13d, %eax
	jmp	LBB0_19
LBB0_2:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.3:
	cmpq	$0, 16(%rbp)
	je	LBB0_12
## %bb.4:
	testq	%r12, %r12
	je	LBB0_12
## %bb.5:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	(%rbx), %r14d
	testl	%r14d, %r14d
	je	LBB0_18
## %bb.6:
	movabsq	$-3689348814741910323, %rcx     ## imm = 0xCCCCCCCCCCCCCCCD
	mulq	%rcx
	movq	%rdx, %r13
	shrq	$2, %r13
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$1, %r13d
	jle	LBB0_14
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	decl	%r13d
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$3000, %edi                     ## imm = 0xBB8
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_usleep_range
	movl	%r14d, (%rbx)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movq	16(%rbp), %rcx
	callq	_cyapa_empty_pip_output_data
	testl	%eax, %eax
	jne	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$2, %r13d
	jge	LBB0_8
	jmp	LBB0_17
LBB0_12:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_18:
	movq	%r15, %rdi
	callq	_atomic_dec
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_18
LBB0_16:
	testl	%r13d, %r13d
	jg	LBB0_18
LBB0_17:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_cyapa_do_i2c_pip_cmd_polling
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyapa_do_i2c_pip_cmd_polling
_cyapa_do_i2c_pip_cmd_polling:          ; @cyapa_do_i2c_pip_cmd_polling
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x6
	mov	x24, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x25, x1
	mov	x19, x0
	bl	_atomic_inc
	mov	x0, x19
	mov	x1, x25
	mov	x2, x23
	bl	_cyapa_i2c_pip_write
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
	mov	x0, x19
	bl	_atomic_dec
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w23, #0
	csneg	w23, w23, w8, lt
	b	LBB0_17
LBB0_2:
	mov	w23, #0
	cbz	x21, LBB0_16
; %bb.3:
	cbz	x20, LBB0_16
; %bb.4:
	cbz	x22, LBB0_16
; %bb.5:
	ldr	w25, [x21]
	cbz	w25, LBB0_16
; %bb.6:
	mov	x8, #-3689348814741910324
	movk	x8, #52429
	umulh	x8, x24, x8
	lsr	x24, x8, #2
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	cmp	w24, #1
	b.le	LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	sub	w24, w24, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #3000
	mov	w1, #5000
	bl	_usleep_range
	str	w25, [x21]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_cyapa_empty_pip_output_data
	cbnz	w0, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x21]
	cbnz	w8, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w24, #2
	b.ge	LBB0_8
	b	LBB0_15
LBB0_12:
	mov	x23, x0
	b	LBB0_16
LBB0_13:
	cmp	w24, #0
	b.le	LBB0_15
; %bb.14:
	mov	w23, #0
	b	LBB0_16
LBB0_15:
Lloh3:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_16:
	mov	x0, x19
	bl	_atomic_dec
LBB0_17:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_cyapa_do_i2c_pip_cmd_polling
.subsections_via_symbols
