	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arizona_gpio_direction_out
_arizona_gpio_direction_out:            ## @arizona_gpio_direction_out
	.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, %r14d
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_gpiochip_get_data
	movq	(%rax), %rbx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_gpiochip_line_is_persistent
	movl	%eax, %r13d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	movq	_ARIZONA_GPIO1_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r12d, %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movq	_ARIZONA_GPN_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, -44(%rbp)
	je	LBB0_5
## %bb.2:
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.3:
	movq	%rax, %r13
	movl	(%r15), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movl	(%r13), %edx
LBB0_5:
	testl	%r14d, %r14d
	movq	_ARIZONA_GPN_LVL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmovnel	%eax, %r14d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	movq	_ARIZONA_GPIO1_CTRL@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r12d
	orl	%eax, %edx
	movl	%r12d, %esi
	movl	%r14d, %ecx
	callq	_regmap_update_bits
LBB0_6:
	movl	%eax, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ARIZONA_GPIO1_CTRL,4,2         ## @ARIZONA_GPIO1_CTRL
	.comm	_ARIZONA_GPN_DIR,4,2            ## @ARIZONA_GPN_DIR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to resume: %d\n"

	.comm	_ARIZONA_GPN_LVL,4,2            ## @ARIZONA_GPN_LVL
	.no_dead_strip	_arizona_gpio_direction_out
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arizona_gpio_direction_out
_arizona_gpio_direction_out:            ; @arizona_gpio_direction_out
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_gpiochip_get_data
	ldr	x24, [x0]
	mov	x0, x21
	mov	x1, x19
	bl	_gpiochip_line_is_persistent
	mov	x23, x0
	ldr	w0, [x24]
Lloh0:
	adrp	x25, _ARIZONA_GPIO1_CTRL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ARIZONA_GPIO1_CTRL@GOTPAGEOFF]
	ldr	w8, [x25]
	add	w1, w8, w19
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w9, [sp, #12]
Lloh2:
	adrp	x26, _ARIZONA_GPN_DIR@GOTPAGE
Lloh3:
	ldr	x26, [x26, _ARIZONA_GPN_DIR@GOTPAGEOFF]
	ldr	w8, [x26]
	and	w9, w8, w9
	cmp	w9, #0
	ccmp	w23, #0, #4, ne
	b.eq	LBB0_4
; %bb.2:
	ldr	w0, [x21]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	w8, [x26]
LBB0_4:
Lloh4:
	adrp	x9, _ARIZONA_GPN_LVL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ARIZONA_GPN_LVL@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w20, #0
	csel	w3, wzr, w9, eq
	ldr	w0, [x24]
	ldr	w10, [x25]
	add	w1, w10, w19
	orr	w2, w8, w9
	bl	_regmap_update_bits
LBB0_5:
	mov	x22, x0
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	mov	x22, x0
	ldr	w0, [x21]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ARIZONA_GPIO1_CTRL,4,2         ; @ARIZONA_GPIO1_CTRL
	.comm	_ARIZONA_GPN_DIR,4,2            ; @ARIZONA_GPN_DIR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to resume: %d\n"

	.comm	_ARIZONA_GPN_LVL,4,2            ; @ARIZONA_GPN_LVL
	.no_dead_strip	_arizona_gpio_direction_out
.subsections_via_symbols
