	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function palmas_gpio_get
_palmas_gpio_get:                       ## @palmas_gpio_get
	.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	%esi, %r12d
	movq	%rdi, %r14
	callq	_gpiochip_get_data
	movq	(%rax), %r15
	cmpl	$8, %r12d
	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), %r13d
	movq	_PALMAS_GPIO_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_palmas_read
	testl	%eax, %eax
	js	LBB0_4
## %bb.6:
	movl	%r12d, %r13d
	andl	$7, %r13d
	movl	-44(%rbp), %ebx
	movl	%r13d, %edi
	callq	_BIT
	testl	%ebx, %eax
	movq	_PALMAS_GPIO_DATA_OUT2@GOTPCREL(%rip), %rax
	cmoveq	_PALMAS_GPIO_DATA_IN2@GOTPCREL(%rip), %rax
	movq	_PALMAS_GPIO_DATA_OUT@GOTPCREL(%rip), %rcx
	cmoveq	_PALMAS_GPIO_DATA_IN@GOTPCREL(%rip), %rcx
	cmpl	$8, %r12d
	cmovaeq	%rax, %rcx
	movl	(%rcx), %r12d
	movq	_PALMAS_GPIO_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_palmas_read
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movl	-44(%rbp), %r14d
	movl	%r13d, %edi
	callq	_BIT
	xorl	%ebx, %ebx
	testl	%r14d, %eax
	setne	%bl
	jmp	LBB0_9
LBB0_4:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	jmp	LBB0_5
LBB0_7:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
LBB0_5:
	movl	%ebx, %ecx
	callq	_dev_err
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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 read failed, %d\n"

	.comm	_PALMAS_GPIO_DATA_OUT2,4,2      ## @PALMAS_GPIO_DATA_OUT2
	.comm	_PALMAS_GPIO_DATA_OUT,4,2       ## @PALMAS_GPIO_DATA_OUT
	.comm	_PALMAS_GPIO_DATA_IN2,4,2       ## @PALMAS_GPIO_DATA_IN2
	.comm	_PALMAS_GPIO_DATA_IN,4,2        ## @PALMAS_GPIO_DATA_IN
	.no_dead_strip	_palmas_gpio_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function palmas_gpio_get
_palmas_gpio_get:                       ; @palmas_gpio_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_gpiochip_get_data
	ldr	x20, [x0]
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	w21, #8
	csel	x8, x9, x8, lo
	ldr	w23, [x8]
Lloh4:
	adrp	x24, _PALMAS_GPIO_BASE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _PALMAS_GPIO_BASE@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x3, sp, #12
	mov	x0, x20
	mov	x2, x23
	bl	_palmas_read
	tbnz	w0, #31, LBB0_3
; %bb.1:
	and	w23, w21, #0x7
	ldr	w22, [sp, #12]
	mov	x0, x23
	bl	_BIT
Lloh6:
	adrp	x8, _PALMAS_GPIO_DATA_IN2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PALMAS_GPIO_DATA_IN2@GOTPAGEOFF]
Lloh8:
	adrp	x9, _PALMAS_GPIO_DATA_OUT2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PALMAS_GPIO_DATA_OUT2@GOTPAGEOFF]
	tst	w0, w22
Lloh10:
	adrp	x10, _PALMAS_GPIO_DATA_IN@GOTPAGE
Lloh11:
	ldr	x10, [x10, _PALMAS_GPIO_DATA_IN@GOTPAGEOFF]
Lloh12:
	adrp	x11, _PALMAS_GPIO_DATA_OUT@GOTPAGE
Lloh13:
	ldr	x11, [x11, _PALMAS_GPIO_DATA_OUT@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	csel	x9, x10, x11, eq
	cmp	w21, #8
	csel	x8, x9, x8, lo
	ldr	w21, [x8]
	ldr	w1, [x24]
	add	x3, sp, #12
	mov	x0, x20
	mov	x2, x21
	bl	_palmas_read
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	w19, [sp, #12]
	mov	x0, x23
	bl	_BIT
	tst	w0, w19
	cset	w22, ne
	b	LBB0_6
LBB0_3:
	mov	x22, x0
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	b	LBB0_5
LBB0_4:
	mov	x22, x0
	ldr	w0, [x19]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
LBB0_5:
	mov	x3, x22
	bl	_dev_err
LBB0_6:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.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 read failed, %d\n"

	.comm	_PALMAS_GPIO_DATA_OUT2,4,2      ; @PALMAS_GPIO_DATA_OUT2
	.comm	_PALMAS_GPIO_DATA_OUT,4,2       ; @PALMAS_GPIO_DATA_OUT
	.comm	_PALMAS_GPIO_DATA_IN2,4,2       ; @PALMAS_GPIO_DATA_IN2
	.comm	_PALMAS_GPIO_DATA_IN,4,2        ; @PALMAS_GPIO_DATA_IN
	.no_dead_strip	_palmas_gpio_get
.subsections_via_symbols
