	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnic_uio_open
_cnic_uio_open:                         ## @cnic_uio_open
	.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
	movq	%rsi, %r14
	movq	(%rdi), %r12
	movq	_CAP_NET_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$-1, (%r12)
	je	LBB0_7
## %bb.2:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rtnl_lock
	movq	8(%r12), %r15
	testq	%r15, %r15
	je	LBB0_10
## %bb.8:
	movq	_CNIC_F_CNIC_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_iminor
	movl	%eax, (%r12)
	movq	%r15, %rdi
	callq	_cnic_shutdown_rings
	movq	%r15, %rdi
	callq	_cnic_init_rings
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rtnl_unlock
	jmp	LBB0_6
LBB0_10:
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_NET_ADMIN,4,2              ## @CAP_NET_ADMIN
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CNIC_F_CNIC_UP,4,2             ## @CNIC_F_CNIC_UP
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_cnic_uio_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnic_uio_open
_cnic_uio_open:                         ; @cnic_uio_open
	.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
	mov	x19, x1
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _CAP_NET_ADMIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_NET_ADMIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x21]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
Lloh5:
	adrp	x8, _EPERM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	bl	_rtnl_lock
	ldr	x20, [x21, #8]
	cbz	x20, LBB0_7
; %bb.5:
Lloh7:
	adrp	x8, _CNIC_F_CNIC_UP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CNIC_F_CNIC_UP@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_iminor
	str	w0, [x21]
	mov	x0, x20
	bl	_cnic_shutdown_rings
	mov	x0, x20
	bl	_cnic_init_rings
	bl	_rtnl_unlock
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	bl	_rtnl_unlock
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_NET_ADMIN,4,2              ; @CAP_NET_ADMIN
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CNIC_F_CNIC_UP,4,2             ; @CNIC_F_CNIC_UP
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_cnic_uio_open
.subsections_via_symbols
