	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psp_v11_0_xgmi_set_topology_info
_psp_v11_0_xgmi_set_topology_info:      ## @psp_v11_0_xgmi_set_topology_info
	.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
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.1:
	movq	%rdx, %rbx
	movq	(%rdx), %rax
	movq	_TA_XGMI__MAX_CONNECTED_NODES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_2
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_TA_COMMAND_XGMI__SET_TOPOLOGY_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r12)
	movl	%r15d, 8(%r12)
	testl	%r15d, %r15d
	jle	LBB0_5
## %bb.3:
	movq	8(%rbx), %rcx
	movq	16(%r12), %rdx
	movl	%r15d, %esi
	addq	$8, %rcx
	shlq	$4, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %ebx
	movl	%ebx, 12(%rdx,%rdi)
	movl	-4(%rcx), %ebx
	movl	%ebx, 8(%rdx,%rdi)
	movl	$1, (%rdx,%rdi)
	movl	-8(%rcx), %ebx
	movl	%ebx, 4(%rdx,%rdi)
	addq	$12, %rcx
	addq	$16, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_4
LBB0_5:
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_psp_xgmi_invoke                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TA_XGMI__MAX_CONNECTED_NODES,8,3 ## @TA_XGMI__MAX_CONNECTED_NODES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TA_COMMAND_XGMI__SET_TOPOLOGY_INFO,4,2 ## @TA_COMMAND_XGMI__SET_TOPOLOGY_INFO
	.no_dead_strip	_psp_v11_0_xgmi_set_topology_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psp_v11_0_xgmi_set_topology_info
_psp_v11_0_xgmi_set_topology_info:      ; @psp_v11_0_xgmi_set_topology_info
	.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
	cbz	x2, LBB0_2
; %bb.1:
	mov	x21, x2
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _TA_XGMI__MAX_CONNECTED_NODES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TA_XGMI__MAX_CONNECTED_NODES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	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_3:
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0]
	mov	x0, x22
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh6:
	adrp	x8, _TA_COMMAND_XGMI__SET_TOPOLOGY_INFO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TA_COMMAND_XGMI__SET_TOPOLOGY_INFO@GOTPAGEOFF]
	ldr	w9, [x8]
	str	w9, [x22]
	str	w20, [x22, #8]
	cmp	w20, #1
	b.lt	LBB0_11
; %bb.4:
	ldr	x11, [x21, #8]
	ldr	x9, [x22, #16]
	mov	w10, w20
	cmp	w20, #8
	b.hs	LBB0_6
; %bb.5:
	mov	x12, #0
	b	LBB0_9
LBB0_6:
	and	x12, x10, #0xfffffff8
	add	x13, x9, #64
	movi.4s	v0, #1
	mov	x14, x12
	mov	x15, x11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x16, x15
	ld3.4s	{ v5, v6, v7 }, [x16], #48
	ld3.4s	{ v1, v2, v3 }, [x16]
	sub	x16, x13, #64
	mov.16b	v4, v0
	st4.4s	{ v4, v5, v6, v7 }, [x16]
	st4.4s	{ v0, v1, v2, v3 }, [x13]
	add	x15, x15, #96
	add	x13, x13, #128
	subs	x14, x14, #8
	b.ne	LBB0_7
; %bb.8:
	cmp	x12, x10
	b.eq	LBB0_11
LBB0_9:
	mov	w13, #12
	madd	x11, x12, x13, x11
	add	x11, x11, #8
	sub	x10, x10, x12
	add	x9, x9, x12, lsl #4
	mov	w12, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x11]
	str	w13, [x9, #12]
	str	w12, [x9]
	ldur	d0, [x11, #-8]
	stur	d0, [x9, #4]
	add	x11, x11, #12
	add	x9, x9, #16
	subs	x10, x10, #1
	b.ne	LBB0_10
LBB0_11:
	ldr	w1, [x8]
	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
	b	_psp_xgmi_invoke
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TA_XGMI__MAX_CONNECTED_NODES,8,3 ; @TA_XGMI__MAX_CONNECTED_NODES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TA_COMMAND_XGMI__SET_TOPOLOGY_INFO,4,2 ; @TA_COMMAND_XGMI__SET_TOPOLOGY_INFO
	.no_dead_strip	_psp_v11_0_xgmi_set_topology_info
.subsections_via_symbols
