	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dn_dev_set_default             ## -- Begin function dn_dev_set_default
	.p2align	4, 0x90
_dn_dev_set_default:                    ## @dn_dev_set_default
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_dndev_lock@GOTPCREL(%rip), %rdi
	callq	_write_lock
	movq	_decnet_default_device@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	testl	%r12d, %r12d
	jne	LBB0_5
## %bb.3:
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:
	negl	%ebx
	movq	_dndev_lock@GOTPCREL(%rip), %rdi
	callq	_write_unlock
	jmp	LBB0_7
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movq	%r14, (%rax)
	movq	_dndev_lock@GOTPCREL(%rip), %rdi
	callq	_write_unlock
	xorl	%ebx, %ebx
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_dev_put
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_dndev_lock,4,2                 ## @dndev_lock
	.comm	_decnet_default_device,8,3      ## @decnet_default_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dn_dev_set_default             ; -- Begin function dn_dev_set_default
	.p2align	2
_dn_dev_set_default:                    ; @dn_dev_set_default
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x0, _dndev_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _dndev_lock@GOTPAGEOFF]
	bl	_write_lock
Lloh5:
	adrp	x8, _decnet_default_device@GOTPAGE
Lloh6:
	ldr	x8, [x8, _decnet_default_device@GOTPAGEOFF]
	ldr	x20, [x8]
	cbnz	w21, LBB0_5
; %bb.2:
	cbz	x20, LBB0_5
; %bb.3:
	neg	w19, w22
Lloh7:
	adrp	x0, _dndev_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _dndev_lock@GOTPAGEOFF]
	bl	_write_unlock
	b	LBB0_8
LBB0_4:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_8
LBB0_5:
	str	x19, [x8]
Lloh12:
	adrp	x0, _dndev_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _dndev_lock@GOTPAGEOFF]
	bl	_write_unlock
	cbz	x20, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_dev_put
LBB0_7:
	mov	w19, #0
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_dndev_lock,4,2                 ; @dndev_lock
	.comm	_decnet_default_device,8,3      ; @decnet_default_device
.subsections_via_symbols
