	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_add                      ## -- Begin function event_add
	.p2align	4, 0x90
_event_add:                             ## @event_add
	.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
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	12(%rdi), %r12
	movq	%r12, %rdi
	callq	_dl_list_len
	movq	_MAX_EVENTS_QUEUED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jae	LBB0_1
## %bb.7:
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.8:
	cmpq	$0, 16(%r14)
	je	LBB0_4
## %bb.9:
	testl	%eax, %eax
	je	LBB0_4
## %bb.10:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %r13d
	jmp	LBB0_14
LBB0_1:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$1, %r13d
	testl	%r15d, %r15d
	jne	LBB0_14
## %bb.2:
	movq	%r14, %rdi
	callq	_event_dequeue
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movq	%rax, %rdi
	callq	_event_delete
	movl	-48(%rbp), %eax                 ## 4-byte Reload
LBB0_4:
	movl	%eax, %r15d
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	$32, %edi
	callq	_os_zalloc
	movl	$-1, %r13d
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_dl_list_init
	movq	%r14, 24(%r12)
	movq	%rbx, %rdi
	callq	_wpabuf_dup
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.11:
	movq	(%r14), %rax
	movq	%rax, %rcx
	incq	%rcx
	movq	%rcx, (%r14)
	movq	%rax, 8(%r12)
	jne	LBB0_13
## %bb.12:
	movq	$1, (%r14)
LBB0_13:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	incl	%r15d
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r12, %rdx
	movq	%r14, %rcx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_dl_list_add_tail
	movl	8(%r14), %edi
	callq	_event_send_all_later
	jmp	LBB0_14
LBB0_6:
	movq	%r12, %rdi
	callq	_os_free
LBB0_14:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_EVENTS_QUEUED,4,2          ## @MAX_EVENTS_QUEUED
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS UPnP: Too many events queued for subscriber %p"

L_.str.1:                               ## @.str.1
	.asciz	"WPS UPnP: Do not queue more Probe Request frames for subscription %p since last delivery failed"

L_.str.2:                               ## @.str.2
	.asciz	"WPS UPnP: Queue event %p for subscriber %p (queue len %u)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_add                      ; -- Begin function event_add
	.p2align	2
_event_add:                             ; @event_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	add	x20, x0, #12
	mov	x0, x20
	bl	_dl_list_len
	mov	x21, x0
Lloh0:
	adrp	x8, _MAX_EVENTS_QUEUED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_EVENTS_QUEUED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.hs	LBB0_5
; %bb.1:
	cbz	w23, LBB0_9
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.3:
	cbz	w21, LBB0_9
; %bb.4:
Lloh3:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
	b	LBB0_16
LBB0_5:
Lloh8:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	cbz	w23, LBB0_7
LBB0_6:
	mov	w0, #1
	b	LBB0_16
LBB0_7:
	mov	x0, x19
	bl	_event_dequeue
	cbz	x0, LBB0_6
; %bb.8:
	bl	_event_delete
LBB0_9:
	mov	w0, #32
	bl	_os_zalloc
	cbz	x0, LBB0_14
; %bb.10:
	mov	x23, x0
	bl	_dl_list_init
	str	x19, [x23, #24]
	mov	x0, x22
	bl	_wpabuf_dup
	str	x0, [x23, #16]
	cbz	x0, LBB0_15
; %bb.11:
	ldr	x8, [x19]
	str	x8, [x23, #8]
	adds	x8, x8, #1
	str	x8, [x19]
	b.lo	LBB0_13
; %bb.12:
	mov	w8, #1
	str	x8, [x19]
LBB0_13:
Lloh13:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	add	w8, w21, #1
	stp	x19, x8, [sp, #8]
	str	x23, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	mov	x0, x20
	mov	x1, x23
	bl	_dl_list_add_tail
	ldr	w0, [x19, #8]
	bl	_event_send_all_later
	mov	w0, #0
	b	LBB0_16
LBB0_14:
	mov	w0, #-1
	b	LBB0_16
LBB0_15:
	mov	x0, x23
	bl	_os_free
	mov	w0, #-1
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_EVENTS_QUEUED,4,2          ; @MAX_EVENTS_QUEUED
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS UPnP: Too many events queued for subscriber %p"

l_.str.1:                               ; @.str.1
	.asciz	"WPS UPnP: Do not queue more Probe Request frames for subscription %p since last delivery failed"

l_.str.2:                               ; @.str.2
	.asciz	"WPS UPnP: Queue event %p for subscriber %p (queue len %u)"

.subsections_via_symbols
