	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vga_get                        ## -- Begin function vga_get
	.p2align	4, 0x90
_vga_get:                               ## @vga_get
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_vga_check_first_use
	testq	%r14, %r14
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_vga_default_device
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_6
LBB0_2:
	movq	_vga_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	callq	_vgadev_find
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	_vga_lock@GOTPCREL(%rip), %rbx
	movq	_vga_wait_queue@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	callq	_schedule
	movq	%r13, %rdi
	leaq	-44(%rbp), %rsi
	callq	_remove_wait_queue
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	callq	_vgadev_find
	testq	%rax, %rax
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	___vga_tryget
	movq	%rax, %r15
	movq	%rbx, %r12
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	testq	%r15, %r15
	je	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_init_waitqueue_entry
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_add_wait_queue
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rax), %edi
	callq	_set_current_state
	testl	%ebx, %ebx
	movq	%r12, %rbx
	je	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_7
## %bb.14:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___set_current_state
	movq	_vga_wait_queue@GOTPCREL(%rip), %rdi
	leaq	-44(%rbp), %rsi
	callq	_remove_wait_queue
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_vga_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vga_lock,4,2                   ## @vga_lock
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_current,4,2                    ## @current
	.comm	_vga_wait_queue,4,2             ## @vga_wait_queue
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vga_get                        ; -- Begin function vga_get
	.p2align	2
_vga_get:                               ; @vga_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_vga_check_first_use
	cbnz	x21, LBB0_2
; %bb.1:
	bl	_vga_default_device
	mov	x21, x0
	cbz	x0, LBB0_12
LBB0_2:
Lloh0:
	adrp	x0, _vga_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _vga_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	mov	x0, x21
	bl	_vgadev_find
	cbz	x0, LBB0_9
; %bb.3:
Lloh2:
	adrp	x22, _vga_lock@GOTPAGE
Lloh3:
	ldr	x22, [x22, _vga_lock@GOTPAGEOFF]
Lloh4:
	adrp	x25, _current@GOTPAGE
Lloh5:
	ldr	x25, [x25, _current@GOTPAGEOFF]
Lloh6:
	adrp	x23, _vga_wait_queue@GOTPAGE
Lloh7:
	ldr	x23, [x23, _vga_wait_queue@GOTPAGEOFF]
Lloh8:
	adrp	x26, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh9:
	ldr	x26, [x26, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh10:
	adrp	x27, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh11:
	ldr	x27, [x27, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_schedule
	add	x1, sp, #12
	mov	x0, x23
	bl	_remove_wait_queue
	mov	x0, x22
	bl	_spin_lock_irqsave
	mov	x0, x21
	bl	_vgadev_find
	cbz	x0, LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x20
	bl	___vga_tryget
	mov	x24, x0
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	cbz	x24, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x25]
	add	x0, sp, #12
	bl	_init_waitqueue_entry
	add	x1, sp, #12
	mov	x0, x23
	bl	_add_wait_queue
	cmp	w19, #0
	csel	x8, x27, x26, eq
	ldr	w0, [x8]
	bl	_set_current_state
	cbz	w19, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x25]
	bl	_signal_pending
	cbz	x0, LBB0_4
; %bb.8:
Lloh12:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	___set_current_state
Lloh15:
	adrp	x0, _vga_wait_queue@GOTPAGE
Lloh16:
	ldr	x0, [x0, _vga_wait_queue@GOTPAGEOFF]
	add	x1, sp, #12
	bl	_remove_wait_queue
Lloh17:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh19:
	adrp	x0, _vga_lock@GOTPAGE
Lloh20:
	ldr	x0, [x0, _vga_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_vga_lock,4,2                   ; @vga_lock
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_current,4,2                    ; @current
	.comm	_vga_wait_queue,4,2             ; @vga_wait_queue
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
.subsections_via_symbols
