	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mptsas_mgmt_done
_mptsas_mgmt_done:                      ## @mptsas_mgmt_done
	.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
	movq	%rdi, %rbx
	movq	_MPT_MGMT_STATUS_COMMAND_GOOD@GOTPCREL(%rip), %rcx
	movl	(%rdi), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rdi)
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	%rdx, %r14
	movq	_MPT_MGMT_STATUS_RF_VALID@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movl	8(%rbx), %r15d
	movl	12(%rbx), %edi
	movl	(%rdx), %esi
	shll	$2, %esi
	callq	_min
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movl	(%rbx), %eax
LBB0_2:
	movq	_MPT_MGMT_STATUS_PENDING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_3
## %bb.4:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_complete
	movl	$1, %eax
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MPT_MGMT_STATUS_COMMAND_GOOD,4,2 ## @MPT_MGMT_STATUS_COMMAND_GOOD
	.comm	_MPT_MGMT_STATUS_RF_VALID,4,2   ## @MPT_MGMT_STATUS_RF_VALID
	.comm	_MPT_MGMT_STATUS_PENDING,4,2    ## @MPT_MGMT_STATUS_PENDING
	.no_dead_strip	_mptsas_mgmt_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mptsas_mgmt_done
_mptsas_mgmt_done:                      ; @mptsas_mgmt_done
	.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, x0
Lloh0:
	adrp	x8, _MPT_MGMT_STATUS_COMMAND_GOOD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPT_MGMT_STATUS_COMMAND_GOOD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
	cbz	x2, LBB0_2
; %bb.1:
	mov	x20, x2
Lloh3:
	adrp	x9, _MPT_MGMT_STATUS_RF_VALID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MPT_MGMT_STATUS_RF_VALID@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	ldp	w21, w0, [x19, #8]
	ldr	w8, [x2]
	lsl	w1, w8, #2
	bl	_min
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_memcpy
	ldr	w8, [x19]
LBB0_2:
Lloh6:
	adrp	x9, _MPT_MGMT_STATUS_PENDING@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MPT_MGMT_STATUS_PENDING@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bic	w8, w8, w9
	str	w8, [x19], #4
	mov	x0, x19
	bl	_complete
	mov	w0, #1
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MPT_MGMT_STATUS_COMMAND_GOOD,4,2 ; @MPT_MGMT_STATUS_COMMAND_GOOD
	.comm	_MPT_MGMT_STATUS_RF_VALID,4,2   ; @MPT_MGMT_STATUS_RF_VALID
	.comm	_MPT_MGMT_STATUS_PENDING,4,2    ; @MPT_MGMT_STATUS_PENDING
	.no_dead_strip	_mptsas_mgmt_done
.subsections_via_symbols
