	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max7301_direction_input
_max7301_direction_input:               ## @max7301_direction_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	%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, %r15d
	callq	_gpiochip_get_data
	movq	%rax, %r14
	leal	4(%r15), %r12d
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	8(%r14), %ebx
	movl	%r12d, %edi
	callq	_BIT
	testl	%ebx, %eax
	jne	LBB0_1
## %bb.2:
	movq	_PIN_CONFIG_IN_WO_PULLUP@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PIN_CONFIG_IN_PULLUP@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	shrl	$2, %r12d
	addl	%r15d, %r15d
	leaq	24(%r14), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_PIN_CONFIG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andb	$6, %r15b
	movl	%r15d, %ecx
	shll	%cl, %eax
	notl	%eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	andl	(%rdx,%r12,4), %eax
	shll	%cl, %ebx
	orl	%eax, %ebx
	movl	%ebx, (%rdx,%r12,4)
	movl	28(%r14), %edi
	addl	$8, %r12d
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	*16(%r14)
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIN_CONFIG_IN_PULLUP,4,2       ## @PIN_CONFIG_IN_PULLUP
	.comm	_PIN_CONFIG_IN_WO_PULLUP,4,2    ## @PIN_CONFIG_IN_WO_PULLUP
	.comm	_PIN_CONFIG_MASK,4,2            ## @PIN_CONFIG_MASK
	.no_dead_strip	_max7301_direction_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max7301_direction_input
_max7301_direction_input:               ; @max7301_direction_input
	.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	x19, x1
	bl	_gpiochip_get_data
	mov	x20, x0
	add	w21, w19, #4
	ldr	x22, [x0]
	ldr	w23, [x0, #8]
	mov	x0, x21
	bl	_BIT
Lloh0:
	adrp	x8, _PIN_CONFIG_IN_WO_PULLUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIN_CONFIG_IN_WO_PULLUP@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PIN_CONFIG_IN_PULLUP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PIN_CONFIG_IN_PULLUP@GOTPAGEOFF]
	tst	w0, w23
	csel	x8, x8, x9, eq
	lsr	w21, w21, #2
	ldr	w23, [x8]
	lsl	w24, w21, #2
	ubfiz	w25, w19, #1, #2
	add	x19, x20, #24
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x22, x24]
Lloh4:
	adrp	x9, _PIN_CONFIG_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PIN_CONFIG_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	lsl	w9, w9, w25
	bic	w8, w8, w9
	lsl	w9, w23, w25
	orr	w2, w8, w9
	str	w2, [x22, x24]
	ldr	x8, [x20, #16]
	ldr	w0, [x20, #28]
	add	w1, w21, #8
	blr	x8
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PIN_CONFIG_IN_PULLUP,4,2       ; @PIN_CONFIG_IN_PULLUP
	.comm	_PIN_CONFIG_IN_WO_PULLUP,4,2    ; @PIN_CONFIG_IN_WO_PULLUP
	.comm	_PIN_CONFIG_MASK,4,2            ; @PIN_CONFIG_MASK
	.no_dead_strip	_max7301_direction_input
.subsections_via_symbols
