	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function mgsl_memory_test
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	4                               ## 0x4
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_1:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_2:
	.quad	8                               ## 0x8
	.quad	8                               ## 0x8
LCPI0_3:
	.quad	16                              ## 0x10
	.quad	16                              ## 0x10
LCPI0_4:
	.quad	24                              ## 0x18
	.quad	24                              ## 0x18
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_mgsl_memory_test:                      ## @mgsl_memory_test
	.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	%rdi, %r15
	leaq	_mgsl_memory_test.BitPatterns(%rip), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	(%r15), %rcx
	movq	_MGSL_BUS_TYPE_PCI@GOTPCREL(%rip), %rdx
	movl	$1, %r14d
	cmpq	(%rdx), %rcx
	jne	LBB0_23
## %bb.1:
	movq	_SHARED_MEM_ADDRESS_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdx
	movq	8(%r15), %rcx
	testq	%rax, %rax
	je	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	movq	%rsi, (%rcx)
	cmpq	(%rbx), %rsi
	jne	LBB0_22
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$8, %rbx
	decq	%rax
	jne	LBB0_2
LBB0_4:
	cmpl	$7, %edx
	ja	LBB0_6
## %bb.5:
	movq	8(%r15), %rdi
	jmp	LBB0_21
LBB0_6:
	movq	%rdx, %rsi
	shrq	$3, %rsi
	cmpq	$2, %rsi
	movl	$1, %eax
	cmovaeq	%rsi, %rax
	cmpq	$4, %rax
	jae	LBB0_9
## %bb.7:
	xorl	%esi, %esi
	jmp	LBB0_16
LBB0_9:
	movq	%rax, %rsi
	andq	$-4, %rsi
	leaq	-4(%rsi), %rdi
	movq	%rdi, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.10:
	movq	%r8, %rdi
	andq	$-2, %rdi
	movdqa	LCPI0_1(%rip), %xmm0            ## xmm0 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	xorl	%ebx, %ebx
	movdqa	LCPI0_2(%rip), %xmm1            ## xmm1 = [8,8]
	movdqa	LCPI0_3(%rip), %xmm2            ## xmm2 = [16,16]
	movdqa	LCPI0_4(%rip), %xmm3            ## xmm3 = [24,24]
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm4
	psllq	$2, %xmm4
	movdqa	%xmm4, %xmm5
	paddq	%xmm1, %xmm5
	movdqu	%xmm4, (%rcx,%rbx,8)
	movdqu	%xmm5, 16(%rcx,%rbx,8)
	movdqa	%xmm4, %xmm5
	paddq	%xmm2, %xmm5
	paddq	%xmm3, %xmm4
	movdqu	%xmm5, 32(%rcx,%rbx,8)
	movdqu	%xmm4, 48(%rcx,%rbx,8)
	addq	$8, %rbx
	paddq	%xmm1, %xmm0
	addq	$-2, %rdi
	jne	LBB0_11
## %bb.12:
	psllq	$2, %xmm0
	testb	$1, %r8b
	je	LBB0_14
LBB0_13:
	movdqa	LCPI0_2(%rip), %xmm1            ## xmm1 = [8,8]
	paddq	%xmm0, %xmm1
	movdqu	%xmm0, (%rcx,%rbx,8)
	movdqu	%xmm1, 16(%rcx,%rbx,8)
LBB0_14:
	cmpq	%rsi, %rax
	je	LBB0_18
## %bb.15:
	leaq	(%rcx,%rsi,8), %rcx
LBB0_16:
	movq	%rax, %rdi
	subq	%rsi, %rdi
	shlq	$2, %rsi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsi, (%rcx,%rbx,8)
	incq	%rbx
	addq	$4, %rsi
	cmpq	%rbx, %rdi
	jne	LBB0_17
LBB0_18:
	movq	8(%r15), %rdi
	shlq	$2, %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%rdi,%rcx,2), %rcx
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	addq	$4, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_19
LBB0_21:
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	jmp	LBB0_23
LBB0_22:
	xorl	%r14d, %r14d
LBB0_23:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0]
	xorl	%ebx, %ebx
	testb	$1, %r8b
	jne	LBB0_13
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @mgsl_memory_test.BitPatterns
_mgsl_memory_test.BitPatterns:
	.quad	0                               ## 0x0
	.quad	1431655765                      ## 0x55555555
	.quad	2863311530                      ## 0xaaaaaaaa
	.quad	1717986918                      ## 0x66666666
	.quad	2576980377                      ## 0x99999999
	.quad	4294967295                      ## 0xffffffff
	.quad	305419896                       ## 0x12345678

	.comm	_SHARED_MEM_ADDRESS_SIZE,4,2    ## @SHARED_MEM_ADDRESS_SIZE
	.comm	_MGSL_BUS_TYPE_PCI,8,3          ## @MGSL_BUS_TYPE_PCI
	.no_dead_strip	_mgsl_memory_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function mgsl_memory_test
lCPI0_0:
	.quad	0                               ; 0x0
	.quad	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mgsl_memory_test:                      ; @mgsl_memory_test
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, _mgsl_memory_test.BitPatterns@PAGE
Lloh1:
	add	x0, x0, _mgsl_memory_test.BitPatterns@PAGEOFF
	bl	_ARRAY_SIZE
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _MGSL_BUS_TYPE_PCI@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MGSL_BUS_TYPE_PCI@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.1:
Lloh5:
	adrp	x8, _SHARED_MEM_ADDRESS_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SHARED_MEM_ADDRESS_SIZE@GOTPAGEOFF]
Lloh7:
	ldrsw	x2, [x8]
	ldr	x11, [x19, #8]
	cbz	x0, LBB0_5
; %bb.2:
Lloh8:
	adrp	x8, _mgsl_memory_test.BitPatterns@PAGE
Lloh9:
	add	x8, x8, _mgsl_memory_test.BitPatterns@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8]
	str	x9, [x11]
	ldr	x10, [x8]
	cmp	x9, x10
	b.ne	LBB0_19
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #8
	subs	x0, x0, #1
	b.ne	LBB0_3
LBB0_5:
	cmp	w2, #7
	b.hi	LBB0_7
; %bb.6:
	ldr	x0, [x19, #8]
	b	LBB0_17
LBB0_7:
	lsr	x8, x2, #3
	cmp	x8, #1
	csinc	x8, x8, xzr, hi
	cmp	x8, #8
	b.hs	LBB0_9
; %bb.8:
	mov	x10, #0
	mov	x9, x11
	b	LBB0_12
LBB0_9:
	and	x10, x8, #0x1ffffffffffffff8
	add	x9, x11, x10, lsl #3
Lloh10:
	adrp	x12, lCPI0_0@PAGE
Lloh11:
	ldr	q0, [x12, lCPI0_0@PAGEOFF]
	add	x11, x11, #32
	mov	w12, #8
	dup.2d	v1, x12
	mov	w12, #16
	dup.2d	v2, x12
	mov	w12, #24
	dup.2d	v3, x12
	mov	x12, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	shl.2d	v4, v0, #2
	add.2d	v5, v4, v1
	add.2d	v6, v4, v2
	add.2d	v7, v4, v3
	stp	q4, q5, [x11, #-32]
	stp	q6, q7, [x11], #64
	add.2d	v0, v0, v1
	subs	x12, x12, #8
	b.ne	LBB0_10
; %bb.11:
	cmp	x8, x10
	b.eq	LBB0_14
LBB0_12:
	sub	x11, x8, x10
	lsl	x10, x10, #2
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	str	x10, [x9], #8
	add	x10, x10, #4
	subs	x11, x11, #1
	b.ne	LBB0_13
LBB0_14:
	mov	x9, #0
	ldr	x0, [x19, #8]
	lsl	x8, x8, #2
	mov	x10, x0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	cmp	x9, x11
	b.ne	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x9, x9, #4
	add	x10, x10, #8
	cmp	x8, x9
	b.ne	LBB0_15
LBB0_17:
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
LBB0_18:
	mov	w0, #1
	b	LBB0_20
LBB0_19:
	mov	w0, #0
LBB0_20:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdr	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	3                               ; @mgsl_memory_test.BitPatterns
_mgsl_memory_test.BitPatterns:
	.quad	0                               ; 0x0
	.quad	1431655765                      ; 0x55555555
	.quad	2863311530                      ; 0xaaaaaaaa
	.quad	1717986918                      ; 0x66666666
	.quad	2576980377                      ; 0x99999999
	.quad	4294967295                      ; 0xffffffff
	.quad	305419896                       ; 0x12345678

	.comm	_SHARED_MEM_ADDRESS_SIZE,4,2    ; @SHARED_MEM_ADDRESS_SIZE
	.comm	_MGSL_BUS_TYPE_PCI,8,3          ; @MGSL_BUS_TYPE_PCI
	.no_dead_strip	_mgsl_memory_test
.subsections_via_symbols
