	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __nmk_gpio_set_mode_safe
___nmk_gpio_set_mode_safe:              ## @__nmk_gpio_set_mode_safe
	.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
	movl	%esi, %r13d
	movq	%rdi, %rbx
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.1:
	movl	(%rbx), %r14d
	movl	4(%rbx), %r15d
	cmpq	$0, 16(%rbx)
	je	LBB0_3
## %bb.2:
	movl	%r13d, %edi
	callq	_BIT
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%eax, %r14d
	notl	%r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	andl	%r14d, %edi
	movq	_NMK_GPIO_RWIMSC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	andl	%r15d, %r14d
	movq	_NMK_GPIO_FWIMSC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r14d, %edi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	callq	_writel
	movl	$1, %edi
	callq	*16(%rbx)
LBB0_3:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	___nmk_gpio_set_mode
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	xorl	%edi, %edi
	callq	*%rax
	movq	_NMK_GPIO_RWIMSC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r14d, %edi
	callq	_writel
	movq	_NMK_GPIO_FWIMSC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r15d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_5:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___nmk_gpio_set_mode            ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NMK_GPIO_RWIMSC,8,3            ## @NMK_GPIO_RWIMSC
	.comm	_NMK_GPIO_FWIMSC,8,3            ## @NMK_GPIO_FWIMSC
	.no_dead_strip	___nmk_gpio_set_mode_safe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __nmk_gpio_set_mode_safe
___nmk_gpio_set_mode_safe:              ; @__nmk_gpio_set_mode_safe
	.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	x22, x2
	mov	x23, x1
	mov	x19, x0
	cbz	w3, LBB0_5
; %bb.1:
	ldp	w21, w20, [x19]
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x26, _NMK_GPIO_RWIMSC@GOTPAGE
Lloh1:
	ldr	x26, [x26, _NMK_GPIO_RWIMSC@GOTPAGEOFF]
Lloh2:
	adrp	x25, _NMK_GPIO_FWIMSC@GOTPAGE
Lloh3:
	ldr	x25, [x25, _NMK_GPIO_FWIMSC@GOTPAGEOFF]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x23
	bl	_BIT
	mov	x24, x0
	bic	w0, w21, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x26]
	add	x1, x9, x8
	bl	_writel
	bic	w0, w20, w24
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #16]
	mov	w0, #1
	blr	x8
LBB0_3:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	___nmk_gpio_set_mode
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.4:
	mov	w0, #0
	blr	x8
	ldr	x8, [x19, #8]
	ldr	x9, [x26]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	add	x1, x9, x8
	mov	x0, x20
	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	_writel
LBB0_5:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	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	___nmk_gpio_set_mode
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NMK_GPIO_RWIMSC,8,3            ; @NMK_GPIO_RWIMSC
	.comm	_NMK_GPIO_FWIMSC,8,3            ; @NMK_GPIO_FWIMSC
	.no_dead_strip	___nmk_gpio_set_mode_safe
.subsections_via_symbols
