	.file	"extr_qeth_core_main.c_qeth_setup_channel.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"setupch"
	.text
	.p2align 4
	.type	qeth_setup_channel, @function
qeth_setup_channel:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	rdx, .LC0[rip]
	mov	esi, 2
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR SETUP[rip]
	call	QETH_DBF_TEXT@PLT
	mov	eax, DWORD PTR QETH_CMD_BUFFER_NO[rip]
	test	eax, eax
	jle	.L2
	xor	ebx, ebx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	mov	eax, DWORD PTR BUF_STATE_FREE[rip]
	add	rbx, 1
	cmp	DWORD PTR QETH_CMD_BUFFER_NO[rip], ebx
	mov	QWORD PTR 24[rdx], rbp
	mov	QWORD PTR 8[rdx], 0
	mov	DWORD PTR 32[rdx], eax
	mov	eax, DWORD PTR qeth_send_control_data_cb[rip]
	mov	DWORD PTR 16[rdx], eax
	jle	.L2
.L4:
	mov	edi, DWORD PTR QETH_BUFSIZE[rip]
	mov	esi, DWORD PTR GFP_DMA[rip]
	movsx	r12, ebx
	or	esi, DWORD PTR GFP_KERNEL[rip]
	call	kzalloc@PLT
	mov	rcx, QWORD PTR 32[rbp]
	lea	rdx, [rbx+rbx*4]
	lea	rdx, [rcx+rdx*8]
	mov	QWORD PTR [rdx], rax
	test	rax, rax
	jne	.L11
	cmp	DWORD PTR QETH_CMD_BUFFER_NO[rip], r12d
	jle	.L2
	lea	eax, -1[r12]
	test	r12d, r12d
	jle	.L5
	cdqe
	lea	r13, [rax+rax*4]
	lea	eax, -1[rbx]
	sub	r12, rax
	sal	r13, 3
	lea	rax, [r12+r12*4]
	lea	rbx, -80[0+rax*8]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rcx, QWORD PTR 32[rbp]
.L6:
	mov	rdi, QWORD PTR [rcx+r13]
	sub	r13, 40
	call	kfree@PLT
	cmp	rbx, r13
	jne	.L12
.L5:
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	QWORD PTR 24[rbp], 0
	lea	rdi, 8[rbp]
	xor	esi, esi
	mov	QWORD PTR 16[rbp], 0
	call	atomic_set@PLT
	lea	rdi, 4[rbp]
	call	spin_lock_init@PLT
	mov	rdi, rbp
	call	init_waitqueue_head@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	qeth_setup_channel, .-qeth_setup_channel
	.comm	qeth_send_control_data_cb,4,4
	.comm	SETUP,4,4
	.comm	QETH_CMD_BUFFER_NO,4,4
	.comm	QETH_BUFSIZE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GFP_DMA,4,4
	.comm	ENOMEM,4,4
	.comm	BUF_STATE_FREE,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_qeth_core_main.c_qeth_setup_channel.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"setupch\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	qeth_setup_channel, %function
qeth_setup_channel:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L16
	ldr	r7, .L16+4
	mov	r6, r0
	mov	r1, #2
	ldr	r0, [r3]
	ldr	r2, .L16+8
	bl	QETH_DBF_TEXT
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L2
	mov	r5, #0
	ldr	r8, .L16+12
	mov	r4, r5
	ldr	fp, .L16+16
	ldr	r10, .L16+20
	ldr	r9, .L16+24
	b	.L4
.L14:
	mov	r3, #0
	ldr	lr, [r7]
	ldr	ip, [r10]
	ldr	r0, [r9]
	add	r4, r4, #1
	cmp	lr, r4
	str	r6, [r1, #12]
	str	r3, [r1, #4]
	add	r5, r5, #20
	str	ip, [r1, #16]
	str	r0, [r1, #8]
	ble	.L2
.L4:
	ldr	ip, [r8]
	ldr	r1, [fp]
	ldr	r3, .L16+28
	orr	r1, ip, r1
	ldr	r0, [r3]
	bl	kzalloc
	ldr	ip, [r6, #20]
	cmp	r0, #0
	str	r0, [ip, r5]
	add	r1, ip, r5
	bne	.L14
	ldr	r3, [r7]
	cmp	r3, r4
	ble	.L2
	cmp	r4, #0
	sub	r4, r4, #1
	bgt	.L6
	b	.L5
.L15:
	ldr	ip, [r6, #20]
.L6:
	add	r3, r4, r4, lsl #2
	ldr	r0, [ip, r3, lsl #2]
	sub	r4, r4, #1
	bl	kfree
	cmn	r4, #1
	bne	.L15
.L5:
	ldr	r3, .L16+32
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r4, #0
	add	r0, r6, #8
	mov	r1, r4
	str	r4, [r6, #16]
	str	r4, [r6, #12]
	bl	atomic_set
	add	r0, r6, #4
	bl	spin_lock_init
	mov	r0, r6
	bl	init_waitqueue_head
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	.align	2
.L16:
	.word	SETUP
	.word	QETH_CMD_BUFFER_NO
	.word	.LC0
	.word	GFP_DMA
	.word	GFP_KERNEL
	.word	BUF_STATE_FREE
	.word	qeth_send_control_data_cb
	.word	QETH_BUFSIZE
	.word	ENOMEM
	.size	qeth_setup_channel, .-qeth_setup_channel
	.comm	qeth_send_control_data_cb,4,4
	.comm	SETUP,4,4
	.comm	QETH_CMD_BUFFER_NO,4,4
	.comm	QETH_BUFSIZE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GFP_DMA,4,4
	.comm	ENOMEM,4,4
	.comm	BUF_STATE_FREE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
