	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmvmc_get_valid_hmc_buffer
_ibmvmc_get_valid_hmc_buffer:           ## @ibmvmc_get_valid_hmc_buffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_ibmvmc@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jb	LBB0_8
## %bb.1:
	movq	_ibmvmc_max_buf_pool_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.2:
	movq	_hmcs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rdi,8), %rax
	movq	_VMC_BUF_OWNER_ALPHA@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$24, %rax
	decq	%rcx
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 16(%rax)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rdx, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	$0, 8(%rax)
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ibmvmc,8,3                     ## @ibmvmc
	.comm	_hmcs,8,3                       ## @hmcs
	.comm	_ibmvmc_max_buf_pool_size,8,3   ## @ibmvmc_max_buf_pool_size
	.comm	_VMC_BUF_OWNER_ALPHA,8,3        ## @VMC_BUF_OWNER_ALPHA
	.no_dead_strip	_ibmvmc_get_valid_hmc_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmvmc_get_valid_hmc_buffer
_ibmvmc_get_valid_hmc_buffer:           ; @ibmvmc_get_valid_hmc_buffer
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _ibmvmc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ibmvmc@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.lo	LBB0_8
; %bb.1:
Lloh3:
	adrp	x8, _ibmvmc_max_buf_pool_size@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ibmvmc_max_buf_pool_size@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.2:
Lloh6:
	adrp	x9, _hmcs@GOTPAGE
Lloh7:
	ldr	x9, [x9, _hmcs@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x0, [x9, x0, lsl #3]
Lloh9:
	adrp	x9, _VMC_BUF_OWNER_ALPHA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VMC_BUF_OWNER_ALPHA@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x0, #24
	subs	x8, x8, #1
	b.eq	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x0, #16]
	cbz	x10, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x0, #8]
	cbz	x10, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x0]
	cmp	x10, x9
	b.ne	LBB0_3
; %bb.7:
	str	xzr, [x0, #8]
	ret
LBB0_8:
	mov	x0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ibmvmc,8,3                     ; @ibmvmc
	.comm	_hmcs,8,3                       ; @hmcs
	.comm	_ibmvmc_max_buf_pool_size,8,3   ; @ibmvmc_max_buf_pool_size
	.comm	_VMC_BUF_OWNER_ALPHA,8,3        ; @VMC_BUF_OWNER_ALPHA
	.no_dead_strip	_ibmvmc_get_valid_hmc_buffer
.subsections_via_symbols
