	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgui_osk_ptr_at_pos            ## -- Begin function rgui_osk_ptr_at_pos
	.p2align	4, 0x90
_rgui_osk_ptr_at_pos:                   ## @rgui_osk_ptr_at_pos
	.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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	leaq	-32(%rbp), %rdi
	leaq	-28(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	callq	_menu_display_get_fb_size
	movq	_FONT_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	leal	16(%r10), %r11d
	movq	_FONT_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	12(%rax), %r8d
	addl	$12, %r10d
	leal	8(%rax), %r9d
	movq	_OSK_CHARS_PER_LINE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	%r15d, %ecx
	imull	%r11d, %ecx
	movq	_FONT_HEIGHT_STRIDE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	leal	(%rdx,%rdx), %esi
	movl	-32(%rbp), %edi
	subl	%ecx, %edi
	addl	$-20, %edi
	shrl	%edi
	movl	-28(%rbp), %ecx
	leal	(%rsi,%rax,4), %eax
	addl	$48, %eax
	subl	%eax, %ecx
	addl	$-35, %ecx
	shrl	%ecx
	addl	$12, %edi
	leal	(%rcx,%rdx,2), %esi
	addl	$27, %esi
	xorl	%ecx, %ecx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%rcx
	cmpq	$44, %rcx
	je	LBB0_3
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r15d
	imull	%r11d, %edx
	addl	%edi, %edx
	cmpl	%ebx, %edx
	jae	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	%r10d, %edx
	cmpl	%ebx, %edx
	jbe	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	imull	%r8d, %eax
	addl	%esi, %eax
	cmpl	%r14d, %eax
	jae	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	%r9d, %eax
	cmpl	%r14d, %eax
	jbe	LBB0_2
	jmp	LBB0_7
LBB0_3:
	movl	$-1, %ecx
LBB0_7:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FONT_WIDTH,4,2                 ## @FONT_WIDTH
	.comm	_FONT_HEIGHT,4,2                ## @FONT_HEIGHT
	.comm	_OSK_CHARS_PER_LINE,4,2         ## @OSK_CHARS_PER_LINE
	.comm	_FONT_HEIGHT_STRIDE,4,2         ## @FONT_HEIGHT_STRIDE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgui_osk_ptr_at_pos            ; -- Begin function rgui_osk_ptr_at_pos
	.p2align	2
_rgui_osk_ptr_at_pos:                   ; @rgui_osk_ptr_at_pos
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	add	x0, sp, #4
	mov	x1, sp
	add	x2, sp, #8
	bl	_menu_display_get_fb_size
	mov	x0, #0
Lloh0:
	adrp	x8, _FONT_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FONT_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
	add	w8, w10, #16
Lloh3:
	adrp	x9, _FONT_HEIGHT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FONT_HEIGHT@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x9]
	add	w9, w11, #12
	add	w10, w10, #12
	add	w11, w11, #8
Lloh6:
	adrp	x12, _OSK_CHARS_PER_LINE@GOTPAGE
Lloh7:
	ldr	x12, [x12, _OSK_CHARS_PER_LINE@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
Lloh9:
	adrp	x13, _FONT_HEIGHT_STRIDE@GOTPAGE
Lloh10:
	ldr	x13, [x13, _FONT_HEIGHT_STRIDE@GOTPAGEOFF]
Lloh11:
	ldr	w13, [x13]
	lsl	w14, w13, #1
	ldr	w13, [sp]
	add	w15, w14, w9, lsl #2
	sub	w13, w13, w15
	ldr	w15, [sp, #4]
	msub	w15, w12, w8, w15
	sub	w15, w15, #20
	lsr	w15, w15, #1
	sub	w16, w13, #35
	add	w13, w15, #12
	add	w14, w14, w16, lsr #1
	add	w14, w14, #27
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	udiv	w15, w0, w12
	msub	w16, w15, w12, w0
	madd	w16, w16, w8, w13
	madd	w15, w15, w9, w14
	add	w17, w10, w16
	add	w1, w11, w15
	cmp	w16, w20
	ccmp	w17, w20, #0, lo
	ccmp	w15, w19, #2, hi
	ccmp	w1, w19, #0, lo
	b.hi	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x0, x0, #1
	cmp	x0, #44
	b.ne	LBB0_1
; %bb.3:
	mov	w0, #-1
LBB0_4:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FONT_WIDTH,4,2                 ; @FONT_WIDTH
	.comm	_FONT_HEIGHT,4,2                ; @FONT_HEIGHT
	.comm	_OSK_CHARS_PER_LINE,4,2         ; @OSK_CHARS_PER_LINE
	.comm	_FONT_HEIGHT_STRIDE,4,2         ; @FONT_HEIGHT_STRIDE
.subsections_via_symbols
