	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_log
_wait_log:                              ## @wait_log
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	-40(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	xorl	%edi, %edi
	cmpl	$5, (%r15)
	setb	%dil
	callq	_assert
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	4(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	(%r15), %edx
	leaq	-40(%rbp), %rsi
	movl	%r14d, %edi
	callq	_bind
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	movl	4(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_4:
	movq	_SOMAXCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_listen
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	movl	4(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_6:
	movl	$4, -44(%rbp)
	leaq	-40(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%r14d, %edi
	callq	_getsockname
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	movl	4(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_8:
	leaq	-40(%rbp), %r12
	movq	%r12, %rdi
	callq	_socket_get_port
	movl	%eax, %ebx
	movq	_eSetLoggingSocket@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_put32
	movl	%ebx, %edi
	callq	_ntohs
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_put32
	movl	$4, -44(%rbp)
	leaq	-44(%rbp), %rdx
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_accept
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	movl	4(%r15), %edx
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_10:
	movl	%r14d, %edi
	callq	_close
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to build socket for %s's logging port"

L_.str.1:                               ## @.str.1
	.asciz	"failed to bind %s's logging port"

	.comm	_SOMAXCONN,4,2                  ## @SOMAXCONN
L_.str.2:                               ## @.str.2
	.asciz	"failed to listen %s's logging port"

L_.str.3:                               ## @.str.3
	.asciz	"failed to get address of local socket for %s"

	.comm	_eSetLoggingSocket,4,2          ## @eSetLoggingSocket
L_.str.4:                               ## @.str.4
	.asciz	"failed to accept local socket for %s"

	.no_dead_strip	_wait_log
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_log
_wait_log:                              ; @wait_log
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w8, [x19]
	cmp	w8, #5
	cset	w0, lo
	bl	_assert
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w2, [x19, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w2, [x19]
	add	x1, sp, #8
	mov	x0, x20
	bl	_bind
	tbz	w0, #31, LBB0_4
; %bb.3:
	ldr	w2, [x19, #4]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
Lloh7:
	adrp	x8, _SOMAXCONN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SOMAXCONN@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_listen
	tbz	x0, #63, LBB0_6
; %bb.5:
	ldr	w2, [x19, #4]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
	mov	w22, #4
	str	w22, [sp, #4]
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x20
	bl	_getsockname
	tbz	w0, #31, LBB0_8
; %bb.7:
	ldr	w2, [x19, #4]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
	add	x0, sp, #8
	bl	_socket_get_port
	mov	x21, x0
Lloh14:
	adrp	x8, _eSetLoggingSocket@GOTPAGE
Lloh15:
	ldr	x8, [x8, _eSetLoggingSocket@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_put32
	mov	x0, x21
	bl	_ntohs
	mov	x1, x0
	mov	x0, x19
	bl	_put32
	str	w22, [sp, #4]
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x20
	bl	_accept
	mov	x21, x0
	tbz	w0, #31, LBB0_10
; %bb.9:
	ldr	w2, [x19, #4]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_10:
	mov	x0, x20
	bl	_close
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to build socket for %s's logging port"

l_.str.1:                               ; @.str.1
	.asciz	"failed to bind %s's logging port"

	.comm	_SOMAXCONN,4,2                  ; @SOMAXCONN
l_.str.2:                               ; @.str.2
	.asciz	"failed to listen %s's logging port"

l_.str.3:                               ; @.str.3
	.asciz	"failed to get address of local socket for %s"

	.comm	_eSetLoggingSocket,4,2          ; @eSetLoggingSocket
l_.str.4:                               ; @.str.4
	.asciz	"failed to accept local socket for %s"

	.no_dead_strip	_wait_log
.subsections_via_symbols
