	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fpm_sockets_new_listening_socket
_fpm_sockets_new_listening_socket:      ## @fpm_sockets_new_listening_socket
	.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, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	$1, -44(%rbp)
	movl	(%rsi), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movq	_ZLOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_zlog
LBB0_4:
	movq	(%r14), %rax
	movq	_FPM_AF_UNIX@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_fpm_socket_unix_test_connect
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	(%r15), %rdi
	callq	_unlink
	movl	$511, %edi                      ## imm = 0x1FF
	xorl	8(%r14), %edi
	callq	_umask
	movl	%eax, %r13d
LBB0_8:
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_9
## %bb.11:
	movq	(%r14), %rax
	movq	_FPM_AF_UNIX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	(%r15), %r15
	movl	%r13d, %edi
	callq	_umask
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_fpm_unix_set_socket_premissions
	testq	%rax, %rax
	js	LBB0_16
LBB0_13:
	movq	16(%r14), %rax
	movl	8(%rax), %esi
	movl	%ebx, %edi
	callq	_listen
	testq	%rax, %rax
	jns	LBB0_18
## %bb.14:
	movq	_ZLOG_SYSERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rax
	movq	(%rax), %rdx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_15
LBB0_1:
	movq	_ZLOG_SYSERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_zlog
	jmp	LBB0_17
LBB0_9:
	movq	_ZLOG_SYSERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rax
	movq	(%rax), %rdx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_zlog
	movq	(%r14), %rax
	movq	_FPM_AF_UNIX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.10:
	movl	%r13d, %edi
	callq	_umask
	jmp	LBB0_16
LBB0_6:
	movq	_ZLOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rdx
	leaq	L_.str.2(%rip), %rsi
LBB0_15:
	xorl	%eax, %eax
	callq	_zlog
LBB0_16:
	movl	%ebx, %edi
	callq	_close
LBB0_17:
	movl	$-1, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_ZLOG_SYSERROR,4,2              ## @ZLOG_SYSERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create new listening socket: socket()"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
	.comm	_ZLOG_WARNING,4,2               ## @ZLOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"failed to change socket attribute"

	.comm	_FPM_AF_UNIX,8,3                ## @FPM_AF_UNIX
	.comm	_ZLOG_ERROR,4,2                 ## @ZLOG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"Another FPM instance seems to already listen on %s"

L_.str.3:                               ## @.str.3
	.asciz	"unable to bind listening socket for address '%s'"

L_.str.4:                               ## @.str.4
	.asciz	"failed to listen to address '%s'"

	.no_dead_strip	_fpm_sockets_new_listening_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fpm_sockets_new_listening_socket
_fpm_sockets_new_listening_socket:      ; @fpm_sockets_new_listening_socket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	mov	w8, #1
	str	w8, [sp, #12]
	ldr	w0, [x1]
Lloh0:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	w4, #4
	bl	_setsockopt
	tbz	x0, #63, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _ZLOG_WARNING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ZLOG_WARNING@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_zlog
LBB0_3:
	ldr	x8, [x20]
Lloh14:
	adrp	x24, _FPM_AF_UNIX@GOTPAGE
Lloh15:
	ldr	x24, [x24, _FPM_AF_UNIX@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x21
	mov	x1, x22
	bl	_fpm_socket_unix_test_connect
	cbz	x0, LBB0_15
; %bb.5:
	ldr	x0, [x21]
	bl	_unlink
	ldr	w8, [x20, #8]
	eor	w0, w8, #0x1ff
	bl	_umask
	mov	x23, x0
	b	LBB0_8
LBB0_6:
Lloh16:
	adrp	x8, _ZLOG_SYSERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ZLOG_SYSERROR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_zlog
	b	LBB0_18
LBB0_7:
	mov	w23, #0
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_bind
	tbnz	x0, #63, LBB0_13
; %bb.9:
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	ldr	x21, [x21]
	mov	x0, x23
	bl	_umask
	mov	x0, x20
	mov	x1, x21
	bl	_fpm_unix_set_socket_premissions
	tbnz	x0, #63, LBB0_17
LBB0_11:
	ldr	x8, [x20, #16]
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_listen
	tbz	x0, #63, LBB0_19
; %bb.12:
Lloh21:
	adrp	x8, _ZLOG_SYSERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ZLOG_SYSERROR@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_13:
Lloh26:
	adrp	x8, _ZLOG_SYSERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ZLOG_SYSERROR@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	str	x8, [sp]
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_zlog
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.14:
	mov	x0, x23
	bl	_umask
	b	LBB0_17
LBB0_15:
Lloh31:
	adrp	x8, _ZLOG_ERROR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ZLOG_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	ldr	x8, [x21]
	str	x8, [sp]
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_16:
	bl	_zlog
LBB0_17:
	mov	x0, x19
	bl	_close
LBB0_18:
	mov	w19, #-1
LBB0_19:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_ZLOG_SYSERROR,4,2              ; @ZLOG_SYSERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create new listening socket: socket()"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
	.comm	_ZLOG_WARNING,4,2               ; @ZLOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"failed to change socket attribute"

	.comm	_FPM_AF_UNIX,8,3                ; @FPM_AF_UNIX
	.comm	_ZLOG_ERROR,4,2                 ; @ZLOG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"Another FPM instance seems to already listen on %s"

l_.str.3:                               ; @.str.3
	.asciz	"unable to bind listening socket for address '%s'"

l_.str.4:                               ; @.str.4
	.asciz	"failed to listen to address '%s'"

	.no_dead_strip	_fpm_sockets_new_listening_socket
.subsections_via_symbols
