	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _alt_hps2fpga_enable_set
__alt_hps2fpga_enable_set:              ## @_alt_hps2fpga_enable_set
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	callq	_reset_control_deassert
	testl	%eax, %eax
	jne	LBB0_7
	jmp	LBB0_4
LBB0_2:
	callq	_reset_control_assert
	testl	%eax, %eax
	jne	LBB0_7
LBB0_4:
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.6:
	movq	_l3_remap_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_ALT_L3_REMAP_MPUZERO_MSK@GOTPCREL(%rip), %rax
	movq	_l3_remap_shadow@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	%edx, (%rcx)
	movl	(%rbx), %eax
	movl	%eax, %esi
	notl	%esi
	andl	%edx, %esi
	orl	%eax, %edx
	testl	%r14d, %r14d
	cmovel	%esi, %edx
	movl	%edx, (%rcx)
	movl	4(%rbx), %edi
	movq	_ALT_L3_REMAP_OFST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_l3_remap_lock,4,2              ## @l3_remap_lock
	.comm	_ALT_L3_REMAP_MPUZERO_MSK,4,2   ## @ALT_L3_REMAP_MPUZERO_MSK
	.comm	_l3_remap_shadow,4,2            ## @l3_remap_shadow
	.comm	_ALT_L3_REMAP_OFST,4,2          ## @ALT_L3_REMAP_OFST
	.no_dead_strip	__alt_hps2fpga_enable_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _alt_hps2fpga_enable_set
__alt_hps2fpga_enable_set:              ; @_alt_hps2fpga_enable_set
	.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, x1
	mov	x20, x0
	ldr	w0, [x0, #8]
	cbz	w1, LBB0_2
; %bb.1:
	bl	_reset_control_deassert
	cbnz	w0, LBB0_6
	b	LBB0_3
LBB0_2:
	bl	_reset_control_assert
	cbnz	w0, LBB0_6
LBB0_3:
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.4:
Lloh0:
	adrp	x21, _l3_remap_lock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _l3_remap_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x8, _ALT_L3_REMAP_MPUZERO_MSK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ALT_L3_REMAP_MPUZERO_MSK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _l3_remap_shadow@GOTPAGE
Lloh6:
	ldr	x9, [x9, _l3_remap_shadow@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	ldp	w10, w0, [x20]
	bic	w11, w8, w10
	orr	w8, w10, w8
	cmp	w19, #0
	csel	w2, w11, w8, eq
	str	w2, [x9]
Lloh7:
	adrp	x8, _ALT_L3_REMAP_OFST@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ALT_L3_REMAP_OFST@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_regmap_write
	mov	x19, x0
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_l3_remap_lock,4,2              ; @l3_remap_lock
	.comm	_ALT_L3_REMAP_MPUZERO_MSK,4,2   ; @ALT_L3_REMAP_MPUZERO_MSK
	.comm	_l3_remap_shadow,4,2            ; @l3_remap_shadow
	.comm	_ALT_L3_REMAP_OFST,4,2          ; @ALT_L3_REMAP_OFST
	.no_dead_strip	__alt_hps2fpga_enable_set
.subsections_via_symbols
