	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unix_open
_unix_open:                             ## @unix_open
	.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	%rsi, %rax
	movq	%rdi, %r12
	movq	%rsi, -40(%rbp)
	movq	8(%rdi), %rbx
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rax, %rdi
	callq	_av_strstart
	movq	_AF_UNIX@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, 12(%rbx)
	movl	8(%rbx), %edi
	movq	-40(%rbp), %rsi
	movl	$4, %edx
	callq	_av_strlcpy
	movl	(%r14), %edi
	movl	24(%rbx), %esi
	xorl	%edx, %edx
	callq	_ff_socket
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jns	LBB0_5
## %bb.3:
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	cltq
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	movl	%ecx, (%rbx)
LBB0_5:
	leaq	8(%rbx), %r15
	cmpq	$0, 16(%rbx)
	je	LBB0_7
## %bb.6:
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	$8, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r12, %r8
	callq	_ff_listen_bind
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_9
## %bb.11:
	cmpq	$0, 16(%rbx)
	jne	LBB0_12
	jmp	LBB0_14
LBB0_1:
	xorl	%eax, %eax
	callq	_ff_neterrno
	movl	%eax, %r12d
	jmp	LBB0_15
LBB0_7:
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	$8, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r12, %r8
	xorl	%r9d, %r9d
	callq	_ff_listen_connect
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movl	%r14d, %r12d
LBB0_9:
	movl	%r12d, 4(%rbx)
	xorl	%r12d, %r12d
	jmp	LBB0_15
LBB0_10:
	movl	%eax, %r12d
	cmpq	$0, 16(%rbx)
	je	LBB0_14
LBB0_12:
	movl	%r12d, %edi
	callq	_AVUNERROR
	movq	_EADDRINUSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.13:
	movl	(%r15), %edi
	callq	_unlink
LBB0_14:
	movl	%r14d, %edi
	callq	_closesocket
LBB0_15:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unix:"

	.comm	_AF_UNIX,4,2                    ## @AF_UNIX
	.comm	_EADDRINUSE,8,3                 ## @EADDRINUSE
	.no_dead_strip	_unix_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unix_open
_unix_open:                             ; @unix_open
	.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	x8, x1
	mov	x21, x0
	str	x1, [sp, #8]
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x0, x8
	bl	_av_strstart
Lloh2:
	adrp	x20, _AF_UNIX@GOTPAGE
Lloh3:
	ldr	x20, [x20, _AF_UNIX@GOTPAGEOFF]
	ldr	w8, [x20]
	mov	x19, x22
	ldr	w0, [x19, #8]!
	str	w8, [x22, #12]
	ldr	x1, [sp, #8]
	mov	w2, #4
	bl	_av_strlcpy
	ldr	w0, [x20]
	ldr	w1, [x22, #24]
	mov	w2, #0
	bl	_ff_socket
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	w3, [x22]
	tbz	w3, #31, LBB0_4
; %bb.2:
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.3:
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w3, w8, w9
	str	w3, [x22]
LBB0_4:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_8
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #8
	mov	x4, x21
	bl	_ff_listen_bind
	mov	x21, x0
	tbz	w0, #31, LBB0_10
; %bb.6:
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_12
	b	LBB0_14
LBB0_7:
	bl	_ff_neterrno
	mov	x21, x0
	b	LBB0_15
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #8
	mov	x4, x21
	mov	w5, #0
	bl	_ff_listen_connect
	tbnz	w0, #31, LBB0_11
; %bb.9:
	mov	x21, x20
LBB0_10:
	str	w21, [x22, #4]
	mov	w21, #0
	b	LBB0_15
LBB0_11:
	mov	x21, x0
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_14
LBB0_12:
	mov	x0, x21
	bl	_AVUNERROR
Lloh4:
	adrp	x8, _EADDRINUSE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EADDRINUSE@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_14
; %bb.13:
	ldr	w0, [x19]
	bl	_unlink
LBB0_14:
	mov	x0, x20
	bl	_closesocket
LBB0_15:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unix:"

	.comm	_AF_UNIX,4,2                    ; @AF_UNIX
	.comm	_EADDRINUSE,8,3                 ; @EADDRINUSE
	.no_dead_strip	_unix_open
.subsections_via_symbols
