	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx23885_gpio_clear             ## -- Begin function cx23885_gpio_clear
	.p2align	4, 0x90
_cx23885_gpio_clear:                    ## @cx23885_gpio_clear
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	andl	$7, %esi
	je	LBB0_2
## %bb.1:
	movq	_GP0_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_clear
LBB0_2:
	movl	%r15d, %ebx
	andl	$524280, %ebx                   ## imm = 0x7FFF8
	je	LBB0_7
## %bb.3:
	movq	%r14, %rdi
	callq	_encoder_on_portb
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_encoder_on_portc
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_6:
	movq	_MC417_RWD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shrl	$3, %ebx
	movl	%ebx, %esi
	callq	_cx_clear
LBB0_7:
	testl	$16252928, %r15d                ## imm = 0xF80000
	je	LBB0_8
## %bb.9:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_info                        ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GP0_IO,4,2                     ## @GP0_IO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Clearing GPIO moving on encoder ports\n"

	.comm	_MC417_RWD,4,2                  ## @MC417_RWD
L_.str.1:                               ## @.str.1
	.asciz	"%s: Unsupported\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx23885_gpio_clear             ; -- Begin function cx23885_gpio_clear
	.p2align	2
_cx23885_gpio_clear:                    ; @cx23885_gpio_clear
	.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	x20, x1
	mov	x19, x0
	ands	w1, w1, #0x7
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _GP0_IO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GP0_IO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cx_clear
LBB0_2:
	ands	w21, w20, #0x7fff8
	b.eq	LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_encoder_on_portb
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_encoder_on_portc
	cbz	x0, LBB0_6
LBB0_5:
	ldr	w1, [x19]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_6:
Lloh5:
	adrp	x8, _MC417_RWD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MC417_RWD@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	lsr	w1, w21, #3
	bl	_cx_clear
LBB0_7:
	tst	w20, #0xf80000
	b.eq	LBB0_9
; %bb.8:
	ldr	w1, [x19]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	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	_pr_info
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GP0_IO,4,2                     ; @GP0_IO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Clearing GPIO moving on encoder ports\n"

	.comm	_MC417_RWD,4,2                  ; @MC417_RWD
l_.str.1:                               ; @.str.1
	.asciz	"%s: Unsupported\n"

.subsections_via_symbols
