	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wps_er_subscribe
_wps_er_subscribe:                      ## @wps_er_subscribe
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	cmpq	$0, (%rbx)
	je	LBB0_5
## %bb.4:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wpa_printf                     ## TAILCALL
LBB0_5:
	leaq	-48(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	callq	_http_client_url_parse
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	24(%rbx), %rdi
	callq	_os_strlen
	leaq	1000(%rax), %rdi
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r14
	movq	-64(%rbp), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %edi
	callq	_inet_ntoa
	movl	%eax, %r13d
	movl	-48(%rbp), %edi
	callq	_ntohs
	movq	16(%rbx), %rcx
	movl	8(%rcx), %r9d
	movl	(%rcx), %r10d
	movl	4(%rcx), %r11d
	movl	8(%rbx), %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r13d, %ecx
	movl	%eax, %r8d
	pushq	$1800                           ## imm = 0x708
	pushq	%r12
	pushq	%r10
	pushq	%r11
	callq	_wpabuf_printf
	addq	$32, %rsp
	movq	%r15, %rdi
	callq	_os_free
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_wpabuf_head
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_wpabuf_len
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %edi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_wpa_hexdump_ascii
	movq	_wps_er_http_subscribe_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdi
	movq	%r14, %rsi
	movl	$1000, %edx                     ## imm = 0x3E8
	movq	%rbx, %r8
	callq	_http_client_addr
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_wpabuf_free
	jmp	LBB0_11
LBB0_6:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_11
LBB0_8:
	movq	%r15, %rdi
	callq	_os_free
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS ER: No eventSubURL - cannot subscribe"

L_.str.1:                               ## @.str.1
	.asciz	"WPS ER: Pending HTTP request - cannot send subscribe request"

L_.str.2:                               ## @.str.2
	.asciz	"WPS ER: Failed to parse eventSubURL"

L_.str.3:                               ## @.str.3
	.asciz	"SUBSCRIBE %s HTTP/1.1\r\nHOST: %s:%d\r\nCALLBACK: <http://%s:%d/event/%u/%u>\r\nNT: upnp:event\r\nTIMEOUT: Second-%d\r\n\r\n"

	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
L_.str.4:                               ## @.str.4
	.asciz	"WPS ER: Subscription request"

	.comm	_wps_er_http_subscribe_cb,4,2   ## @wps_er_http_subscribe_cb
	.no_dead_strip	_wps_er_subscribe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wps_er_subscribe
_wps_er_subscribe:                      ; @wps_er_subscribe
	.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	x19, x0
	ldr	x0, [x0, #24]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19]
	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.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	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
	b	_wpa_printf
LBB0_5:
	add	x1, sp, #24
	add	x2, sp, #16
	bl	_http_client_url_parse
	cbz	x0, LBB0_9
; %bb.6:
	mov	x21, x0
	ldr	x0, [x19, #24]
	bl	_os_strlen
	add	x0, x0, #1000
	bl	_wpabuf_alloc
	cbz	x0, LBB0_10
; %bb.7:
	mov	x20, x0
	ldr	x22, [sp, #16]
	ldr	w0, [sp, #28]
	bl	_inet_ntoa
	mov	x23, x0
	ldr	w0, [sp, #24]
	bl	_ntohs
	mov	x4, x0
	ldr	x8, [x19, #16]
	ldp	w6, w5, [x8, #4]
	ldr	w7, [x8]
	ldr	w8, [x19, #8]
	mov	w9, #1800
	stp	w8, w9, [sp]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	mov	x3, x23
	bl	_wpabuf_printf
	mov	x0, x21
	bl	_os_free
Lloh12:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_wpabuf_head
	mov	x22, x0
	mov	x0, x20
	bl	_wpabuf_len
	mov	x3, x0
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_wpa_hexdump_ascii
Lloh17:
	adrp	x8, _wps_er_http_subscribe_cb@GOTPAGE
Lloh18:
	ldr	x8, [x8, _wps_er_http_subscribe_cb@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	add	x0, sp, #24
	mov	x1, x20
	mov	w2, #1000
	mov	x4, x19
	bl	_http_client_addr
	str	x0, [x19]
	cbnz	x0, LBB0_11
; %bb.8:
	mov	x0, x20
	bl	_wpabuf_free
	b	LBB0_11
LBB0_9:
Lloh20:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	b	LBB0_11
LBB0_10:
	mov	x0, x21
	bl	_os_free
LBB0_11:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS ER: No eventSubURL - cannot subscribe"

l_.str.1:                               ; @.str.1
	.asciz	"WPS ER: Pending HTTP request - cannot send subscribe request"

l_.str.2:                               ; @.str.2
	.asciz	"WPS ER: Failed to parse eventSubURL"

l_.str.3:                               ; @.str.3
	.asciz	"SUBSCRIBE %s HTTP/1.1\r\nHOST: %s:%d\r\nCALLBACK: <http://%s:%d/event/%u/%u>\r\nNT: upnp:event\r\nTIMEOUT: Second-%d\r\n\r\n"

	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
l_.str.4:                               ; @.str.4
	.asciz	"WPS ER: Subscription request"

	.comm	_wps_er_http_subscribe_cb,4,2   ; @wps_er_http_subscribe_cb
	.no_dead_strip	_wps_er_subscribe
.subsections_via_symbols
