	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qoriq_gpio_pin_setflags
_qoriq_gpio_pin_setflags:               ## @qoriq_gpio_pin_setflags
	.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, %r15d
	movl	%esi, %r12d
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%r12d, %edi
	callq	_VALID_PIN
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_GPIO_PIN_INPUT@GOTPCREL(%rip), %rbx
	movq	_GPIO_PIN_OUTPUT@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	orl	(%rbx), %eax
	movl	%r15d, %ecx
	notl	%ecx
	testl	%ecx, %eax
	jne	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_3:
	movq	%r14, %rdi
	callq	_GPIO_LOCK
	testl	%r15d, (%rbx)
	je	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	movq	_GPIO_GPDIR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_bus_read_4
	movl	$-2147483648, %ebx              ## imm = 0x80000000
	movl	%r12d, %ecx
	shrl	%cl, %ebx
	notl	%ebx
	andl	%eax, %ebx
	jmp	LBB0_7
LBB0_5:
	testl	%r15d, (%r13)
	je	LBB0_8
## %bb.6:
	movl	(%r14), %edi
	movq	_GPIO_GPDIR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_bus_read_4
	movl	$-2147483648, %ebx              ## imm = 0x80000000
	movl	%r12d, %ecx
	shrl	%cl, %ebx
	orl	%ebx, %eax
	movl	(%r14), %edi
	movl	(%r13), %esi
	movl	%eax, %edx
	callq	_bus_write_4
	movl	(%r14), %edi
	movq	_GPIO_GPODR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_bus_read_4
	movq	_GPIO_PIN_OPENDRAIN@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	orl	%ebx, %edx
	notl	%ebx
	andl	%eax, %ebx
	testl	%r15d, (%rcx)
	cmovnel	%edx, %ebx
LBB0_7:
	movl	(%r14), %edi
	movl	(%r13), %esi
	movl	%ebx, %edx
	callq	_bus_write_4
LBB0_8:
	movq	%r14, %rdi
	callq	_GPIO_UNLOCK
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GPIO_PIN_INPUT,4,2             ## @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,4,2            ## @GPIO_PIN_OUTPUT
	.comm	_GPIO_GPDIR,4,2                 ## @GPIO_GPDIR
	.comm	_GPIO_GPODR,4,2                 ## @GPIO_GPODR
	.comm	_GPIO_PIN_OPENDRAIN,4,2         ## @GPIO_PIN_OPENDRAIN
	.no_dead_strip	_qoriq_gpio_pin_setflags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qoriq_gpio_pin_setflags
_qoriq_gpio_pin_setflags:               ; @qoriq_gpio_pin_setflags
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_device_get_softc
	mov	x19, x0
	mov	x0, x21
	bl	_VALID_PIN
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x23, _GPIO_PIN_INPUT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GPIO_PIN_INPUT@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x22, _GPIO_PIN_OUTPUT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _GPIO_PIN_OUTPUT@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w8, w9, w8
	bics	wzr, w8, w20
	b.ne	LBB0_3
LBB0_2:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_3:
	mov	x0, x19
	bl	_GPIO_LOCK
	ldr	w8, [x23]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x19]
Lloh7:
	adrp	x22, _GPIO_GPDIR@GOTPAGE
Lloh8:
	ldr	x22, [x22, _GPIO_GPDIR@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_bus_read_4
	mov	w8, #-2147483648
	lsr	w8, w8, w21
	bic	w2, w0, w8
	b	LBB0_7
LBB0_5:
	ldr	w8, [x22]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.6:
	ldr	w0, [x19]
Lloh9:
	adrp	x22, _GPIO_GPDIR@GOTPAGE
Lloh10:
	ldr	x22, [x22, _GPIO_GPDIR@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_bus_read_4
	mov	w8, #-2147483648
	lsr	w21, w8, w21
	orr	w2, w0, w21
	ldr	w0, [x19]
	ldr	w1, [x22]
	bl	_bus_write_4
	ldr	w0, [x19]
Lloh11:
	adrp	x22, _GPIO_GPODR@GOTPAGE
Lloh12:
	ldr	x22, [x22, _GPIO_GPODR@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_bus_read_4
Lloh13:
	adrp	x8, _GPIO_PIN_OPENDRAIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GPIO_PIN_OPENDRAIN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	orr	w9, w0, w21
	bic	w10, w0, w21
	tst	w8, w20
	csel	w2, w10, w9, eq
LBB0_7:
	ldr	w0, [x19]
	ldr	w1, [x22]
	bl	_bus_write_4
LBB0_8:
	mov	x0, x19
	bl	_GPIO_UNLOCK
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GPIO_PIN_INPUT,4,2             ; @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,4,2            ; @GPIO_PIN_OUTPUT
	.comm	_GPIO_GPDIR,4,2                 ; @GPIO_GPDIR
	.comm	_GPIO_GPODR,4,2                 ; @GPIO_GPODR
	.comm	_GPIO_PIN_OPENDRAIN,4,2         ; @GPIO_PIN_OPENDRAIN
	.no_dead_strip	_qoriq_gpio_pin_setflags
.subsections_via_symbols
