	.file	"extr_atom.c_atom_allocate_fb_scratch.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"atom firmware requested %08x %dkb\n"
	.text
	.p2align 4
	.globl	atom_allocate_fb_scratch
	.type	atom_allocate_fb_scratch, @function
atom_allocate_fb_scratch:
.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
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR VRAM_UsageByFirmware[rip]
	mov	edi, DWORD PTR DATA[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	GetIndexIntoMasterTable@PLT
	xor	r8d, r8d
	xor	ecx, ecx
	xor	edx, edx
	mov	esi, eax
	mov	r9, rsp
	mov	rdi, rbx
	call	atom_parse_data_header@PLT
	test	rax, rax
	jne	.L2
	mov	DWORD PTR [rbx], 0
	mov	ebp, 20480
.L3:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, ebp
	call	kzalloc@PLT
	mov	DWORD PTR 4[rbx], eax
	test	eax, eax
	je	.L9
	mov	DWORD PTR [rbx], ebp
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	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
.L9:
	.cfi_restore_state
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rbp, QWORD PTR [rsp]
	add	rbp, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [rax]
	call	le16_to_cpu@PLT
	mov	r12d, eax
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR 4[rax]
	call	le32_to_cpu@PLT
	mov	edx, r12d
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	DRM_DEBUG@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [rax]
	call	le16_to_cpu@PLT
	mov	DWORD PTR [rbx], 0
	sal	eax, 10
	mov	ebp, eax
	mov	eax, 20480
	cmove	ebp, eax
	jmp	.L3
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	atom_allocate_fb_scratch, .-atom_allocate_fb_scratch
	.comm	VRAM_UsageByFirmware,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	DATA,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_atom.c_atom_allocate_fb_scratch.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"atom firmware requested %08x %dkb\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	atom_allocate_fb_scratch
	.syntax unified
	.arm
	.fpu softvfp
	.type	atom_allocate_fb_scratch, %function
atom_allocate_fb_scratch:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L10
	ldr	r2, .L10+4
	mov	r4, r0
	ldr	r0, [r3]
	ldr	r3, .L10+8
	sub	sp, sp, #16
	ldr	r1, [r2]
	mov	r5, #0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	GetIndexIntoMasterTable
	add	ip, sp, #8
	mov	r1, r0
	mov	r3, r5
	mov	r0, r4
	mov	r2, r5
	str	r5, [sp]
	str	ip, [sp, #4]
	bl	atom_parse_data_header
	cmp	r0, #0
	bne	.L2
	mov	r6, #20480
	str	r0, [r4]
.L3:
	ldr	r3, .L10+12
	mov	r0, r6
	ldr	r1, [r3]
	bl	kzalloc
	cmp	r0, #0
	ldreq	r3, .L10+16
	str	r0, [r4, #4]
	ldreq	r0, [r3]
	ldr	r3, .L10+8
	strne	r6, [r4]
	movne	r0, #0
	rsbeq	r0, r0, #0
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r6, [sp, #8]
	ldr	r7, [r4, #8]
	ldr	r3, [r7, r6]
	ldr	r0, [r3, #4]
	bl	le32_to_cpu
	ldr	r3, [r7, r6]
	mov	r8, r0
	ldr	r0, [r3]
	bl	le16_to_cpu
	mov	r1, r8
	mov	r2, r0
	ldr	r0, .L10+20
	bl	DRM_DEBUG
	ldr	r3, [r7, r6]
	ldr	r0, [r3]
	bl	le16_to_cpu
	lsls	r6, r0, #10
	moveq	r6, #20480
	str	r5, [r4]
	b	.L3
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	DATA
	.word	VRAM_UsageByFirmware
	.word	.LC1
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	.LC0
	.size	atom_allocate_fb_scratch, .-atom_allocate_fb_scratch
	.comm	VRAM_UsageByFirmware,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
