	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tca6416_setup_registers
_tca6416_setup_registers:               ## @tca6416_setup_registers
	.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
	movq	%rdi, %rbx
	movq	_TCA6416_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, %rdx
	callq	_tca6416_read_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	_TCA6416_DIRECTION@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	4(%rbx), %r14
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_tca6416_read_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movl	(%r15), %esi
	movl	8(%rbx), %edx
	orl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_tca6416_write_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_tca6416_read_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	_TCA6416_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	12(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_tca6416_read_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	8(%rbx), %eax
	andl	%eax, 12(%rbx)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TCA6416_OUTPUT,4,2             ## @TCA6416_OUTPUT
	.comm	_TCA6416_DIRECTION,4,2          ## @TCA6416_DIRECTION
	.comm	_TCA6416_INPUT,4,2              ## @TCA6416_INPUT
	.no_dead_strip	_tca6416_setup_registers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tca6416_setup_registers
_tca6416_setup_registers:               ; @tca6416_setup_registers
	.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
Lloh0:
	adrp	x8, _TCA6416_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TCA6416_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x0
	bl	_tca6416_read_reg
	cbnz	w0, LBB0_6
; %bb.1:
Lloh3:
	adrp	x21, _TCA6416_DIRECTION@GOTPAGE
Lloh4:
	ldr	x21, [x21, _TCA6416_DIRECTION@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x20, x19, #4
	mov	x0, x19
	mov	x2, x20
	bl	_tca6416_read_reg
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w1, [x21]
	ldp	w8, w9, [x19, #4]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_tca6416_write_reg
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_tca6416_read_reg
	cbnz	w0, LBB0_6
; %bb.4:
Lloh5:
	adrp	x8, _TCA6416_INPUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TCA6416_INPUT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, x19, #12
	mov	x0, x19
	bl	_tca6416_read_reg
	cbnz	w0, LBB0_6
; %bb.5:
	ldp	w8, w9, [x19, #8]
	and	w8, w9, w8
	str	w8, [x19, #12]
LBB0_6:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TCA6416_OUTPUT,4,2             ; @TCA6416_OUTPUT
	.comm	_TCA6416_DIRECTION,4,2          ; @TCA6416_DIRECTION
	.comm	_TCA6416_INPUT,4,2              ; @TCA6416_INPUT
	.no_dead_strip	_tca6416_setup_registers
.subsections_via_symbols
