	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hipz_h_destroy_cq              ## -- Begin function hipz_h_destroy_cq
	.p2align	4, 0x90
_hipz_h_destroy_cq:                     ## @hipz_h_destroy_cq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movl	%edi, %r14d
	leaq	4(%rsi), %rdi
	callq	_hcp_galpas_dtor
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_ehca_gen_err
	movq	_H_RESOURCE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_4
LBB0_2:
	movq	_H_FREE_RESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	xorl	%ecx, %ecx
	testq	%r15, %r15
	setne	%cl
	movl	%r14d, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_ehca_plpar_hcall_norets
	addq	$16, %rsp
	movq	%rax, %rbx
	movq	_H_RESOURCE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_ehca_gen_err
LBB0_4:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not destruct cp->galpas"

	.comm	_H_RESOURCE,8,3                 ## @H_RESOURCE
	.comm	_H_FREE_RESOURCE,4,2            ## @H_FREE_RESOURCE
L_.str.1:                               ## @.str.1
	.asciz	"H_FREE_RESOURCE failed ret=%lli "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hipz_h_destroy_cq              ; -- Begin function hipz_h_destroy_cq
	.p2align	2
_hipz_h_destroy_cq:                     ; @hipz_h_destroy_cq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x0, x1, #4
	bl	_hcp_galpas_dtor
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ehca_gen_err
Lloh2:
	adrp	x8, _H_RESOURCE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _H_RESOURCE@GOTPAGEOFF]
Lloh4:
	ldr	x19, [x8]
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, _H_FREE_RESOURCE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _H_FREE_RESOURCE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w2, [x21]
	cmp	x20, #0
	cset	w3, ne
	mov	x1, x19
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_ehca_plpar_hcall_norets
	mov	x19, x0
Lloh8:
	adrp	x8, _H_RESOURCE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H_RESOURCE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
	str	x19, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ehca_gen_err
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not destruct cp->galpas"

	.comm	_H_RESOURCE,8,3                 ; @H_RESOURCE
	.comm	_H_FREE_RESOURCE,4,2            ; @H_FREE_RESOURCE
l_.str.1:                               ; @.str.1
	.asciz	"H_FREE_RESOURCE failed ret=%lli "

.subsections_via_symbols
