	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exprom_wp_set
_exprom_wp_set:                         ## @exprom_wp_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	testl	%esi, %esi
	setne	%al
	je	LBB0_1
## %bb.2:
	movq	_EXPROM_WRITE_ENABLE@GOTPCREL(%rip), %rcx
	leaq	L_.str(%rip), %rsi
	movl	(%rcx), %ebx
	jmp	LBB0_3
LBB0_1:
	movl	%esi, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movq	_exprom_wp_disabled@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	callq	_dd_dev_info
	movq	_ASIC_GPIO_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_write_csr
	movq	_ASIC_GPIO_OE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_write_csr
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXPROM_WRITE_ENABLE,4,2        ## @EXPROM_WRITE_ENABLE
	.comm	_exprom_wp_disabled,4,2         ## @exprom_wp_disabled
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disable Expansion ROM Write Protection\n"

L_.str.1:                               ## @.str.1
	.asciz	"Enable Expansion ROM Write Protection\n"

	.comm	_ASIC_GPIO_OUT,4,2              ## @ASIC_GPIO_OUT
	.comm	_ASIC_GPIO_OE,4,2               ## @ASIC_GPIO_OE
	.no_dead_strip	_exprom_wp_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exprom_wp_set
_exprom_wp_set:                         ; @exprom_wp_set
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _EXPROM_WRITE_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXPROM_WRITE_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w1, #0
	csel	w20, wzr, w8, eq
	cset	w8, ne
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
Lloh5:
	adrp	x10, l_.str.1@PAGE
Lloh6:
	add	x10, x10, l_.str.1@PAGEOFF
	csel	x1, x10, x9, eq
Lloh7:
	adrp	x9, _exprom_wp_disabled@GOTPAGE
Lloh8:
	ldr	x9, [x9, _exprom_wp_disabled@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
	bl	_dd_dev_info
Lloh10:
	adrp	x8, _ASIC_GPIO_OUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ASIC_GPIO_OUT@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_write_csr
Lloh13:
	adrp	x8, _ASIC_GPIO_OE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ASIC_GPIO_OE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_write_csr
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EXPROM_WRITE_ENABLE,4,2        ; @EXPROM_WRITE_ENABLE
	.comm	_exprom_wp_disabled,4,2         ; @exprom_wp_disabled
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disable Expansion ROM Write Protection\n"

l_.str.1:                               ; @.str.1
	.asciz	"Enable Expansion ROM Write Protection\n"

	.comm	_ASIC_GPIO_OUT,4,2              ; @ASIC_GPIO_OUT
	.comm	_ASIC_GPIO_OE,4,2               ; @ASIC_GPIO_OE
	.no_dead_strip	_exprom_wp_set
.subsections_via_symbols
