	.file	"extr_mlxbf-tmfifo.c_mlxbf_tmfifo_create_vdev.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"vdev %d already exists\n"
.LC1:
	.string	"unable to allocate vring\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"register_virtio_device failed\n"
	.text
	.p2align 4
	.type	mlxbf_tmfifo_create_vdev, @function
mlxbf_tmfifo_create_vdev:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movsx	r15, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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, r15
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 8[rsp], ecx
	mov	DWORD PTR 12[rsp], r9d
	call	mutex_lock@PLT
	mov	rax, QWORD PTR 8[r13]
	cmp	QWORD PTR [rax+r15*8], 0
	je	.L2
	mov	edx, r15d
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_err@PLT
	mov	r12d, DWORD PTR EEXIST[rip]
	neg	r12d
.L3:
	mov	rdi, r13
	call	mutex_unlock@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 48
	call	kzalloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L17
	mov	DWORD PTR 24[rax], r15d
	lea	rax, mlxbf_tmfifo_virtio_config_ops[rip]
	mov	QWORD PTR 16[r14], rax
	mov	eax, DWORD PTR tmfifo_virtio_dev_release[rip]
	mov	QWORD PTR 8[r14], rbp
	mov	DWORD PTR [r14], eax
	mov	eax, DWORD PTR 8[rsp]
	mov	DWORD PTR 40[r14], eax
	test	rbx, rbx
	je	.L5
	mov	edx, DWORD PTR 12[rsp]
	lea	rdi, 36[r14]
	mov	rsi, rbx
	call	memcpy@PLT
.L5:
	mov	rsi, r14
	mov	rdi, r13
	call	mlxbf_tmfifo_alloc_vrings@PLT
	test	rax, rax
	jne	.L18
	cmp	DWORD PTR VIRTIO_ID_CONSOLE[rip], r12d
	je	.L19
.L7:
	mov	rax, QWORD PTR 8[r13]
	mov	rdi, r14
	mov	QWORD PTR [rax+r15*8], r14
	call	register_virtio_device@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L3
	mov	rdi, rbp
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	rdi, r13
	mov	rsi, r14
	call	mlxbf_tmfifo_free_vrings@PLT
	mov	rax, QWORD PTR 8[r13]
	mov	rdi, r14
	mov	QWORD PTR [rax+r15*8], 0
	call	put_device@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L17:
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, rbp
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	rdi, r13
	mov	rsi, r14
	mov	r12d, DWORD PTR ENOMEM[rip]
	call	mlxbf_tmfifo_free_vrings@PLT
	mov	rax, QWORD PTR 8[r13]
	mov	rdi, r14
	neg	r12d
	mov	QWORD PTR [rax+r15*8], 0
	call	kfree@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, DWORD PTR MLXBF_TMFIFO_CON_TX_BUF_SIZE[rip]
	mov	rdi, rbp
	call	devm_kmalloc@PLT
	mov	DWORD PTR 32[r14], eax
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	mlxbf_tmfifo_create_vdev, .-mlxbf_tmfifo_create_vdev
	.comm	tmfifo_virtio_dev_release,4,4
	.comm	mlxbf_tmfifo_virtio_config_ops,4,4
	.comm	VIRTIO_ID_CONSOLE,4,4
	.comm	MLXBF_TMFIFO_CON_TX_BUF_SIZE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EEXIST,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_mlxbf-tmfifo.c_mlxbf_tmfifo_create_vdev.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"vdev %d already exists\012\000"
	.align	2
.LC1:
	.ascii	"unable to allocate vring\012\000"
	.align	2
.LC2:
	.ascii	"register_virtio_device failed\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlxbf_tmfifo_create_vdev, %function
mlxbf_tmfifo_create_vdev:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r1
	mov	r5, r2
	mov	r8, r0
	mov	r0, r1
	mov	r7, r3
	bl	mutex_lock
	ldr	r2, [r4, #4]
	ldr	r2, [r2, r5, lsl #2]
	cmp	r2, #0
	beq	.L2
	mov	r2, r5
	mov	r0, r8
	ldr	r1, .L20
	bl	dev_err
	ldr	r3, .L20+4
	ldr	r7, [r3]
	rsb	r7, r7, #0
.L3:
	mov	r0, r4
	bl	mutex_unlock
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r9, .L20+8
	mov	r0, #28
	ldr	r1, [r9]
	bl	kzalloc
	subs	r6, r0, #0
	beq	.L17
	ldr	r3, .L20+12
	ldr	r2, [sp, #32]
	str	r5, [r6, #12]
	cmp	r2, #0
	ldr	r2, [r3]
	ldr	r3, .L20+16
	str	r8, [r6, #4]
	str	r7, [r6, #24]
	str	r2, [r6]
	str	r3, [r6, #8]
	beq	.L5
	ldr	r2, [sp, #36]
	ldr	r1, [sp, #32]
	add	r0, r6, #20
	bl	memcpy
.L5:
	mov	r1, r6
	mov	r0, r4
	bl	mlxbf_tmfifo_alloc_vrings
	cmp	r0, #0
	bne	.L18
	ldr	r3, .L20+20
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L19
.L7:
	ldr	r3, [r4, #4]
	mov	r0, r6
	str	r6, [r3, r5, lsl #2]
	bl	register_virtio_device
	subs	r7, r0, #0
	beq	.L3
	mov	r0, r8
	ldr	r1, .L20+24
	bl	dev_err
	mov	r1, r6
	mov	r0, r4
	bl	mlxbf_tmfifo_free_vrings
	mov	r2, #0
	ldr	r3, [r4, #4]
	mov	r0, r6
	str	r2, [r3, r5, lsl #2]
	bl	put_device
	b	.L3
.L17:
	ldr	r3, .L20+28
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L3
.L18:
	mov	r0, r8
	ldr	r1, .L20+32
	bl	dev_err
	ldr	r3, .L20+28
	mov	r1, r6
	mov	r0, r4
	ldr	r7, [r3]
	bl	mlxbf_tmfifo_free_vrings
	mov	r2, #0
	ldr	r3, [r4, #4]
	mov	r0, r6
	str	r2, [r3, r5, lsl #2]
	rsb	r7, r7, #0
	bl	kfree
	b	.L3
.L19:
	ldr	r3, .L20+36
	mov	r0, r8
	ldr	r2, [r9]
	ldr	r1, [r3]
	bl	devm_kmalloc
	str	r0, [r6, #16]
	b	.L7
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	EEXIST
	.word	GFP_KERNEL
	.word	tmfifo_virtio_dev_release
	.word	mlxbf_tmfifo_virtio_config_ops
	.word	VIRTIO_ID_CONSOLE
	.word	.LC2
	.word	ENOMEM
	.word	.LC1
	.word	MLXBF_TMFIFO_CON_TX_BUF_SIZE
	.size	mlxbf_tmfifo_create_vdev, .-mlxbf_tmfifo_create_vdev
	.comm	tmfifo_virtio_dev_release,4,4
	.comm	mlxbf_tmfifo_virtio_config_ops,4,4
	.comm	VIRTIO_ID_CONSOLE,4,4
	.comm	MLXBF_TMFIFO_CON_TX_BUF_SIZE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EEXIST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
