	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssdp_listener_open             ## -- Begin function ssdp_listener_open
	.p2align	4, 0x90
_ssdp_listener_open:                    ## @ssdp_listener_open
	.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
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$1, -40(%rbp)
	movb	$4, -33(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	$-1, %r14d
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movl	%eax, %ebx
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_fcntl
	testq	%rax, %rax
	jne	LBB0_7
## %bb.2:
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rcx
	movl	$4, %r8d
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_setsockopt
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	leaq	-80(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_os_memset
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_htonl
	movq	%rax, -56(%rbp)
	movq	_UPNP_MULTICAST_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, -64(%rbp)
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	$40, %edx
	callq	_bind
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	leaq	-120(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_os_memset
	movl	(%r12), %edi
	callq	_htonl
	movq	%rax, -112(%rbp)
	movq	_UPNP_MULTICAST_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_inet_addr
	movl	%eax, -120(%rbp)
	movq	_IPPROTO_IP@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_IP_ADD_MEMBERSHIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %r8d
	movl	%ebx, %edi
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_setsockopt
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movl	(%r12), %esi
	movq	_IP_MULTICAST_TTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-33(%rbp), %rcx
	movl	$1, %r8d
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_setsockopt
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movl	%ebx, %edi
	callq	_close
LBB0_8:
	movl	%r14d, %eax
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%ebx, %r14d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_UPNP_MULTICAST_PORT,4,2        ## @UPNP_MULTICAST_PORT
	.comm	_UPNP_MULTICAST_ADDRESS,4,2     ## @UPNP_MULTICAST_ADDRESS
	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_IP_ADD_MEMBERSHIP,4,2          ## @IP_ADD_MEMBERSHIP
	.comm	_IP_MULTICAST_TTL,4,2           ## @IP_MULTICAST_TTL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssdp_listener_open             ; -- Begin function ssdp_listener_open
	.p2align	2
_ssdp_listener_open:                    ; @ssdp_listener_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	w8, #1
	str	w8, [sp, #28]
	mov	w8, #4
	strb	w8, [sp, #27]
Lloh0:
	adrp	x20, _AF_INET@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AF_INET@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh5:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_fcntl
	cbnz	x0, LBB0_6
; %bb.2:
Lloh11:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	w8, #4
	add	x9, sp, #28
	stp	x9, x8, [sp]
	mov	x0, x19
	bl	_setsockopt
	cbnz	x0, LBB0_6
; %bb.3:
	add	x0, sp, #72
	mov	w1, #0
	mov	w2, #40
	bl	_os_memset
	ldr	w8, [x20]
	str	w8, [sp, #104]
Lloh17:
	adrp	x20, _INADDR_ANY@GOTPAGE
Lloh18:
	ldr	x20, [x20, _INADDR_ANY@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_htonl
	str	x0, [sp, #96]
Lloh19:
	adrp	x8, _UPNP_MULTICAST_PORT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _UPNP_MULTICAST_PORT@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_htons
	str	w0, [sp, #88]
	add	x1, sp, #72
	mov	x0, x19
	mov	w2, #40
	bl	_bind
	cbnz	x0, LBB0_6
; %bb.4:
	add	x21, sp, #32
	mov	w22, #40
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #40
	bl	_os_memset
	ldr	w0, [x20]
	bl	_htonl
	str	x0, [sp, #40]
Lloh22:
	adrp	x8, _UPNP_MULTICAST_ADDRESS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _UPNP_MULTICAST_ADDRESS@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_inet_addr
	str	w0, [sp, #32]
Lloh25:
	adrp	x20, _IPPROTO_IP@GOTPAGE
Lloh26:
	ldr	x20, [x20, _IPPROTO_IP@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh27:
	adrp	x8, _IP_ADD_MEMBERSHIP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IP_ADD_MEMBERSHIP@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	stp	x21, x22, [sp]
	mov	x0, x19
	bl	_setsockopt
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	w1, [x20]
Lloh30:
	adrp	x8, _IP_MULTICAST_TTL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IP_MULTICAST_TTL@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	w8, #1
	add	x9, sp, #27
	stp	x9, x8, [sp]
	mov	x0, x19
	bl	_setsockopt
	cbz	x0, LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_close
LBB0_7:
	mov	w19, #-1
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_UPNP_MULTICAST_PORT,4,2        ; @UPNP_MULTICAST_PORT
	.comm	_UPNP_MULTICAST_ADDRESS,4,2     ; @UPNP_MULTICAST_ADDRESS
	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_IP_ADD_MEMBERSHIP,4,2          ; @IP_ADD_MEMBERSHIP
	.comm	_IP_MULTICAST_TTL,4,2           ; @IP_MULTICAST_TTL
.subsections_via_symbols
