	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function visual_init
_visual_init:                           ## @visual_init
	.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	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	40(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	8(%rax), %edi
	callq	_module_put
LBB0_2:
	movq	_conswitchp@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%rbx)
	movq	_con_driver_map@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%r15d, %r15
	movq	(%rcx,%r15,8), %rcx
	testq	%rcx, %rcx
	cmoveq	%rax, %rcx
	movq	%rcx, 40(%rbx)
	movl	8(%rcx), %edi
	callq	___module_get
	movl	%r15d, (%rbx)
	movq	_master_display_fg@GOTPCREL(%rip), %rax
	movq	%rax, 72(%rbx)
	leaq	56(%rbx), %rax
	movq	%rax, 64(%rbx)
	movq	$0, 4(%rbx)
	movq	$0, 32(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movq	40(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	*(%rax)
	movl	4(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	cmpq	$0, 32(%rbx)
	movl	$2048, %ecx                     ## imm = 0x800
	movl	$30464, %eax                    ## imm = 0x7700
	cmovel	%ecx, %eax
	movl	%eax, 4(%rbx)
LBB0_4:
	movl	%eax, 12(%rbx)
	movl	20(%rbx), %eax
	addl	%eax, %eax
	movl	%eax, 16(%rbx)
	imull	28(%rbx), %eax
	movl	%eax, 24(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_conswitchp,8,3                 ## @conswitchp
	.comm	_con_driver_map,8,3             ## @con_driver_map
	.comm	_master_display_fg,4,2          ## @master_display_fg
	.no_dead_strip	_visual_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function visual_init
_visual_init:                           ; @visual_init
	.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
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x8, #8]
	bl	_module_put
LBB0_2:
Lloh0:
	adrp	x8, _conswitchp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _conswitchp@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x19, #40]
Lloh3:
	adrp	x9, _con_driver_map@GOTPAGE
Lloh4:
	ldr	x9, [x9, _con_driver_map@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x9, [x9, w21, sxtw #3]
	cmp	x9, #0
	csel	x8, x8, x9, eq
	str	x8, [x19, #40]
	ldr	w0, [x8, #8]
	bl	___module_get
Lloh6:
	adrp	x8, _master_display_fg@GOTPAGE
Lloh7:
	ldr	x8, [x8, _master_display_fg@GOTPAGEOFF]
	mov	x9, x19
	str	xzr, [x9, #56]!
	stp	x9, x8, [x19, #64]
	str	xzr, [x19, #32]
	stp	wzr, wzr, [x19, #4]
	str	w21, [x19]
	str	xzr, [x19, #48]
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_4
; %bb.3:
	ldr	x8, [x19, #32]
	cmp	x8, #0
	mov	w8, #30464
	mov	w9, #2048
	csel	w8, w9, w8, eq
	str	w8, [x19, #4]
LBB0_4:
	ldr	w9, [x19, #20]
	lsl	w9, w9, #1
	stp	w8, w9, [x19, #12]
	ldr	w8, [x19, #28]
	mul	w8, w8, w9
	str	w8, [x19, #24]
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_conswitchp,8,3                 ; @conswitchp
	.comm	_con_driver_map,8,3             ; @con_driver_map
	.comm	_master_display_fg,4,2          ; @master_display_fg
	.no_dead_strip	_visual_init
.subsections_via_symbols
