	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pca953x_recalc_addr
_pca953x_recalc_addr:                   ## @pca953x_recalc_addr
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_pca953x_bank_shift
	movq	_PCAL_GPIO_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%ebx, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movq	_PCAL_PINCTRL_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	addl	%ebx, %ebx
	orl	%edx, %ebx
	movq	_BANK_SZ@GOTPCREL(%rip), %rcx
	movl	%r13d, %eax
	cltd
	idivl	(%rcx)
	movl	%eax, %r13d
	orl	%ebx, %r13d
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.1:
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_NBANK
	cmpl	$3, %eax
	jl	LBB0_4
## %bb.3:
	movq	_REG_ADDR_AI@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
LBB0_4:
	movl	(%r14), %edi
	callq	_PCA_CHIP_TYPE
	movq	_PCA957X_TYPE@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_REG_ADDR_AI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_6:
	orl	%ecx, %r13d
LBB0_7:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCAL_GPIO_MASK,4,2             ## @PCAL_GPIO_MASK
	.comm	_PCAL_PINCTRL_MASK,4,2          ## @PCAL_PINCTRL_MASK
	.comm	_BANK_SZ,4,2                    ## @BANK_SZ
	.comm	_REG_ADDR_AI,4,2                ## @REG_ADDR_AI
	.comm	_PCA957X_TYPE,8,3               ## @PCA957X_TYPE
	.no_dead_strip	_pca953x_recalc_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pca953x_recalc_addr
_pca953x_recalc_addr:                   ; @pca953x_recalc_addr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x4
	mov	x21, x3
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	bl	_pca953x_bank_shift
Lloh0:
	adrp	x8, _PCAL_GPIO_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCAL_GPIO_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w23
	lsl	w8, w8, w0
Lloh3:
	adrp	x9, _PCAL_PINCTRL_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCAL_PINCTRL_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w23
	orr	w8, w8, w9, lsl #1
Lloh6:
	adrp	x9, _BANK_SZ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BANK_SZ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	sdiv	w9, w19, w9
	orr	w19, w8, w9
	cbz	w22, LBB0_5
; %bb.1:
Lloh9:
	adrp	x22, _REG_ADDR_AI@GOTPAGE
Lloh10:
	ldr	x22, [x22, _REG_ADDR_AI@GOTPAGEOFF]
	cbz	w21, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_NBANK
	cmp	w0, #3
	b.lt	LBB0_4
; %bb.3:
	ldr	w8, [x22]
	orr	w19, w8, w19
LBB0_4:
	ldr	w0, [x20]
	bl	_PCA_CHIP_TYPE
Lloh11:
	adrp	x8, _PCA957X_TYPE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PCA957X_TYPE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	w9, [x22]
	cmp	x0, x8
	csel	w8, w9, wzr, eq
	orr	w19, w8, w19
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PCAL_GPIO_MASK,4,2             ; @PCAL_GPIO_MASK
	.comm	_PCAL_PINCTRL_MASK,4,2          ; @PCAL_PINCTRL_MASK
	.comm	_BANK_SZ,4,2                    ; @BANK_SZ
	.comm	_REG_ADDR_AI,4,2                ; @REG_ADDR_AI
	.comm	_PCA957X_TYPE,8,3               ; @PCA957X_TYPE
	.no_dead_strip	_pca953x_recalc_addr
.subsections_via_symbols
