	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_reply_packet
_create_reply_packet:                   ## @create_reply_packet
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	%rdx, %rdi
	callq	_hpsb_alloc_packet
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_HPSB_ERR
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_hpsb_async@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_hpsb_unused@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	%r15, 32(%rbx)
	movswl	6(%r12), %eax
	movl	%eax, (%rbx)
	movl	(%r12), %eax
	shrl	$10, %eax
	andl	$63, %eax
	movl	%eax, 4(%rbx)
	movl	$1, 8(%rbx)
	movq	%r15, %rdi
	callq	_get_hpsb_generation
	movl	%eax, 24(%rbx)
	testb	$3, %r14b
	je	LBB0_4
## %bb.3:
	movq	16(%rbx), %rax
	andq	$-4, %r14
	movq	$0, (%rax,%r14,2)
LBB0_4:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory, cannot send response packet"

	.comm	_hpsb_async,4,2                 ## @hpsb_async
	.comm	_hpsb_unused,4,2                ## @hpsb_unused
	.no_dead_strip	_create_reply_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_reply_packet
_create_reply_packet:                   ; @create_reply_packet
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	mov	x0, x2
	bl	_hpsb_alloc_packet
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPSB_ERR
	mov	x19, #0
	b	LBB0_4
LBB0_2:
Lloh2:
	adrp	x8, _hpsb_async@GOTPAGE
Lloh3:
	ldr	x8, [x8, _hpsb_async@GOTPAGEOFF]
Lloh4:
	adrp	x9, _hpsb_unused@GOTPAGE
Lloh5:
	ldr	x9, [x9, _hpsb_unused@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #40]
	str	x21, [x19, #32]
	ldrsh	w8, [x22, #6]
	str	w8, [x19]
	ldr	w8, [x22]
	ubfx	w8, w8, #10, #6
	mov	w9, #1
	stp	w8, w9, [x19, #4]
	mov	x0, x21
	bl	_get_hpsb_generation
	str	w0, [x19, #24]
	tst	x20, #0x3
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x19, #16]
	lsl	x9, x20, #1
	and	x9, x9, #0xfffffffffffffff8
	str	xzr, [x8, x9]
LBB0_4:
	mov	x0, x19
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory, cannot send response packet"

	.comm	_hpsb_async,4,2                 ; @hpsb_async
	.comm	_hpsb_unused,4,2                ; @hpsb_unused
	.no_dead_strip	_create_reply_packet
.subsections_via_symbols
