	.file	"extr_sunhv.c_sunhv_console_write_paged.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sunhv_console_write_paged, @function
sunhv_console_write_paged:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	edi, edi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR sunhv_port[rip]
	mov	rbx, rax
	mov	QWORD PTR 8[rsp], rax
	call	local_irq_save@PLT
	cmp	QWORD PTR 8[rbx], 0
	jne	.L2
	cmp	QWORD PTR oops_in_progress[rip], 0
	jne	.L32
	mov	rdi, QWORD PTR 8[rsp]
	call	spin_lock@PLT
	test	r13d, r13d
	je	.L6
	mov	DWORD PTR 4[rsp], 1
.L4:
	lea	r15, 24[rsp]
	lea	r12, 32[rsp]
.L13:
	mov	edi, DWORD PTR con_write_page[rip]
	call	__pa@PLT
	mov	esi, r13d
	mov	rdi, r14
	mov	rdx, r15
	mov	rbp, rax
	call	fill_con_write_page@PLT
	mov	rsi, QWORD PTR 24[rsp]
	sub	r13d, eax
	mov	eax, eax
	add	r14, rax
	test	rsi, rsi
	je	.L16
	.p2align 4,,10
	.p2align 3
.L7:
	mov	ebx, 1000000
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L33:
	mov	edi, 1
	call	udelay@PLT
	sub	ebx, 1
	je	.L16
	mov	rsi, QWORD PTR 24[rsp]
.L12:
	mov	rdx, r12
	mov	rdi, rbp
	call	sun4v_con_write@PLT
	cmp	QWORD PTR HV_EOK[rip], rax
	jne	.L33
	mov	rax, QWORD PTR 32[rsp]
	mov	rsi, QWORD PTR 24[rsp]
	sub	rsi, rax
	add	rbp, rax
	mov	QWORD PTR 24[rsp], rsi
	test	rsi, rsi
	jne	.L7
.L16:
	test	r13d, r13d
	jne	.L13
.L5:
	mov	eax, DWORD PTR 4[rsp]
	test	eax, eax
	jne	.L6
.L14:
	xor	edi, edi
	call	local_irq_restore@PLT
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L34
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	mov	DWORD PTR 4[rsp], 0
	test	r13d, r13d
	jne	.L4
	jmp	.L14
.L32:
	mov	rdi, rbx
	call	spin_trylock@PLT
	mov	DWORD PTR 4[rsp], eax
	test	r13d, r13d
	jne	.L4
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, QWORD PTR 8[rsp]
	call	spin_unlock@PLT
	jmp	.L14
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sunhv_console_write_paged, .-sunhv_console_write_paged
	.comm	sunhv_port,8,8
	.comm	oops_in_progress,8,8
	.comm	con_write_page,4,4
	.comm	HV_EOK,8,8
	.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_sunhv.c_sunhv_console_write_paged.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sunhv_console_write_paged, %function
sunhv_console_write_paged:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L34
	sub	sp, sp, #20
	ldr	fp, [r3]
	ldr	r3, .L34+4
	mov	r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r8, r1
	mov	r7, r2
	bl	local_irq_save
	ldr	r3, [fp, #4]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L34+8
	mov	r0, fp
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L31
	bl	spin_lock
	cmp	r7, #0
	beq	.L6
	mov	r10, #1
.L4:
	ldr	r9, .L34+12
	ldr	r6, .L34+16
.L13:
	ldr	r0, [r9]
	bl	__pa
	mov	r1, r7
	mov	r5, r0
	add	r2, sp, #4
	mov	r0, r8
	bl	fill_con_write_page
	ldr	r1, [sp, #4]
	sub	r7, r7, r0
	cmp	r1, #0
	add	r8, r8, r0
	beq	.L16
.L7:
	ldr	r4, .L34+20
	b	.L12
.L32:
	mov	r0, #1
	bl	udelay
	subs	r4, r4, #1
	beq	.L16
	ldr	r1, [sp, #4]
.L12:
	mov	r0, r5
	add	r2, sp, #8
	bl	sun4v_con_write
	ldr	r3, [r6]
	cmp	r3, r0
	bne	.L32
	ldmib	sp, {r1, r3}
	sub	r1, r1, r3
	cmp	r1, #0
	add	r5, r5, r3
	str	r1, [sp, #4]
	bne	.L7
.L16:
	cmp	r7, #0
	bne	.L13
.L5:
	cmp	r10, #0
	bne	.L6
.L14:
	mov	r0, #0
	bl	local_irq_restore
	ldr	r3, .L34+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L33
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	cmp	r7, #0
	movne	r10, #0
	bne	.L4
	b	.L14
.L31:
	bl	spin_trylock
	cmp	r7, #0
	mov	r10, r0
	bne	.L4
	b	.L5
.L6:
	mov	r0, fp
	bl	spin_unlock
	b	.L14
.L33:
	bl	__stack_chk_fail
.L35:
	.align	2
.L34:
	.word	sunhv_port
	.word	.LC0
	.word	oops_in_progress
	.word	con_write_page
	.word	HV_EOK
	.word	1000000
	.size	sunhv_console_write_paged, .-sunhv_console_write_paged
	.comm	sunhv_port,4,4
	.comm	oops_in_progress,4,4
	.comm	con_write_page,4,4
	.comm	HV_EOK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
