	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rgui_set_video_config
_rgui_set_video_config:                 ## @rgui_set_video_config
	.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
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_video_viewport_get_custom
	testq	%r12, %r12
	je	LBB0_4
## %bb.1:
	movl	24(%rbx), %ecx
	movl	%ecx, (%r12)
	movq	16(%rbx), %rcx
	movq	%rcx, 8(%rax)
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rax)
	movl	8(%rbx), %edx
	movl	%edx, 20(%rax)
	movl	4(%rbx), %edx
	movl	%edx, 16(%rax)
	cvtsi2ss	%rcx, %xmm1
	divss	%xmm0, %xmm1
	movq	_aspectratio_lut@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ASPECT_RATIO_CUSTOM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movss	%xmm1, (%rax,%rcx,4)
	movl	$1, %ebx
	testl	%r15d, %r15d
	jne	LBB0_3
## %bb.2:
	movq	_CMD_EVENT_VIDEO_SET_ASPECT_RATIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_command_event
LBB0_3:
	movl	%ebx, (%r14)
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aspectratio_lut,8,3            ## @aspectratio_lut
	.comm	_ASPECT_RATIO_CUSTOM,8,3        ## @ASPECT_RATIO_CUSTOM
	.comm	_CMD_EVENT_VIDEO_SET_ASPECT_RATIO,4,2 ## @CMD_EVENT_VIDEO_SET_ASPECT_RATIO
	.no_dead_strip	_rgui_set_video_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rgui_set_video_config
_rgui_set_video_config:                 ; @rgui_set_video_config
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_config_get_ptr
	mov	x22, x0
	bl	_video_viewport_get_custom
	cbz	x22, LBB0_5
; %bb.1:
	ldr	w8, [x21, #24]
	str	w8, [x22]
	ldr	x8, [x21, #16]
	str	x8, [x0, #8]
	ldr	s0, [x21]
	str	s0, [x0]
	ldur	d1, [x21, #4]
	str	d1, [x0, #16]
	scvtf	s1, x8
	fdiv	s0, s1, s0
Lloh0:
	adrp	x8, _aspectratio_lut@GOTPAGE
Lloh1:
	ldr	x8, [x8, _aspectratio_lut@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _ASPECT_RATIO_CUSTOM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ASPECT_RATIO_CUSTOM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	str	s0, [x8, x9, lsl #2]
	cbz	w20, LBB0_3
; %bb.2:
	mov	w8, #1
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _CMD_EVENT_VIDEO_SET_ASPECT_RATIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CMD_EVENT_VIDEO_SET_ASPECT_RATIO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_command_event
	mov	w8, #0
LBB0_4:
	str	w8, [x19]
LBB0_5:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_aspectratio_lut,8,3            ; @aspectratio_lut
	.comm	_ASPECT_RATIO_CUSTOM,8,3        ; @ASPECT_RATIO_CUSTOM
	.comm	_CMD_EVENT_VIDEO_SET_ASPECT_RATIO,4,2 ; @CMD_EVENT_VIDEO_SET_ASPECT_RATIO
	.no_dead_strip	_rgui_set_video_config
.subsections_via_symbols
