	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_set_primary_ip_address_sa ## -- Begin function sctp_set_primary_ip_address_sa
	.p2align	4, 0x90
_sctp_set_primary_ip_address_sa:        ## @sctp_set_primary_ip_address_sa
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	4(%rdi), %esi
	movq	_SCTP_ADDR_NOT_LOCKED@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_sctp_find_ifa_by_addr
	movl	$-1, %r15d
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_SCTP_SET_PRIM_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_sctp_asconf_queue_add
	movq	_SCTP_DEBUG_ASCONF1@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	testl	%eax, %eax
	je	LBB0_2
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_SCTPDBG
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_SCTPDBG_ADDR
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_SCTPDBG
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_SCTPDBG_ADDR
	movq	%rbx, %rdi
	callq	_SCTP_GET_STATE
	movq	_SCTP_STATE_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_SCTP_GET_STATE
	movq	_SCTP_STATE_SHUTDOWN_RECEIVED@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_4:
	movl	(%r12), %edx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sctp_send_asconf
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_ADDR_NOT_LOCKED,4,2       ## @SCTP_ADDR_NOT_LOCKED
	.comm	_SCTP_SET_PRIM_ADDR,4,2         ## @SCTP_SET_PRIM_ADDR
	.comm	_SCTP_DEBUG_ASCONF1,4,2         ## @SCTP_DEBUG_ASCONF1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set_primary_ip_address_sa: queued on tcb=%p, "

	.comm	_SCTP_STATE_OPEN,8,3            ## @SCTP_STATE_OPEN
	.comm	_SCTP_STATE_SHUTDOWN_RECEIVED,8,3 ## @SCTP_STATE_SHUTDOWN_RECEIVED
L_.str.1:                               ## @.str.1
	.asciz	"set_primary_ip_address_sa: failed to add to queue on tcb=%p, "

	.comm	_SCTP_TIMER_TYPE_ASCONF,4,2     ## @SCTP_TIMER_TYPE_ASCONF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_set_primary_ip_address_sa ; -- Begin function sctp_set_primary_ip_address_sa
	.p2align	2
_sctp_set_primary_ip_address_sa:        ; @sctp_set_primary_ip_address_sa
	.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, x1
	mov	x19, x0
	ldr	w1, [x0, #4]
Lloh0:
	adrp	x21, _SCTP_ADDR_NOT_LOCKED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SCTP_ADDR_NOT_LOCKED@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x20
	bl	_sctp_find_ifa_by_addr
	cbz	x0, LBB0_3
; %bb.1:
	mov	x1, x0
Lloh2:
	adrp	x8, _SCTP_SET_PRIM_ADDR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SCTP_SET_PRIM_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_sctp_asconf_queue_add
	mov	x8, x0
Lloh5:
	adrp	x22, _SCTP_DEBUG_ASCONF1@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SCTP_DEBUG_ASCONF1@GOTPAGEOFF]
	ldr	w0, [x22]
	cbz	w8, LBB0_4
; %bb.2:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_SCTPDBG
	ldr	w0, [x22]
	mov	x1, x20
	bl	_SCTPDBG_ADDR
LBB0_3:
	mov	w0, #-1
	b	LBB0_8
LBB0_4:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_SCTPDBG
	ldr	w0, [x22]
	mov	x1, x20
	bl	_SCTPDBG_ADDR
	mov	x0, x19
	bl	_SCTP_GET_STATE
Lloh11:
	adrp	x8, _SCTP_STATE_OPEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SCTP_STATE_OPEN@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_SCTP_GET_STATE
Lloh14:
	adrp	x8, _SCTP_STATE_SHUTDOWN_RECEIVED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SCTP_STATE_SHUTDOWN_RECEIVED@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
LBB0_6:
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, #0
	bl	_sctp_send_asconf
LBB0_7:
	mov	w0, #0
LBB0_8:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_ADDR_NOT_LOCKED,4,2       ; @SCTP_ADDR_NOT_LOCKED
	.comm	_SCTP_SET_PRIM_ADDR,4,2         ; @SCTP_SET_PRIM_ADDR
	.comm	_SCTP_DEBUG_ASCONF1,4,2         ; @SCTP_DEBUG_ASCONF1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set_primary_ip_address_sa: queued on tcb=%p, "

	.comm	_SCTP_STATE_OPEN,8,3            ; @SCTP_STATE_OPEN
	.comm	_SCTP_STATE_SHUTDOWN_RECEIVED,8,3 ; @SCTP_STATE_SHUTDOWN_RECEIVED
l_.str.1:                               ; @.str.1
	.asciz	"set_primary_ip_address_sa: failed to add to queue on tcb=%p, "

	.comm	_SCTP_TIMER_TYPE_ASCONF,4,2     ; @SCTP_TIMER_TYPE_ASCONF
.subsections_via_symbols
