	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_prepare_service_register_response ## -- Begin function server_prepare_service_register_response
	.p2align	4, 0x90
_server_prepare_service_register_response: ## @server_prepare_service_register_response
	.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
	movq	(%rdi), %rax
	leaq	(%rsi,%rsi,2), %r14
	shlq	$4, %r14
	cmpl	$0, 44(%rax,%r14)
	je	LBB0_9
## %bb.1:
	cmpl	$0, 40(%rax,%r14)
	je	LBB0_9
## %bb.2:
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movslq	(%r12), %r13
	cmpl	$7, %r13d
	jle	LBB0_9
## %bb.3:
	movq	%rsi, %rbx
	leaq	16(%r12), %rsi
	movq	16(%rax,%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	callq	_SDP_GET16
	callq	_profile_get_descriptor
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	leaq	(%r12,%r13,4), %r13
	addq	$16, %r13
	addq	$32, %r12
	subq	%r12, %r13
	sarq	$2, %r13
	movslq	(%rax), %rcx
	cmpq	%rcx, %r13
	jl	LBB0_9
## %bb.5:
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.6:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	*%rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r12, %rcx
	movl	%r13d, %r8d
	callq	_provider_register
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	%rax, %r12
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_SDP_PUT16
	movl	(%r12), %edi
	movq	%r13, %rsi
	callq	_SDP_PUT32
	movq	(%r15), %rax
	movq	24(%rax,%r14), %rcx
	addq	$-4, %rcx
	movq	%rcx, 32(%rax,%r14)
	subq	16(%rax,%r14), %r13
	shrq	$2, %r13
	movl	%r13d, (%rax,%r14)
	movq	$0, 8(%rax,%r14)
	jmp	LBB0_11
LBB0_9:
	movq	_SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rbx
LBB0_11:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_SDP_ERROR_CODE_INSUFFICIENT_RESOURCES@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX,8,3 ## @SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX
	.comm	_SDP_ERROR_CODE_INSUFFICIENT_RESOURCES,8,3 ## @SDP_ERROR_CODE_INSUFFICIENT_RESOURCES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_prepare_service_register_response ; -- Begin function server_prepare_service_register_response
	.p2align	2
_server_prepare_service_register_response: ; @server_prepare_service_register_response
	.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
	ldr	x9, [x0]
	mov	w8, #48
	madd	x8, x1, x8, x9
	ldr	w10, [x8, #44]
	cbz	w10, LBB0_2
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x24, [x0, #8]
	mov	x22, x24
	ldrsw	x25, [x22], #16
	mov	w10, #48
	madd	x9, x1, x10, x9
	ldr	w9, [x9, #40]
	cmp	w9, #0
	ccmp	w25, #7, #4, ne
	b.gt	LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX@GOTPAGEOFF]
LBB0_3:
	ldr	x0, [x8]
LBB0_4:
	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_5:
	ldr	x21, [x8, #16]
	mov	x1, x22
	bl	_SDP_GET16
	bl	_profile_get_descriptor
	cbz	x0, LBB0_2
; %bb.6:
	mov	x23, x0
	add	x8, x22, x25, lsl #2
	add	x24, x24, #32
	sub	x8, x8, x24
	ldrsw	x9, [x0]
	cmp	x9, x8, asr #2
	b.gt	LBB0_2
; %bb.7:
	ldr	x9, [x23, #8]
	cbz	x9, LBB0_2
; %bb.8:
	lsr	x25, x8, #2
	mov	x0, x24
	mov	x1, x25
	blr	x9
	cbz	x0, LBB0_2
; %bb.9:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x19
	mov	x3, x24
	mov	x4, x25
	bl	_provider_register
	cbz	x0, LBB0_11
; %bb.10:
	mov	x22, x0
	mov	w0, #0
	mov	x1, x21
	bl	_SDP_PUT16
	ldr	w0, [x22]
	mov	x1, x21
	bl	_SDP_PUT32
	mov	x0, #0
	ldr	x8, [x20]
	mov	w9, #48
	madd	x8, x19, x9, x8
	ldp	x10, x9, [x8, #16]
	sub	x9, x9, #4
	str	x9, [x8, #32]
	sub	x9, x21, x10
	lsr	x9, x9, #2
	str	w9, [x8]
	str	xzr, [x8, #8]
	b	LBB0_4
LBB0_11:
Lloh2:
	adrp	x8, _SDP_ERROR_CODE_INSUFFICIENT_RESOURCES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SDP_ERROR_CODE_INSUFFICIENT_RESOURCES@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX,8,3 ; @SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX
	.comm	_SDP_ERROR_CODE_INSUFFICIENT_RESOURCES,8,3 ; @SDP_ERROR_CODE_INSUFFICIENT_RESOURCES
.subsections_via_symbols
