	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_graphics_get_display_size      ## -- Begin function graphics_get_display_size
	.p2align	4, 0x90
_graphics_get_display_size:             ## @graphics_get_display_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	setne	%al
	testq	%rdx, %rdx
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_vcos_assert
	movl	$0, (%r14)
	movl	$0, (%r13)
	movq	_MAX_DISPLAY_HANDLES@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rbx, (%rax)
	setg	%dil
	callq	_vcos_verify
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_gx_priv_open_screen
	xorl	%r12d, %r12d
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movl	-44(%rbp), %edi
	leaq	-56(%rbp), %rsi
	callq	_vc_dispmanx_display_get_info
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movl	-56(%rbp), %eax
	movl	%eax, (%r13)
	movl	-52(%rbp), %eax
	movl	%eax, (%r14)
	xorl	%r12d, %r12d
	cmpl	$65, %eax
	setge	%r12b
	jmp	LBB0_6
LBB0_1:
	movl	$-1, %r15d
	jmp	LBB0_7
LBB0_3:
	movl	$-1, %r15d
LBB0_6:
	movl	%r12d, %edi
	callq	_vcos_assert
LBB0_7:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_DISPLAY_HANDLES,8,3        ## @MAX_DISPLAY_HANDLES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_graphics_get_display_size      ; -- Begin function graphics_get_display_size
	.p2align	2
_graphics_get_display_size:             ; @graphics_get_display_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	cmp	x1, #0
	ccmp	x2, #0, #4, ne
	cset	w0, ne
	bl	_vcos_assert
	str	wzr, [x19]
	str	wzr, [x20]
Lloh0:
	adrp	x8, _MAX_DISPLAY_HANDLES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_DISPLAY_HANDLES@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	cset	w0, gt
	bl	_vcos_verify
	cbz	x0, LBB0_4
; %bb.1:
	add	x1, sp, #4
	mov	x0, x21
	bl	_gx_priv_open_screen
	tbnz	x0, #63, LBB0_5
; %bb.2:
	ldr	w0, [sp, #4]
	add	x1, sp, #8
	bl	_vc_dispmanx_display_get_info
	mov	x21, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldp	w8, w9, [sp, #8]
	str	w8, [x20]
	str	w9, [x19]
	cmp	w9, #64
	cset	w0, gt
	b	LBB0_7
LBB0_4:
	mov	w21, #-1
	b	LBB0_8
LBB0_5:
	mov	w0, #0
	mov	w21, #-1
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	bl	_vcos_assert
LBB0_8:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_DISPLAY_HANDLES,8,3        ; @MAX_DISPLAY_HANDLES
.subsections_via_symbols
