	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psp_v11_0_xgmi_get_topology_info
_psp_v11_0_xgmi_get_topology_info:      ## @psp_v11_0_xgmi_get_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_2
## %bb.1:
	movq	%rdx, %r12
	movl	(%rdx), %eax
	movq	_TA_XGMI__MAX_CONNECTED_NODES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_22
LBB0_3:
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	(%rdi), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_TA_COMMAND_XGMI__GET_GET_TOPOLOGY_INFO@GOTPCREL(%rip), %r8
	movl	(%r8), %esi
	movl	%esi, 16(%r14)
	movl	%ebx, 24(%r14)
	testl	%ebx, %ebx
	jle	LBB0_12
## %bb.4:
	movq	8(%r12), %rcx
	movq	32(%r14), %rdx
	movl	%ebx, %edi
	leaq	-1(%rdi), %rax
	movl	%edi, %esi
	andl	$3, %esi
	cmpq	$3, %rax
	jae	LBB0_6
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_6:
	andl	$-4, %edi
	movl	$48, %eax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movups	-48(%rcx,%rax), %xmm0
	movups	%xmm0, -48(%rdx,%rax)
	movups	-32(%rcx,%rax), %xmm0
	movups	%xmm0, -32(%rdx,%rax)
	movups	-16(%rcx,%rax), %xmm0
	movups	%xmm0, -16(%rdx,%rax)
	movups	(%rcx,%rax), %xmm0
	movups	%xmm0, (%rdx,%rax)
	addq	$4, %rbx
	addq	$64, %rax
	cmpq	%rbx, %rdi
	jne	LBB0_7
LBB0_8:
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.9:
	shlq	$4, %rbx
	addq	%rbx, %rdx
	addq	%rbx, %rcx
	shlq	$4, %rsi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rcx,%rax), %xmm0
	movups	%xmm0, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rax, %rsi
	jne	LBB0_10
LBB0_11:
	movl	(%r8), %esi
LBB0_12:
	movq	%r15, %rdi
	callq	_psp_xgmi_invoke
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	je	LBB0_13
LBB0_22:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	(%r14), %edi
	movl	%edi, (%r12)
	testl	%edi, %edi
	jle	LBB0_14
## %bb.15:
	movq	8(%r14), %rcx
	movq	8(%r12), %rdx
	leaq	-1(%rdi), %rsi
	movl	%edi, %r8d
	andl	$3, %r8d
	xorl	%eax, %eax
	cmpq	$3, %rsi
	jae	LBB0_17
## %bb.16:
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_17:
	andl	$-4, %edi
	movl	$48, %esi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movups	-48(%rcx,%rsi), %xmm0
	movups	%xmm0, -48(%rdx,%rsi)
	movups	-32(%rcx,%rsi), %xmm0
	movups	%xmm0, -32(%rdx,%rsi)
	movups	-16(%rcx,%rsi), %xmm0
	movups	%xmm0, -16(%rdx,%rsi)
	movups	(%rcx,%rsi), %xmm0
	movups	%xmm0, (%rdx,%rsi)
	addq	$4, %rbx
	addq	$64, %rsi
	cmpq	%rbx, %rdi
	jne	LBB0_18
LBB0_19:
	testq	%r8, %r8
	je	LBB0_22
## %bb.20:
	shlq	$4, %rbx
	addq	%rbx, %rdx
	addq	%rbx, %rcx
	shlq	$4, %r8
	xorl	%eax, %eax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rcx,%rsi), %xmm0
	movups	%xmm0, (%rdx,%rsi)
	addq	$16, %rsi
	cmpq	%rsi, %r8
	jne	LBB0_21
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_TA_XGMI__MAX_CONNECTED_NODES,4,2 ## @TA_XGMI__MAX_CONNECTED_NODES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TA_COMMAND_XGMI__GET_GET_TOPOLOGY_INFO,4,2 ## @TA_COMMAND_XGMI__GET_GET_TOPOLOGY_INFO
	.no_dead_strip	_psp_v11_0_xgmi_get_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_get_topology_info
_psp_v11_0_xgmi_get_topology_info:      ; @psp_v11_0_xgmi_get_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	x19, x2
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _TA_XGMI__MAX_CONNECTED_NODES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TA_XGMI__MAX_CONNECTED_NODES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_22
LBB0_3:
	mov	x22, x1
	mov	x21, x0
	ldr	x20, [x0]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh6:
	adrp	x8, _TA_COMMAND_XGMI__GET_GET_TOPOLOGY_INFO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TA_COMMAND_XGMI__GET_GET_TOPOLOGY_INFO@GOTPAGEOFF]
	ldr	w1, [x8]
	str	w1, [x20, #16]
	str	w22, [x20, #24]
	cmp	w22, #1
	b.lt	LBB0_12
; %bb.4:
	ldr	x11, [x19, #8]
	ldr	x10, [x20, #32]
	mov	w9, w22
	cmp	w22, #8
	b.hs	LBB0_6
; %bb.5:
	mov	x12, #0
	b	LBB0_9
LBB0_6:
	and	x12, x9, #0xfffffff8
	add	x13, x11, #64
	add	x14, x10, #64
	mov	x15, x12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q0, [x13, #-64]
	ldp	q3, q2, [x13, #-32]
	ldp	q5, q4, [x13]
	ldp	q7, q6, [x13, #32]
	stp	q3, q2, [x14, #-32]
	stp	q1, q0, [x14, #-64]
	stp	q7, q6, [x14, #32]
	add	x13, x13, #128
	stp	q5, q4, [x14], #128
	subs	x15, x15, #8
	b.ne	LBB0_7
; %bb.8:
	cmp	x12, x9
	b.eq	LBB0_11
LBB0_9:
	lsl	x13, x12, #4
	add	x11, x11, x13
	add	x10, x10, x13
	sub	x9, x9, x12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	q0, [x11], #16
	str	q0, [x10], #16
	subs	x9, x9, #1
	b.ne	LBB0_10
LBB0_11:
	ldr	w1, [x8]
LBB0_12:
	mov	x0, x21
	bl	_psp_xgmi_invoke
	cbnz	w0, LBB0_22
; %bb.13:
	ldr	w8, [x20]
	str	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.14:
	ldr	x10, [x20, #8]
	ldr	x9, [x19, #8]
	cmp	w8, #8
	b.hs	LBB0_16
; %bb.15:
	mov	x11, #0
	b	LBB0_19
LBB0_16:
	and	x11, x8, #0xfffffff8
	add	x12, x10, #64
	add	x13, x9, #64
	mov	x14, x11
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q0, [x12, #-64]
	ldp	q3, q2, [x12, #-32]
	ldp	q5, q4, [x12]
	ldp	q7, q6, [x12, #32]
	stp	q3, q2, [x13, #-32]
	stp	q1, q0, [x13, #-64]
	stp	q7, q6, [x13, #32]
	add	x12, x12, #128
	stp	q5, q4, [x13], #128
	subs	x14, x14, #8
	b.ne	LBB0_17
; %bb.18:
	cmp	x11, x8
	b.eq	LBB0_21
LBB0_19:
	lsl	x12, x11, #4
	add	x10, x10, x12
	add	x9, x9, x12
	sub	x8, x8, x11
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	q0, [x10], #16
	str	q0, [x9], #16
	subs	x8, x8, #1
	b.ne	LBB0_20
LBB0_21:
	mov	w0, #0
LBB0_22:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TA_XGMI__MAX_CONNECTED_NODES,4,2 ; @TA_XGMI__MAX_CONNECTED_NODES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TA_COMMAND_XGMI__GET_GET_TOPOLOGY_INFO,4,2 ; @TA_COMMAND_XGMI__GET_GET_TOPOLOGY_INFO
	.no_dead_strip	_psp_v11_0_xgmi_get_topology_info
.subsections_via_symbols
