	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bind_con_driver
_bind_con_driver:                       ## @bind_con_driver
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	movq	_ENODEV@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r12d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_try_module_get
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_acquire_console_sem
	movq	_MAX_NR_CON_DRIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_3
## %bb.8:
	movq	_registered_con_driver@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	leal	-1(%rax), %ecx
	shlq	$5, %rcx
	addq	%rbx, %rcx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r15, 24(%rbx)
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_9 Depth=1
	addq	$32, %rbx
	decq	%rax
	jne	LBB0_9
## %bb.7:
	movq	%rcx, %rbx
	testl	%r12d, %r12d
	jne	LBB0_5
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_1:
	xorl	%r12d, %r12d
	subl	(%rbx), %r12d
	jmp	LBB0_38
LBB0_3:
                                        ## implicit-def: $rbx
	testl	%r12d, %r12d
	je	LBB0_11
LBB0_5:
	negl	%r12d
	jmp	LBB0_37
LBB0_10:
	movq	(%rbx), %rax
LBB0_12:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_CON_DRIVER_FLAG_INIT@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, 8(%rbx)
	jne	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	callq	*8(%r15)
	movl	(%r12), %eax
	orl	%eax, 8(%rbx)
LBB0_14:
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_18
## %bb.15:
	movq	_conswitchp@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	(%rax), %rdi
	callq	_module_put
LBB0_17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	___module_get
	movq	%r15, (%r12)
LBB0_18:
	movl	16(%rbx), %esi
	movl	%r13d, %edi
	callq	_max
	movl	%eax, %r12d
	movl	12(%rbx), %esi
	movl	%r14d, %edi
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	movl	$-1, -56(%rbp)                  ## 4-byte Folded Spill
	movl	$-1, -52(%rbp)                  ## 4-byte Folded Spill
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	cmpl	%eax, %r12d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_19
LBB0_31:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_33
## %bb.32:
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	incl	%edx
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_printk
LBB0_33:
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	js	LBB0_36
## %bb.34:
	movq	_vc_cons@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	%ecx, %ecx
	movq	(%rax,%rcx,8), %rax
	cmpl	$0, (%rax)
	leaq	L_.str.4(%rip), %rcx
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rcx, %rsi
	movl	16(%rax), %r8d
	movl	20(%rax), %ecx
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_printk
	testl	%ebx, %ebx
	js	LBB0_37
## %bb.35:
	movq	(%r14), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rdi
	callq	_update_screen
	jmp	LBB0_37
LBB0_19:
	movslq	-60(%rbp), %r12                 ## 4-byte Folded Reload
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %ebx
	movl	$-1, -52(%rbp)                  ## 4-byte Folded Spill
	movl	$-1, -56(%rbp)                  ## 4-byte Folded Spill
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
LBB0_30:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%r12
	cmpl	%r12d, %ebx
	je	LBB0_31
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	_vc_cons@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r12,8), %r13
	movq	_con_driver_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r12,8), %rax
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	(%rax), %rdi
	callq	_module_put
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%r14, %rdi
	callq	___module_get
	movq	_con_driver_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r15, (%rax,%r12,8)
	testq	%r13, %r13
	je	LBB0_30
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=1
	cmpq	$0, 32(%r13)
	je	LBB0_30
## %bb.24:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%r13, %rdi
	callq	_CON_IS_VISIBLE
	testq	%rax, %rax
	je	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%r13, %rdi
	callq	_save_screen
	movl	%r12d, %r14d
	movl	%r12d, %eax
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_27
LBB0_25:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	%r12d, %r14d
LBB0_27:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	(%r13), %ebx
	movq	32(%r13), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	movq	24(%r13), %rax
	movq	%rax, 8(%r13)
	movq	%r13, %rdi
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_visual_init
	movq	%r13, %rdi
	callq	_set_origin
	movq	%r13, %rdi
	callq	_update_attr
	cmpl	(%r13), %ebx
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%r13, %rdi
	callq	_clear_buffer_attributes
	jmp	LBB0_29
LBB0_36:
	leaq	L_.str.5(%rip), %rdi
	xorl	%r12d, %r12d
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_printk
LBB0_37:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_release_console_sem
	movq	%rbx, %rdi
	callq	_module_put
LBB0_38:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MAX_NR_CON_DRIVER,4,2          ## @MAX_NR_CON_DRIVER
	.comm	_registered_con_driver,8,3      ## @registered_con_driver
	.comm	_CON_DRIVER_FLAG_INIT,4,2       ## @CON_DRIVER_FLAG_INIT
	.comm	_conswitchp,8,3                 ## @conswitchp
	.comm	_vc_cons,8,3                    ## @vc_cons
	.comm	_con_driver_map,8,3             ## @con_driver_map
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Console: switching "

L_.str.1:                               ## @.str.1
	.asciz	"consoles %d-%d "

L_.str.2:                               ## @.str.2
	.asciz	"to %s %s %dx%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"colour"

L_.str.4:                               ## @.str.4
	.asciz	"mono"

L_.str.5:                               ## @.str.5
	.asciz	"to %s\n"

	.no_dead_strip	_bind_con_driver
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bind_con_driver
_bind_con_driver:                       ; @bind_con_driver
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x25, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x19, [x0]
Lloh0:
	adrp	x20, _ENODEV@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ENODEV@GOTPAGEOFF]
	ldr	w24, [x20]
	mov	x0, x19
	bl	_try_module_get
	cbz	w0, LBB0_7
; %bb.1:
	bl	_acquire_console_sem
Lloh2:
	adrp	x8, _MAX_NR_CON_DRIVER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_NR_CON_DRIVER@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.2:
Lloh5:
	adrp	x9, _registered_con_driver@GOTPAGE
Lloh6:
	ldr	x9, [x9, _registered_con_driver@GOTPAGEOFF]
Lloh7:
	ldr	x20, [x9]
	sub	w9, w8, #1
	add	x9, x20, x9, lsl #5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20, #24]
	cmp	x10, x21
	b.eq	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #32
	subs	x8, x8, #1
	b.ne	LBB0_3
; %bb.5:
	mov	x20, x9
	cbnz	w24, LBB0_9
LBB0_6:
	str	xzr, [sp, #48]                  ; 8-byte Folded Spill
	b	LBB0_11
LBB0_7:
	ldr	w8, [x20]
	neg	w20, w8
	b	LBB0_38
LBB0_8:
                                        ; implicit-def: $x20
	cbz	w24, LBB0_6
LBB0_9:
	neg	w20, w24
	b	LBB0_37
LBB0_10:
	ldr	x8, [x20]
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
LBB0_11:
	ldr	w8, [x20, #8]
Lloh8:
	adrp	x24, _CON_DRIVER_FLAG_INIT@GOTPAGE
Lloh9:
	ldr	x24, [x24, _CON_DRIVER_FLAG_INIT@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.12:
	ldr	x8, [x21, #8]
	blr	x8
	ldr	w8, [x24]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
LBB0_13:
	cbz	w25, LBB0_17
; %bb.14:
Lloh10:
	adrp	x24, _conswitchp@GOTPAGE
Lloh11:
	ldr	x24, [x24, _conswitchp@GOTPAGEOFF]
	ldr	x8, [x24]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	x0, [x8]
	bl	_module_put
LBB0_16:
	mov	x0, x19
	bl	___module_get
	str	x21, [x24]
LBB0_17:
	str	w25, [sp, #56]                  ; 4-byte Folded Spill
	ldr	w1, [x20, #16]
	mov	x0, x22
	bl	_max
	mov	x22, x0
	ldr	w1, [x20, #12]
	mov	x0, x23
	bl	_min
Lloh12:
	adrp	x27, _vc_cons@GOTPAGE
Lloh13:
	ldr	x27, [x27, _vc_cons@GOTPAGEOFF]
	cmp	w22, w0
	str	x22, [sp, #40]                  ; 8-byte Folded Spill
	str	w0, [sp, #36]                   ; 4-byte Folded Spill
	b.le	LBB0_23
; %bb.18:
	mov	w24, #-1
	mov	w8, #-1
	str	w8, [sp, #60]                   ; 4-byte Folded Spill
LBB0_19:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	ldr	w8, [sp, #56]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_34
; %bb.20:
	tbnz	w24, #31, LBB0_35
LBB0_21:
	ldr	x8, [x27]
	ldr	x8, [x8, w24, uxtw #3]
	ldr	w9, [x8]
Lloh16:
	adrp	x10, l_.str.3@PAGE
Lloh17:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh18:
	adrp	x11, l_.str.4@PAGE
Lloh19:
	add	x11, x11, l_.str.4@PAGEOFF
	cmp	w9, #0
	csel	x9, x11, x10, eq
	ldp	w8, w10, [x8, #16]
	stp	x10, x8, [sp, #16]
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	stp	x9, x8, [sp]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printk
	ldr	w9, [sp, #60]                   ; 4-byte Folded Reload
	tbnz	w9, #31, LBB0_36
; %bb.22:
	ldr	x8, [x27]
	ldr	x0, [x8, w9, uxtw #3]
	bl	_update_screen
	b	LBB0_36
LBB0_23:
	sxtw	x26, w22
	add	w20, w0, #1
	sbfiz	x23, x22, #3, #32
	mov	w8, #-1
	str	w8, [sp, #60]                   ; 4-byte Folded Spill
Lloh22:
	adrp	x22, _con_driver_map@GOTPAGE
Lloh23:
	ldr	x22, [x22, _con_driver_map@GOTPAGEOFF]
	mov	w24, #-1
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	add	x26, x26, #1
	add	x23, x23, #8
	cmp	w20, w26
	b.eq	LBB0_19
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	ldr	x25, [x8, x23]
	ldr	x8, [x22]
	ldr	x8, [x8, x23]
	cbz	x8, LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	x0, [x8]
	bl	_module_put
LBB0_27:                                ;   in Loop: Header=BB0_25 Depth=1
	mov	x0, x19
	bl	___module_get
	ldr	x8, [x22]
	str	x21, [x8, x23]
	cbz	x25, LBB0_24
; %bb.28:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	x8, [x25, #32]
	cbz	x8, LBB0_24
; %bb.29:                               ;   in Loop: Header=BB0_25 Depth=1
	mov	x0, x25
	bl	_CON_IS_VISIBLE
	cbz	x0, LBB0_31
; %bb.30:                               ;   in Loop: Header=BB0_25 Depth=1
	mov	x0, x25
	bl	_save_screen
	mov	x24, x26
	mov	x8, x26
	str	w26, [sp, #60]                  ; 4-byte Folded Spill
	b	LBB0_32
LBB0_31:                                ;   in Loop: Header=BB0_25 Depth=1
	mov	x24, x26
LBB0_32:                                ;   in Loop: Header=BB0_25 Depth=1
	ldr	w28, [x25]
	ldr	x8, [x25, #32]
	ldr	x8, [x8]
	mov	x0, x25
	blr	x8
	ldr	x8, [x25, #24]
	str	x8, [x25, #8]
	mov	x0, x25
	mov	x1, x24
	mov	w2, #0
	bl	_visual_init
	mov	x0, x25
	bl	_set_origin
	mov	x0, x25
	bl	_update_attr
	ldr	w8, [x25]
	cmp	w28, w8
	b.eq	LBB0_24
; %bb.33:                               ;   in Loop: Header=BB0_25 Depth=1
	mov	x0, x25
	bl	_clear_buffer_attributes
	b	LBB0_24
LBB0_34:
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	add	w8, w8, #1
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	add	w9, w9, #1
	stp	x8, x9, [sp]
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
	tbz	w24, #31, LBB0_21
LBB0_35:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	str	x8, [sp]
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printk
LBB0_36:
	mov	w20, #0
LBB0_37:
	bl	_release_console_sem
	mov	x0, x19
	bl	_module_put
LBB0_38:
	mov	x0, x20
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MAX_NR_CON_DRIVER,4,2          ; @MAX_NR_CON_DRIVER
	.comm	_registered_con_driver,8,3      ; @registered_con_driver
	.comm	_CON_DRIVER_FLAG_INIT,4,2       ; @CON_DRIVER_FLAG_INIT
	.comm	_conswitchp,8,3                 ; @conswitchp
	.comm	_vc_cons,8,3                    ; @vc_cons
	.comm	_con_driver_map,8,3             ; @con_driver_map
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Console: switching "

l_.str.1:                               ; @.str.1
	.asciz	"consoles %d-%d "

l_.str.2:                               ; @.str.2
	.asciz	"to %s %s %dx%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"colour"

l_.str.4:                               ; @.str.4
	.asciz	"mono"

l_.str.5:                               ; @.str.5
	.asciz	"to %s\n"

	.no_dead_strip	_bind_con_driver
.subsections_via_symbols
