	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function menu_display_get_pixel_scale
LCPI0_0:
	.long	0x38d1b717                      ## float 9.99999974E-5
LCPI0_1:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_menu_display_get_pixel_scale
	.p2align	4, 0x90
_menu_display_get_pixel_scale:          ## @menu_display_get_pixel_scale
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %r14
	cmpb	$1, _menu_display_get_pixel_scale.scale_cached(%rip)
	jne	LBB0_3
## %bb.1:
	cmpl	%ebx, _menu_display_get_pixel_scale.last_width(%rip)
	jne	LBB0_3
## %bb.2:
	cmpl	%r15d, _menu_display_get_pixel_scale.last_height(%rip)
	je	LBB0_4
LBB0_3:
	movl	%ebx, %eax
	imull	%ebx, %eax
	movl	%r15d, %ecx
	imull	%ecx, %ecx
	addl	%eax, %ecx
	cvtsi2sd	%rcx, %xmm0
	callq	_sqrt
	movq	_DIAGONAL_PIXELS_1080P@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, _menu_display_get_pixel_scale.scale(%rip)
	movb	$1, _menu_display_get_pixel_scale.scale_cached(%rip)
	movl	%ebx, _menu_display_get_pixel_scale.last_width(%rip)
	movl	%r15d, _menu_display_get_pixel_scale.last_height(%rip)
LBB0_4:
	movss	_menu_display_get_pixel_scale.scale(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movss	(%r14), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	cmpltss	%xmm1, %xmm2
	andps	%xmm2, %xmm1
	movss	LCPI0_1(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	andnps	%xmm3, %xmm2
	orps	%xmm1, %xmm2
	mulss	%xmm2, %xmm0
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_menu_display_get_pixel_scale.last_width,4,2 ## @menu_display_get_pixel_scale.last_width
.zerofill __DATA,__bss,_menu_display_get_pixel_scale.last_height,4,2 ## @menu_display_get_pixel_scale.last_height
.zerofill __DATA,__bss,_menu_display_get_pixel_scale.scale,4,2 ## @menu_display_get_pixel_scale.scale
.zerofill __DATA,__bss,_menu_display_get_pixel_scale.scale_cached,1,2 ## @menu_display_get_pixel_scale.scale_cached
	.comm	_DIAGONAL_PIXELS_1080P,4,2      ## @DIAGONAL_PIXELS_1080P
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_display_get_pixel_scale   ; -- Begin function menu_display_get_pixel_scale
	.p2align	2
_menu_display_get_pixel_scale:          ; @menu_display_get_pixel_scale
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x21, x0
	bl	_config_get_ptr
	mov	x19, x0
	adrp	x22, _menu_display_get_pixel_scale.scale_cached@PAGE
	ldrb	w8, [x22, _menu_display_get_pixel_scale.scale_cached@PAGEOFF]
	adrp	x23, _menu_display_get_pixel_scale.last_width@PAGE
	ldr	w9, [x23, _menu_display_get_pixel_scale.last_width@PAGEOFF]
	adrp	x24, _menu_display_get_pixel_scale.last_height@PAGE
	ldr	w10, [x24, _menu_display_get_pixel_scale.last_height@PAGEOFF]
	cmp	w8, #1
	ccmp	w9, w21, #0, eq
	ccmp	w10, w20, #0, eq
	adrp	x25, _menu_display_get_pixel_scale.scale@PAGE
	b.eq	LBB0_2
; %bb.1:
	mul	w8, w21, w21
	madd	w8, w20, w20, w8
	ucvtf	d0, w8
	bl	_sqrt
Lloh0:
	adrp	x8, _DIAGONAL_PIXELS_1080P@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DIAGONAL_PIXELS_1080P@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sdiv	w8, w0, w8
	scvtf	s0, w8
	str	s0, [x25, _menu_display_get_pixel_scale.scale@PAGEOFF]
	mov	w8, #1
	strb	w8, [x22, _menu_display_get_pixel_scale.scale_cached@PAGEOFF]
	str	w21, [x23, _menu_display_get_pixel_scale.last_width@PAGEOFF]
	str	w20, [x24, _menu_display_get_pixel_scale.last_height@PAGEOFF]
LBB0_2:
	ldr	s0, [x25, _menu_display_get_pixel_scale.scale@PAGEOFF]
	cbz	x19, LBB0_4
; %bb.3:
	ldr	s1, [x19]
	mov	w8, #46871
	movk	w8, #14545, lsl #16
	fmov	s2, w8
	fcmp	s1, s2
	fmov	s2, #1.00000000
	fcsel	s1, s1, s2, gt
	fmul	s0, s0, s1
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_menu_display_get_pixel_scale.last_width,4,2 ; @menu_display_get_pixel_scale.last_width
.zerofill __DATA,__bss,_menu_display_get_pixel_scale.last_height,4,2 ; @menu_display_get_pixel_scale.last_height
.zerofill __DATA,__bss,_menu_display_get_pixel_scale.scale,4,2 ; @menu_display_get_pixel_scale.scale
.zerofill __DATA,__bss,_menu_display_get_pixel_scale.scale_cached,1,2 ; @menu_display_get_pixel_scale.scale_cached
	.comm	_DIAGONAL_PIXELS_1080P,4,2      ; @DIAGONAL_PIXELS_1080P
.subsections_via_symbols
