	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wps_er_ssdp_init               ## -- Begin function wps_er_ssdp_init
	.p2align	4, 0x90
_wps_er_ssdp_init:                      ## @wps_er_ssdp_init
	.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	%rdi, %rbx
	movq	16(%rdi), %rdi
	callq	_add_ssdp_network
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_2:
	callq	_wpa_printf
	movl	$-1, %r14d
LBB0_13:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	32(%rbx), %edi
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.5:
	movq	16(%rbx), %rsi
	jmp	LBB0_6
LBB0_4:
	xorl	%esi, %esi
LBB0_6:
	callq	_ssdp_open_multicast_sock
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	xorl	%eax, %eax
	callq	_ssdp_listener_open
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	js	LBB0_9
## %bb.10:
	movq	(%rbx), %rdi
	movq	_EVENT_TYPE_READ@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_wps_er_ssdp_rx@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	_eloop_register_sock
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_13
## %bb.11:
	movq	8(%rbx), %rdi
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	_eloop_register_sock
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	callq	_wps_er_send_ssdp_msearch
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_7:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_9:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS ER: Failed to add routing entry for SSDP"

L_.str.1:                               ## @.str.1
	.asciz	"WPS ER: Failed to open multicast socket for SSDP"

L_.str.2:                               ## @.str.2
	.asciz	"WPS ER: Failed to open SSDP listener socket"

	.comm	_EVENT_TYPE_READ,4,2            ## @EVENT_TYPE_READ
	.comm	_wps_er_ssdp_rx,4,2             ## @wps_er_ssdp_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wps_er_ssdp_init               ; -- Begin function wps_er_ssdp_init
	.p2align	2
_wps_er_ssdp_init:                      ; @wps_er_ssdp_init
	.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, x0
	ldr	x0, [x0, #16]
	bl	_add_ssdp_network
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	bl	_wpa_printf
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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_5:
	ldr	w0, [x19, #32]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	x1, [x19, #16]
	b	LBB0_8
LBB0_7:
	mov	x1, #0
LBB0_8:
	bl	_ssdp_open_multicast_sock
	str	x0, [x19]
	tbnz	x0, #63, LBB0_13
; %bb.9:
	bl	_ssdp_listener_open
	str	x0, [x19, #8]
	tbnz	x0, #63, LBB0_14
; %bb.10:
	ldr	x0, [x19]
Lloh5:
	adrp	x20, _EVENT_TYPE_READ@GOTPAGE
Lloh6:
	ldr	x20, [x20, _EVENT_TYPE_READ@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh7:
	adrp	x21, _wps_er_ssdp_rx@GOTPAGE
Lloh8:
	ldr	x21, [x21, _wps_er_ssdp_rx@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x3, x19
	mov	x4, #0
	bl	_eloop_register_sock
	cbnz	x0, LBB0_3
; %bb.11:
	ldr	x0, [x19, #8]
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x3, x19
	mov	x4, #0
	bl	_eloop_register_sock
	cbnz	x0, LBB0_3
; %bb.12:
	mov	x0, x19
	bl	_wps_er_send_ssdp_msearch
	mov	w0, #0
	b	LBB0_4
LBB0_13:
Lloh9:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_14:
Lloh14:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS ER: Failed to add routing entry for SSDP"

l_.str.1:                               ; @.str.1
	.asciz	"WPS ER: Failed to open multicast socket for SSDP"

l_.str.2:                               ; @.str.2
	.asciz	"WPS ER: Failed to open SSDP listener socket"

	.comm	_EVENT_TYPE_READ,4,2            ; @EVENT_TYPE_READ
	.comm	_wps_er_ssdp_rx,4,2             ; @wps_er_ssdp_rx
.subsections_via_symbols
