	.file	"extr_fsl_rio.c_rio_hw_add_outb_message.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"RIO: rio_hw_add_outb_message(): destid %4.4x mbox %d buffer %8.8x len %8.8x\n"
	.text
	.p2align 4
	.globl	rio_hw_add_outb_message
	.type	rio_hw_add_outb_message, @function
rio_hw_add_outb_message:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	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
	mov	ebx, edx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r15, QWORD PTR 8[rdi]
	mov	esi, DWORD PTR [rsi]
	lea	rdi, .LC0[rip]
	mov	eax, DWORD PTR [r15]
	mov	DWORD PTR 4[rsp], eax
	mov	rax, QWORD PTR 32[r15]
	mov	QWORD PTR 8[rsp], rax
	call	pr_debug@PLT
	cmp	rbp, 7
	jbe	.L2
	cmp	QWORD PTR RIO_MAX_MSG_SIZE[rip], rbp
	jnb	.L3
.L2:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	add	rsp, 24
	.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
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	movsx	rdx, DWORD PTR [r15]
	mov	rax, QWORD PTR 24[r15]
	mov	rsi, r14
	mov	rdi, QWORD PTR [rax+rdx*8]
	mov	rdx, rbp
	call	memcpy@PLT
	mov	rdx, QWORD PTR RIO_MAX_MSG_SIZE[rip]
	lea	rax, -4[rdx]
	cmp	rax, rbp
	ja	.L12
.L5:
	movsx	r14, DWORD PTR 4[rsp]
	mov	rcx, QWORD PTR 8[rsp]
	lea	rax, [r14+r14*2]
	lea	r14, [rcx+rax*8]
	mov	eax, DWORD PTR [r12]
	cmp	eax, 128
	je	.L6
	cmp	eax, 129
	je	.L13
.L7:
	mov	rdi, rbp
	call	is_power_of_2@PLT
	test	rax, rax
	je	.L14
.L8:
.L4:
	endbr64
	movsx	rdx, DWORD PTR [r15]
	mov	rax, QWORD PTR 8[r15]
	mov	QWORD PTR 8[r14], rbp
	mov	rdi, QWORD PTR 40[r15]
	mov	eax, DWORD PTR [rax+rdx*4]
	or	eax, 4
	mov	DWORD PTR 16[r14], eax
	call	in_be32@PLT
	mov	rdi, QWORD PTR 40[r15]
	or	eax, DWORD PTR RIO_MSG_OMR_MUI[rip]
	mov	esi, eax
	call	out_be32@PLT
	mov	eax, DWORD PTR [r15]
	add	eax, 1
	mov	DWORD PTR [r15], eax
	movsx	rdx, eax
	xor	eax, eax
	cmp	rdx, QWORD PTR 16[r15]
	jne	.L1
	mov	DWORD PTR [r15], 0
	add	rsp, 24
	.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
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[r13]
	and	ebx, 3
	mov	rdi, rbp
	mov	DWORD PTR [r14], ebx
	sal	eax, 2
	or	eax, 671088640
	mov	DWORD PTR 4[r14], eax
	call	is_power_of_2@PLT
	test	rax, rax
	jne	.L8
.L14:
	mov	rdi, rbp
	mov	ebp, 1
	call	get_bitmask_order@PLT
	mov	ecx, eax
	sal	ebp, cl
	movsx	rbp, ebp
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edx, DWORD PTR 0[r13]
	and	ebx, 3
	mov	DWORD PTR 4[r14], 671088640
	sal	edx, 16
	or	ebx, edx
	mov	DWORD PTR [r14], ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	movsx	rcx, DWORD PTR [r15]
	mov	rax, QWORD PTR 24[r15]
	sub	rdx, rbp
	xor	esi, esi
	mov	rdi, QWORD PTR [rax+rcx*8]
	add	rdi, rbp
	call	memset@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	rio_hw_add_outb_message, .-rio_hw_add_outb_message
	.comm	RIO_MSG_OMR_MUI,4,4
	.comm	RIO_MAX_MSG_SIZE,8,8
	.comm	EINVAL,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_fsl_rio.c_rio_hw_add_outb_message.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"RIO: rio_hw_add_outb_message(): destid %4.4x mbox %"
	.ascii	"d buffer %8.8x len %8.8x\012\000"
	.text
	.align	2
	.global	rio_hw_add_outb_message
	.syntax unified
	.arm
	.fpu softvfp
	.type	rio_hw_add_outb_message, %function
rio_hw_add_outb_message:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	ldr	r4, [r0, #4]
	ldr	r5, [sp, #48]
	ldr	r10, [r4]
	ldr	r9, [r4, #16]
	mov	r6, r0
	mov	r7, r1
	ldr	r0, .L15
	ldr	r1, [r1]
	str	r5, [sp]
	mov	r8, r2
	mov	fp, r3
	bl	pr_debug
	cmp	r5, #7
	bls	.L2
	ldr	r3, .L15+4
	ldr	r2, [r3]
	cmp	r2, r5
	bcs	.L3
.L2:
	ldr	r3, .L15+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
.L3:
	ldr	r2, [r4, #12]
	ldr	r0, [r4]
	mov	r1, fp
	ldr	r0, [r2, r0, lsl #2]
	mov	r2, r5
	bl	memcpy
	ldr	r3, .L15+4
	ldr	r2, [r3]
	sub	r3, r2, #4
	cmp	r3, r5
	bhi	.L12
.L5:
	ldr	r3, [r6]
	add	r6, r9, r10, lsl #4
	cmp	r3, #128
	beq	.L6
	cmp	r3, #129
	beq	.L13
.L7:
	mov	r0, r5
	bl	is_power_of_2
	cmp	r0, #0
	beq	.L14
.L8:
	ldm	r4, {r2, r3}
	ldr	r3, [r3, r2, lsl #2]
	ldr	r0, [r4, #20]
	orr	r3, r3, #4
	str	r3, [r6, #12]
	str	r5, [r6, #8]
	bl	in_be32
	mov	r1, r0
	ldr	r3, .L15+12
	ldr	r0, [r4, #20]
	ldr	r3, [r3]
	orr	r1, r1, r3
	bl	out_be32
	mov	r0, #0
	ldr	r3, [r4]
	ldr	r2, [r4, #8]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [r4]
	streq	r0, [r4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	ldr	r3, [r7]
	and	r8, r8, #3
	lsl	r3, r3, #2
	orr	r3, r3, #671088640
	str	r8, [r9, r10, lsl #4]
	mov	r0, r5
	str	r3, [r6, #4]
	bl	is_power_of_2
	cmp	r0, #0
	bne	.L8
.L14:
	mov	r0, r5
	bl	get_bitmask_order
	mov	r5, #1
	lsl	r5, r5, r0
	b	.L8
.L6:
	mov	r3, #671088640
	ldr	r2, [r7]
	and	r8, r8, #3
	orr	r8, r8, r2, lsl #16
	str	r8, [r9, r10, lsl #4]
	str	r3, [r6, #4]
	b	.L7
.L12:
	ldr	r1, [r4]
	ldr	r3, [r4, #12]
	sub	r2, r2, r5
	ldr	r0, [r3, r1, lsl #2]
	mov	r1, #0
	add	r0, r5, r0
	bl	memset
	b	.L5
.L16:
	.align	2
.L15:
	.word	.LC0
	.word	RIO_MAX_MSG_SIZE
	.word	EINVAL
	.word	RIO_MSG_OMR_MUI
	.size	rio_hw_add_outb_message, .-rio_hw_add_outb_message
	.comm	RIO_MSG_OMR_MUI,4,4
	.comm	RIO_MAX_MSG_SIZE,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
