	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_for_pin
_wait_for_pin:                          ## @wait_for_pin
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_DEF_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$1, %esi
	callq	_get_pcf
	movl	%eax, (%r14)
	movq	_I2C_PCF_PIN@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_7
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %edi
	callq	*8(%r15)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_get_pcf
	movl	%eax, (%r14)
	testl	%eax, (%r12)
	jne	LBB0_1
## %bb.5:
	movq	_I2C_PCF_LAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_3
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_2:
	movq	_I2C_PCF_LAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_3
	jmp	LBB0_9
LBB0_7:
	movq	_I2C_PCF_LAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
LBB0_3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_handle_lab
	movq	_EINTR@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jne	LBB0_11
LBB0_9:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEF_TIMEOUT,4,2                ## @DEF_TIMEOUT
	.comm	_I2C_PCF_PIN,4,2                ## @I2C_PCF_PIN
	.comm	_I2C_PCF_LAB,4,2                ## @I2C_PCF_LAB
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_wait_for_pin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_for_pin
_wait_for_pin:                          ; @wait_for_pin
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _DEF_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEF_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	w1, #1
	bl	_get_pcf
	str	w0, [x19]
Lloh3:
	adrp	x21, _I2C_PCF_PIN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _I2C_PCF_PIN@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_5
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	subs	w22, w22, #1
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x20]
	blr	x8
	mov	x0, x20
	mov	w1, #1
	bl	_get_pcf
	str	w0, [x19]
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.3:
Lloh5:
	adrp	x8, _I2C_PCF_LAB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2C_PCF_LAB@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_6
	b	LBB0_8
LBB0_4:
Lloh8:
	adrp	x8, _I2C_PCF_LAB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I2C_PCF_LAB@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_6
	b	LBB0_9
LBB0_5:
Lloh11:
	adrp	x8, _I2C_PCF_LAB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I2C_PCF_LAB@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_handle_lab
Lloh14:
	adrp	x8, _EINTR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	cbz	w22, LBB0_9
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
Lloh16:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DEF_TIMEOUT,4,2                ; @DEF_TIMEOUT
	.comm	_I2C_PCF_PIN,4,2                ; @I2C_PCF_PIN
	.comm	_I2C_PCF_LAB,4,2                ; @I2C_PCF_LAB
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_wait_for_pin
.subsections_via_symbols
