	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipc_create_socket              ## -- Begin function ipc_create_socket
	.p2align	4, 0x90
_ipc_create_socket:                     ## @ipc_create_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
	movq	%rdi, %rbx
	movq	_current_socketpath@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_FREE
	movq	%rbx, %rdi
	callq	_resolve_tilde
	movq	%rax, %r14
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_DLOG
	movq	%r14, %rdi
	callq	_sstrdup
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_dirname
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_path_exists
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_DEFAULT_DIR_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdirp
LBB0_2:
	movq	%r15, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_unlink
	movq	_AF_LOCAL@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movq	_F_SETFD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_fcntl
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	movl	-48(%rbp), %edi
	movq	%r14, %rsi
	movl	$3, %edx
	callq	_strncpy
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	$8, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_5
## %bb.7:
	movl	%ebx, %edi
	callq	_set_nonblock
	movl	%ebx, %edi
	movl	$5, %esi
	callq	_listen
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	movq	%r14, (%r12)
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
LBB0_6:
	callq	_perror
	movq	%r14, %rdi
	callq	_free
	movl	$-1, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_current_socketpath,8,3         ## @current_socketpath
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Creating IPC-socket at %s\n"

	.comm	_DEFAULT_DIR_MODE,4,2           ## @DEFAULT_DIR_MODE
	.comm	_AF_LOCAL,4,2                   ## @AF_LOCAL
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
L_.str.1:                               ## @.str.1
	.asciz	"socket()"

	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
L_.str.2:                               ## @.str.2
	.asciz	"bind()"

L_.str.3:                               ## @.str.3
	.asciz	"listen()"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipc_create_socket              ; -- Begin function ipc_create_socket
	.p2align	2
_ipc_create_socket:                     ; @ipc_create_socket
	.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
Lloh0:
	adrp	x22, _current_socketpath@GOTPAGE
Lloh1:
	ldr	x22, [x22, _current_socketpath@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_FREE
	mov	x0, x19
	bl	_resolve_tilde
	mov	x19, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DLOG
	mov	x0, x19
	bl	_sstrdup
	mov	x20, x0
	bl	_dirname
	mov	x21, x0
	bl	_path_exists
	cbnz	w0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _DEFAULT_DIR_MODE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DEFAULT_DIR_MODE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mkdirp
LBB0_2:
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_unlink
Lloh7:
	adrp	x21, _AF_LOCAL@GOTPAGE
Lloh8:
	ldr	x21, [x21, _AF_LOCAL@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh9:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_7
; %bb.3:
	mov	x20, x0
Lloh12:
	adrp	x8, _F_SETFD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _F_SETFD@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _FD_CLOEXEC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FD_CLOEXEC@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_fcntl
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w8, [x21]
	str	w8, [sp, #12]
	ldr	w0, [sp, #8]
	mov	x1, x19
	mov	w2, #3
	bl	_strncpy
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #8
	bl	_bind
	tbnz	x0, #63, LBB0_8
; %bb.4:
	mov	x0, x20
	bl	_set_nonblock
	mov	x0, x20
	mov	w1, #5
	bl	_listen
	tbnz	x0, #63, LBB0_9
; %bb.5:
	str	x19, [x22]
LBB0_6:
	mov	x0, x20
	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
LBB0_7:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_10:
	bl	_perror
	mov	x0, x19
	bl	_free
	mov	w20, #-1
	b	LBB0_6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_current_socketpath,8,3         ; @current_socketpath
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Creating IPC-socket at %s\n"

	.comm	_DEFAULT_DIR_MODE,4,2           ; @DEFAULT_DIR_MODE
	.comm	_AF_LOCAL,4,2                   ; @AF_LOCAL
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
l_.str.1:                               ; @.str.1
	.asciz	"socket()"

	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
l_.str.2:                               ; @.str.2
	.asciz	"bind()"

l_.str.3:                               ; @.str.3
	.asciz	"listen()"

.subsections_via_symbols
