	.file	"extr_xillybus_core.c_xilly_setupchannels.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Corrupt IDT: No message buffer. Aborting.\n"
	.align 8
.LC1:
	.string	"IDT requests channel out of range. Aborting.\n"
	.text
	.p2align 4
	.type	xilly_setupchannels, @function
xilly_setupchannels:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 136
	.cfi_def_cfa_offset 192
	mov	rdi, QWORD PTR 8[rdi]
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	DWORD PTR 8[rsp], edx
	mov	esi, DWORD PTR 0[rbp]
	mov	edx, 200
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 120[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR DMA_TO_DEVICE[rip]
	mov	QWORD PTR 48[rsp], rdi
	mov	QWORD PTR 64[rsp], 1
	mov	DWORD PTR 72[rsp], eax
	movabs	rax, -9223372036854775807
	mov	QWORD PTR 96[rsp], rax
	mov	eax, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	DWORD PTR 76[rsp], 0
	mov	QWORD PTR 80[rsp], 0
	mov	DWORD PTR 104[rsp], eax
	mov	DWORD PTR 108[rsp], 0
	mov	QWORD PTR 112[rsp], 0
	call	devm_kcalloc@PLT
	test	rax, rax
	je	.L34
	mov	rbx, rax
	mov	eax, DWORD PTR 0[rbp]
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	edx, 8
	mov	rdi, QWORD PTR 48[rsp]
	lea	esi, 1[rax]
	call	devm_kcalloc@PLT
	mov	QWORD PTR 16[rbp], rax
	test	rax, rax
	je	.L34
	mov	esi, DWORD PTR 0[rbp]
	mov	QWORD PTR [rax], 0
	test	esi, esi
	jle	.L5
	mov	r14d, 8
	mov	r12d, 1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	QWORD PTR 72[rbx], 0
	lea	rdi, 124[rbx]
	mov	r13, rbx
	mov	QWORD PTR 80[rbx], 0
	mov	DWORD PTR [rbx], 0
	mov	DWORD PTR 4[rbx], 0
	mov	DWORD PTR 8[rbx], -1
	mov	QWORD PTR 192[rbx], 0
	mov	QWORD PTR 184[rbx], 0
	mov	DWORD PTR 12[rbx], 1
	mov	QWORD PTR 176[rbx], 0
	mov	DWORD PTR 16[rbx], 1
	mov	QWORD PTR 168[rbx], 0
	mov	QWORD PTR 160[rbx], 0
	mov	QWORD PTR 152[rbx], 0
	mov	QWORD PTR 144[rbx], 0
	mov	QWORD PTR 136[rbx], 0
	mov	QWORD PTR 128[rbx], 0
	call	spin_lock_init@PLT
	lea	rdi, 120[rbx]
	call	spin_lock_init@PLT
	lea	rdi, 116[rbx]
	call	mutex_init@PLT
	lea	rdi, 112[rbx]
	call	mutex_init@PLT
	lea	rdi, 108[rbx]
	call	init_waitqueue_head@PLT
	lea	rdi, 104[rbx]
	call	init_waitqueue_head@PLT
	lea	rdi, 100[rbx]
	call	init_waitqueue_head@PLT
	mov	esi, DWORD PTR xillybus_autoflush[rip]
	lea	rdi, 96[rbx]
	add	rbx, 200
	call	INIT_DELAYED_WORK@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	DWORD PTR -180[rbx], r12d
	add	r12d, 1
	mov	QWORD PTR -112[rbx], rbp
	mov	DWORD PTR -176[rbx], 0
	mov	QWORD PTR [rax+r14], r13
	add	r14, 8
	cmp	DWORD PTR 0[rbp], r12d
	jge	.L6
.L5:
	mov	ecx, DWORD PTR 8[rsp]
	test	ecx, ecx
	jle	.L19
	mov	eax, DWORD PTR 8[rsp]
	mov	DWORD PTR 60[rsp], 0
	mov	r10, rbp
	sub	eax, 1
	lea	rax, 4[r15+rax*4]
	mov	QWORD PTR 16[rsp], rax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR 8[rsp]
	mov	DWORD PTR 4[r12], esi
	mov	DWORD PTR 28[r12], r8d
	mov	DWORD PTR 32[r12], eax
	mov	DWORD PTR 36[r12], ebp
	mov	DWORD PTR 40[r12], r14d
	mov	QWORD PTR 80[r12], rdx
	mov	DWORD PTR 44[r12], r9d
	lea	r9, 64[rsp]
.L33:
	mov	ecx, esi
	mov	rdi, r10
	mov	rsi, r9
	mov	QWORD PTR 8[rsp], r10
	call	xilly_get_dma_buffers@PLT
	mov	r10, QWORD PTR 8[rsp]
	test	eax, eax
	jne	.L34
.L17:
	add	r15, 4
	cmp	r15, QWORD PTR 16[rsp]
	je	.L36
.L18:
	movzx	edx, BYTE PTR [r15]
	movzx	eax, BYTE PTR 1[r15]
	mov	r8d, 1
	movzx	r13d, BYTE PTR 2[r15]
	mov	ebx, eax
	mov	ecx, edx
	mov	ebp, eax
	mov	r11d, edx
	sal	ebx, 7
	shr	cl
	mov	r14d, r13d
	mov	r9d, r13d
	movzx	ecx, cl
	and	ebx, 1920
	mov	edi, edx
	shr	bpl, 7
	or	ebx, ecx
	mov	ecx, eax
	shr	r14b, 7
	and	r11d, 1
	shr	cl, 6
	shr	r9b, 6
	and	edi, 1
	movzx	ebp, bpl
	mov	esi, ecx
	mov	ecx, r13d
	movzx	r14d, r14b
	and	r9d, 1
	sal	r8d, cl
	movzx	ecx, BYTE PTR 3[r15]
	and	esi, 1
	mov	DWORD PTR 8[rsp], esi
	mov	esi, 1
	and	ecx, 15
	sal	esi, cl
	cmp	DWORD PTR [r10], ebx
	jl	.L8
	or	edi, ebx
	je	.L8
	mov	rdi, QWORD PTR 16[r10]
	movsx	rcx, ebx
	and	edx, 1
	mov	r12, QWORD PTR [rdi+rcx*8]
	je	.L22
	test	ebx, ebx
	jne	.L22
	sal	r8d, 2
	xor	edx, edx
	test	r11b, r11b
	je	.L13
.L14:
	lea	r9, 96[rsp]
	mov	ecx, esi
	mov	rdi, r10
	xor	edx, edx
	mov	rsi, r9
	mov	QWORD PTR 8[rsp], r10
	call	xilly_get_dma_buffers@PLT
	add	DWORD PTR 60[rsp], 1
	mov	r10, QWORD PTR 8[rsp]
	test	eax, eax
	je	.L17
	.p2align 4,,10
	.p2align 3
.L34:
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
.L1:
	mov	rdx, QWORD PTR 120[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L37
	add	rsp, 136
	.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
.L22:
	.cfi_restore_state
	shr	al, 4
	mov	rdi, QWORD PTR 48[rsp]
	mov	edx, 8
	mov	QWORD PTR 40[rsp], r10
	mov	ecx, eax
	mov	eax, 2
	mov	DWORD PTR 56[rsp], r9d
	and	ecx, 3
	mov	BYTE PTR 39[rsp], r11b
	cmp	ecx, 2
	mov	DWORD PTR 28[rsp], esi
	cmovg	ecx, eax
	mov	DWORD PTR 24[r12], ecx
	sal	r8d, cl
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	DWORD PTR 32[rsp], r8d
	call	devm_kcalloc@PLT
	mov	esi, DWORD PTR 28[rsp]
	mov	r8d, DWORD PTR 32[rsp]
	test	rax, rax
	mov	r9d, DWORD PTR 56[rsp]
	mov	r10, QWORD PTR 40[rsp]
	mov	rdx, rax
	movzx	r11d, BYTE PTR 39[rsp]
	je	.L34
	test	r11b, r11b
	je	.L13
	test	ebx, ebx
	je	.L14
	mov	eax, DWORD PTR 8[rsp]
	shr	r13b, 5
	mov	DWORD PTR 44[r12], r9d
	lea	r9, 96[rsp]
	and	r13d, 1
	mov	DWORD PTR [r12], esi
	mov	DWORD PTR 48[r12], r8d
	mov	DWORD PTR 52[r12], r13d
	mov	DWORD PTR 56[r12], eax
	mov	DWORD PTR 60[r12], ebp
	mov	DWORD PTR 64[r12], r14d
	mov	QWORD PTR 72[r12], rdx
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR 8[r10]
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L36:
	mov	edx, DWORD PTR 60[rsp]
	mov	rbp, r10
	test	edx, edx
	jne	.L1
.L19:
	mov	rdi, QWORD PTR 8[rbp]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	xilly_setupchannels, .-xilly_setupchannels
	.comm	xillybus_autoflush,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,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_xillybus_core.c_xilly_setupchannels.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Corrupt IDT: No message buffer. Aborting.\012\000"
	.align	2
.LC1:
	.ascii	"IDT requests channel out of range. Aborting.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xilly_setupchannels, %function
xilly_setupchannels:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r0
	mov	r6, #0
	mov	r9, #1
	mov	ip, #-2147483648
	ldr	r3, .L35
	sub	sp, sp, #92
	ldr	r0, [r0, #4]
	ldr	r3, [r3]
	str	r2, [sp, #24]
	ldr	r2, .L35+4
	str	r0, [sp, #36]
	mov	r5, r1
	ldr	r1, .L35+8
	ldr	r2, [r2]
	str	r2, [sp, #84]
	mov	r2,#0
	str	r3, [sp, #52]
	ldr	r3, .L35+12
	ldr	lr, [r1]
	mov	r2, #148
	ldr	r1, [fp]
	ldr	r3, [r3]
	str	lr, [sp, #72]
	str	r9, [sp, #44]
	str	r9, [sp, #64]
	str	r6, [sp, #48]
	str	r6, [sp, #56]
	str	r6, [sp, #60]
	str	r6, [sp, #76]
	str	r6, [sp, #80]
	str	ip, [sp, #68]
	bl	devm_kcalloc
	subs	r4, r0, #0
	beq	.L31
	ldr	r1, [fp]
	ldr	r3, .L35+12
	mov	r2, #4
	ldr	r3, [r3]
	ldr	r0, [sp, #36]
	add	r1, r1, #1
	bl	devm_kcalloc
	cmp	r0, #0
	str	r0, [fp, #8]
	beq	.L31
	ldr	r2, [fp]
	str	r6, [r0]
	cmp	r2, #0
	ble	.L5
	mov	r10, r9
	mvn	r8, #0
	ldr	r7, .L35+16
	add	r4, r4, #108
.L6:
	mov	r0, r4
	str	r6, [r4, #-40]
	str	r6, [r4, #-36]
	str	r6, [r4, #-108]
	str	r6, [r4, #-104]
	str	r8, [r4, #-100]
	str	r6, [r4, #36]
	str	r6, [r4, #32]
	str	r10, [r4, #-96]
	str	r6, [r4, #28]
	str	r10, [r4, #-92]
	str	r6, [r4, #24]
	str	r6, [r4, #20]
	str	r6, [r4, #16]
	str	r6, [r4, #12]
	str	r6, [r4, #8]
	str	r6, [r4, #4]
	bl	spin_lock_init
	sub	r0, r4, #4
	bl	spin_lock_init
	sub	r0, r4, #8
	bl	mutex_init
	sub	r0, r4, #12
	bl	mutex_init
	sub	r0, r4, #16
	bl	init_waitqueue_head
	sub	r0, r4, #20
	bl	init_waitqueue_head
	sub	r0, r4, #24
	bl	init_waitqueue_head
	ldr	r1, [r7]
	sub	r0, r4, #28
	bl	INIT_DELAYED_WORK
	str	r9, [r4, #-88]
	str	r6, [r4, #-84]
	ldr	r3, [fp, #8]
	ldr	r2, [fp]
	sub	r1, r4, #108
	str	fp, [r4, #-32]
	str	r1, [r3, r9, lsl #2]
	add	r9, r9, #1
	cmp	r2, r9
	add	r4, r4, #148
	bge	.L6
.L5:
	ldr	r3, [sp, #24]
	cmp	r3, #0
	movgt	r9, #0
	addgt	r10, r5, #4
	strgt	r9, [sp, #28]
	bgt	.L17
	b	.L18
.L12:
	ldr	r3, [sp, #16]
	str	r1, [r6, #4]
	str	r3, [r6, #32]
	ldr	r3, [sp, #8]
	str	r5, [r6, #28]
	str	r3, [r6, #36]
	ldr	r3, [sp, #12]
	str	r2, [r6, #72]
	str	r3, [r6, #40]
	ldr	r3, [sp, #20]
	mov	r0, fp
	str	r3, [r6, #44]
	mov	r3, r1
	str	r5, [sp]
	add	r1, sp, #44
	bl	xilly_get_dma_buffers
.L15:
	cmp	r0, #0
	bne	.L31
.L16:
	ldr	r3, [sp, #24]
	add	r9, r9, #1
	cmp	r3, r9
	add	r10, r10, #4
	beq	.L29
	ldr	r2, [fp]
.L17:
	ldrb	r0, [r10, #-3]	@ zero_extendqisi2
	ldrb	r3, [r10, #-4]	@ zero_extendqisi2
	lsr	ip, r0, #6
	and	ip, ip, #1
	str	ip, [sp, #16]
	mov	ip, #1
	lsl	r4, r0, #7
	ldrb	r7, [r10, #-2]	@ zero_extendqisi2
	and	r4, r4, #1920
	orr	r4, r4, r3, lsr #1
	cmp	r2, r4
	lsr	r2, r7, #6
	and	r2, r2, ip
	ldrb	r1, [r10, #-1]	@ zero_extendqisi2
	str	r2, [sp, #20]
	lsr	r2, r0, #7
	and	r5, r7, #31
	and	r1, r1, #15
	str	r2, [sp, #8]
	lsr	r2, r7, #7
	lsl	r5, ip, r5
	lsl	r1, ip, r1
	and	r8, r3, ip
	str	r2, [sp, #12]
	blt	.L8
	orrs	r2, r8, r4
	beq	.L8
	mvn	r3, r3
	cmp	r4, #0
	movne	r3, #1
	ldr	r2, [fp, #8]
	andeq	r3, r3, #1
	cmp	r3, #0
	ldr	r6, [r2, r4, lsl #2]
	bne	.L33
	cmp	r8, #0
	moveq	r2, r8
	lsl	r5, r5, #2
	beq	.L12
.L13:
	mov	r3, r1
	mov	r2, #0
	mov	r0, fp
	str	r5, [sp]
	add	r1, sp, #64
	bl	xilly_get_dma_buffers
	ldr	r3, [sp, #28]
	cmp	r0, #0
	add	r3, r3, #1
	str	r3, [sp, #28]
	beq	.L16
.L31:
	ldr	r3, .L35+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L35+4
	ldr	r2, [r3]
	ldr	r3, [sp, #84]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L34
	add	sp, sp, #92
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	lsr	ip, r0, #4
	and	ip, ip, #3
	cmp	ip, #2
	movge	ip, #2
	ldr	r3, .L35+12
	mov	r2, #4
	ldr	r3, [r3]
	ldr	r0, [sp, #36]
	str	ip, [r6, #24]
	str	r1, [sp, #32]
	lsl	r5, r5, ip
	bl	devm_kcalloc
	subs	r2, r0, #0
	ldr	r1, [sp, #32]
	beq	.L31
	cmp	r8, #0
	beq	.L12
	cmp	r4, #0
	beq	.L13
	ldr	r3, [sp, #20]
	lsr	r7, r7, #5
	str	r3, [r6, #44]
	ldr	r3, [sp, #16]
	and	r7, r7, #1
	str	r3, [r6, #56]
	ldr	r3, [sp, #8]
	str	r1, [r6]
	str	r3, [r6, #60]
	ldr	r3, [sp, #12]
	str	r7, [r6, #52]
	str	r3, [r6, #64]
	str	r5, [r6, #48]
	mov	r3, r1
	str	r2, [r6, #68]
	mov	r0, fp
	str	r5, [sp]
	add	r1, sp, #64
	bl	xilly_get_dma_buffers
	b	.L15
.L8:
	ldr	r0, [fp, #4]
	ldr	r1, .L35+24
	bl	dev_err
	ldr	r3, .L35+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L29:
	ldr	r3, [sp, #28]
	cmp	r3, #0
	bne	.L1
.L18:
	ldr	r0, [fp, #4]
	ldr	r1, .L35+32
	bl	dev_err
	ldr	r3, .L35+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L34:
	bl	__stack_chk_fail
.L36:
	.align	2
.L35:
	.word	DMA_TO_DEVICE
	.word	.LC2
	.word	DMA_FROM_DEVICE
	.word	GFP_KERNEL
	.word	xillybus_autoflush
	.word	ENOMEM
	.word	.LC1
	.word	ENODEV
	.word	.LC0
	.size	xilly_setupchannels, .-xilly_setupchannels
	.comm	xillybus_autoflush,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
