	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_device_set_netdev           ## -- Begin function ib_device_set_netdev
	.p2align	4, 0x90
_ib_device_set_netdev:                  ## @ib_device_set_netdev
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_alloc_port_data
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rdma_is_port_valid
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	(%r15), %r13
	movl	%r14d, %r15d
	leaq	(,%r15,8), %r14
	addq	%r13, %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	4(%r13,%r15,8), %ebx
	movq	%r14, %rdi
	callq	_lockdep_is_held
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_rcu_dereference_protected
	cmpq	%r12, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_dev_hold
LBB0_7:
	movl	4(%r13,%r15,8), %edi
	movq	%r12, %rsi
	callq	_rcu_assign_pointer
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_add_ndev_hash
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_dev_put
	jmp	LBB0_9
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_4:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_device_set_netdev           ; -- Begin function ib_device_set_netdev
	.p2align	2
_ib_device_set_netdev:                  ; @ib_device_set_netdev
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_alloc_port_data
	cbnz	w0, LBB0_10
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	bl	_rdma_is_port_valid
	cbz	w0, LBB0_7
; %bb.2:
	ldr	x8, [x21]
	add	x20, x8, w20, uxtw #3
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x22, x20
	ldr	w21, [x22, #4]!
	mov	x0, x20
	bl	_lockdep_is_held
	mov	x1, x0
	mov	x0, x21
	bl	_rcu_dereference_protected
	cmp	x0, x19
	b.eq	LBB0_8
; %bb.3:
	mov	x21, x0
	cbz	x19, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_dev_hold
LBB0_5:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_rcu_assign_pointer
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_add_ndev_hash
	cbz	x21, LBB0_9
; %bb.6:
	mov	x0, x21
	bl	_dev_put
	b	LBB0_9
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
