	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_opal_wait_completion           ## -- Begin function opal_wait_completion
	.p2align	4, 0x90
_opal_wait_completion:                  ## @opal_wait_completion
	.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
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r12
	movslq	%edx, %rax
	movq	_OPAL_BUSY@GOTPCREL(%rip), %r15
	shlq	$4, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$100, %edi
	callq	_DELAY
	cmpl	(%r15), %ebx
	jne	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_OPAL_CHECK_ASYNC_COMPLETION@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_vtophys
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	callq	_opal_call
	movl	%eax, %ebx
	cmpl	(%r15), %eax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_completions@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, 8(%rax,%rcx)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_atomic_thread_fence_acq
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	_completions@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	movq	_OPAL_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OPAL_CHECK_ASYNC_COMPLETION,4,2 ## @OPAL_CHECK_ASYNC_COMPLETION
	.comm	_OPAL_BUSY,4,2                  ## @OPAL_BUSY
	.comm	_completions,8,3                ## @completions
	.comm	_OPAL_SUCCESS,4,2               ## @OPAL_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_opal_wait_completion           ; -- Begin function opal_wait_completion
	.p2align	2
_opal_wait_completion:                  ; @opal_wait_completion
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	sxtw	x23, w21
Lloh0:
	adrp	x25, _OPAL_CHECK_ASYNC_COMPLETION@GOTPAGE
Lloh1:
	ldr	x25, [x25, _OPAL_CHECK_ASYNC_COMPLETION@GOTPAGEOFF]
Lloh2:
	adrp	x26, _OPAL_BUSY@GOTPAGE
Lloh3:
	ldr	x26, [x26, _OPAL_BUSY@GOTPAGEOFF]
Lloh4:
	adrp	x24, _completions@GOTPAGE
Lloh5:
	ldr	x24, [x24, _completions@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #100
	bl	_DELAY
	ldr	w8, [x26]
	cmp	w22, w8
	b.ne	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x25]
	mov	x0, x20
	bl	_vtophys
	mov	x1, x0
	mov	x0, x22
	mov	x2, x19
	mov	x3, x21
	bl	_opal_call
	mov	x22, x0
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
	add	x8, x8, x23, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_1
; %bb.4:
	bl	_atomic_thread_fence_acq
	ldr	x8, [x24]
	add	x1, x8, x23, lsl #4
	mov	x0, x20
	mov	x2, x19
	bl	_memcpy
Lloh6:
	adrp	x8, _OPAL_SUCCESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OPAL_SUCCESS@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OPAL_CHECK_ASYNC_COMPLETION,4,2 ; @OPAL_CHECK_ASYNC_COMPLETION
	.comm	_OPAL_BUSY,4,2                  ; @OPAL_BUSY
	.comm	_completions,8,3                ; @completions
	.comm	_OPAL_SUCCESS,4,2               ; @OPAL_SUCCESS
.subsections_via_symbols
