	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efi_capsule_update_locked
_efi_capsule_update_locked:             ## @efi_capsule_update_locked
	.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	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, -32(%rbp)
	movq	_capsule_mutex@GOTPCREL(%rip), %rdi
	callq	_lockdep_assert_held
	movq	_efi_reset_type@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	testl	%edx, %edx
	js	LBB0_3
## %bb.1:
	cmpl	%ebx, %edx
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_err
	jmp	LBB0_5
LBB0_3:
	movq	_stop_capsules@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r14), %rdi
	callq	_page_to_phys
	movq	_efi@GOTPCREL(%rip), %rcx
	leaq	-32(%rbp), %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	*(%rcx)
	movq	_EFI_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_capsule_pending@GOTPCREL(%rip), %rcx
	movl	$1, (%rcx)
	movl	%ebx, (%r15)
LBB0_8:
	movq	%rax, %rdi
	callq	_efi_status_to_err
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_capsule_mutex,4,2              ## @capsule_mutex
	.comm	_efi_reset_type,4,2             ## @efi_reset_type
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Conflicting capsule reset type %d (%d).\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_stop_capsules,4,2              ## @stop_capsules
L_.str.1:                               ## @.str.1
	.asciz	"Capsule update raced with reboot, aborting.\n"

	.comm	_efi,8,3                        ## @efi
	.comm	_EFI_SUCCESS,8,3                ## @EFI_SUCCESS
	.comm	_capsule_pending,4,2            ## @capsule_pending
	.no_dead_strip	_efi_capsule_update_locked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efi_capsule_update_locked
_efi_capsule_update_locked:             ; @efi_capsule_update_locked
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	str	x0, [sp, #8]
Lloh0:
	adrp	x0, _capsule_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _capsule_mutex@GOTPAGEOFF]
	bl	_lockdep_assert_held
Lloh2:
	adrp	x21, _efi_reset_type@GOTPAGE
Lloh3:
	ldr	x21, [x21, _efi_reset_type@GOTPAGEOFF]
	ldr	w2, [x21]
	tbnz	w2, #31, LBB0_3
; %bb.1:
	cmp	w2, w19
	b.eq	LBB0_3
; %bb.2:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_err
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _stop_capsules@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stop_capsules@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.4:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
LBB0_5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	x0, [x20]
	bl	_page_to_phys
	mov	x2, x0
Lloh14:
	adrp	x8, _efi@GOTPAGE
Lloh15:
	ldr	x8, [x8, _efi@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	mov	w20, #1
	add	x0, sp, #8
	mov	w1, #1
	blr	x8
Lloh17:
	adrp	x8, _EFI_SUCCESS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EFI_SUCCESS@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
Lloh20:
	adrp	x8, _capsule_pending@GOTPAGE
Lloh21:
	ldr	x8, [x8, _capsule_pending@GOTPAGEOFF]
Lloh22:
	str	w20, [x8]
	str	w19, [x21]
LBB0_9:
	bl	_efi_status_to_err
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_capsule_mutex,4,2              ; @capsule_mutex
	.comm	_efi_reset_type,4,2             ; @efi_reset_type
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Conflicting capsule reset type %d (%d).\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_stop_capsules,4,2              ; @stop_capsules
l_.str.1:                               ; @.str.1
	.asciz	"Capsule update raced with reboot, aborting.\n"

	.comm	_efi,8,3                        ; @efi
	.comm	_EFI_SUCCESS,8,3                ; @EFI_SUCCESS
	.comm	_capsule_pending,4,2            ; @capsule_pending
	.no_dead_strip	_efi_capsule_update_locked
.subsections_via_symbols
