	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx25821_set_gpiopin_logicvalue
_cx25821_set_gpiopin_logicvalue:        ## @cx25821_set_gpiopin_logicvalue
	.cfi_startproc
## %bb.0:
	cmpl	$46, %esi
	jle	LBB0_1
## %bb.7:
	retq
LBB0_1:
	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
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	_GPIO_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%edx, %edx
	callq	_cx25821_set_gpiopin_direction
	cmpl	$32, %ebx
	jl	LBB0_3
## %bb.2:
	addl	$-31, %ebx
	movq	_GPIO_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %edi
	callq	_cx_read
	movl	%eax, %r12d
	movl	%ebx, %edi
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.5:
	callq	_Set_GPIO_Bit
	orl	%r12d, %eax
	jmp	LBB0_6
LBB0_4:
	callq	_Clear_GPIO_Bit
	andl	%r12d, %eax
LBB0_6:
	movl	%r14d, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cx_write                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_LO,4,2                    ## @GPIO_LO
	.comm	_GPIO_HI,4,2                    ## @GPIO_HI
	.no_dead_strip	_cx25821_set_gpiopin_logicvalue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx25821_set_gpiopin_logicvalue
_cx25821_set_gpiopin_logicvalue:        ; @cx25821_set_gpiopin_logicvalue
	.cfi_startproc
; %bb.0:
	cmp	w1, #46
	b.le	LBB0_2
; %bb.1:
	ret
LBB0_2:
	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	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _GPIO_LO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_LO@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	w2, #0
	bl	_cx25821_set_gpiopin_direction
	subs	w8, w19, #31
Lloh3:
	adrp	x9, _GPIO_HI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GPIO_HI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	csel	w21, w8, w19, gt
	csel	w19, w9, w22, gt
	mov	x0, x19
	bl	_cx_read
	mov	x22, x0
	mov	x0, x21
	cbz	w20, LBB0_4
; %bb.3:
	bl	_Set_GPIO_Bit
	orr	w1, w0, w22
	b	LBB0_5
LBB0_4:
	bl	_Clear_GPIO_Bit
	and	w1, w0, w22
LBB0_5:
	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	_cx_write
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_LO,4,2                    ; @GPIO_LO
	.comm	_GPIO_HI,4,2                    ; @GPIO_HI
	.no_dead_strip	_cx25821_set_gpiopin_logicvalue
.subsections_via_symbols
