	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function siw_newlink
_siw_newlink:                           ## @siw_newlink
	.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, %r15
	movq	%rdi, %r14
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%rsi, %rdi
	callq	_siw_dev_qualified
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_RDMA_DRIVER_SIW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ib_device_get_by_netdev
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rdi
	callq	_ib_device_put
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %ebx
	jmp	LBB0_12
LBB0_4:
	movq	%r15, %rdi
	callq	_siw_device_create
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	%rax, %r12
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	callq	_netif_carrier_ok
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_IB_PORT_ACTIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_IB_PORT_DOWN@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_siw_device_register
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_ib_dealloc_device
	jmp	LBB0_12
LBB0_10:
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RDMA_DRIVER_SIW,4,2            ## @RDMA_DRIVER_SIW
	.comm	_EEXIST,4,2                     ## @EEXIST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"siw: new device\n"

	.comm	_IB_PORT_ACTIVE,4,2             ## @IB_PORT_ACTIVE
	.comm	_IB_PORT_DOWN,4,2               ## @IB_PORT_DOWN
	.no_dead_strip	_siw_newlink
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function siw_newlink
_siw_newlink:                           ; @siw_newlink
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x1
	bl	_siw_dev_qualified
	cbz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _RDMA_DRIVER_SIW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RDMA_DRIVER_SIW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_ib_device_get_by_netdev
	cbz	x0, LBB0_6
; %bb.2:
	bl	_ib_device_put
Lloh6:
	adrp	x8, _EEXIST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_5:
	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
LBB0_6:
	mov	x0, x21
	bl	_siw_device_create
	cbz	x0, LBB0_10
; %bb.7:
	mov	x20, x0
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	x0, x21
	bl	_netif_running
	cbz	x0, LBB0_11
; %bb.8:
	mov	x0, x21
	bl	_netif_carrier_ok
	cbz	x0, LBB0_11
; %bb.9:
Lloh12:
	adrp	x8, _IB_PORT_ACTIVE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IB_PORT_ACTIVE@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	neg	w19, w22
	b	LBB0_5
LBB0_11:
Lloh14:
	adrp	x8, _IB_PORT_DOWN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IB_PORT_DOWN@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	mov	x0, x20
	mov	x1, x19
	bl	_siw_device_register
	mov	x19, x0
	cbz	w0, LBB0_5
; %bb.13:
	mov	x0, x20
	bl	_ib_dealloc_device
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RDMA_DRIVER_SIW,4,2            ; @RDMA_DRIVER_SIW
	.comm	_EEXIST,4,2                     ; @EEXIST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"siw: new device\n"

	.comm	_IB_PORT_ACTIVE,4,2             ; @IB_PORT_ACTIVE
	.comm	_IB_PORT_DOWN,4,2               ; @IB_PORT_DOWN
	.no_dead_strip	_siw_newlink
.subsections_via_symbols
