	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function am79c961_ramtest
_am79c961_ramtest:                      ## @am79c961_ramtest
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$65536, %edi                    ## imm = 0x10000
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	%ebx, %esi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_memset
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_am_writebuffer
	movl	%ebx, %esi
	xorl	$255, %esi
	movq	%r14, %rdi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_memset
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_am_readbuffer
	leaq	L_.str.1(%rip), %r13
	xorl	%r15d, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	cmpq	$65536, %r15                    ## imm = 0x10000
	je	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r14,%r15), %ecx
	testl	%r12d, %r12d
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%ebx, %ecx
	jne	LBB0_13
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%r12d, %r12d
	setne	%al
	movl	$0, %r12d
	movb	%al, %r12b
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%ebx, %ecx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_printk
	jmp	LBB0_8
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_printk
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	leaq	1(%r15), %rax
	movl	$1, %r12d
	cmpq	$65535, %r15                    ## imm = 0xFFFF
	movq	%rax, %r15
	jne	LBB0_3
	jmp	LBB0_10
LBB0_9:
	testl	%r12d, %r12d
	je	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_12
LBB0_1:
	xorl	%eax, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: buffer error (%02X %02X) %05X - "

L_.str.1:                               ## @.str.1
	.asciz	"%05X\n"

L_.str.2:                               ## @.str.2
	.asciz	"10000\n"

	.no_dead_strip	_am79c961_ramtest
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function am79c961_ramtest
_am79c961_ramtest:                      ; @am79c961_ramtest
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #65536
	bl	_kmalloc
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
	mov	x1, x20
	mov	w2, #65536
	bl	_memset
	mov	x0, x21
	mov	w1, #0
	mov	x2, x19
	mov	w3, #65536
	bl	_am_writebuffer
	eor	w1, w20, #0xff
	mov	x0, x19
	mov	w2, #65536
	bl	_memset
	mov	x0, x21
	mov	w1, #0
	mov	x2, x19
	mov	w3, #65536
	bl	_am_readbuffer
	mov	x25, #0
	mov	w22, #0
	mov	w8, #0
Lloh3:
	adrp	x23, l_.str.1@PAGE
Lloh4:
	add	x23, x23, l_.str.1@PAGEOFF
	mov	w26, #65537
Lloh5:
	adrp	x24, l_.str@PAGE
Lloh6:
	add	x24, x24, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	add	x25, x25, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	x8, x10
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x25, x25, #1
	cmp	x25, x26
	b.eq	LBB0_11
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x9, x19, x25
	ldurb	w9, [x9, #-1]
	cbnz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w9, w20
	b.ne	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=2
	cmp	w8, #0
	cset	w10, ne
	cbz	w8, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x8, x10
	cmp	w9, w20
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=2
	sub	x8, x25, #1
	str	x8, [sp]
	mov	x0, x23
	bl	_printk
	mov	w8, #0
	b	LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x8, x25, #1
	ldr	w10, [x21]
	stp	x9, x8, [sp, #16]
	stp	x10, x20, [sp]
	mov	x0, x24
	bl	_printk
	add	w22, w22, #1
	mov	w8, #1
	cmp	x25, #16, lsl #12               ; =65536
	b.ne	LBB0_2
	b	LBB0_12
LBB0_11:
	cbz	w8, LBB0_13
LBB0_12:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printk
LBB0_13:
	mov	x0, x19
	bl	_kfree
	b	LBB0_15
LBB0_14:
	mov	w22, #0
LBB0_15:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: buffer error (%02X %02X) %05X - "

l_.str.1:                               ; @.str.1
	.asciz	"%05X\n"

l_.str.2:                               ; @.str.2
	.asciz	"10000\n"

	.no_dead_strip	_am79c961_ramtest
.subsections_via_symbols
