	.file	"extr_macfb.c_dafb_setpalette.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dafb_setpalette, @function
dafb_setpalette:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edi
	xor	edi, edi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r8
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 12[rsp], ecx
	call	local_irq_save@PLT
	mov	eax, DWORD PTR lastreg.1945[rip]
	add	eax, 1
	cmp	eax, r12d
	jne	.L10
.L2:
	mov	rsi, QWORD PTR dafb_cmap_regs[rip]
	mov	edi, r15d
	call	nubus_writeb@PLT
	xor	eax, eax
	call	nop@PLT
	mov	rsi, QWORD PTR dafb_cmap_regs[rip]
	mov	edi, r14d
	call	nubus_writeb@PLT
	xor	eax, eax
	call	nop@PLT
	mov	edi, DWORD PTR 12[rsp]
	mov	rsi, QWORD PTR dafb_cmap_regs[rip]
	call	nubus_writeb@PLT
	xor	edi, edi
	call	local_irq_restore@PLT
	mov	DWORD PTR lastreg.1945[rip], r12d
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rax, QWORD PTR dafb_cmap_regs[rip]
	xor	edi, edi
	lea	rsi, 4[rax]
	call	nubus_writel@PLT
	xor	eax, eax
	call	nop@PLT
	test	r12d, r12d
	je	.L2
	lea	eax, -1[r12]
	xor	ebx, ebx
	lea	r13, 4[0+rax*4]
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 0[rbp]
	mov	rsi, QWORD PTR dafb_cmap_regs[rip]
	mov	edi, DWORD PTR [rax+rbx]
	sar	edi, 8
	call	nubus_writeb@PLT
	xor	eax, eax
	call	nop@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rsi, QWORD PTR dafb_cmap_regs[rip]
	mov	edi, DWORD PTR [rax+rbx]
	sar	edi, 8
	call	nubus_writeb@PLT
	xor	eax, eax
	call	nop@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	rsi, QWORD PTR dafb_cmap_regs[rip]
	mov	edi, DWORD PTR [rax+rbx]
	add	rbx, 4
	sar	edi, 8
	call	nubus_writeb@PLT
	xor	eax, eax
	call	nop@PLT
	cmp	r13, rbx
	jne	.L3
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	dafb_setpalette, .-dafb_setpalette
	.data
	.align 4
	.type	lastreg.1945, @object
	.size	lastreg.1945, 4
lastreg.1945:
	.long	-2
	.comm	dafb_cmap_regs,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_macfb.c_dafb_setpalette.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dafb_setpalette, %function
dafb_setpalette:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r0
	ldr	fp, .L12
	mov	r0, #0
	mov	r8, r3
	mov	r10, r1
	mov	r9, r2
	ldr	r6, [sp, #40]
	bl	local_irq_save
	ldr	r3, [fp]
	ldr	r5, .L12+4
	add	r3, r3, #1
	cmp	r3, r7
	bne	.L9
.L2:
	ldr	r1, [r5]
	mov	r0, r10
	bl	nubus_writeb
	bl	nop
	ldr	r1, [r5]
	mov	r0, r9
	bl	nubus_writeb
	bl	nop
	ldr	r1, [r5]
	mov	r0, r8
	bl	nubus_writeb
	mov	r0, #0
	bl	local_irq_restore
	mov	r0, #0
	str	r7, [fp]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	ldr	r1, [r5]
	mov	r0, #0
	add	r1, r1, #4
	bl	nubus_writel
	bl	nop
	cmp	r7, #0
	beq	.L2
	mov	r4, #0
.L3:
	ldr	r3, [r6]
	ldr	r1, [r5]
	ldr	r0, [r3, r4, lsl #2]
	asr	r0, r0, #8
	bl	nubus_writeb
	bl	nop
	ldr	r3, [r6, #4]
	ldr	r1, [r5]
	ldr	r0, [r3, r4, lsl #2]
	asr	r0, r0, #8
	bl	nubus_writeb
	bl	nop
	ldr	r3, [r6, #8]
	ldr	r1, [r5]
	ldr	r0, [r3, r4, lsl #2]
	add	r4, r4, #1
	asr	r0, r0, #8
	bl	nubus_writeb
	bl	nop
	cmp	r4, r7
	bne	.L3
	b	.L2
.L13:
	.align	2
.L12:
	.word	.LANCHOR0
	.word	dafb_cmap_regs
	.size	dafb_setpalette, .-dafb_setpalette
	.comm	dafb_cmap_regs,4,4
	.data
	.align	2
	.set	.LANCHOR0,. + 0
	.type	lastreg.4229, %object
	.size	lastreg.4229, 4
lastreg.4229:
	.word	-2
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
