	.file	"extr_xen_console.c_xencons_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s%r"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Unable to initialize the console (%d)\n"
	.align 8
.LC2:
	.string	"shutdown event registration failed!\n"
	.text
	.p2align 4
	.type	xencons_attach, @function
xencons_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	rsi, main_cons[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	lea	rdi, xencons_ttydevsw[rip]
	call	tty_alloc@PLT
	mov	ecx, DWORD PTR driver_name[rip]
	xor	r8d, r8d
	xor	esi, esi
	mov	r12, rax
	lea	rdx, .LC0[rip]
	mov	rdi, rax
	call	tty_makedev@PLT
	mov	rsi, r12
	mov	edi, ebp
	call	device_set_softc@PLT
	mov	rdi, r12
	call	tty_getlock@PLT
	xor	edx, edx
	lea	rdi, main_cons[rip+8]
	mov	esi, eax
	call	callout_init_mtx@PLT
	mov	edx, DWORD PTR xencons_intr[rip]
	mov	rsi, r12
	mov	edi, ebp
	mov	rax, QWORD PTR main_cons[rip]
	call	[QWORD PTR [rax]]
	mov	r13d, eax
	test	eax, eax
	jne	.L6
	mov	ecx, DWORD PTR SHUTDOWN_PRI_DEFAULT[rip]
	mov	esi, DWORD PTR xencons_shutdown[rip]
	mov	rdx, r12
	mov	edi, DWORD PTR shutdown_post_sync[rip]
	call	EVENTHANDLER_REGISTER@PLT
	test	rax, rax
	je	.L7
	mov	eax, r13d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	edx, eax
	mov	edi, ebp
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	device_printf@PLT
	mov	eax, r13d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edi, ebp
	lea	rsi, .LC2[rip]
	call	device_printf@PLT
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	xencons_attach, .-xencons_attach
	.comm	xencons_ttydevsw,4,4
	.comm	xencons_shutdown,4,4
	.comm	xencons_intr,4,4
	.comm	shutdown_post_sync,4,4
	.comm	main_cons,16,16
	.comm	driver_name,4,4
	.comm	SHUTDOWN_PRI_DEFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_xen_console.c_xencons_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s%r\000"
	.align	2
.LC1:
	.ascii	"Unable to initialize the console (%d)\012\000"
	.align	2
.LC2:
	.ascii	"shutdown event registration failed!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xencons_attach, %function
xencons_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r6, .L8
	sub	sp, sp, #12
	mov	r5, r0
	mov	r1, r6
	ldr	r0, .L8+4
	bl	tty_alloc
	mov	r7, #0
	mov	r4, r0
	ldr	r3, .L8+8
	str	r7, [sp]
	ldr	r3, [r3]
	ldr	r2, .L8+12
	mov	r1, r7
	bl	tty_makedev
	mov	r1, r4
	mov	r0, r5
	bl	device_set_softc
	mov	r0, r4
	bl	tty_getlock
	mov	r2, r7
	mov	r1, r0
	add	r0, r6, #4
	bl	callout_init_mtx
	ldr	r3, [r6]
	ldr	r2, .L8+16
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [r3]
	ldr	r2, [r2]
	blx	r3
	subs	r6, r0, #0
	bne	.L6
	ldr	r3, .L8+20
	ldr	r1, .L8+24
	ldr	r0, .L8+28
	mov	r2, r4
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r0, [r0]
	bl	EVENTHANDLER_REGISTER
	cmp	r0, #0
	beq	.L7
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L6:
	mov	r0, r5
	mov	r2, r6
	ldr	r1, .L8+32
	bl	device_printf
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L7:
	mov	r0, r5
	ldr	r1, .L8+36
	bl	device_printf
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L9:
	.align	2
.L8:
	.word	main_cons
	.word	xencons_ttydevsw
	.word	driver_name
	.word	.LC0
	.word	xencons_intr
	.word	SHUTDOWN_PRI_DEFAULT
	.word	xencons_shutdown
	.word	shutdown_post_sync
	.word	.LC1
	.word	.LC2
	.size	xencons_attach, .-xencons_attach
	.comm	xencons_ttydevsw,4,4
	.comm	xencons_shutdown,4,4
	.comm	xencons_intr,4,4
	.comm	shutdown_post_sync,4,4
	.comm	main_cons,8,4
	.comm	driver_name,4,4
	.comm	SHUTDOWN_PRI_DEFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
