	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioc3_ssram_disc
_ioc3_ssram_disc:                       ## @ioc3_ssram_disc
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	16(%rdi), %r12
	leaq	65536(%rbx), %r15
	movq	%r12, %rdi
	callq	_readl
	movq	_EMCR_BUFSIZ@GOTPCREL(%rip), %rcx
	movq	_EMCR_RAMPAR@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_writel
	movq	%r12, %rdi
	callq	_readl
	movl	$21845, %edi                    ## imm = 0x5555
	movq	%rbx, %rsi
	callq	_writel
	movq	_IOC3_SSRAM_DM@GOTPCREL(%rip), %r13
	movl	$-21846, %edi                   ## imm = 0xAAAA
	andl	(%r13), %edi
	movq	%r15, %rsi
	callq	_writel
	movq	%rbx, %rdi
	callq	_readl
	andl	(%r13), %eax
	cmpl	$21845, %eax                    ## imm = 0x5555
	jne	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	callq	_readl
	xorl	$-21846, %eax                   ## imm = 0xAAAA
	testl	%eax, (%r13)
	je	LBB0_2
LBB0_3:
	movq	_EMCR_RAMPAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
	movq	%r12, %rdi
	callq	_readl
	movq	_EMCR_BUFSIZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	%r12, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_2:
	movq	_EMCR_RAMPAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EMCR_BUFSIZ@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	%eax, 8(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMCR_BUFSIZ,4,2                ## @EMCR_BUFSIZ
	.comm	_EMCR_RAMPAR,4,2                ## @EMCR_RAMPAR
	.comm	_IOC3_SSRAM_DM,4,2              ## @IOC3_SSRAM_DM
	.no_dead_strip	_ioc3_ssram_disc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioc3_ssram_disc
_ioc3_ssram_disc:                       ; @ioc3_ssram_disc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	ldr	x19, [x0, #16]
	ldr	x22, [x0]
	add	x21, x22, #16, lsl #12          ; =65536
	mov	x0, x19
	bl	_readl
Lloh0:
	adrp	x23, _EMCR_BUFSIZ@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EMCR_BUFSIZ@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x24, _EMCR_RAMPAR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _EMCR_RAMPAR@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w8, w0
	orr	w0, w8, w9
	mov	x1, x19
	bl	_writel
	mov	x0, x19
	bl	_readl
	mov	w27, #21845
	mov	w0, #21845
	mov	x1, x22
	bl	_writel
Lloh4:
	adrp	x25, _IOC3_SSRAM_DM@GOTPAGE
Lloh5:
	ldr	x25, [x25, _IOC3_SSRAM_DM@GOTPAGEOFF]
	ldr	w8, [x25]
	mov	w26, #-21846
	and	w0, w8, w26
	mov	x1, x21
	bl	_writel
	mov	x0, x22
	bl	_readl
	ldr	w8, [x25]
	and	w8, w8, w0
	cmp	w8, w27
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_readl
	ldr	w8, [x25]
	eor	w9, w0, w26
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
	ldr	w8, [x24]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
	mov	x0, x19
	bl	_readl
	ldr	w8, [x23]
	bic	w0, w0, w8
	mov	x1, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_writel
LBB0_3:
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x20, #8]
	orr	w8, w8, w9
	str	w8, [x20, #8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EMCR_BUFSIZ,4,2                ; @EMCR_BUFSIZ
	.comm	_EMCR_RAMPAR,4,2                ; @EMCR_RAMPAR
	.comm	_IOC3_SSRAM_DM,4,2              ; @IOC3_SSRAM_DM
	.no_dead_strip	_ioc3_ssram_disc
.subsections_via_symbols
