	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function upnp_wps_device_stop
_upnp_wps_device_stop:                  ## @upnp_wps_device_stop
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_5
## %bb.2:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	%rbx, %rdi
	callq	_web_listener_stop
	movq	%rbx, %rdi
	callq	_ssdp_listener_stop
	leaq	36(%rbx), %rdi
	callq	_upnp_wps_free_msearchreply
	leaq	32(%rbx), %rdi
	xorl	%esi, %esi
	callq	_upnp_wps_free_subscriptions
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_advertisement_state_machine_stop
	movq	%rbx, %rdi
	callq	_event_send_stop_all
	movq	24(%rbx), %rdi
	callq	_os_free
	movq	$0, 24(%rbx)
	movq	16(%rbx), %rdi
	callq	_os_free
	movq	$0, 16(%rbx)
	movl	(%rbx), %edi
	testl	%edi, %edi
	js	LBB0_4
## %bb.3:
	callq	_close
LBB0_4:
	movl	$-1, (%rbx)
	movq	$0, 8(%rbx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS UPnP: Stop device"

	.no_dead_strip	_upnp_wps_device_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function upnp_wps_device_stop
_upnp_wps_device_stop:                  ; @upnp_wps_device_stop
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	x0, x19
	bl	_web_listener_stop
	mov	x0, x19
	bl	_ssdp_listener_stop
	add	x0, x19, #36
	bl	_upnp_wps_free_msearchreply
	add	x0, x19, #32
	mov	x1, #0
	bl	_upnp_wps_free_subscriptions
	mov	x0, x19
	mov	w1, #1
	bl	_advertisement_state_machine_stop
	mov	x0, x19
	bl	_event_send_stop_all
	ldr	x0, [x19, #24]
	bl	_os_free
	str	xzr, [x19, #24]
	ldr	x0, [x19, #16]
	bl	_os_free
	str	xzr, [x19, #16]
	ldr	w0, [x19]
	tbnz	w0, #31, LBB0_4
; %bb.3:
	bl	_close
LBB0_4:
	mov	w8, #-1
	str	w8, [x19]
	str	xzr, [x19, #8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS UPnP: Stop device"

	.no_dead_strip	_upnp_wps_device_stop
.subsections_via_symbols
