	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function combios_detect_ram
_combios_detect_ram:                    ## @combios_detect_ram
	.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
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	_RADEON_MEM_CNTL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32
	movq	_RV100_HALF_MODE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	%r14d, %ecx
	shrl	$31, %ecx
	addl	%r14d, %ecx
	sarl	%ecx
	movl	%ecx, %r14d
LBB0_2:
	andl	$-65281, %eax                   ## imm = 0xFFFF00FF
	shll	$8, %ebx
	movzwl	%bx, %esi
	orl	%eax, %esi
	movl	(%r15), %edi
	callq	_WREG32
	movl	(%r15), %edi
	callq	_RREG32
	movl	%r14d, %ebx
	shll	$20, %ebx
	addl	$-1048576, %ebx                 ## imm = 0xFFF00000
	movl	$-1, %r15d
	movq	_RADEON_MM_APER@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r15d
	cmpl	%r15d, %r14d
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-1048576(%rbx), %r13d
	movl	(%r12), %edi
	orl	%ebx, %edi
	movl	$-559038737, %esi               ## imm = 0xDEADBEEF
	callq	_WREG32_IDX
	orl	(%r12), %ebx
	movl	%ebx, %edi
	callq	_RREG32_IDX
	movl	%r13d, %ebx
	cmpl	$-559038737, %eax               ## imm = 0xDEADBEEF
	je	LBB0_3
## %bb.5:
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_MEM_CNTL,4,2            ## @RADEON_MEM_CNTL
	.comm	_RV100_HALF_MODE,4,2            ## @RV100_HALF_MODE
	.comm	_RADEON_MM_APER,4,2             ## @RADEON_MM_APER
	.no_dead_strip	_combios_detect_ram
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function combios_detect_ram
_combios_detect_ram:                    ; @combios_detect_ram
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x19, x1
	mov	w21, #48879
	movk	w21, #57005, lsl #16
Lloh0:
	adrp	x22, _RADEON_MEM_CNTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RADEON_MEM_CNTL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_RREG32
	mov	x1, x0
Lloh2:
	adrp	x8, _RV100_HALF_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RV100_HALF_MODE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w19, #0
	cinc	w9, w19, lt
	asr	w9, w9, #1
	tst	w8, w0
	csel	w19, w19, w9, eq
	bfi	w1, w20, #8, #8
	ldr	w0, [x22]
	bl	_WREG32
	ldr	w0, [x22]
	bl	_RREG32
	lsl	w8, w19, #20
	sub	w23, w8, #256, lsl #12          ; =1048576
	mov	w20, #-1
Lloh5:
	adrp	x22, _RADEON_MM_APER@GOTPAGE
Lloh6:
	ldr	x22, [x22, _RADEON_MM_APER@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	w20, w20, #1
	cmp	w19, w20
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w24, w23, #256, lsl #12         ; =1048576
	ldr	w8, [x22]
	orr	w0, w8, w23
	mov	w1, #48879
	movk	w1, #57005, lsl #16
	bl	_WREG32_IDX
	ldr	w8, [x22]
	orr	w0, w8, w23
	bl	_RREG32_IDX
	mov	x23, x24
	cmp	w0, w21
	b.eq	LBB0_1
; %bb.3:
	mov	w19, #0
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_MEM_CNTL,4,2            ; @RADEON_MEM_CNTL
	.comm	_RV100_HALF_MODE,4,2            ; @RV100_HALF_MODE
	.comm	_RADEON_MM_APER,4,2             ; @RADEON_MM_APER
	.no_dead_strip	_combios_detect_ram
.subsections_via_symbols
