	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_trans_pcie_clear_persistence_bit
_iwl_trans_pcie_clear_persistence_bit:  ## @iwl_trans_pcie_clear_persistence_bit
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	cmpl	$128, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.3:
	movq	_PREG_PRPH_WPROT_22000@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_PREG_PRPH_WPROT_9000@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r12d
	movq	_HPM_DEBUG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_iwl_read_umac_prph_no_grab
	cmpl	$-1515870816, %eax              ## imm = 0xA5A5A5A0
	je	LBB0_9
## %bb.5:
	movl	%eax, %r15d
	movq	_PERSISTENCE_BIT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.6:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_iwl_read_umac_prph_no_grab
	movq	_PREG_WFPM_ACCESS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IWL_ERR
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_7:
	movl	(%r13), %esi
	movq	_PERSISTENCE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_iwl_write_umac_prph_no_grab
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PREG_PRPH_WPROT_9000,4,2       ## @PREG_PRPH_WPROT_9000
	.comm	_PREG_PRPH_WPROT_22000,4,2      ## @PREG_PRPH_WPROT_22000
	.comm	_HPM_DEBUG,4,2                  ## @HPM_DEBUG
	.comm	_PERSISTENCE_BIT,4,2            ## @PERSISTENCE_BIT
	.comm	_PREG_WFPM_ACCESS,4,2           ## @PREG_WFPM_ACCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error, can not clear persistence bit\n"

	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_iwl_trans_pcie_clear_persistence_bit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_trans_pcie_clear_persistence_bit
_iwl_trans_pcie_clear_persistence_bit:  ; @iwl_trans_pcie_clear_persistence_bit
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.2:
Lloh0:
	adrp	x8, _PREG_PRPH_WPROT_22000@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PREG_PRPH_WPROT_22000@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _PREG_PRPH_WPROT_9000@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PREG_PRPH_WPROT_9000@GOTPAGEOFF]
LBB0_4:
	ldr	w21, [x8]
Lloh4:
	adrp	x22, _HPM_DEBUG@GOTPAGE
Lloh5:
	ldr	x22, [x22, _HPM_DEBUG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_iwl_read_umac_prph_no_grab
	mov	w8, #42400
	movk	w8, #42405, lsl #16
	cmp	w0, w8
	b.eq	LBB0_9
; %bb.5:
	mov	x20, x0
Lloh6:
	adrp	x23, _PERSISTENCE_BIT@GOTPAGE
Lloh7:
	ldr	x23, [x23, _PERSISTENCE_BIT@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	bl	_iwl_read_umac_prph_no_grab
Lloh8:
	adrp	x8, _PREG_WFPM_ACCESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PREG_WFPM_ACCESS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.7:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
Lloh13:
	adrp	x8, _EPERM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	ldr	w1, [x22]
	ldr	w8, [x23]
	bic	w2, w20, w8
	mov	x0, x19
	bl	_iwl_write_umac_prph_no_grab
LBB0_9:
	mov	w0, #0
LBB0_10:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PREG_PRPH_WPROT_9000,4,2       ; @PREG_PRPH_WPROT_9000
	.comm	_PREG_PRPH_WPROT_22000,4,2      ; @PREG_PRPH_WPROT_22000
	.comm	_HPM_DEBUG,4,2                  ; @HPM_DEBUG
	.comm	_PERSISTENCE_BIT,4,2            ; @PERSISTENCE_BIT
	.comm	_PREG_WFPM_ACCESS,4,2           ; @PREG_WFPM_ACCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error, can not clear persistence bit\n"

	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_iwl_trans_pcie_clear_persistence_bit
.subsections_via_symbols
