	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hipz_h_destroy_qp              ## -- Begin function hipz_h_destroy_qp
	.p2align	4, 0x90
_hipz_h_destroy_qp:                     ## @hipz_h_destroy_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%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, %rbx
	leaq	4(%r15), %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_6
LBB0_2:
	movq	_H_DISABLE_AND_GETC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %r8d
	subq	$8, %rsp
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movl	$1, %ecx
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_ehca_plpar_hcall9
	addq	$48, %rsp
	movq	_H_HARDWARE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_ehca_gen_err
LBB0_4:
	movq	_H_FREE_RESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	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_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_ehca_gen_err
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rax
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PLPAR_HCALL9_BUFSIZE,4,2       ## @PLPAR_HCALL9_BUFSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not destruct qp->galpas"

	.comm	_H_RESOURCE,8,3                 ## @H_RESOURCE
	.comm	_H_DISABLE_AND_GETC,4,2         ## @H_DISABLE_AND_GETC
	.comm	_H_HARDWARE,8,3                 ## @H_HARDWARE
L_.str.1:                               ## @.str.1
	.asciz	"HCA not operational. ret=%lli"

	.comm	_H_FREE_RESOURCE,4,2            ## @H_FREE_RESOURCE
L_.str.2:                               ## @.str.2
	.asciz	"Resource still in use. ret=%lli"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hipz_h_destroy_qp              ; -- Begin function hipz_h_destroy_qp
	.p2align	2
_hipz_h_destroy_qp:                     ; @hipz_h_destroy_qp
	.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
	sub	sp, sp, #16
	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, #-40]
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	x21, x9, x8
	mov	sp, x21
	add	x0, x1, #4
	bl	_hcp_galpas_dtor
	cbz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ehca_gen_err
Lloh10:
	adrp	x8, _H_RESOURCE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _H_RESOURCE@GOTPAGEOFF]
Lloh12:
	ldr	x19, [x8]
	b	LBB0_6
LBB0_2:
Lloh13:
	adrp	x8, _H_DISABLE_AND_GETC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _H_DISABLE_AND_GETC@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w4, [x20]
	sub	sp, sp, #16
	str	wzr, [sp, #8]
	str	xzr, [sp]
	mov	x1, x21
	mov	x2, x19
	mov	w3, #1
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_ehca_plpar_hcall9
	add	sp, sp, #16
Lloh16:
	adrp	x8, _H_HARDWARE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _H_HARDWARE@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
	str	x0, [sp, #-16]!
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ehca_gen_err
	add	sp, sp, #16
LBB0_4:
Lloh21:
	adrp	x8, _H_FREE_RESOURCE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _H_FREE_RESOURCE@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	w2, [x20]
	mov	x1, x19
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_ehca_plpar_hcall_norets
	mov	x19, x0
Lloh24:
	adrp	x8, _H_RESOURCE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _H_RESOURCE@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.5:
	str	x19, [sp, #-16]!
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ehca_gen_err
	add	sp, sp, #16
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	sub	sp, x29, #32
	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
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_PLPAR_HCALL9_BUFSIZE,4,2       ; @PLPAR_HCALL9_BUFSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not destruct qp->galpas"

	.comm	_H_RESOURCE,8,3                 ; @H_RESOURCE
	.comm	_H_DISABLE_AND_GETC,4,2         ; @H_DISABLE_AND_GETC
	.comm	_H_HARDWARE,8,3                 ; @H_HARDWARE
l_.str.1:                               ; @.str.1
	.asciz	"HCA not operational. ret=%lli"

	.comm	_H_FREE_RESOURCE,4,2            ; @H_FREE_RESOURCE
l_.str.2:                               ; @.str.2
	.asciz	"Resource still in use. ret=%lli"

.subsections_via_symbols
