	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max7301_direction_output
_max7301_direction_output:              ## @max7301_direction_output
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	callq	_gpiochip_get_data
	movq	%rax, %r13
	leal	4(%rbx), %r12d
	addl	%ebx, %ebx
	movq	(%rax), %r15
	movl	%r12d, %r14d
	shrl	$2, %r14d
	leaq	16(%rax), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_PIN_CONFIG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andb	$6, %bl
	movl	%ebx, %ecx
	shll	%cl, %eax
	notl	%eax
	movq	_PIN_CONFIG_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	andl	(%r15,%r14,4), %eax
	orl	%eax, %edx
	movl	%edx, (%r15,%r14,4)
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	___max7301_set
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	20(%r13), %edi
	leal	8(%r14), %esi
	movl	(%r15,%r14,4), %edx
	callq	*8(%r13)
	movl	%eax, %ebx
LBB0_2:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIN_CONFIG_MASK,4,2            ## @PIN_CONFIG_MASK
	.comm	_PIN_CONFIG_OUT,4,2             ## @PIN_CONFIG_OUT
	.no_dead_strip	_max7301_direction_output
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max7301_direction_output
_max7301_direction_output:              ; @max7301_direction_output
	.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	x19, x1
	bl	_gpiochip_get_data
	mov	x20, x0
	add	w22, w19, #4
	ubfiz	w25, w19, #1, #2
	mov	x19, x0
	ldr	x23, [x19], #16
	lsr	w24, w22, #2
	lsl	x26, x24, #2
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x23, x26]
Lloh0:
	adrp	x9, _PIN_CONFIG_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PIN_CONFIG_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w9, w9, w25
Lloh3:
	adrp	x10, _PIN_CONFIG_OUT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PIN_CONFIG_OUT@GOTPAGEOFF]
	bic	w8, w8, w9
Lloh5:
	ldr	w9, [x10]
	lsl	w9, w9, w25
	orr	w8, w8, w9
	str	w8, [x23, x26]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	___max7301_set
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	w0, [x20, #20]
	add	w1, w24, #8
	ldr	w2, [x23, x24, lsl #2]
	blr	x8
	mov	x21, x0
LBB0_2:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PIN_CONFIG_MASK,4,2            ; @PIN_CONFIG_MASK
	.comm	_PIN_CONFIG_OUT,4,2             ; @PIN_CONFIG_OUT
	.no_dead_strip	_max7301_direction_output
.subsections_via_symbols
