	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LSAPI_CreateListenSock2        ## -- Begin function LSAPI_CreateListenSock2
	.p2align	4, 0x90
_LSAPI_CreateListenSock2:               ## @LSAPI_CreateListenSock2
	.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	%esi, %r14d
	movq	%rdi, %r13
	movl	$1, -44(%rbp)
	movl	(%rdi), %edi
	movl	$-1, %r15d
	cmpl	$128, %edi
	je	LBB0_5
## %bb.1:
	cmpl	$130, %edi
	je	LBB0_2
## %bb.3:
	cmpl	$129, %edi
	jne	LBB0_12
## %bb.4:
	movl	$4, %r12d
	movl	$129, %edi
	jmp	LBB0_6
LBB0_5:
	movl	$128, %edi
	callq	_unlink
	movl	(%r13), %edi
	movl	$4, %r12d
	jmp	LBB0_6
LBB0_2:
	movl	$16, %r12d
LBB0_6:
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.7:
	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
	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
	jne	LBB0_11
## %bb.8:
	movl	%ebx, %edi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_bind
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_listen
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r12d
	movl	%ebx, %edi
	callq	_close
	movl	%r12d, (%r14)
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%ebx, %r15d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LSAPI_CreateListenSock2        ; -- Begin function LSAPI_CreateListenSock2
	.p2align	2
_LSAPI_CreateListenSock2:               ; @LSAPI_CreateListenSock2
	.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, x1
	mov	x20, x0
	mov	w8, #1
	str	w8, [sp, #12]
	ldr	w0, [x0]
	cmp	w0, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w0, #129
	b.eq	LBB0_4
	b	LBB0_11
LBB0_3:
	bl	_unlink
	ldr	w0, [x20]
LBB0_4:
	mov	w22, #4
	b	LBB0_6
LBB0_5:
	mov	w22, #16
LBB0_6:
Lloh0:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x21, x0
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.7:
Lloh3:
	adrp	x8, _F_SETFD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _F_SETFD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _FD_CLOEXEC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FD_CLOEXEC@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_fcntl
Lloh9:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x21
	mov	w4, #4
	bl	_setsockopt
	cbnz	x0, LBB0_10
; %bb.8:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_bind
	cbnz	w0, LBB0_10
; %bb.9:
	mov	x0, x21
	mov	x1, x19
	bl	_listen
	cbz	w0, LBB0_12
LBB0_10:
Lloh15:
	adrp	x19, _errno@GOTPAGE
Lloh16:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	w20, [x19]
	mov	x0, x21
	bl	_close
	str	w20, [x19]
LBB0_11:
	mov	w21, #-1
LBB0_12:
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
