	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_mode
_set_mode:                              ## @set_mode
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	callq	_to_net_dev
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_rtnl_trylock
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	(%rbx), %rax
	movq	_NETREG_REGISTERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ipoib_set_mode
	movl	%eax, %r14d
	movq	_EBUSY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	addl	%r14d, %eax
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_rtnl_unlock
LBB0_5:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	movl	(%rbx), %eax
	addl	%r14d, %eax
	movslq	%r14d, %rax
	cmovneq	%rax, %r15
	jmp	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_restart_syscall                ## TAILCALL
LBB0_2:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movq	_EPERM@GOTPCREL(%rip), %rax
	subq	(%rax), %r15
LBB0_7:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETREG_REGISTERED,8,3          ## @NETREG_REGISTERED
	.comm	_EPERM,8,3                      ## @EPERM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_mode
_set_mode:                              ; @set_mode
	.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, x3
	mov	x20, x2
	bl	_to_net_dev
	mov	x21, x0
	bl	_rtnl_trylock
	cbz	w0, LBB0_6
; %bb.1:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _NETREG_REGISTERED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NETREG_REGISTERED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	mov	x0, x21
	mov	x1, x20
	bl	_ipoib_set_mode
	mov	x20, x0
Lloh3:
	adrp	x21, _EBUSY@GOTPAGE
Lloh4:
	ldr	x21, [x21, _EBUSY@GOTPAGEOFF]
	ldr	w8, [x21]
	cmn	w0, w8
	b.eq	LBB0_4
; %bb.3:
	bl	_rtnl_unlock
LBB0_4:
	cbz	w20, LBB0_8
; %bb.5:
	ldr	w8, [x21]
	sxtw	x9, w20
	cmn	w20, w8
	csel	x19, x19, x9, eq
	b	LBB0_8
LBB0_6:
	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
	b	_restart_syscall
LBB0_7:
	bl	_rtnl_unlock
Lloh5:
	adrp	x8, _EPERM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	neg	x19, x8
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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NETREG_REGISTERED,8,3          ; @NETREG_REGISTERED
	.comm	_EPERM,8,3                      ; @EPERM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_set_mode
.subsections_via_symbols
