	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function palmas_gpio_input
_palmas_gpio_input:                     ## @palmas_gpio_input
	.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	%esi, %ebx
	movq	%rdi, %r14
	callq	_gpiochip_get_data
	movq	(%rax), %r15
	movl	%ebx, %edi
	andl	$7, %edi
	cmpl	$8, %ebx
	jae	LBB0_1
## %bb.2:
	movq	_PALMAS_GPIO_DATA_DIR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PALMAS_GPIO_DATA_DIR2@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r12d
	movq	_PALMAS_GPIO_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_BIT
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_palmas_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	callq	_dev_err
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PALMAS_GPIO_DATA_DIR2,4,2      ## @PALMAS_GPIO_DATA_DIR2
	.comm	_PALMAS_GPIO_DATA_DIR,4,2       ## @PALMAS_GPIO_DATA_DIR
	.comm	_PALMAS_GPIO_BASE,4,2           ## @PALMAS_GPIO_BASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reg 0x%02x update failed, %d\n"

	.no_dead_strip	_palmas_gpio_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function palmas_gpio_input
_palmas_gpio_input:                     ; @palmas_gpio_input
	.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
	bl	_gpiochip_get_data
	ldr	x21, [x0]
	and	w0, w20, #0x7
Lloh0:
	adrp	x8, _PALMAS_GPIO_DATA_DIR2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PALMAS_GPIO_DATA_DIR2@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PALMAS_GPIO_DATA_DIR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PALMAS_GPIO_DATA_DIR@GOTPAGEOFF]
	cmp	w20, #8
	csel	x8, x9, x8, lo
	ldr	w20, [x8]
Lloh4:
	adrp	x8, _PALMAS_GPIO_BASE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PALMAS_GPIO_BASE@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
	bl	_BIT
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	w4, #0
	bl	_palmas_update_bits
	mov	x21, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	bl	_dev_err
LBB0_2:
	mov	x0, x21
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PALMAS_GPIO_DATA_DIR2,4,2      ; @PALMAS_GPIO_DATA_DIR2
	.comm	_PALMAS_GPIO_DATA_DIR,4,2       ; @PALMAS_GPIO_DATA_DIR
	.comm	_PALMAS_GPIO_BASE,4,2           ; @PALMAS_GPIO_BASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reg 0x%02x update failed, %d\n"

	.no_dead_strip	_palmas_gpio_input
.subsections_via_symbols
