	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function palmas_gpio_set
_palmas_gpio_set:                       ## @palmas_gpio_set
	.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	%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	%rdi, %r14
	callq	_gpiochip_get_data
	movl	%ebx, %edi
	andl	$7, %edi
	cmpl	$8, %ebx
	movq	_PALMAS_GPIO_SET_DATA_OUT2@GOTPCREL(%rip), %rcx
	cmovbq	_PALMAS_GPIO_SET_DATA_OUT@GOTPCREL(%rip), %rcx
	movq	_PALMAS_GPIO_CLEAR_DATA_OUT2@GOTPCREL(%rip), %rdx
	cmovbq	_PALMAS_GPIO_CLEAR_DATA_OUT@GOTPCREL(%rip), %rdx
	testl	%r15d, %r15d
	cmovneq	%rcx, %rdx
	movq	(%rax), %r12
	movl	(%rdx), %r15d
	movq	_PALMAS_GPIO_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_BIT
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_palmas_write
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%eax, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PALMAS_GPIO_SET_DATA_OUT2,4,2  ## @PALMAS_GPIO_SET_DATA_OUT2
	.comm	_PALMAS_GPIO_CLEAR_DATA_OUT2,4,2 ## @PALMAS_GPIO_CLEAR_DATA_OUT2
	.comm	_PALMAS_GPIO_SET_DATA_OUT,4,2   ## @PALMAS_GPIO_SET_DATA_OUT
	.comm	_PALMAS_GPIO_CLEAR_DATA_OUT,4,2 ## @PALMAS_GPIO_CLEAR_DATA_OUT
	.comm	_PALMAS_GPIO_BASE,4,2           ## @PALMAS_GPIO_BASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reg 0x%02x write failed, %d\n"

	.no_dead_strip	_palmas_gpio_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function palmas_gpio_set
_palmas_gpio_set:                       ; @palmas_gpio_set
	.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, x2
	mov	x21, x1
	mov	x19, x0
	bl	_gpiochip_get_data
	ldr	x22, [x0]
	and	w0, w21, #0x7
Lloh0:
	adrp	x8, _PALMAS_GPIO_SET_DATA_OUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PALMAS_GPIO_SET_DATA_OUT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PALMAS_GPIO_SET_DATA_OUT2@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PALMAS_GPIO_SET_DATA_OUT2@GOTPAGEOFF]
	cmp	w21, #8
	csel	x8, x8, x9, lo
Lloh4:
	adrp	x9, _PALMAS_GPIO_CLEAR_DATA_OUT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PALMAS_GPIO_CLEAR_DATA_OUT@GOTPAGEOFF]
Lloh6:
	adrp	x10, _PALMAS_GPIO_CLEAR_DATA_OUT2@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PALMAS_GPIO_CLEAR_DATA_OUT2@GOTPAGEOFF]
	csel	x9, x9, x10, lo
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w20, [x8]
Lloh8:
	adrp	x8, _PALMAS_GPIO_BASE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PALMAS_GPIO_BASE@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
	bl	_BIT
	mov	x3, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_palmas_write
	tbnz	w0, #31, LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x3, x0
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	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	_dev_err
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PALMAS_GPIO_SET_DATA_OUT2,4,2  ; @PALMAS_GPIO_SET_DATA_OUT2
	.comm	_PALMAS_GPIO_CLEAR_DATA_OUT2,4,2 ; @PALMAS_GPIO_CLEAR_DATA_OUT2
	.comm	_PALMAS_GPIO_SET_DATA_OUT,4,2   ; @PALMAS_GPIO_SET_DATA_OUT
	.comm	_PALMAS_GPIO_CLEAR_DATA_OUT,4,2 ; @PALMAS_GPIO_CLEAR_DATA_OUT
	.comm	_PALMAS_GPIO_BASE,4,2           ; @PALMAS_GPIO_BASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reg 0x%02x write failed, %d\n"

	.no_dead_strip	_palmas_gpio_set
.subsections_via_symbols
