	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpmc_cs_set_memconf
_gpmc_cs_set_memconf:                   ## @gpmc_cs_set_memconf
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	leal	-1(%rdx), %eax
	testl	%esi, %eax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	movl	%esi, %r15d
	movl	%edi, %r14d
	movq	_GPMC_CHUNK_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movl	%eax, %ecx
	sarl	%cl, %r15d
	movq	_GPMC_SECTION_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %ebx
	shll	%cl, %ebx
	subl	%edx, %ebx
	movl	%eax, %ecx
	sarl	%cl, %ebx
	movq	_GPMC_CONFIG7_MASKADDRESS_OFFSET@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_GPMC_CS_CONFIG7@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_gpmc_cs_read_reg
	movq	_GPMC_CONFIG7_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_GPMC_CONFIG7_BASEADDRESS_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	orl	%ecx, %r15d
	movq	_GPMC_CONFIG7_MASKADDRESS_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	orl	%r15d, %ebx
	movq	_GPMC_CONFIG7_CSVALID@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r12), %esi
	movl	%r14d, %edi
	movl	%ebx, %edx
	callq	_gpmc_cs_write_reg
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GPMC_CHUNK_SHIFT,4,2           ## @GPMC_CHUNK_SHIFT
	.comm	_GPMC_SECTION_SHIFT,4,2         ## @GPMC_SECTION_SHIFT
	.comm	_GPMC_CONFIG7_MASKADDRESS_OFFSET,4,2 ## @GPMC_CONFIG7_MASKADDRESS_OFFSET
	.comm	_GPMC_CS_CONFIG7,4,2            ## @GPMC_CS_CONFIG7
	.comm	_GPMC_CONFIG7_MASK,4,2          ## @GPMC_CONFIG7_MASK
	.comm	_GPMC_CONFIG7_BASEADDRESS_MASK,4,2 ## @GPMC_CONFIG7_BASEADDRESS_MASK
	.comm	_GPMC_CONFIG7_MASKADDRESS_MASK,4,2 ## @GPMC_CONFIG7_MASKADDRESS_MASK
	.comm	_GPMC_CONFIG7_CSVALID,4,2       ## @GPMC_CONFIG7_CSVALID
	.no_dead_strip	_gpmc_cs_set_memconf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpmc_cs_set_memconf
_gpmc_cs_set_memconf:                   ; @gpmc_cs_set_memconf
	.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
	sub	w8, w2, #1
	tst	w8, w1
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x19, x0
Lloh3:
	adrp	x8, _GPMC_CHUNK_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPMC_CHUNK_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	asr	w20, w1, w8
Lloh6:
	adrp	x9, _GPMC_SECTION_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GPMC_SECTION_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	sub	w9, w9, w2
Lloh9:
	adrp	x10, _GPMC_CONFIG7_MASKADDRESS_OFFSET@GOTPAGE
Lloh10:
	ldr	x10, [x10, _GPMC_CONFIG7_MASKADDRESS_OFFSET@GOTPAGEOFF]
	asr	w8, w9, w8
Lloh11:
	ldr	w9, [x10]
	lsl	w21, w8, w9
Lloh12:
	adrp	x22, _GPMC_CS_CONFIG7@GOTPAGE
Lloh13:
	ldr	x22, [x22, _GPMC_CS_CONFIG7@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_gpmc_cs_read_reg
Lloh14:
	adrp	x8, _GPMC_CONFIG7_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GPMC_CONFIG7_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh17:
	adrp	x9, _GPMC_CONFIG7_BASEADDRESS_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _GPMC_CONFIG7_BASEADDRESS_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	and	w9, w9, w20
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _GPMC_CONFIG7_MASKADDRESS_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _GPMC_CONFIG7_MASKADDRESS_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	and	w9, w9, w21
	orr	w8, w8, w9
Lloh23:
	adrp	x9, _GPMC_CONFIG7_CSVALID@GOTPAGE
Lloh24:
	ldr	x9, [x9, _GPMC_CONFIG7_CSVALID@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	bl	_gpmc_cs_write_reg
	mov	w0, #0
LBB0_3:
	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	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GPMC_CHUNK_SHIFT,4,2           ; @GPMC_CHUNK_SHIFT
	.comm	_GPMC_SECTION_SHIFT,4,2         ; @GPMC_SECTION_SHIFT
	.comm	_GPMC_CONFIG7_MASKADDRESS_OFFSET,4,2 ; @GPMC_CONFIG7_MASKADDRESS_OFFSET
	.comm	_GPMC_CS_CONFIG7,4,2            ; @GPMC_CS_CONFIG7
	.comm	_GPMC_CONFIG7_MASK,4,2          ; @GPMC_CONFIG7_MASK
	.comm	_GPMC_CONFIG7_BASEADDRESS_MASK,4,2 ; @GPMC_CONFIG7_BASEADDRESS_MASK
	.comm	_GPMC_CONFIG7_MASKADDRESS_MASK,4,2 ; @GPMC_CONFIG7_MASKADDRESS_MASK
	.comm	_GPMC_CONFIG7_CSVALID,4,2       ; @GPMC_CONFIG7_CSVALID
	.no_dead_strip	_gpmc_cs_set_memconf
.subsections_via_symbols
