	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmc_v9_0_get_vbios_fb_size
_gmc_v9_0_get_vbios_fb_size:            ## @gmc_v9_0_get_vbios_fb_size
	.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
	callq	_gmc_v9_0_keep_stolen_memory
	movl	$9437184, %ebx                  ## imm = 0x900000
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	movq	_DCE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_mmD1VGA_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_D1VGA_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_D1VGA_MODE_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_REG_GET_FIELD
	movl	%eax, %ecx
	movl	$9437184, %eax                  ## imm = 0x900000
	testl	%ecx, %ecx
	jne	LBB0_3
## %bb.2:
	movl	$-131, %eax
	addl	(%r14), %eax
	cmpl	$2, %eax
	movl	(%r15), %edi
	movq	_SCL0_VIEWPORT_SIZE@GOTPCREL(%rip), %r13
	cmovbq	_HUBP0_DCSURF_PRI_VIEWPORT_DIMENSION@GOTPCREL(%rip), %r13
	movq	_mmSCL0_VIEWPORT_SIZE@GOTPCREL(%rip), %rax
	cmovbq	_mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_VIEWPORT_HEIGHT@GOTPCREL(%rip), %r12
	cmovbq	_PRI_VIEWPORT_HEIGHT@GOTPCREL(%rip), %r12
	movq	_VIEWPORT_WIDTH@GOTPCREL(%rip), %r15
	cmovbq	_PRI_VIEWPORT_WIDTH@GOTPCREL(%rip), %r15
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movl	(%r13), %esi
	movl	(%r12), %edx
	movl	%eax, %edi
	movl	%eax, %r12d
	callq	_REG_GET_FIELD
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r13), %esi
	movl	(%r15), %edx
	movl	%r12d, %edi
	callq	_REG_GET_FIELD
	imull	-44(%rbp), %eax                 ## 4-byte Folded Reload
	shll	$2, %eax
LBB0_3:
	movl	4(%r14), %ecx
	subl	%eax, %ecx
	cmpl	$8388608, %ecx                  ## imm = 0x800000
	cmovael	%eax, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCE,4,2                        ## @DCE
	.comm	_mmD1VGA_CONTROL,4,2            ## @mmD1VGA_CONTROL
	.comm	_D1VGA_CONTROL,4,2              ## @D1VGA_CONTROL
	.comm	_D1VGA_MODE_ENABLE,4,2          ## @D1VGA_MODE_ENABLE
	.comm	_mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION,4,2 ## @mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION
	.comm	_HUBP0_DCSURF_PRI_VIEWPORT_DIMENSION,4,2 ## @HUBP0_DCSURF_PRI_VIEWPORT_DIMENSION
	.comm	_PRI_VIEWPORT_HEIGHT,4,2        ## @PRI_VIEWPORT_HEIGHT
	.comm	_PRI_VIEWPORT_WIDTH,4,2         ## @PRI_VIEWPORT_WIDTH
	.comm	_mmSCL0_VIEWPORT_SIZE,4,2       ## @mmSCL0_VIEWPORT_SIZE
	.comm	_SCL0_VIEWPORT_SIZE,4,2         ## @SCL0_VIEWPORT_SIZE
	.comm	_VIEWPORT_HEIGHT,4,2            ## @VIEWPORT_HEIGHT
	.comm	_VIEWPORT_WIDTH,4,2             ## @VIEWPORT_WIDTH
	.no_dead_strip	_gmc_v9_0_get_vbios_fb_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmc_v9_0_get_vbios_fb_size
_gmc_v9_0_get_vbios_fb_size:            ; @gmc_v9_0_get_vbios_fb_size
	.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	x19, x0
	bl	_gmc_v9_0_keep_stolen_memory
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #9437184
	b	LBB0_6
LBB0_2:
Lloh0:
	adrp	x20, _DCE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DCE@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _mmD1VGA_CONTROL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mmD1VGA_CONTROL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh5:
	adrp	x8, _D1VGA_CONTROL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _D1VGA_CONTROL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _D1VGA_MODE_ENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _D1VGA_MODE_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_REG_GET_FIELD
	cbz	w0, LBB0_4
; %bb.3:
	mov	w8, #9437184
	b	LBB0_5
LBB0_4:
	ldr	w8, [x19]
	sub	w8, w8, #131
	ldr	w0, [x20]
Lloh11:
	adrp	x9, _SCL0_VIEWPORT_SIZE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SCL0_VIEWPORT_SIZE@GOTPAGEOFF]
Lloh13:
	adrp	x10, _HUBP0_DCSURF_PRI_VIEWPORT_DIMENSION@GOTPAGE
Lloh14:
	ldr	x10, [x10, _HUBP0_DCSURF_PRI_VIEWPORT_DIMENSION@GOTPAGEOFF]
	cmp	w8, #2
	csel	x22, x10, x9, lo
Lloh15:
	adrp	x8, _mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION@GOTPAGEOFF]
Lloh17:
	adrp	x9, _mmSCL0_VIEWPORT_SIZE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _mmSCL0_VIEWPORT_SIZE@GOTPAGEOFF]
	csel	x8, x8, x9, lo
	ldr	w2, [x8]
Lloh19:
	adrp	x8, _PRI_VIEWPORT_HEIGHT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PRI_VIEWPORT_HEIGHT@GOTPAGEOFF]
Lloh21:
	adrp	x9, _VIEWPORT_HEIGHT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _VIEWPORT_HEIGHT@GOTPAGEOFF]
	csel	x21, x8, x9, lo
Lloh23:
	adrp	x8, _PRI_VIEWPORT_WIDTH@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PRI_VIEWPORT_WIDTH@GOTPAGEOFF]
Lloh25:
	adrp	x9, _VIEWPORT_WIDTH@GOTPAGE
Lloh26:
	ldr	x9, [x9, _VIEWPORT_WIDTH@GOTPAGEOFF]
	csel	x23, x8, x9, lo
	mov	w1, #0
	bl	_RREG32_SOC15
	mov	x20, x0
	ldr	w1, [x22]
	ldr	w2, [x21]
	bl	_REG_GET_FIELD
	mov	x21, x0
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x20
	bl	_REG_GET_FIELD
	mul	w8, w0, w21
	lsl	w8, w8, #2
LBB0_5:
	ldr	w9, [x19, #4]
	sub	w9, w9, w8
	cmp	w9, #2048, lsl #12              ; =8388608
	csel	w0, wzr, w8, lo
LBB0_6:
	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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DCE,4,2                        ; @DCE
	.comm	_mmD1VGA_CONTROL,4,2            ; @mmD1VGA_CONTROL
	.comm	_D1VGA_CONTROL,4,2              ; @D1VGA_CONTROL
	.comm	_D1VGA_MODE_ENABLE,4,2          ; @D1VGA_MODE_ENABLE
	.comm	_mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION,4,2 ; @mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION
	.comm	_HUBP0_DCSURF_PRI_VIEWPORT_DIMENSION,4,2 ; @HUBP0_DCSURF_PRI_VIEWPORT_DIMENSION
	.comm	_PRI_VIEWPORT_HEIGHT,4,2        ; @PRI_VIEWPORT_HEIGHT
	.comm	_PRI_VIEWPORT_WIDTH,4,2         ; @PRI_VIEWPORT_WIDTH
	.comm	_mmSCL0_VIEWPORT_SIZE,4,2       ; @mmSCL0_VIEWPORT_SIZE
	.comm	_SCL0_VIEWPORT_SIZE,4,2         ; @SCL0_VIEWPORT_SIZE
	.comm	_VIEWPORT_HEIGHT,4,2            ; @VIEWPORT_HEIGHT
	.comm	_VIEWPORT_WIDTH,4,2             ; @VIEWPORT_WIDTH
	.no_dead_strip	_gmc_v9_0_get_vbios_fb_size
.subsections_via_symbols
