	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx51_gpio_pin_config_32
_imx51_gpio_pin_config_32:              ## @imx51_gpio_pin_config_32
	.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
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %rbx
	callq	_device_get_softc
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	cmpq	%r13, (%rax)
	jge	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_IMX_GPIO_DR_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_READ4
	testq	%r13, %r13
	jle	LBB0_4
## %bb.5:
	movq	_GPIO_PIN_INPUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_GPIO_PIN_OUTPUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r10
	movq	_GPIO_PIN_PRESET_LOW@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	movq	_GPIO_PIN_PRESET_HIGH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	xorl	%r11d, %r11d
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	orq	%rdi, %rbx
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rcx
	cmpq	%rcx, %r13
	je	LBB0_15
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	shll	%cl, %edi
	movq	(%r12,%rcx,8), %rsi
	testq	%rsi, %rdx
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	testq	%rsi, %r10
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	orq	%rdi, %r11
	testq	%rsi, %r9
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	orq	%rdi, %r14
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	testq	%rsi, %r8
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	andl	%eax, %edi
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	orq	%rdi, -48(%rbp)                 ## 8-byte Folded Spill
	jmp	LBB0_14
LBB0_4:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r11d, %r11d
LBB0_15:
	movq	%r11, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %r12
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_mtx_lock_spin
	movq	_IMX_GPIO_DR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_READ4
	notq	%r14
	andq	%rax, %r14
	orq	-48(%rbp), %r14                 ## 8-byte Folded Reload
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	%r14, %rdx
	callq	_WRITE4
	movq	_IMX_GPIO_OE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_READ4
	notq	%rbx
	andq	%rax, %rbx
	orq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_WRITE4
	movq	%r15, %rdi
	callq	_mtx_unlock_spin
	xorl	%eax, %eax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IMX_GPIO_DR_REG,4,2            ## @IMX_GPIO_DR_REG
	.comm	_GPIO_PIN_INPUT,8,3             ## @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,8,3            ## @GPIO_PIN_OUTPUT
	.comm	_GPIO_PIN_PRESET_LOW,8,3        ## @GPIO_PIN_PRESET_LOW
	.comm	_GPIO_PIN_PRESET_HIGH,8,3       ## @GPIO_PIN_PRESET_HIGH
	.comm	_IMX_GPIO_OE_REG,4,2            ## @IMX_GPIO_OE_REG
	.no_dead_strip	_imx51_gpio_pin_config_32
.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_config_32
_imx51_gpio_pin_config_32:              ; @imx51_gpio_pin_config_32
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	bl	_device_get_softc
	cbnz	x22, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, x21
	b.ge	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_3:
	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
LBB0_4:
Lloh3:
	adrp	x24, _IMX_GPIO_DR_REG@GOTPAGE
Lloh4:
	ldr	x24, [x24, _IMX_GPIO_DR_REG@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_READ4
	cmp	x21, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x22, #0
	mov	x23, #0
	mov	x8, #0
	mov	x25, #0
	mov	x26, #0
	mov	w9, #1
Lloh5:
	adrp	x10, _GPIO_PIN_INPUT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GPIO_PIN_INPUT@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
Lloh8:
	adrp	x11, _GPIO_PIN_OUTPUT@GOTPAGE
Lloh9:
	ldr	x11, [x11, _GPIO_PIN_OUTPUT@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x11]
Lloh11:
	adrp	x12, _GPIO_PIN_PRESET_LOW@GOTPAGE
Lloh12:
	ldr	x12, [x12, _GPIO_PIN_PRESET_LOW@GOTPAGEOFF]
Lloh13:
	ldr	x12, [x12]
Lloh14:
	adrp	x13, _GPIO_PIN_PRESET_HIGH@GOTPAGE
Lloh15:
	ldr	x13, [x13, _GPIO_PIN_PRESET_HIGH@GOTPAGEOFF]
Lloh16:
	ldr	x13, [x13]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w14, w9, w8
	ldr	x15, [x20, x8, lsl #3]
	orr	x16, x22, x14
	tst	x13, x15
	and	x17, x0, x14
	orr	x17, x17, x25
	orr	x1, x25, x14
	csel	x17, x17, x1, eq
	orr	x1, x26, x14
	tst	x12, x15
	csel	x1, x26, x1, eq
	csel	x17, x17, x25, eq
	tst	x11, x15
	csel	x1, x26, x1, eq
	csel	x17, x25, x17, eq
	csel	x16, x22, x16, eq
	orr	x14, x23, x14
	tst	x10, x15
	csel	x26, x1, x26, eq
	csel	x25, x17, x25, eq
	csel	x23, x23, x14, eq
	csel	x22, x16, x22, eq
	add	x8, x8, #1
	cmp	x21, x8
	b.ne	LBB0_6
	b	LBB0_8
LBB0_7:
	mov	x26, #0
	mov	x25, #0
	mov	x23, #0
	mov	x22, #0
LBB0_8:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mtx_lock_spin
	ldr	w21, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_READ4
	bic	x8, x0, x26
	orr	x2, x8, x25
	mov	x0, x19
	mov	x1, x21
	bl	_WRITE4
Lloh17:
	adrp	x8, _IMX_GPIO_OE_REG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IMX_GPIO_OE_REG@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_READ4
	bic	x8, x0, x23
	orr	x2, x8, x22
	mov	x0, x19
	mov	x1, x21
	bl	_WRITE4
	mov	x0, x20
	bl	_mtx_unlock_spin
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IMX_GPIO_DR_REG,4,2            ; @IMX_GPIO_DR_REG
	.comm	_GPIO_PIN_INPUT,8,3             ; @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,8,3            ; @GPIO_PIN_OUTPUT
	.comm	_GPIO_PIN_PRESET_LOW,8,3        ; @GPIO_PIN_PRESET_LOW
	.comm	_GPIO_PIN_PRESET_HIGH,8,3       ; @GPIO_PIN_PRESET_HIGH
	.comm	_IMX_GPIO_OE_REG,4,2            ; @IMX_GPIO_OE_REG
	.no_dead_strip	_imx51_gpio_pin_config_32
.subsections_via_symbols
