	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_gpio_set_cfg    ## -- Begin function cxd2880_tnrdmd_gpio_set_cfg
	.p2align	4, 0x90
_cxd2880_tnrdmd_gpio_set_cfg:           ## @cxd2880_tnrdmd_gpio_set_cfg
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%esi, %r13d
	cmpl	$3, %esi
	jge	LBB0_1
## %bb.3:
	movl	%r8d, %r12d
	movl	%ecx, %r8d
	movq	_CXD2880_TNRDMD_GPIO_MODE_EEW@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jb	LBB0_1
## %bb.4:
	movl	%r9d, %r15d
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_CXD2880_TNRDMD_STATE_SLEEP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_CXD2880_TNRDMD_STATE_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_CXD2880_IO_TGT_SYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	64(%r13), %ecx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$15, %r9d
	callq	_cxd2880_tnrdmd_set_and_save_reg_bits
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movl	%r13d, %ecx
	movl	$1, %r13d
	shll	%cl, %r13d
	movq	_CXD2880_IO_TGT_SYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r12d, %r12d
	cmovnel	%r13d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$67, %ecx
	movl	%r12d, %r8d
	movl	%r13d, %r9d
	callq	_cxd2880_tnrdmd_set_and_save_reg_bits
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_CXD2880_IO_TGT_SYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r15d, %r15d
	cmovnel	%r13d, %r15d
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$68, %ecx
	movl	%r15d, %r8d
	movl	%r13d, %r9d
	callq	_cxd2880_tnrdmd_set_and_save_reg_bits
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:
	movq	_CXD2880_IO_TGT_SYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r14d, %r14d
	cmovel	%r13d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$69, %ecx
	movl	%r12d, %r8d
	movl	%r13d, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cxd2880_tnrdmd_set_and_save_reg_bits ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXD2880_TNRDMD_GPIO_MODE_EEW,4,2 ## @CXD2880_TNRDMD_GPIO_MODE_EEW
	.comm	_CXD2880_TNRDMD_STATE_SLEEP,8,3 ## @CXD2880_TNRDMD_STATE_SLEEP
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ## @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_IO_TGT_SYS,4,2         ## @CXD2880_IO_TGT_SYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_gpio_set_cfg    ; -- Begin function cxd2880_tnrdmd_gpio_set_cfg
	.p2align	2
_cxd2880_tnrdmd_gpio_set_cfg:           ; @cxd2880_tnrdmd_gpio_set_cfg
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x22, x1
	cmp	w1, #3
	b.ge	LBB0_8
; %bb.2:
	mov	x23, x4
	mov	x4, x3
Lloh0:
	adrp	x8, _CXD2880_TNRDMD_GPIO_MODE_EEW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CXD2880_TNRDMD_GPIO_MODE_EEW@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w3
	b.lo	LBB0_8
; %bb.3:
	mov	x19, x0
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _CXD2880_TNRDMD_STATE_SLEEP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CXD2880_TNRDMD_STATE_SLEEP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.4:
	mov	x21, x5
	mov	x20, x2
Lloh9:
	adrp	x24, _CXD2880_IO_TGT_SYS@GOTPAGE
Lloh10:
	ldr	x24, [x24, _CXD2880_IO_TGT_SYS@GOTPAGEOFF]
	ldr	w1, [x24]
	add	w3, w22, #64
	mov	x0, x19
	mov	w2, #0
	mov	w5, #15
	bl	_cxd2880_tnrdmd_set_and_save_reg_bits
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	w1, [x24]
	mov	w8, #1
	lsl	w22, w8, w22
	cmp	w23, #0
	csel	w4, wzr, w22, eq
	mov	x0, x19
	mov	w2, #0
	mov	w3, #67
	mov	x5, x22
	bl	_cxd2880_tnrdmd_set_and_save_reg_bits
	cbnz	w0, LBB0_9
; %bb.6:
	ldr	w1, [x24]
	cmp	w21, #0
	csel	w4, wzr, w22, eq
	mov	x0, x19
	mov	w2, #0
	mov	w3, #68
	mov	x5, x22
	bl	_cxd2880_tnrdmd_set_and_save_reg_bits
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	w1, [x24]
	cmp	w20, #0
	csel	w4, w22, wzr, eq
	mov	x0, x19
	mov	w2, #0
	mov	w3, #69
	mov	x5, x22
	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
	b	_cxd2880_tnrdmd_set_and_save_reg_bits
LBB0_8:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CXD2880_TNRDMD_GPIO_MODE_EEW,4,2 ; @CXD2880_TNRDMD_GPIO_MODE_EEW
	.comm	_CXD2880_TNRDMD_STATE_SLEEP,8,3 ; @CXD2880_TNRDMD_STATE_SLEEP
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ; @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_IO_TGT_SYS,4,2         ; @CXD2880_IO_TGT_SYS
.subsections_via_symbols
