	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_mode_params
_store_mode_params:                     ## @store_mode_params
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_graphic_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_store_cursor_position
	xorl	%eax, %eax
	callq	_store_video_mode
	movq	_boot_params@GOTPCREL(%rip), %r14
	xorl	%eax, %eax
	cmpl	$7, (%r14)
	setne	%al
	orl	$22, %eax
	shll	$11, %eax
	movq	_video_segment@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%edi, %edi
	callq	_set_fs
	movl	$1157, %edi                     ## imm = 0x485
	callq	_rdfs16
	movq	%rax, 16(%r14)
	movl	$1098, %edi                     ## imm = 0x44A
	callq	_rdfs16
	movq	%rax, %rbx
	movq	_adapter@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_ADAPTER_CGA@GOTPCREL(%rip), %rdx
	movl	$25, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.2:
	movl	$1156, %edi                     ## imm = 0x484
	callq	_rdfs8
	incl	%eax
LBB0_3:
	movq	_force_x@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	cmovnel	%ecx, %ebx
	movq	_force_y@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	cmovnel	%ecx, %eax
	movl	%ebx, 4(%r14)
	movl	%eax, 8(%r14)
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_graphic_mode,8,3               ## @graphic_mode
	.comm	_boot_params,24,3               ## @boot_params
	.comm	_video_segment,4,2              ## @video_segment
	.comm	_adapter,8,3                    ## @adapter
	.comm	_ADAPTER_CGA,8,3                ## @ADAPTER_CGA
	.comm	_force_x,4,2                    ## @force_x
	.comm	_force_y,4,2                    ## @force_y
	.no_dead_strip	_store_mode_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_mode_params
_store_mode_params:                     ; @store_mode_params
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _graphic_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _graphic_mode@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_5
; %bb.1:
	bl	_store_cursor_position
	bl	_store_video_mode
Lloh3:
	adrp	x20, _boot_params@GOTPAGE
Lloh4:
	ldr	x20, [x20, _boot_params@GOTPAGEOFF]
	ldr	w8, [x20]
	mov	w9, #47104
	mov	w10, #45056
	cmp	w8, #7
	csel	w8, w10, w9, eq
Lloh5:
	adrp	x9, _video_segment@GOTPAGE
Lloh6:
	ldr	x9, [x9, _video_segment@GOTPAGEOFF]
Lloh7:
	str	w8, [x9]
	mov	w0, #0
	bl	_set_fs
	mov	w0, #1157
	bl	_rdfs16
	str	x0, [x20, #16]
	mov	w0, #1098
	bl	_rdfs16
	mov	x19, x0
Lloh8:
	adrp	x8, _adapter@GOTPAGE
Lloh9:
	ldr	x8, [x8, _adapter@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _ADAPTER_CGA@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ADAPTER_CGA@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	w8, #25
	b	LBB0_4
LBB0_3:
	mov	w0, #1156
	bl	_rdfs8
	add	w8, w0, #1
LBB0_4:
Lloh14:
	adrp	x9, _force_x@GOTPAGE
Lloh15:
	ldr	x9, [x9, _force_x@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _force_y@GOTPAGE
Lloh18:
	ldr	x10, [x10, _force_y@GOTPAGEOFF]
	cmp	w9, #0
	csel	w9, w19, w9, eq
Lloh19:
	ldr	w10, [x10]
	cmp	w10, #0
	csel	w8, w8, w10, eq
	stp	w9, w8, [x20, #4]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_graphic_mode,8,3               ; @graphic_mode
	.comm	_boot_params,24,3               ; @boot_params
	.comm	_video_segment,4,2              ; @video_segment
	.comm	_adapter,8,3                    ; @adapter
	.comm	_ADAPTER_CGA,8,3                ; @ADAPTER_CGA
	.comm	_force_x,4,2                    ; @force_x
	.comm	_force_y,4,2                    ; @force_y
	.no_dead_strip	_store_mode_params
.subsections_via_symbols
