	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmc_v6_0_get_vbios_fb_size
_gmc_v6_0_get_vbios_fb_size:            ## @gmc_v6_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_mmD1VGA_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	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_2
## %bb.1:
	movq	_mmVIEWPORT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %ebx
	movq	_VIEWPORT_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_VIEWPORT_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_REG_GET_FIELD
	movl	%eax, %r15d
	movl	(%r12), %esi
	movq	_VIEWPORT_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_REG_GET_FIELD
	imull	%r15d, %eax
	shll	$2, %eax
LBB0_2:
	movl	(%r14), %edx
	subl	%eax, %edx
	xorl	%ecx, %ecx
	cmpl	$8388608, %edx                  ## imm = 0x800000
	cmovael	%eax, %ecx
	movl	%ecx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mmD1VGA_CONTROL,4,2            ## @mmD1VGA_CONTROL
	.comm	_D1VGA_CONTROL,4,2              ## @D1VGA_CONTROL
	.comm	_D1VGA_MODE_ENABLE,4,2          ## @D1VGA_MODE_ENABLE
	.comm	_mmVIEWPORT_SIZE,4,2            ## @mmVIEWPORT_SIZE
	.comm	_VIEWPORT_SIZE,4,2              ## @VIEWPORT_SIZE
	.comm	_VIEWPORT_HEIGHT,4,2            ## @VIEWPORT_HEIGHT
	.comm	_VIEWPORT_WIDTH,4,2             ## @VIEWPORT_WIDTH
	.no_dead_strip	_gmc_v6_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_v6_0_get_vbios_fb_size
_gmc_v6_0_get_vbios_fb_size:            ; @gmc_v6_0_get_vbios_fb_size
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _mmD1VGA_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mmD1VGA_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32
Lloh3:
	adrp	x8, _D1VGA_CONTROL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D1VGA_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _D1VGA_MODE_ENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D1VGA_MODE_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_REG_GET_FIELD
	cbz	w0, LBB0_2
; %bb.1:
	mov	w8, #9437184
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _mmVIEWPORT_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mmVIEWPORT_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_RREG32
	mov	x20, x0
Lloh12:
	adrp	x22, _VIEWPORT_SIZE@GOTPAGE
Lloh13:
	ldr	x22, [x22, _VIEWPORT_SIZE@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh14:
	adrp	x8, _VIEWPORT_HEIGHT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VIEWPORT_HEIGHT@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_REG_GET_FIELD
	mov	x21, x0
	ldr	w1, [x22]
Lloh17:
	adrp	x8, _VIEWPORT_WIDTH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VIEWPORT_WIDTH@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_REG_GET_FIELD
	mul	w8, w21, w0
	lsl	w8, w8, #2
LBB0_3:
	ldr	w9, [x19]
	sub	w9, w9, w8
	cmp	w9, #2048, lsl #12              ; =8388608
	csel	w0, wzr, w8, lo
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_mmD1VGA_CONTROL,4,2            ; @mmD1VGA_CONTROL
	.comm	_D1VGA_CONTROL,4,2              ; @D1VGA_CONTROL
	.comm	_D1VGA_MODE_ENABLE,4,2          ; @D1VGA_MODE_ENABLE
	.comm	_mmVIEWPORT_SIZE,4,2            ; @mmVIEWPORT_SIZE
	.comm	_VIEWPORT_SIZE,4,2              ; @VIEWPORT_SIZE
	.comm	_VIEWPORT_HEIGHT,4,2            ; @VIEWPORT_HEIGHT
	.comm	_VIEWPORT_WIDTH,4,2             ; @VIEWPORT_WIDTH
	.no_dead_strip	_gmc_v6_0_get_vbios_fb_size
.subsections_via_symbols
