	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_epsv                           ## -- Begin function epsv
	.p2align	4, 0x90
_epsv:                                  ## @epsv
	.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	_ctrl_addr@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movq	_pdata@GOTPCREL(%rip), %r15
	movl	%eax, (%r15)
	testl	%eax, %eax
	js	LBB0_13
## %bb.1:
	movq	(%rbx), %rdi
	movl	(%rdi), %eax
	movq	_pasv_addr@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	movl	%eax, (%rbx)
	callq	_socket_get_address
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_socket_set_address_and_port
	movl	(%r15), %edi
	movq	_restricted_data_ports@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rax
	movl	(%rax), %edx
	callq	_socket_set_portrange
	xorl	%edi, %edi
	callq	_seteuid
	testq	%rax, %rax
	jns	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	callq	_fatal
LBB0_3:
	movl	(%r15), %r14d
	movq	(%r12), %rbx
	movq	%rbx, %rdi
	callq	_socket_sockaddr_size
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_bind
	movq	%rax, %rbx
	movq	_pw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_seteuid
	testq	%rbx, %rbx
	js	LBB0_4
## %bb.7:
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_fatal
LBB0_9:
	movl	$4, -36(%rbp)
	movl	(%r15), %edi
	movq	(%r12), %rsi
	leaq	-36(%rbp), %rdx
	callq	_getsockname
	testq	%rax, %rax
	js	LBB0_6
## %bb.10:
	movl	(%r15), %edi
	movl	$1, %esi
	callq	_listen
	testq	%rax, %rax
	js	LBB0_6
## %bb.11:
	movq	(%r12), %rdi
	callq	_socket_get_port
	movl	%eax, %edi
	callq	_ntohs
	leaq	L_.str.2(%rip), %rsi
	movl	$229, %edi
	movl	%eax, %edx
	callq	_reply
	jmp	LBB0_12
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movl	$425, %edi                      ## imm = 0x1A9
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_perror_reply                   ## TAILCALL
LBB0_4:
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_fatal
LBB0_6:
	movl	(%r15), %edi
	callq	_close
	movl	$-1, (%r15)
	leaq	L_.str(%rip), %rsi
	movl	$425, %edi                      ## imm = 0x1A9
	callq	_perror_reply
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ctrl_addr,8,3                  ## @ctrl_addr
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_pdata,4,2                      ## @pdata
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't open passive connection"

	.comm	_pasv_addr,8,3                  ## @pasv_addr
	.comm	_restricted_data_ports,4,2      ## @restricted_data_ports
L_.str.1:                               ## @.str.1
	.asciz	"Failed to seteuid"

	.comm	_pw,8,3                         ## @pw
L_.str.2:                               ## @.str.2
	.asciz	"Entering Extended Passive Mode (|||%d|)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_epsv                           ; -- Begin function epsv
	.p2align	2
_epsv:                                  ; @epsv
	.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
Lloh0:
	adrp	x19, _ctrl_addr@GOTPAGE
Lloh1:
	ldr	x19, [x19, _ctrl_addr@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh2:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
Lloh5:
	adrp	x21, _pdata@GOTPAGE
Lloh6:
	ldr	x21, [x21, _pdata@GOTPAGEOFF]
	str	w0, [x21]
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldr	x0, [x19]
	ldr	w8, [x0]
Lloh7:
	adrp	x22, _pasv_addr@GOTPAGE
Lloh8:
	ldr	x22, [x22, _pasv_addr@GOTPAGEOFF]
	ldr	x19, [x22]
	str	w8, [x19]
	bl	_socket_get_address
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_socket_set_address_and_port
	ldr	w0, [x21]
Lloh9:
	adrp	x8, _restricted_data_ports@GOTPAGE
Lloh10:
	ldr	x8, [x8, _restricted_data_ports@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x8, [x22]
	ldr	w2, [x8]
	bl	_socket_set_portrange
	mov	w0, #0
	bl	_seteuid
	tbz	x0, #63, LBB0_3
; %bb.2:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fatal
LBB0_3:
	ldr	w19, [x21]
	ldr	x20, [x22]
	mov	x0, x20
	bl	_socket_sockaddr_size
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_bind
	mov	x19, x0
Lloh14:
	adrp	x8, _pw@GOTPAGE
Lloh15:
	ldr	x8, [x8, _pw@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_seteuid
	tbnz	x19, #63, LBB0_10
; %bb.4:
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fatal
LBB0_6:
	mov	w8, #4
	str	w8, [sp, #12]
	ldr	w0, [x21]
	ldr	x1, [x22]
	add	x2, sp, #12
	bl	_getsockname
	tbnz	x0, #63, LBB0_12
; %bb.7:
	ldr	w0, [x21]
	mov	w1, #1
	bl	_listen
	tbnz	x0, #63, LBB0_12
; %bb.8:
	ldr	x0, [x22]
	bl	_socket_get_port
	bl	_ntohs
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #229
	bl	_reply
	b	LBB0_13
LBB0_9:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #425
	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
	b	_perror_reply
LBB0_10:
	cbz	x0, LBB0_12
; %bb.11:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fatal
LBB0_12:
	ldr	w0, [x21]
	bl	_close
	mov	w8, #-1
	str	w8, [x21]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #425
	bl	_perror_reply
LBB0_13:
	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	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ctrl_addr,8,3                  ; @ctrl_addr
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_pdata,4,2                      ; @pdata
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't open passive connection"

	.comm	_pasv_addr,8,3                  ; @pasv_addr
	.comm	_restricted_data_ports,4,2      ; @restricted_data_ports
l_.str.1:                               ; @.str.1
	.asciz	"Failed to seteuid"

	.comm	_pw,8,3                         ; @pw
l_.str.2:                               ; @.str.2
	.asciz	"Entering Extended Passive Mode (|||%d|)"

.subsections_via_symbols
