	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function make_listen_socket
_make_listen_socket:                    ## @make_listen_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	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
	movl	%eax, %edi
	callq	_rk_IS_BAD_SOCKET
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_rk_SOCK_ERRNO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_krb5_err
LBB0_2:
	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
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)
	testq	%r15, %r15
	je	LBB0_8
## %bb.3:
	leaq	L_.str.1(%rip), %rdx
	movl	%r14d, %edi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_krb5_getportbyname
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	movl	$10, %edx
	callq	_strtol
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	cmpq	%r15, -64(%rbp)
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdx
	movl	%r14d, %edi
	movl	$1, %esi
	movq	%r15, %rcx
	callq	_krb5_errx
LBB0_7:
	movq	%r12, %rdi
	callq	_htons
	jmp	LBB0_9
LBB0_8:
	movq	_IPROP_SERVICE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_IPROP_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	movl	%r14d, %edi
	callq	_krb5_getportbyname
LBB0_9:
	movq	%rax, -56(%rbp)
LBB0_10:
	leaq	-56(%rbp), %rsi
	movl	%ebx, %edi
	movl	$16, %edx
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_12
## %bb.11:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rcx
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_krb5_err
LBB0_12:
	movq	_SOMAXCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_listen
	testq	%rax, %rax
	jns	LBB0_14
## %bb.13:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rcx
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_krb5_err
LBB0_14:
	movl	%ebx, %eax
	addq	$32, %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
	.comm	_rk_SOCK_ERRNO,4,2              ## @rk_SOCK_ERRNO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket AF_INET"

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

L_.str.2:                               ## @.str.2
	.asciz	"bad port `%s'"

	.comm	_IPROP_SERVICE,8,3              ## @IPROP_SERVICE
	.comm	_IPROP_PORT,4,2                 ## @IPROP_PORT
	.comm	_errno,4,2                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"bind"

	.comm	_SOMAXCONN,4,2                  ## @SOMAXCONN
L_.str.4:                               ## @.str.4
	.asciz	"listen"

	.no_dead_strip	_make_listen_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function make_listen_socket
_make_listen_socket:                    ; @make_listen_socket
	.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	x21, x1
	mov	x19, x0
	mov	w8, #1
	str	w8, [sp, #28]
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
	bl	_rk_IS_BAD_SOCKET
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _rk_SOCK_ERRNO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _rk_SOCK_ERRNO@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	bl	_krb5_err
LBB0_2:
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, #28
	mov	x0, x20
	mov	w4, #4
	bl	_setsockopt
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w8, [x22]
	str	w8, [sp, #16]
	cbz	x21, LBB0_8
; %bb.3:
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	bl	_krb5_getportbyname
	str	x0, [sp, #8]
	cbnz	x0, LBB0_10
; %bb.4:
	mov	x1, sp
	mov	x0, x21
	mov	w2, #10
	bl	_strtol
	mov	x22, x0
	cbnz	x0, LBB0_7
; %bb.5:
	ldr	x8, [sp]
	cmp	x8, x21
	b.ne	LBB0_7
; %bb.6:
Lloh18:
	adrp	x2, l_.str.2@PAGE
Lloh19:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	mov	x3, x21
	bl	_krb5_errx
LBB0_7:
	mov	x0, x22
	bl	_htons
	b	LBB0_9
LBB0_8:
Lloh20:
	adrp	x8, _IPROP_SERVICE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IPROP_SERVICE@GOTPAGEOFF]
Lloh22:
	ldr	x1, [x8]
Lloh23:
	adrp	x8, _IPROP_PORT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IPROP_PORT@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_krb5_getportbyname
LBB0_9:
	str	x0, [sp, #8]
LBB0_10:
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #16
	bl	_bind
	tbz	x0, #63, LBB0_12
; %bb.11:
Lloh28:
	adrp	x8, _errno@GOTPAGE
Lloh29:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
Lloh31:
	adrp	x3, l_.str.3@PAGE
Lloh32:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	bl	_krb5_err
LBB0_12:
Lloh33:
	adrp	x8, _SOMAXCONN@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SOMAXCONN@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_listen
	tbz	x0, #63, LBB0_14
; %bb.13:
Lloh36:
	adrp	x8, _errno@GOTPAGE
Lloh37:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
Lloh39:
	adrp	x3, l_.str.4@PAGE
Lloh40:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	bl	_krb5_err
LBB0_14:
	mov	x0, x20
	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	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_rk_SOCK_ERRNO,4,2              ; @rk_SOCK_ERRNO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket AF_INET"

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

l_.str.2:                               ; @.str.2
	.asciz	"bad port `%s'"

	.comm	_IPROP_SERVICE,8,3              ; @IPROP_SERVICE
	.comm	_IPROP_PORT,4,2                 ; @IPROP_PORT
	.comm	_errno,4,2                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"bind"

	.comm	_SOMAXCONN,4,2                  ; @SOMAXCONN
l_.str.4:                               ; @.str.4
	.asciz	"listen"

	.no_dead_strip	_make_listen_socket
.subsections_via_symbols
