	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_for_reset
_wait_for_reset:                        ## @wait_for_reset
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	72(%rdi), %eax
	movl	%eax, 24(%rdi)
	movups	56(%rdi), %xmm0
	movups	%xmm0, 8(%rdi)
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_init_completion
	movl	$1, (%rbx)
	movq	_VNIC_RESET_CHANGE_PARAM@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_ibmvnic_reset
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	%r14, %rdi
	callq	_wait_for_completion
	cmpq	$0, 48(%rbx)
	je	LBB0_2
## %bb.3:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movl	24(%rbx), %eax
	movl	%eax, 44(%rbx)
	movups	8(%rbx), %xmm0
	movups	%xmm0, 28(%rbx)
	movq	%r14, %rdi
	callq	_init_completion
	movl	$1, (%rbx)
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_ibmvnic_reset
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_wait_for_completion
	jmp	LBB0_5
LBB0_2:
	xorl	%r15d, %r15d
LBB0_5:
	movl	$0, (%rbx)
LBB0_6:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VNIC_RESET_CHANGE_PARAM,4,2    ## @VNIC_RESET_CHANGE_PARAM
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_wait_for_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_for_reset
_wait_for_reset:                        ; @wait_for_reset
	.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
	ldr	w8, [x0, #72]
	str	w8, [x0, #24]
	ldur	q0, [x0, #56]
	stur	q0, [x0, #8]
	add	x20, x0, #4
	mov	x0, x20
	bl	_init_completion
	mov	w8, #1
	str	w8, [x19]
Lloh0:
	adrp	x22, _VNIC_RESET_CHANGE_PARAM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VNIC_RESET_CHANGE_PARAM@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ibmvnic_reset
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.1:
	mov	x0, x20
	bl	_wait_for_completion
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	w8, [x19, #24]
	str	w8, [x19, #44]
	ldur	q0, [x19, #8]
	stur	q0, [x19, #28]
	mov	x0, x20
	bl	_init_completion
	mov	w8, #1
	str	w8, [x19]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ibmvnic_reset
	cbnz	w0, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_wait_for_completion
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	str	wzr, [x19]
LBB0_6:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_VNIC_RESET_CHANGE_PARAM,4,2    ; @VNIC_RESET_CHANGE_PARAM
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_wait_for_reset
.subsections_via_symbols
