	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function gfx_ctx_mali_fbdev_set_video_mode
LCPI0_0:
	.long	0x49742400                      ## float 1.0E+6
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_gfx_ctx_mali_fbdev_set_video_mode:     ## @gfx_ctx_mali_fbdev_set_video_mode
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	movl	%eax, %ebx
	movq	_FBIOGET_VSCREENINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movl	%ebx, %edi
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_1
## %bb.5:
	movl	%ebx, %edi
	callq	_close
	movl	-64(%rbp), %eax
	movl	-60(%rbp), %ecx
	movl	%eax, (%r15)
	movl	%ecx, 4(%r15)
	movl	%eax, 12(%r15)
	movl	%ecx, 16(%r15)
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm1
	divss	-56(%rbp), %xmm1
	cvtsi2ss	%rcx, %xmm2
	addss	-52(%rbp), %xmm2
	addss	-48(%rbp), %xmm2
	mulss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	addss	-44(%rbp), %xmm2
	addss	-40(%rbp), %xmm0
	addss	-36(%rbp), %xmm0
	addss	-32(%rbp), %xmm0
	divss	%xmm2, %xmm1
	divss	%xmm0, %xmm1
	movss	%xmm1, 8(%r15)
	movl	$1, %r14d
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_RARCH_ERR
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.2:
	movl	%ebx, %edi
	callq	_close
LBB0_3:
	xorl	%eax, %eax
	callq	_eglGetError
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_RARCH_ERR
	movq	%r15, %rdi
	callq	_gfx_ctx_mali_fbdev_destroy
LBB0_4:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/fb0"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_FBIOGET_VSCREENINFO,4,2        ## @FBIOGET_VSCREENINFO
L_.str.1:                               ## @.str.1
	.asciz	"Error obtaining framebuffer info.\n"

L_.str.2:                               ## @.str.2
	.asciz	"[Mali fbdev]: EGL error: %d.\n"

	.no_dead_strip	_gfx_ctx_mali_fbdev_set_video_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_ctx_mali_fbdev_set_video_mode
_gfx_ctx_mali_fbdev_set_video_mode:     ; @gfx_ctx_mali_fbdev_set_video_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	mov	x20, x0
Lloh5:
	adrp	x8, _FBIOGET_VSCREENINFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FBIOGET_VSCREENINFO@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	tbnz	x0, #63, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_close
	ldp	w8, w9, [sp, #8]
	mov	w10, #9216
	movk	w10, #18804, lsl #16
	fmov	s0, w10
	ldp	s1, s2, [sp, #16]
	fdiv	s1, s0, s1
	fmul	s0, s1, s0
	ucvtf	s1, w9
	fadd	s1, s2, s1
	ldp	s2, s3, [sp, #24]
	fadd	s1, s1, s2
	fadd	s1, s1, s3
	fdiv	s0, s0, s1
	ucvtf	s1, w8
	ldp	s2, s3, [sp, #32]
	fadd	s1, s2, s1
	stp	w8, w9, [x19]
	stp	w8, w9, [x19, #12]
	fadd	s1, s1, s3
	ldr	s2, [sp, #40]
	fadd	s1, s1, s2
	fdiv	s0, s0, s1
	str	s0, [x19, #8]
	mov	w0, #1
	b	LBB0_5
LBB0_2:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_ERR
	tbnz	w20, #31, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_close
LBB0_4:
	bl	_eglGetError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_RARCH_ERR
	mov	x0, x19
	bl	_gfx_ctx_mali_fbdev_destroy
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/fb0"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_FBIOGET_VSCREENINFO,4,2        ; @FBIOGET_VSCREENINFO
l_.str.1:                               ; @.str.1
	.asciz	"Error obtaining framebuffer info.\n"

l_.str.2:                               ; @.str.2
	.asciz	"[Mali fbdev]: EGL error: %d.\n"

	.no_dead_strip	_gfx_ctx_mali_fbdev_set_video_mode
.subsections_via_symbols
