	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_gpio_pin_setflags
_tegra_gpio_pin_setflags:               ## @tegra_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	callq	_device_get_softc
	cmpq	%r15, (%rax)
	jbe	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_GPIO_LOCK
	movq	_GPIO_CNF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shlq	$2, %r15
	movq	8(%rbx), %rdx
	addq	%r15, %rdx
	movq	%rbx, %rdi
	callq	_gpio_read
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_GPIO_MSK_CNF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rdx
	addq	%r15, %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_gpio_write_masked
LBB0_4:
	addq	8(%rbx), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_tegra_gpio_pin_configure
	movq	%rbx, %rdi
	callq	_GPIO_UNLOCK
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GPIO_CNF,4,2                   ## @GPIO_CNF
	.comm	_GPIO_MSK_CNF,4,2               ## @GPIO_MSK_CNF
	.no_dead_strip	_tegra_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 tegra_gpio_pin_setflags
_tegra_gpio_pin_setflags:               ; @tegra_gpio_pin_setflags
	.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, x2
	mov	x21, x1
	bl	_device_get_softc
	ldr	x8, [x0]
	cmp	x8, x21
	b.ls	LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_GPIO_LOCK
Lloh0:
	adrp	x8, _GPIO_CNF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_CNF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x8, [x20, #8]
	add	x2, x8, x21, lsl #2
	mov	x0, x20
	bl	_gpio_read
	cbnz	w0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _GPIO_MSK_CNF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPIO_MSK_CNF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x8, [x20, #8]
	add	x2, x8, x21, lsl #2
	mov	x0, x20
	mov	w3, #1
	bl	_gpio_write_masked
LBB0_3:
	ldr	x8, [x20, #8]
	add	x1, x8, x21, lsl #2
	mov	x0, x20
	mov	x2, x19
	bl	_tegra_gpio_pin_configure
	mov	x0, x20
	bl	_GPIO_UNLOCK
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_5:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GPIO_CNF,4,2                   ; @GPIO_CNF
	.comm	_GPIO_MSK_CNF,4,2               ; @GPIO_MSK_CNF
	.no_dead_strip	_tegra_gpio_pin_setflags
.subsections_via_symbols
