	.file	"extr_dn_dev.c_dn_dev_set_default.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	dn_dev_set_default
	.type	dn_dev_set_default, @function
dn_dev_set_default:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	jne	.L2
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rbx, rdi
	mov	ebp, esi
	lea	rdi, dndev_lock[rip]
	mov	r12d, DWORD PTR EBUSY[rip]
	call	spin_lock@PLT
	test	ebp, ebp
	jne	.L4
	cmp	QWORD PTR decnet_default_device[rip], 0
	je	.L5
	neg	r12d
	lea	rdi, dndev_lock[rip]
	call	spin_unlock@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rbp, QWORD PTR decnet_default_device[rip]
	lea	rdi, dndev_lock[rip]
	mov	QWORD PTR decnet_default_device[rip], rbx
	call	spin_unlock@PLT
	test	rbp, rbp
	je	.L8
	mov	rdi, rbp
	xor	r12d, r12d
	call	dev_put@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	lea	rdi, dndev_lock[rip]
	mov	QWORD PTR decnet_default_device[rip], rbx
	call	spin_unlock@PLT
.L8:
	xor	r12d, r12d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	dn_dev_set_default, .-dn_dev_set_default
	.comm	dndev_lock,4,4
	.comm	decnet_default_device,8,8
	.comm	ENODEV,4,4
	.comm	EBUSY,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_dn_dev.c_dn_dev_set_default.c"
	.text
	.align	2
	.global	dn_dev_set_default
	.syntax unified
	.arm
	.fpu softvfp
	.type	dn_dev_set_default, %function
dn_dev_set_default:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L9
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r6, r1
	ldr	r3, .L9+4
	mov	r5, r0
	ldr	r0, .L9+8
	ldr	r7, [r3]
	bl	spin_lock
	cmp	r6, #0
	ldr	r3, .L9+12
	bne	.L4
	ldr	r4, [r3]
	ldr	r0, .L9+8
	cmp	r4, #0
	beq	.L5
	rsb	r4, r7, #0
	bl	spin_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r4, [r3]
	ldr	r0, .L9+8
	str	r5, [r3]
	bl	spin_unlock
	cmp	r4, #0
	beq	.L1
	mov	r0, r4
	mov	r4, #0
	bl	dev_put
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	str	r5, [r3]
	bl	spin_unlock
	b	.L1
.L10:
	.align	2
.L9:
	.word	ENODEV
	.word	EBUSY
	.word	dndev_lock
	.word	decnet_default_device
	.size	dn_dev_set_default, .-dn_dev_set_default
	.comm	dndev_lock,4,4
	.comm	decnet_default_device,4,4
	.comm	ENODEV,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
