	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_gpio_i2c_read_ack      ## -- Begin function cx231xx_gpio_i2c_read_ack
	.p2align	4, 0x90
_cx231xx_gpio_i2c_read_ack:             ## @cx231xx_gpio_i2c_read_ack
	.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
	movq	%rdi, %r12
	movb	8(%rdi), %cl
	movl	$1, %esi
	shll	%cl, %esi
	movb	12(%rdi), %al
	btsl	%eax, %esi
	notl	%esi
	andl	(%rdi), %esi
	movl	%esi, (%rdi)
	leaq	4(%rdi), %r15
	movl	4(%rdi), %r14d
	movl	%r14d, %edx
	callq	_cx231xx_set_gpio_bit
	movl	$10, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$2, %edi
	callq	_msleep
	movl	(%r12), %esi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_cx231xx_get_gpio_bit
	leal	-1(%rbx), %eax
	movl	4(%r12), %ecx
	movl	12(%r12), %edx
	btl	%edx, %ecx
	jb	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$1, %ebx
	movl	%eax, %ebx
	ja	LBB0_1
LBB0_3:
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	16(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	$100, %edx
	callq	_dev_dbg
LBB0_5:
	movl	(%r12), %esi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_cx231xx_get_gpio_bit
	movb	12(%r12), %al
	movl	(%r12), %esi
	btsl	%eax, %esi
	movl	%esi, (%r12)
	btrl	%eax, %r14d
	movl	%r14d, 4(%r12)
	movq	%r12, %rdi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cx231xx_set_gpio_bit           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No ACK after %d msec -GPIO I2C failed!"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_gpio_i2c_read_ack      ; -- Begin function cx231xx_gpio_i2c_read_ack
	.p2align	2
_cx231xx_gpio_i2c_read_ack:             ; @cx231xx_gpio_i2c_read_ack
	.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	x19, x0
	mov	w8, #1
	ldp	w9, w10, [x0, #8]
	lsl	w9, w8, w9
	ldr	w11, [x0]
	lsl	w8, w8, w10
	orr	w8, w9, w8
	bic	w1, w11, w8
	str	w1, [x0]
	mov	x21, x0
	ldr	w20, [x21, #4]!
	mov	x2, x20
	bl	_cx231xx_set_gpio_bit
	mov	w22, #10
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x19]
	mov	x0, x19
	mov	x2, x21
	bl	_cx231xx_get_gpio_bit
	sub	w8, w22, #1
	ldr	w9, [x19, #4]
	ldr	w10, [x19, #12]
	lsr	w9, w9, w10
	tbnz	w9, #0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w22, #1
	mov	x22, x8
	b.hi	LBB0_1
LBB0_3:
	cbnz	w8, LBB0_5
; %bb.4:
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #100
	bl	_dev_dbg
LBB0_5:
	ldr	w1, [x19]
	mov	x0, x19
	mov	x2, x21
	bl	_cx231xx_get_gpio_bit
	ldr	w8, [x19, #12]
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x19]
	orr	w1, w9, w8
	bic	w2, w20, w8
	stp	w1, w2, [x19]
	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	_cx231xx_set_gpio_bit
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No ACK after %d msec -GPIO I2C failed!"

.subsections_via_symbols
