	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmvmc_return_hmc
_ibmvmc_return_hmc:                     ## @ibmvmc_return_hmc
	.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
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r15
	movq	56(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_2
## %bb.3:
	testl	%esi, %esi
	je	LBB0_6
## %bb.4:
	movq	64(%r15), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	$0, (%rax)
	movq	_ibmvmc_read_wait@GOTPCREL(%rip), %rdi
	callq	_wake_up_interruptible
	movq	56(%r15), %r13
LBB0_6:
	movl	(%r13), %edi
	callq	_to_vio_dev
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	$0, 48(%r15)
	movq	_ibmhmc_state_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r15)
	movq	_ibmvmc_max_buf_pool_size@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.7:
	movq	16(%r15), %rbx
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_VMC_INVALID_BUFFER_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r15), %rcx
	movl	%eax, (%rcx,%r12,4)
	incq	%r12
	addq	$16, %rbx
	movq	_ibmvmc_max_buf_pool_size@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jae	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%rbx)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_ibmvmc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	callq	_free_dma_buffer
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_dev_dbg
	jmp	LBB0_10
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_11:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ibmvmc_read_wait,4,2           ## @ibmvmc_read_wait
	.comm	_ibmhmc_state_free,4,2          ## @ibmhmc_state_free
	.comm	_ibmvmc_max_buf_pool_size,8,3   ## @ibmvmc_max_buf_pool_size
	.comm	_ibmvmc,4,2                     ## @ibmvmc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Forgot buffer id 0x%lx\n"

	.comm	_VMC_INVALID_BUFFER_ID,4,2      ## @VMC_INVALID_BUFFER_ID
	.no_dead_strip	_ibmvmc_return_hmc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmvmc_return_hmc
_ibmvmc_return_hmc:                     ; @ibmvmc_return_hmc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	ldr	x24, [x0, #56]
	cbz	x24, LBB0_10
; %bb.2:
	cbz	w1, LBB0_5
; %bb.3:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_5
; %bb.4:
	str	xzr, [x8]
Lloh0:
	adrp	x0, _ibmvmc_read_wait@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ibmvmc_read_wait@GOTPAGEOFF]
	bl	_wake_up_interruptible
	ldr	x24, [x19, #56]
LBB0_5:
	ldr	w0, [x24]
	bl	_to_vio_dev
	mov	x20, x0
	mov	x0, x19
	bl	_spin_lock_irqsave
	str	xzr, [x19, #48]
Lloh2:
	adrp	x8, _ibmhmc_state_free@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ibmhmc_state_free@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	stp	xzr, xzr, [x19, #24]
Lloh5:
	adrp	x25, _ibmvmc_max_buf_pool_size@GOTPAGE
Lloh6:
	ldr	x25, [x25, _ibmvmc_max_buf_pool_size@GOTPAGEOFF]
	ldr	x8, [x25]
	cbz	x8, LBB0_11
; %bb.6:
	mov	x21, #0
	ldr	x22, [x19, #16]
Lloh7:
	adrp	x26, _VMC_INVALID_BUFFER_ID@GOTPAGE
Lloh8:
	ldr	x26, [x26, _VMC_INVALID_BUFFER_ID@GOTPAGEOFF]
Lloh9:
	adrp	x23, l_.str@PAGE
Lloh10:
	add	x23, x23, l_.str@PAGEOFF
Lloh11:
	adrp	x27, _ibmvmc@GOTPAGE
Lloh12:
	ldr	x27, [x27, _ibmvmc@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x22
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w8, [x26]
	ldr	x9, [x19, #8]
	str	w8, [x9, x21, lsl #2]
	add	x21, x21, #1
	ldr	x8, [x25]
	add	x22, x22, #16
	cmp	x21, x8
	b.hs	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x27]
	ldp	w3, w2, [x22]
	mov	x0, x20
	bl	_free_dma_buffer
	ldr	w0, [x24]
	mov	x1, x23
	mov	x2, x21
	bl	_dev_dbg
	b	LBB0_7
LBB0_10:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ibmvmc_read_wait,4,2           ; @ibmvmc_read_wait
	.comm	_ibmhmc_state_free,4,2          ; @ibmhmc_state_free
	.comm	_ibmvmc_max_buf_pool_size,8,3   ; @ibmvmc_max_buf_pool_size
	.comm	_ibmvmc,4,2                     ; @ibmvmc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Forgot buffer id 0x%lx\n"

	.comm	_VMC_INVALID_BUFFER_ID,4,2      ; @VMC_INVALID_BUFFER_ID
	.no_dead_strip	_ibmvmc_return_hmc
.subsections_via_symbols
