	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hipz_h_alloc_resource_qp       ## -- Begin function hipz_h_alloc_resource_qp
	.p2align	4, 0x90
_hipz_h_alloc_resource_qp:              ## @hipz_h_alloc_resource_qp
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movl	%edi, -56(%rbp)                 ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PLPAR_HCALL9_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	_H_ALL_RES_QP_ENHANCED_OPS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %ebx
	movq	_H_ALL_RES_QP_PTE_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %r15d
	orl	%ebx, %r15d
	movq	_H_ALL_RES_QP_SERVICE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %r13d
	movq	_H_ALL_RES_QP_SIGNALING_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %r12d
	orl	%r13d, %r12d
	orl	%r15d, %r12d
	movq	_H_ALL_RES_QP_STORAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %r15d
	movq	_H_ALL_RES_QP_SMALL_SQ_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	96(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %r13d
	orl	%r15d, %r13d
	movq	_H_ALL_RES_QP_SMALL_RQ_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	56(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %ebx
	orl	%r13d, %ebx
	orl	%r12d, %ebx
	movq	_H_ALL_RES_QP_LL_RQ_CQE_POSTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LLQP_RECV_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	andl	16(%r14), %eax
	setne	%sil
	callq	_EHCA_BMASK_SET
	movl	%eax, %r15d
	orl	%ebx, %r15d
	movq	_H_ALL_RES_QP_LL_SQ_CQE_POSTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LLQP_SEND_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	andl	16(%r14), %eax
	setne	%sil
	callq	_EHCA_BMASK_SET
	movl	%eax, %r12d
	movq	_H_ALL_RES_QP_UD_AV_LKEY_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %ebx
	orl	%r12d, %ebx
	orl	%r15d, %ebx
	movq	_H_ALL_RES_QP_RESOURCE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %r13d
	orl	%ebx, %r13d
	movq	_H_ALL_RES_QP_MAX_OUTST_SEND_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	100(%r14), %esi
	incl	%esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %r15d
	movq	_H_ALL_RES_QP_MAX_OUTST_RECV_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	60(%r14), %esi
	incl	%esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movq	_H_ALL_RES_QP_MAX_SEND_SGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	104(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %r12d
	movq	_H_ALL_RES_QP_MAX_RECV_SGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	64(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %r15d
	orl	%r12d, %r15d
	orl	%ebx, %r15d
	movq	_H_ALL_RES_QP_SRQ_QP_TOKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%r14), %esi
	callq	_EHCA_BMASK_SET
	movl	%eax, %ebx
	movslq	(%r14), %rax
	movq	_EQPT_SRQ@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_H_ALL_RES_QP_SRQ_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	28(%r14), %esi
	jmp	LBB0_3
LBB0_2:
	movq	_H_ALL_RES_QP_SRQ_QPN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	32(%r14), %esi
LBB0_3:
	callq	_EHCA_BMASK_SET
	movq	_H_ALLOC_RESOURCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	168(%r14), %r8d
	movl	160(%r14), %ecx
	movl	164(%r14), %r9d
	subq	$48, %rsp
	movl	%eax, 32(%rsp)
	movl	%ebx, 24(%rsp)
	movl	%r15d, 16(%rsp)
	movl	%ecx, (%rsp)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edx
	movl	%r13d, %ecx
	callq	_ehca_plpar_hcall9
	addq	$48, %rsp
	movl	%eax, %r13d
	movq	(%rbx), %rax
	movq	%rax, 40(%r14)
	movq	8(%rbx), %rax
	movq	%rax, 136(%r14)
	movq	_H_ALL_RES_QP_ACT_OUTST_SEND_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%rbx), %rsi
	callq	_EHCA_BMASK_GET
	movq	%rax, 128(%r14)
	movq	_H_ALL_RES_QP_ACT_OUTST_RECV_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%rbx), %rsi
	callq	_EHCA_BMASK_GET
	movq	%rax, 88(%r14)
	movq	_H_ALL_RES_QP_ACT_SEND_SGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%rbx), %rsi
	callq	_EHCA_BMASK_GET
	movq	%rax, 120(%r14)
	movq	_H_ALL_RES_QP_ACT_RECV_SGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%rbx), %rsi
	callq	_EHCA_BMASK_GET
	movq	%rax, 80(%r14)
	movq	_H_ALL_RES_QP_SQUEUE_SIZE_PAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	32(%rbx), %rsi
	callq	_EHCA_BMASK_GET
	movq	%rax, 112(%r14)
	movq	_H_ALL_RES_QP_RQUEUE_SIZE_PAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	32(%rbx), %rsi
	callq	_EHCA_BMASK_GET
	movq	%rax, 72(%r14)
	movq	_H_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_6
## %bb.4:
	leaq	48(%r14), %rdi
	movq	48(%rbx), %rcx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	%rcx, %rdx
	callq	_hcp_galpas_ctor
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	48(%rbx), %rdx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ehca_gen_err
	movq	_H_FREE_RESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	40(%r14), %rdx
	movl	%r15d, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_ehca_plpar_hcall_norets
	addq	$16, %rsp
	movq	_H_NO_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_6:
	movq	_H_NOT_ENOUGH_RESOURCES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_ehca_gen_err
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PLPAR_HCALL9_BUFSIZE,4,2       ## @PLPAR_HCALL9_BUFSIZE
	.comm	_H_ALL_RES_QP_ENHANCED_OPS,4,2  ## @H_ALL_RES_QP_ENHANCED_OPS
	.comm	_H_ALL_RES_QP_PTE_PIN,4,2       ## @H_ALL_RES_QP_PTE_PIN
	.comm	_H_ALL_RES_QP_SERVICE_TYPE,4,2  ## @H_ALL_RES_QP_SERVICE_TYPE
	.comm	_H_ALL_RES_QP_SIGNALING_TYPE,4,2 ## @H_ALL_RES_QP_SIGNALING_TYPE
	.comm	_H_ALL_RES_QP_STORAGE,4,2       ## @H_ALL_RES_QP_STORAGE
	.comm	_H_ALL_RES_QP_SMALL_SQ_PAGE_SIZE,4,2 ## @H_ALL_RES_QP_SMALL_SQ_PAGE_SIZE
	.comm	_H_ALL_RES_QP_SMALL_RQ_PAGE_SIZE,4,2 ## @H_ALL_RES_QP_SMALL_RQ_PAGE_SIZE
	.comm	_H_ALL_RES_QP_LL_RQ_CQE_POSTING,4,2 ## @H_ALL_RES_QP_LL_RQ_CQE_POSTING
	.comm	_LLQP_RECV_COMP,4,2             ## @LLQP_RECV_COMP
	.comm	_H_ALL_RES_QP_LL_SQ_CQE_POSTING,4,2 ## @H_ALL_RES_QP_LL_SQ_CQE_POSTING
	.comm	_LLQP_SEND_COMP,4,2             ## @LLQP_SEND_COMP
	.comm	_H_ALL_RES_QP_UD_AV_LKEY_CTRL,4,2 ## @H_ALL_RES_QP_UD_AV_LKEY_CTRL
	.comm	_H_ALL_RES_QP_RESOURCE_TYPE,4,2 ## @H_ALL_RES_QP_RESOURCE_TYPE
	.comm	_H_ALL_RES_QP_MAX_OUTST_SEND_WR,4,2 ## @H_ALL_RES_QP_MAX_OUTST_SEND_WR
	.comm	_H_ALL_RES_QP_MAX_OUTST_RECV_WR,4,2 ## @H_ALL_RES_QP_MAX_OUTST_RECV_WR
	.comm	_H_ALL_RES_QP_MAX_SEND_SGE,4,2  ## @H_ALL_RES_QP_MAX_SEND_SGE
	.comm	_H_ALL_RES_QP_MAX_RECV_SGE,4,2  ## @H_ALL_RES_QP_MAX_RECV_SGE
	.comm	_H_ALL_RES_QP_SRQ_QP_TOKEN,4,2  ## @H_ALL_RES_QP_SRQ_QP_TOKEN
	.comm	_EQPT_SRQ,8,3                   ## @EQPT_SRQ
	.comm	_H_ALL_RES_QP_SRQ_LIMIT,4,2     ## @H_ALL_RES_QP_SRQ_LIMIT
	.comm	_H_ALL_RES_QP_SRQ_QPN,4,2       ## @H_ALL_RES_QP_SRQ_QPN
	.comm	_H_ALLOC_RESOURCE,4,2           ## @H_ALLOC_RESOURCE
	.comm	_H_ALL_RES_QP_ACT_OUTST_SEND_WR,4,2 ## @H_ALL_RES_QP_ACT_OUTST_SEND_WR
	.comm	_H_ALL_RES_QP_ACT_OUTST_RECV_WR,4,2 ## @H_ALL_RES_QP_ACT_OUTST_RECV_WR
	.comm	_H_ALL_RES_QP_ACT_SEND_SGE,4,2  ## @H_ALL_RES_QP_ACT_SEND_SGE
	.comm	_H_ALL_RES_QP_ACT_RECV_SGE,4,2  ## @H_ALL_RES_QP_ACT_RECV_SGE
	.comm	_H_ALL_RES_QP_SQUEUE_SIZE_PAGES,4,2 ## @H_ALL_RES_QP_SQUEUE_SIZE_PAGES
	.comm	_H_ALL_RES_QP_RQUEUE_SIZE_PAGES,4,2 ## @H_ALL_RES_QP_RQUEUE_SIZE_PAGES
	.comm	_H_SUCCESS,4,2                  ## @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not establish HW access. rc=%d paddr=%#lx"

	.comm	_H_FREE_RESOURCE,4,2            ## @H_FREE_RESOURCE
	.comm	_H_NO_MEM,4,2                   ## @H_NO_MEM
	.comm	_H_NOT_ENOUGH_RESOURCES,4,2     ## @H_NOT_ENOUGH_RESOURCES
L_.str.1:                               ## @.str.1
	.asciz	"Not enough resources. ret=%lli"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hipz_h_alloc_resource_qp       ; -- Begin function hipz_h_alloc_resource_qp
	.p2align	2
_hipz_h_alloc_resource_qp:              ; @hipz_h_alloc_resource_qp
	.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
	sub	sp, sp, #16
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _PLPAR_HCALL9_BUFSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PLPAR_HCALL9_BUFSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh8:
	adrp	x8, _H_ALL_RES_QP_ENHANCED_OPS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H_ALL_RES_QP_ENHANCED_OPS@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w1, [x1]
	bl	_EHCA_BMASK_SET
	mov	x23, x0
Lloh11:
	adrp	x8, _H_ALL_RES_QP_PTE_PIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _H_ALL_RES_QP_PTE_PIN@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_EHCA_BMASK_SET
	orr	w23, w0, w23
Lloh14:
	adrp	x8, _H_ALL_RES_QP_SERVICE_TYPE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _H_ALL_RES_QP_SERVICE_TYPE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w1, [x20, #4]
	bl	_EHCA_BMASK_SET
	orr	w23, w23, w0
Lloh17:
	adrp	x8, _H_ALL_RES_QP_SIGNALING_TYPE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _H_ALL_RES_QP_SIGNALING_TYPE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w1, [x20, #8]
	bl	_EHCA_BMASK_SET
	orr	w23, w23, w0
Lloh20:
	adrp	x8, _H_ALL_RES_QP_STORAGE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _H_ALL_RES_QP_STORAGE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	w1, [x20, #12]
	bl	_EHCA_BMASK_SET
	orr	w23, w23, w0
Lloh23:
	adrp	x8, _H_ALL_RES_QP_SMALL_SQ_PAGE_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _H_ALL_RES_QP_SMALL_SQ_PAGE_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldr	w1, [x20, #96]
	bl	_EHCA_BMASK_SET
	orr	w23, w23, w0
Lloh26:
	adrp	x8, _H_ALL_RES_QP_SMALL_RQ_PAGE_SIZE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _H_ALL_RES_QP_SMALL_RQ_PAGE_SIZE@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	w1, [x20, #56]
	bl	_EHCA_BMASK_SET
	orr	w23, w23, w0
Lloh29:
	adrp	x8, _H_ALL_RES_QP_LL_RQ_CQE_POSTING@GOTPAGE
Lloh30:
	ldr	x8, [x8, _H_ALL_RES_QP_LL_RQ_CQE_POSTING@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	ldr	w8, [x20, #16]
Lloh32:
	adrp	x9, _LLQP_RECV_COMP@GOTPAGE
Lloh33:
	ldr	x9, [x9, _LLQP_RECV_COMP@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w1, ne
	bl	_EHCA_BMASK_SET
	orr	w23, w23, w0
Lloh35:
	adrp	x8, _H_ALL_RES_QP_LL_SQ_CQE_POSTING@GOTPAGE
Lloh36:
	ldr	x8, [x8, _H_ALL_RES_QP_LL_SQ_CQE_POSTING@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	ldr	w8, [x20, #16]
Lloh38:
	adrp	x9, _LLQP_SEND_COMP@GOTPAGE
Lloh39:
	ldr	x9, [x9, _LLQP_SEND_COMP@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w1, ne
	bl	_EHCA_BMASK_SET
	orr	w23, w23, w0
Lloh41:
	adrp	x8, _H_ALL_RES_QP_UD_AV_LKEY_CTRL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _H_ALL_RES_QP_UD_AV_LKEY_CTRL@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	ldr	w1, [x20, #20]
	bl	_EHCA_BMASK_SET
	orr	w23, w23, w0
Lloh44:
	adrp	x8, _H_ALL_RES_QP_RESOURCE_TYPE@GOTPAGE
Lloh45:
	ldr	x8, [x8, _H_ALL_RES_QP_RESOURCE_TYPE@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_EHCA_BMASK_SET
	orr	w23, w23, w0
Lloh47:
	adrp	x8, _H_ALL_RES_QP_MAX_OUTST_SEND_WR@GOTPAGE
Lloh48:
	ldr	x8, [x8, _H_ALL_RES_QP_MAX_OUTST_SEND_WR@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
	ldr	w8, [x20, #100]
	add	w1, w8, #1
	bl	_EHCA_BMASK_SET
	mov	x24, x0
Lloh50:
	adrp	x8, _H_ALL_RES_QP_MAX_OUTST_RECV_WR@GOTPAGE
Lloh51:
	ldr	x8, [x8, _H_ALL_RES_QP_MAX_OUTST_RECV_WR@GOTPAGEOFF]
Lloh52:
	ldr	w0, [x8]
	ldr	w8, [x20, #60]
	add	w1, w8, #1
	bl	_EHCA_BMASK_SET
	orr	w24, w0, w24
Lloh53:
	adrp	x8, _H_ALL_RES_QP_MAX_SEND_SGE@GOTPAGE
Lloh54:
	ldr	x8, [x8, _H_ALL_RES_QP_MAX_SEND_SGE@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
	ldr	w1, [x20, #104]
	bl	_EHCA_BMASK_SET
	orr	w24, w24, w0
Lloh56:
	adrp	x8, _H_ALL_RES_QP_MAX_RECV_SGE@GOTPAGE
Lloh57:
	ldr	x8, [x8, _H_ALL_RES_QP_MAX_RECV_SGE@GOTPAGEOFF]
Lloh58:
	ldr	w0, [x8]
	ldr	w1, [x20, #64]
	bl	_EHCA_BMASK_SET
	orr	w25, w24, w0
Lloh59:
	adrp	x8, _H_ALL_RES_QP_SRQ_QP_TOKEN@GOTPAGE
Lloh60:
	ldr	x8, [x8, _H_ALL_RES_QP_SRQ_QP_TOKEN@GOTPAGEOFF]
Lloh61:
	ldr	w0, [x8]
	ldr	w1, [x20, #24]
	bl	_EHCA_BMASK_SET
	mov	x24, x0
	ldrsw	x8, [x20]
Lloh62:
	adrp	x9, _EQPT_SRQ@GOTPAGE
Lloh63:
	ldr	x9, [x9, _EQPT_SRQ@GOTPAGEOFF]
Lloh64:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
Lloh65:
	adrp	x8, _H_ALL_RES_QP_SRQ_LIMIT@GOTPAGE
Lloh66:
	ldr	x8, [x8, _H_ALL_RES_QP_SRQ_LIMIT@GOTPAGEOFF]
Lloh67:
	ldr	w0, [x8]
	ldr	w1, [x20, #28]
	b	LBB0_3
LBB0_2:
Lloh68:
	adrp	x8, _H_ALL_RES_QP_SRQ_QPN@GOTPAGE
Lloh69:
	ldr	x8, [x8, _H_ALL_RES_QP_SRQ_QPN@GOTPAGEOFF]
Lloh70:
	ldr	w0, [x8]
	ldr	w1, [x20, #32]
LBB0_3:
	bl	_EHCA_BMASK_SET
Lloh71:
	adrp	x8, _H_ALLOC_RESOURCE@GOTPAGE
Lloh72:
	ldr	x8, [x8, _H_ALLOC_RESOURCE@GOTPAGEOFF]
Lloh73:
	ldr	w8, [x8]
	ldp	w5, w4, [x20, #164]
	ldr	w6, [x20, #160]
	sub	sp, sp, #16
	stp	w24, w0, [sp, #4]
	str	w25, [sp]
	mov	x0, x8
	mov	x1, x22
	mov	x2, x19
	mov	x3, x23
	bl	_ehca_plpar_hcall9
	add	sp, sp, #16
	mov	x23, x0
	ldp	x8, x9, [x22]
	str	x8, [x20, #40]
	str	x9, [x20, #136]
Lloh74:
	adrp	x8, _H_ALL_RES_QP_ACT_OUTST_SEND_WR@GOTPAGE
Lloh75:
	ldr	x8, [x8, _H_ALL_RES_QP_ACT_OUTST_SEND_WR@GOTPAGEOFF]
Lloh76:
	ldr	w0, [x8]
	ldr	x1, [x22, #16]
	bl	_EHCA_BMASK_GET
	str	x0, [x20, #128]
Lloh77:
	adrp	x8, _H_ALL_RES_QP_ACT_OUTST_RECV_WR@GOTPAGE
Lloh78:
	ldr	x8, [x8, _H_ALL_RES_QP_ACT_OUTST_RECV_WR@GOTPAGEOFF]
Lloh79:
	ldr	w0, [x8]
	ldr	x1, [x22, #16]
	bl	_EHCA_BMASK_GET
	str	x0, [x20, #88]
Lloh80:
	adrp	x8, _H_ALL_RES_QP_ACT_SEND_SGE@GOTPAGE
Lloh81:
	ldr	x8, [x8, _H_ALL_RES_QP_ACT_SEND_SGE@GOTPAGEOFF]
Lloh82:
	ldr	w0, [x8]
	ldr	x1, [x22, #24]
	bl	_EHCA_BMASK_GET
	str	x0, [x20, #120]
Lloh83:
	adrp	x8, _H_ALL_RES_QP_ACT_RECV_SGE@GOTPAGE
Lloh84:
	ldr	x8, [x8, _H_ALL_RES_QP_ACT_RECV_SGE@GOTPAGEOFF]
Lloh85:
	ldr	w0, [x8]
	ldr	x1, [x22, #24]
	bl	_EHCA_BMASK_GET
	str	x0, [x20, #80]
Lloh86:
	adrp	x8, _H_ALL_RES_QP_SQUEUE_SIZE_PAGES@GOTPAGE
Lloh87:
	ldr	x8, [x8, _H_ALL_RES_QP_SQUEUE_SIZE_PAGES@GOTPAGEOFF]
Lloh88:
	ldr	w0, [x8]
	ldr	x1, [x22, #32]
	bl	_EHCA_BMASK_GET
	str	x0, [x20, #112]
Lloh89:
	adrp	x8, _H_ALL_RES_QP_RQUEUE_SIZE_PAGES@GOTPAGE
Lloh90:
	ldr	x8, [x8, _H_ALL_RES_QP_RQUEUE_SIZE_PAGES@GOTPAGEOFF]
Lloh91:
	ldr	w0, [x8]
	ldr	x1, [x22, #32]
	bl	_EHCA_BMASK_GET
	str	x0, [x20, #72]
Lloh92:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh93:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh94:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_6
; %bb.4:
	add	x0, x20, #48
	ldr	x2, [x22, #48]
	mov	x1, x21
	mov	x3, x2
	bl	_hcp_galpas_ctor
	cbz	w0, LBB0_6
; %bb.5:
	mov	x1, x0
	ldr	x8, [x22, #48]
	str	x8, [sp, #-16]!
Lloh95:
	adrp	x0, l_.str@PAGE
Lloh96:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ehca_gen_err
	add	sp, sp, #16
Lloh97:
	adrp	x8, _H_FREE_RESOURCE@GOTPAGE
Lloh98:
	ldr	x8, [x8, _H_FREE_RESOURCE@GOTPAGEOFF]
Lloh99:
	ldr	w0, [x8]
	ldr	x2, [x20, #40]
	mov	x1, x19
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_ehca_plpar_hcall_norets
Lloh100:
	adrp	x8, _H_NO_MEM@GOTPAGE
Lloh101:
	ldr	x8, [x8, _H_NO_MEM@GOTPAGEOFF]
Lloh102:
	ldr	w23, [x8]
LBB0_6:
Lloh103:
	adrp	x8, _H_NOT_ENOUGH_RESOURCES@GOTPAGE
Lloh104:
	ldr	x8, [x8, _H_NOT_ENOUGH_RESOURCES@GOTPAGEOFF]
Lloh105:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_8
; %bb.7:
Lloh106:
	adrp	x0, l_.str.1@PAGE
Lloh107:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	bl	_ehca_gen_err
LBB0_8:
	ldur	x8, [x29, #-72]
Lloh108:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh109:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh110:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x23
	sub	sp, x29, #64
	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
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh100, Lloh101, Lloh102
	.loh AdrpLdrGotLdr	Lloh97, Lloh98, Lloh99
	.loh AdrpAdd	Lloh95, Lloh96
	.loh AdrpLdrGotLdr	Lloh103, Lloh104, Lloh105
	.loh AdrpAdd	Lloh106, Lloh107
	.loh AdrpLdrGotLdr	Lloh108, Lloh109, Lloh110
	.cfi_endproc
                                        ; -- End function
	.comm	_PLPAR_HCALL9_BUFSIZE,4,2       ; @PLPAR_HCALL9_BUFSIZE
	.comm	_H_ALL_RES_QP_ENHANCED_OPS,4,2  ; @H_ALL_RES_QP_ENHANCED_OPS
	.comm	_H_ALL_RES_QP_PTE_PIN,4,2       ; @H_ALL_RES_QP_PTE_PIN
	.comm	_H_ALL_RES_QP_SERVICE_TYPE,4,2  ; @H_ALL_RES_QP_SERVICE_TYPE
	.comm	_H_ALL_RES_QP_SIGNALING_TYPE,4,2 ; @H_ALL_RES_QP_SIGNALING_TYPE
	.comm	_H_ALL_RES_QP_STORAGE,4,2       ; @H_ALL_RES_QP_STORAGE
	.comm	_H_ALL_RES_QP_SMALL_SQ_PAGE_SIZE,4,2 ; @H_ALL_RES_QP_SMALL_SQ_PAGE_SIZE
	.comm	_H_ALL_RES_QP_SMALL_RQ_PAGE_SIZE,4,2 ; @H_ALL_RES_QP_SMALL_RQ_PAGE_SIZE
	.comm	_H_ALL_RES_QP_LL_RQ_CQE_POSTING,4,2 ; @H_ALL_RES_QP_LL_RQ_CQE_POSTING
	.comm	_LLQP_RECV_COMP,4,2             ; @LLQP_RECV_COMP
	.comm	_H_ALL_RES_QP_LL_SQ_CQE_POSTING,4,2 ; @H_ALL_RES_QP_LL_SQ_CQE_POSTING
	.comm	_LLQP_SEND_COMP,4,2             ; @LLQP_SEND_COMP
	.comm	_H_ALL_RES_QP_UD_AV_LKEY_CTRL,4,2 ; @H_ALL_RES_QP_UD_AV_LKEY_CTRL
	.comm	_H_ALL_RES_QP_RESOURCE_TYPE,4,2 ; @H_ALL_RES_QP_RESOURCE_TYPE
	.comm	_H_ALL_RES_QP_MAX_OUTST_SEND_WR,4,2 ; @H_ALL_RES_QP_MAX_OUTST_SEND_WR
	.comm	_H_ALL_RES_QP_MAX_OUTST_RECV_WR,4,2 ; @H_ALL_RES_QP_MAX_OUTST_RECV_WR
	.comm	_H_ALL_RES_QP_MAX_SEND_SGE,4,2  ; @H_ALL_RES_QP_MAX_SEND_SGE
	.comm	_H_ALL_RES_QP_MAX_RECV_SGE,4,2  ; @H_ALL_RES_QP_MAX_RECV_SGE
	.comm	_H_ALL_RES_QP_SRQ_QP_TOKEN,4,2  ; @H_ALL_RES_QP_SRQ_QP_TOKEN
	.comm	_EQPT_SRQ,8,3                   ; @EQPT_SRQ
	.comm	_H_ALL_RES_QP_SRQ_LIMIT,4,2     ; @H_ALL_RES_QP_SRQ_LIMIT
	.comm	_H_ALL_RES_QP_SRQ_QPN,4,2       ; @H_ALL_RES_QP_SRQ_QPN
	.comm	_H_ALLOC_RESOURCE,4,2           ; @H_ALLOC_RESOURCE
	.comm	_H_ALL_RES_QP_ACT_OUTST_SEND_WR,4,2 ; @H_ALL_RES_QP_ACT_OUTST_SEND_WR
	.comm	_H_ALL_RES_QP_ACT_OUTST_RECV_WR,4,2 ; @H_ALL_RES_QP_ACT_OUTST_RECV_WR
	.comm	_H_ALL_RES_QP_ACT_SEND_SGE,4,2  ; @H_ALL_RES_QP_ACT_SEND_SGE
	.comm	_H_ALL_RES_QP_ACT_RECV_SGE,4,2  ; @H_ALL_RES_QP_ACT_RECV_SGE
	.comm	_H_ALL_RES_QP_SQUEUE_SIZE_PAGES,4,2 ; @H_ALL_RES_QP_SQUEUE_SIZE_PAGES
	.comm	_H_ALL_RES_QP_RQUEUE_SIZE_PAGES,4,2 ; @H_ALL_RES_QP_RQUEUE_SIZE_PAGES
	.comm	_H_SUCCESS,4,2                  ; @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not establish HW access. rc=%d paddr=%#lx"

	.comm	_H_FREE_RESOURCE,4,2            ; @H_FREE_RESOURCE
	.comm	_H_NO_MEM,4,2                   ; @H_NO_MEM
	.comm	_H_NOT_ENOUGH_RESOURCES,4,2     ; @H_NOT_ENOUGH_RESOURCES
l_.str.1:                               ; @.str.1
	.asciz	"Not enough resources. ret=%lli"

.subsections_via_symbols
