	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pca953x_gpio_set_pull_up_down
_pca953x_gpio_set_pull_up_down:         ## @pca953x_gpio_set_pull_up_down
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_PCAL953X_PULL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movl	%ebx, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_pca953x_recalc_addr
	movl	%eax, %r12d
	movq	_PCAL953X_PULL_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_pca953x_recalc_addr
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_BANK_SZ@GOTPCREL(%rip), %rcx
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%edx, %edi
	callq	_BIT
	movl	%eax, %r13d
	movq	_PCA_PCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_1
## %bb.2:
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movl	8(%r14), %edi
	movl	%r12d, %esi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	_regmap_write_bits
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_PIN_CONFIG_BIAS_PULL_UP@GOTPCREL(%rip), %rax
	movl	%r13d, %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_PIN_CONFIG_BIAS_PULL_DOWN@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, (%rax)
	jne	LBB0_6
LBB0_5:
	movl	8(%r14), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	callq	_regmap_write_bits
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	movl	8(%r14), %edi
	movl	%r12d, %esi
	movl	%r13d, %edx
	movl	%r13d, %ecx
	callq	_regmap_write_bits
	movl	%eax, %r15d
LBB0_7:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_1:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCAL953X_PULL_EN,4,2           ## @PCAL953X_PULL_EN
	.comm	_PCAL953X_PULL_SEL,4,2          ## @PCAL953X_PULL_SEL
	.comm	_BANK_SZ,4,2                    ## @BANK_SZ
	.comm	_PCA_PCAL,4,2                   ## @PCA_PCAL
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_PIN_CONFIG_BIAS_PULL_UP,8,3    ## @PIN_CONFIG_BIAS_PULL_UP
	.comm	_PIN_CONFIG_BIAS_PULL_DOWN,8,3  ## @PIN_CONFIG_BIAS_PULL_DOWN
	.no_dead_strip	_pca953x_gpio_set_pull_up_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pca953x_gpio_set_pull_up_down
_pca953x_gpio_set_pull_up_down:         ; @pca953x_gpio_set_pull_up_down
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PCAL953X_PULL_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCAL953X_PULL_EN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x22
	mov	w3, #1
	mov	w4, #0
	bl	_pca953x_recalc_addr
	mov	x20, x0
Lloh3:
	adrp	x8, _PCAL953X_PULL_SEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCAL953X_PULL_SEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	mov	w3, #1
	mov	w4, #0
	bl	_pca953x_recalc_addr
	mov	x24, x0
Lloh6:
	adrp	x8, _BANK_SZ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BANK_SZ@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	udiv	w9, w22, w8
	msub	w0, w9, w8, w22
	bl	_BIT
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _PCA_PCAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PCA_PCAL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
	mov	x22, x0
	add	x23, x19, #4
	mov	x0, x23
	bl	_mutex_lock
	ldr	w0, [x19, #8]
	mov	x1, x20
	mov	x2, x22
	mov	w3, #0
	bl	_regmap_write_bits
	mov	x25, x0
	cbnz	w0, LBB0_7
; %bb.2:
Lloh12:
	adrp	x8, _PIN_CONFIG_BIAS_PULL_UP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PIN_CONFIG_BIAS_PULL_UP@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	mov	x3, x22
	cmp	x8, x21
	b.eq	LBB0_5
; %bb.3:
Lloh15:
	adrp	x8, _PIN_CONFIG_BIAS_PULL_DOWN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PIN_CONFIG_BIAS_PULL_DOWN@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_6
; %bb.4:
	mov	w3, #0
LBB0_5:
	ldr	w0, [x19, #8]
	mov	x1, x24
	mov	x2, x22
	bl	_regmap_write_bits
	mov	x25, x0
	cbnz	w0, LBB0_7
LBB0_6:
	ldr	w0, [x19, #8]
	mov	x1, x20
	mov	x2, x22
	mov	x3, x22
	bl	_regmap_write_bits
	mov	x25, x0
LBB0_7:
	mov	x0, x23
	bl	_mutex_unlock
	b	LBB0_9
LBB0_8:
Lloh18:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_9:
	mov	x0, x25
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PCAL953X_PULL_EN,4,2           ; @PCAL953X_PULL_EN
	.comm	_PCAL953X_PULL_SEL,4,2          ; @PCAL953X_PULL_SEL
	.comm	_BANK_SZ,4,2                    ; @BANK_SZ
	.comm	_PCA_PCAL,4,2                   ; @PCA_PCAL
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_PIN_CONFIG_BIAS_PULL_UP,8,3    ; @PIN_CONFIG_BIAS_PULL_UP
	.comm	_PIN_CONFIG_BIAS_PULL_DOWN,8,3  ; @PIN_CONFIG_BIAS_PULL_DOWN
	.no_dead_strip	_pca953x_gpio_set_pull_up_down
.subsections_via_symbols
