	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx7ulp_pmx_gpio_set_direction
_imx7ulp_pmx_gpio_set_direction:        ## @imx7ulp_pmx_gpio_set_direction
	.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	%ecx, %r14d
	movl	%edx, %ebx
	callq	_pinctrl_dev_get_drvdata
	movq	8(%rax), %r12
	movl	%ebx, %ebx
	movslq	(%r12,%rbx,4), %rdi
	cmpq	$-1, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	addq	(%rax), %rdi
	callq	_readl
	testl	%r14d, %r14d
	movq	_BM_IBE_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BM_OBE_ENABLED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %edi
	cmovel	%ecx, %edi
	notl	%edi
	cmovel	%edx, %ecx
	andl	%eax, %edi
	orl	%ecx, %edi
	movslq	(%r12,%rbx,4), %rsi
	addq	(%r15), %rsi
	callq	_writel
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BM_OBE_ENABLED,4,2             ## @BM_OBE_ENABLED
	.comm	_BM_IBE_ENABLED,4,2             ## @BM_IBE_ENABLED
	.no_dead_strip	_imx7ulp_pmx_gpio_set_direction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx7ulp_pmx_gpio_set_direction
_imx7ulp_pmx_gpio_set_direction:        ; @imx7ulp_pmx_gpio_set_direction
	.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	x19, x3
	mov	x21, x2
	bl	_pinctrl_dev_get_drvdata
	ldr	x22, [x0, #8]
	ldrsw	x8, [x22, w21, uxtw #2]
	cmn	w8, #1
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x0
	mov	w21, w21
	ldr	x9, [x0]
	add	x0, x9, x8
	bl	_readl
Lloh0:
	adrp	x8, _BM_IBE_ENABLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BM_IBE_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BM_OBE_ENABLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BM_OBE_ENABLED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w10, w8, w9, eq
	bic	w10, w0, w10
	csel	w8, w9, w8, eq
	orr	w0, w10, w8
	ldr	x8, [x20]
	ldrsw	x9, [x22, x21, lsl #2]
	add	x1, x8, x9
	bl	_writel
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BM_OBE_ENABLED,4,2             ; @BM_OBE_ENABLED
	.comm	_BM_IBE_ENABLED,4,2             ; @BM_IBE_ENABLED
	.no_dead_strip	_imx7ulp_pmx_gpio_set_direction
.subsections_via_symbols
