	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function doit
_doit:                                  ## @doit
	.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, %r14
	movl	%edi, %r15d
	movl	$1, -36(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movl	(%r12), %eax
	movl	%eax, -40(%rbp)
	movl	%r15d, -48(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
LBB0_4:
	leaq	-48(%rbp), %rsi
	movl	%ebx, %edi
	movl	$12, %edx
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_6:
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_listen
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_8:
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_10:
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_proto
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket"

	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
L_.str.1:                               ## @.str.1
	.asciz	"setsockopt SO_REUSEADDR"

L_.str.2:                               ## @.str.2
	.asciz	"bind"

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

L_.str.4:                               ## @.str.4
	.asciz	"accept"

	.no_dead_strip	_doit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function doit
_doit:                                  ; @doit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x21, x0
	mov	w8, #1
	str	w8, [sp, #12]
Lloh0:
	adrp	x22, _AF_INET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AF_INET@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	ldr	w8, [x22]
	str	w8, [sp, #24]
Lloh7:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	stp	w21, w8, [sp, #16]
Lloh10:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x20
	mov	w4, #4
	bl	_setsockopt
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
LBB0_4:
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #12
	bl	_bind
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
	mov	x0, x20
	mov	w1, #1
	bl	_listen
	tbz	x0, #63, LBB0_8
; %bb.7:
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	mov	x20, x0
	tbz	w0, #31, LBB0_10
; %bb.9:
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	bl	_proto
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket"

	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
l_.str.1:                               ; @.str.1
	.asciz	"setsockopt SO_REUSEADDR"

l_.str.2:                               ; @.str.2
	.asciz	"bind"

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

l_.str.4:                               ; @.str.4
	.asciz	"accept"

	.no_dead_strip	_doit
.subsections_via_symbols
