	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx51_gpio_pin_configure
_imx51_gpio_pin_configure:              ## @imx51_gpio_pin_configure
	.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	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mtx_lock_spin
	movq	_GPIO_PIN_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_GPIO_PIN_OUTPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	%r14d, %ebx
	orl	%r13d, %ebx
	testl	%r12d, %ebx
	je	LBB0_11
## %bb.1:
	notl	%ebx
	andl	(%r15), %ebx
	testl	%r12d, %r14d
	je	LBB0_9
## %bb.2:
	movq	_GPIO_PIN_PRESET_LOW@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	testl	%r12d, (%rax)
	jne	LBB0_8
## %bb.3:
	movq	_GPIO_PIN_PRESET_HIGH@GOTPCREL(%rip), %rax
	movl	$1, %edx
	testl	%r12d, (%rax)
	jne	LBB0_8
## %bb.4:
	movq	_GPIO_PIN_OPENDRAIN@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	jne	LBB0_5
## %bb.6:
	movq	%rcx, %r12
	movq	_IMX_GPIO_DR_REG@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_9:
	movq	_IMX_GPIO_OE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	4(%r15), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_CLEAR4
	jmp	LBB0_10
LBB0_5:
	movq	%rcx, %r12
	movq	_IMX_GPIO_PSR_REG@GOTPCREL(%rip), %rax
LBB0_7:
	movq	%r15, %r14
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_READ4
	movl	4(%r15), %ecx
	xorl	%edx, %edx
	btl	%ecx, %eax
	setb	%dl
	movl	(%r12), %r14d
LBB0_8:
	movq	_IMX_GPIO_DR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	4(%r15), %cl
	shll	%cl, %edx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_SET4
	movq	_IMX_GPIO_OE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	4(%r15), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	%r12, %rdi
	callq	_SET4
	movl	%r14d, %r13d
LBB0_10:
	orl	%ebx, %r13d
	movl	%r13d, (%r15)
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock_spin                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_PIN_INPUT,4,2             ## @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,4,2            ## @GPIO_PIN_OUTPUT
	.comm	_GPIO_PIN_PRESET_LOW,4,2        ## @GPIO_PIN_PRESET_LOW
	.comm	_GPIO_PIN_PRESET_HIGH,4,2       ## @GPIO_PIN_PRESET_HIGH
	.comm	_GPIO_PIN_OPENDRAIN,4,2         ## @GPIO_PIN_OPENDRAIN
	.comm	_IMX_GPIO_PSR_REG,4,2           ## @IMX_GPIO_PSR_REG
	.comm	_IMX_GPIO_DR_REG,4,2            ## @IMX_GPIO_DR_REG
	.comm	_IMX_GPIO_OE_REG,4,2            ## @IMX_GPIO_OE_REG
	.no_dead_strip	_imx51_gpio_pin_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx51_gpio_pin_configure
_imx51_gpio_pin_configure:              ; @imx51_gpio_pin_configure
	.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	x20, x1
	mov	x19, x0
	bl	_mtx_lock_spin
Lloh0:
	adrp	x8, _GPIO_PIN_INPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_PIN_INPUT@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
Lloh3:
	adrp	x25, _GPIO_PIN_OUTPUT@GOTPAGE
Lloh4:
	ldr	x25, [x25, _GPIO_PIN_OUTPUT@GOTPAGEOFF]
	ldr	w23, [x25]
	orr	w8, w23, w24
	tst	w8, w21
	b.eq	LBB0_10
; %bb.1:
	ldr	w9, [x20]
	bic	w22, w9, w8
	tst	w23, w21
	b.eq	LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _GPIO_PIN_PRESET_LOW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GPIO_PIN_PRESET_LOW@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x24, _IMX_GPIO_DR_REG@GOTPAGE
Lloh9:
	ldr	x24, [x24, _IMX_GPIO_DR_REG@GOTPAGEOFF]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.3:
	mov	w8, #0
	b	LBB0_8
LBB0_4:
Lloh10:
	adrp	x8, _IMX_GPIO_OE_REG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IMX_GPIO_OE_REG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w8, [x20, #4]
	mov	w9, #1
	lsl	w2, w9, w8
	mov	x0, x19
	bl	_CLEAR4
	mov	x23, x24
	b	LBB0_9
LBB0_5:
Lloh13:
	adrp	x8, _GPIO_PIN_PRESET_HIGH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GPIO_PIN_PRESET_HIGH@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.6:
	mov	w8, #1
	b	LBB0_8
LBB0_7:
Lloh16:
	adrp	x8, _GPIO_PIN_OPENDRAIN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GPIO_PIN_OPENDRAIN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _IMX_GPIO_PSR_REG@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IMX_GPIO_PSR_REG@GOTPAGEOFF]
	tst	w8, w21
	csel	x8, x24, x9, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x20, #4]
	lsr	w8, w0, w8
	and	w8, w8, #0x1
	ldr	w23, [x25]
LBB0_8:
	ldr	w1, [x24]
	ldr	w9, [x20, #4]
	lsl	w2, w8, w9
	mov	x0, x19
	bl	_SET4
Lloh21:
	adrp	x8, _IMX_GPIO_OE_REG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IMX_GPIO_OE_REG@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	w8, [x20, #4]
	mov	w9, #1
	lsl	w2, w9, w8
	mov	x0, x19
	bl	_SET4
LBB0_9:
	orr	w8, w23, w22
	str	w8, [x20]
LBB0_10:
	mov	x0, x19
	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
	b	_mtx_unlock_spin
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_PIN_INPUT,4,2             ; @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,4,2            ; @GPIO_PIN_OUTPUT
	.comm	_GPIO_PIN_PRESET_LOW,4,2        ; @GPIO_PIN_PRESET_LOW
	.comm	_GPIO_PIN_PRESET_HIGH,4,2       ; @GPIO_PIN_PRESET_HIGH
	.comm	_GPIO_PIN_OPENDRAIN,4,2         ; @GPIO_PIN_OPENDRAIN
	.comm	_IMX_GPIO_PSR_REG,4,2           ; @IMX_GPIO_PSR_REG
	.comm	_IMX_GPIO_DR_REG,4,2            ; @IMX_GPIO_DR_REG
	.comm	_IMX_GPIO_OE_REG,4,2            ; @IMX_GPIO_OE_REG
	.no_dead_strip	_imx51_gpio_pin_configure
.subsections_via_symbols
