	.file	"extr_efi_console.c_efi_cons_update_mode.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"teken.fg_color"
.LC2:
	.string	"teken.bg_color"
.LC3:
	.string	"%u"
.LC4:
	.string	"LINES"
.LC5:
	.string	"COLUMNS"
	.text
	.p2align 4
	.globl	efi_cons_update_mode
	.type	efi_cons_update_mode, @function
efi_cons_update_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR conout[rip]
	lea	rcx, 12[rsp]
	lea	rdx, 8[rsp]
	mov	rsi, QWORD PTR 8[rax]
	mov	rdi, rax
	mov	esi, DWORD PTR [rsi]
	call	[QWORD PTR 16[rax]]
	mov	edi, eax
	call	EFI_ERROR@PLT
	test	rax, rax
	je	.L2
	mov	DWORD PTR 8[rsp], 80
	mov	DWORD PTR 12[rsp], 24
.L2:
	xor	eax, eax
	call	parse_uefi_con_out@PLT
	mov	DWORD PTR mode[rip], eax
	mov	r12d, eax
	and	r12d, DWORD PTR RB_SERIAL[rip]
	jne	.L3
	mov	rdi, QWORD PTR buffer[rip]
	test	rdi, rdi
	je	.L4
	mov	eax, DWORD PTR 12[rsp]
	cmp	DWORD PTR tp[rip], eax
	jne	.L5
	mov	eax, DWORD PTR 8[rsp]
	cmp	DWORD PTR tp[rip+4], eax
	je	.L14
.L5:
	call	free@PLT
.L7:
	mov	eax, DWORD PTR 12[rsp]
	mov	edx, DWORD PTR 8[rsp]
	mov	DWORD PTR tp[rip], eax
	imul	eax, edx
	mov	DWORD PTR tp[rip+4], edx
	lea	edi, [rax+rax*2]
	sal	edi, 2
	call	malloc@PLT
	mov	QWORD PTR buffer[rip], rax
	test	rax, rax
	je	.L1
	lea	rsi, tp[rip]
	lea	rdi, teken[rip]
	call	teken_set_winsize@PLT
	lea	rdi, teken[rip]
	lea	rbp, 16[rsp]
	call	teken_get_defattr@PLT
	lea	rdx, .LC0[rip]
	mov	esi, 8
	mov	rdi, rbp
	mov	ecx, DWORD PTR [rax]
	mov	rbx, rax
	call	snprintf@PLT
	mov	r8d, DWORD PTR env_nounset[rip]
	mov	ecx, DWORD PTR efi_set_colors[rip]
	mov	rdx, rbp
	mov	esi, DWORD PTR EV_VOLATILE[rip]
	lea	rdi, .LC1[rip]
	call	env_setenv@PLT
	mov	ecx, DWORD PTR 4[rbx]
	mov	esi, 8
	mov	rdi, rbp
	lea	rdx, .LC0[rip]
	call	snprintf@PLT
	mov	r8d, DWORD PTR env_nounset[rip]
	mov	ecx, DWORD PTR efi_set_colors[rip]
	mov	rdx, rbp
	mov	esi, DWORD PTR EV_VOLATILE[rip]
	lea	rdi, .LC2[rip]
	call	env_setenv@PLT
	mov	r8d, DWORD PTR 12[rsp]
	test	r8d, r8d
	jle	.L8
	mov	esi, DWORD PTR 8[rsp]
	lea	edi, -1[rsi]
	.p2align 4,,10
	.p2align 3
.L9:
	test	esi, esi
	jle	.L12
	mov	edx, DWORD PTR tp[rip+4]
	mov	rcx, QWORD PTR buffer[rip]
	imul	edx, r12d
	movsx	rdx, edx
	lea	rax, [rdx+rdx*2]
	add	rdx, rdi
	lea	rdx, [rdx+rdx*2]
	lea	rax, [rcx+rax*4]
	lea	rcx, 12[rcx+rdx*4]
	.p2align 4,,10
	.p2align 3
.L10:
	mov	BYTE PTR [rax], 32
	mov	rdx, QWORD PTR [rbx]
	add	rax, 12
	mov	QWORD PTR -8[rax], rdx
	cmp	rcx, rax
	jne	.L10
.L12:
	add	r12d, 1
	cmp	r12d, r8d
	jne	.L9
.L8:
	mov	ecx, r8d
	lea	rdx, .LC3[rip]
	mov	esi, 8
	mov	rdi, rbp
	call	snprintf@PLT
	mov	edx, 1
	mov	rsi, rbp
	lea	rdi, .LC4[rip]
	call	setenv@PLT
	mov	ecx, DWORD PTR 8[rsp]
	mov	esi, 8
	mov	rdi, rbp
	lea	rdx, .LC3[rip]
	mov	r12d, 1
	call	snprintf@PLT
	mov	edx, 1
	mov	rsi, rbp
	lea	rdi, .LC5[rip]
	call	setenv@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	r8d, DWORD PTR 12[rsp]
	lea	rbp, 16[rsp]
	jmp	.L8
.L4:
	xor	edx, edx
	lea	rsi, tf[rip]
	lea	rdi, teken[rip]
	call	teken_init@PLT
	jmp	.L7
.L14:
	mov	r12d, 1
	jmp	.L1
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	efi_cons_update_mode, .-efi_cons_update_mode
	.comm	tp,8,8
	.comm	tf,4,4
	.comm	teken,4,4
	.comm	mode,4,4
	.comm	fg_c,4,4
	.comm	env_nounset,4,4
	.comm	efi_set_colors,4,4
	.comm	cury,4,4
	.comm	curx,4,4
	.comm	conout,8,8
	.comm	buffer,8,8
	.comm	bg_c,4,4
	.comm	RB_SERIAL,4,4
	.comm	EV_VOLATILE,4,4
	.comm	DEFAULT_FGCOLOR,4,4
	.comm	DEFAULT_BGCOLOR,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_efi_console.c_efi_cons_update_mode.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"teken.fg_color\000"
	.align	2
.LC2:
	.ascii	"teken.bg_color\000"
	.align	2
.LC3:
	.ascii	"%u\000"
	.align	2
.LC4:
	.ascii	"LINES\000"
	.align	2
.LC5:
	.ascii	"COLUMNS\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	efi_cons_update_mode
	.syntax unified
	.arm
	.fpu softvfp
	.type	efi_cons_update_mode, %function
efi_cons_update_mode:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, .L25
	sub	sp, sp, #36
	ldr	r0, [r2]
	ldr	ip, .L25+4
	add	r3, sp, #16
	add	r2, sp, #12
	ldmib	r0, {r1, r4}
	ldr	r1, [r1]
	ldr	ip, [ip]
	str	ip, [sp, #28]
	mov	ip,#0
	blx	r4
	bl	EFI_ERROR
	cmp	r0, #0
	movne	r2, #80
	movne	r3, #24
	strne	r2, [sp, #12]
	strne	r3, [sp, #16]
	bl	parse_uefi_con_out
	ldr	r2, .L25+8
	ldr	r3, .L25+12
	ldr	r5, [r2]
	str	r0, [r3]
	ands	r5, r0, r5
	bne	.L3
	ldr	r8, .L25+16
	ldr	r0, [r8]
	cmp	r0, #0
	beq	.L4
	ldr	r6, .L25+20
	ldr	r3, [sp, #16]
	ldr	r2, [r6]
	cmp	r2, r3
	bne	.L5
	ldr	r2, [r6, #4]
	ldr	r3, [sp, #12]
	cmp	r2, r3
	moveq	r5, #1
	beq	.L1
.L5:
	bl	free
.L7:
	ldr	r0, [sp, #16]
	ldr	r3, [sp, #12]
	str	r0, [r6]
	mul	r0, r3, r0
	add	r0, r0, r0, lsl #1
	lsl	r0, r0, #2
	str	r3, [r6, #4]
	bl	malloc
	cmp	r0, #0
	str	r0, [r8]
	beq	.L1
	ldr	r1, .L25+20
	ldr	r0, .L25+24
	bl	teken_set_winsize
	ldr	r0, .L25+24
	bl	teken_get_defattr
	mov	r4, r0
	add	r7, sp, #20
	ldr	fp, .L25+28
	ldr	r3, [r0]
	mov	r1, #8
	ldr	r2, .L25+32
	mov	r0, r7
	bl	snprintf
	ldr	r3, [fp]
	ldr	r10, .L25+36
	ldr	r9, .L25+40
	str	r3, [sp]
	mov	r2, r7
	ldr	r3, [r10]
	ldr	r1, [r9]
	ldr	r0, .L25+44
	bl	env_setenv
	mov	r1, #8
	ldr	r3, [r4, #4]
	ldr	r2, .L25+32
	mov	r0, r7
	bl	snprintf
	ldr	r2, [fp]
	ldr	r3, [r10]
	str	r2, [sp]
	ldr	r1, [r9]
	mov	r2, r7
	ldr	r0, .L25+48
	bl	env_setenv
	ldr	r3, [sp, #16]
	cmp	r3, #0
	ble	.L8
	mov	r9, #32
	ldr	r10, [sp, #12]
.L9:
	cmp	r10, #0
	ble	.L12
	ldr	r2, [r6, #4]
	ldr	ip, [r8]
	mul	r2, r5, r2
	add	lr, r10, r2
	add	lr, lr, lr, lsl #1
	add	r2, r2, r2, lsl #1
	add	lr, ip, lr, lsl #2
	add	ip, ip, r2, lsl #2
.L10:
	mov	r2, ip
	add	ip, ip, #12
	strb	r9, [r2], #4
	cmp	lr, ip
	ldm	r4, {r0, r1}
	stm	r2, {r0, r1}
	bne	.L10
.L12:
	add	r5, r5, #1
	cmp	r5, r3
	bne	.L9
.L8:
	mov	r1, #8
	ldr	r2, .L25+52
	mov	r0, r7
	bl	snprintf
	mov	r2, #1
	mov	r1, r7
	ldr	r0, .L25+56
	bl	setenv
	mov	r1, #8
	ldr	r3, [sp, #12]
	ldr	r2, .L25+52
	mov	r0, r7
	bl	snprintf
	mov	r1, r7
	mov	r2, #1
	ldr	r0, .L25+60
	bl	setenv
	mov	r5, #1
.L1:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	mov	r0, r5
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	ldr	r3, [sp, #16]
	add	r7, sp, #20
	b	.L8
.L4:
	mov	r2, r5
	ldr	r1, .L25+64
	ldr	r0, .L25+24
	bl	teken_init
	ldr	r6, .L25+20
	b	.L7
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	conout
	.word	.LC6
	.word	RB_SERIAL
	.word	mode
	.word	buffer
	.word	tp
	.word	teken
	.word	env_nounset
	.word	.LC0
	.word	efi_set_colors
	.word	EV_VOLATILE
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	tf
	.size	efi_cons_update_mode, .-efi_cons_update_mode
	.comm	tp,8,4
	.comm	tf,4,4
	.comm	teken,4,4
	.comm	mode,4,4
	.comm	fg_c,4,4
	.comm	env_nounset,4,4
	.comm	efi_set_colors,4,4
	.comm	cury,4,4
	.comm	curx,4,4
	.comm	conout,4,4
	.comm	buffer,4,4
	.comm	bg_c,4,4
	.comm	RB_SERIAL,4,4
	.comm	EV_VOLATILE,4,4
	.comm	DEFAULT_FGCOLOR,4,4
	.comm	DEFAULT_BGCOLOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
