	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function file_dup
_file_dup:                              ## @file_dup
	.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	%ecx, %r15d
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r14
	cmpl	$2, %ecx
	jne	LBB0_5
## %bb.1:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movl	4(%r13), %edi
	movl	4(%rax), %esi
	callq	_dup2
	movq	(%r14), %rcx
	movq	_APR_FOPEN_NOCLEANUP@GOTPCREL(%rip), %rdx
	movq	_APR_INHERIT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	testl	%esi, (%rcx)
	je	LBB0_16
## %bb.3:
	cmpl	$-1, %eax
	jne	LBB0_8
	jmp	LBB0_14
LBB0_5:
	movl	4(%r13), %edi
	callq	_dup
	cmpl	$-1, %eax
	je	LBB0_14
## %bb.6:
	cmpl	$1, %r15d
	jne	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	$72, %esi
	callq	_apr_pcalloc
	movq	%rax, (%r14)
	movq	%r12, 16(%rax)
	movq	(%r14), %rax
	movl	%ebx, 4(%rax)
LBB0_8:
	movl	64(%r13), %esi
	movq	%r12, %rdi
	callq	_apr_pstrdup
	movq	(%r14), %rsi
	movl	%eax, 64(%rsi)
	movq	48(%r13), %rax
	movq	%rax, 48(%rsi)
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	cmpq	$0, 40(%rsi)
	jne	LBB0_11
## %bb.10:
	movl	32(%r13), %esi
	movq	%r12, %rdi
	callq	_apr_palloc
	movq	(%r14), %rsi
	movq	%rax, 40(%rsi)
	movl	32(%r13), %eax
	movl	%eax, 32(%rsi)
LBB0_11:
	movl	28(%r13), %eax
	movl	%eax, 28(%rsi)
	movl	24(%r13), %eax
	movl	%eax, 24(%rsi)
	movq	_APR_SUCCESS@GOTPCREL(%rip), %rbx
	cmpl	$2, %r15d
	je	LBB0_15
## %bb.12:
	movq	_APR_INHERIT@GOTPCREL(%rip), %rax
	movq	_APR_FOPEN_NOCLEANUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	(%r13), %ecx
	movl	%ecx, (%rsi)
	movq	16(%rsi), %rdi
	movq	_apr_unix_file_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_apr_unix_child_file_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_apr_pool_cleanup_register
	movq	(%r14), %rax
	movq	$0, 8(%rax)
	jmp	LBB0_15
LBB0_14:
	movq	_errno@GOTPCREL(%rip), %rbx
	jmp	LBB0_15
LBB0_13:
	movq	_APR_EINVAL@GOTPCREL(%rip), %rbx
LBB0_15:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_errno@GOTPCREL(%rip), %rbx
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.17:
	movl	4(%rcx), %edi
	movq	_F_GETFD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.18:
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%r14), %rcx
	movl	4(%rcx), %edi
	movq	_F_SETFD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fcntl
	cmpl	$-1, %eax
	jne	LBB0_8
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_APR_EINVAL,4,2                 ## @APR_EINVAL
	.comm	_APR_FOPEN_NOCLEANUP,4,2        ## @APR_FOPEN_NOCLEANUP
	.comm	_APR_INHERIT,4,2                ## @APR_INHERIT
	.comm	_errno,4,2                      ## @errno
	.comm	_F_GETFD,4,2                    ## @F_GETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_APR_SUCCESS,4,2                ## @APR_SUCCESS
	.comm	_apr_unix_file_cleanup,4,2      ## @apr_unix_file_cleanup
	.comm	_apr_unix_child_file_cleanup,4,2 ## @apr_unix_child_file_cleanup
	.comm	_APR_THREAD_MUTEX_DEFAULT,4,2   ## @APR_THREAD_MUTEX_DEFAULT
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.no_dead_strip	_file_dup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function file_dup
_file_dup:                              ; @file_dup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	cmp	w3, #2
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.2:
	ldr	w0, [x20, #4]
	ldr	w1, [x8, #4]
	bl	_dup2
	ldr	x8, [x19]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _APR_FOPEN_NOCLEANUP@GOTPAGE
Lloh1:
	ldr	x10, [x10, _APR_FOPEN_NOCLEANUP@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
Lloh3:
	adrp	x11, _APR_INHERIT@GOTPAGE
Lloh4:
	ldr	x11, [x11, _APR_INHERIT@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w10, w9
	b.eq	LBB0_14
; %bb.3:
	cmn	w0, #1
	b.ne	LBB0_7
	b	LBB0_17
LBB0_4:
	ldr	w0, [x20, #4]
	bl	_dup
	cmn	w0, #1
	b.eq	LBB0_17
; %bb.5:
	cmp	w21, #1
	b.ne	LBB0_7
; %bb.6:
	mov	x23, x0
	mov	x0, x22
	mov	w1, #72
	bl	_apr_pcalloc
	str	x0, [x19]
	str	x22, [x0, #16]
	ldr	x8, [x19]
	str	w23, [x8, #4]
LBB0_7:
	ldr	w1, [x20, #64]
	mov	x0, x22
	bl	_apr_pstrdup
	ldr	x1, [x19]
	str	w0, [x1, #64]
	ldr	x8, [x20, #48]
	str	x8, [x1, #48]
	cbz	x8, LBB0_10
; %bb.8:
	ldr	x8, [x1, #40]
	cbnz	x8, LBB0_10
; %bb.9:
	ldr	w1, [x20, #32]
	mov	x0, x22
	bl	_apr_palloc
	ldr	x1, [x19]
	str	x0, [x1, #40]
	ldr	w8, [x20, #32]
	str	w8, [x1, #32]
LBB0_10:
	ldr	d0, [x20, #24]
	str	d0, [x1, #24]
	cmp	w21, #2
	b.eq	LBB0_12
; %bb.11:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _APR_INHERIT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _APR_INHERIT@GOTPAGEOFF]
Lloh8:
	adrp	x10, _APR_FOPEN_NOCLEANUP@GOTPAGE
Lloh9:
	ldr	x10, [x10, _APR_FOPEN_NOCLEANUP@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w8, w8, w9
	str	w8, [x1]
	ldr	x0, [x1, #16]
Lloh12:
	adrp	x8, _apr_unix_file_cleanup@GOTPAGE
Lloh13:
	ldr	x8, [x8, _apr_unix_file_cleanup@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _apr_unix_child_file_cleanup@GOTPAGE
Lloh16:
	ldr	x8, [x8, _apr_unix_child_file_cleanup@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	bl	_apr_pool_cleanup_register
	ldr	x8, [x19]
	str	xzr, [x8, #8]
LBB0_12:
Lloh18:
	adrp	x8, _APR_SUCCESS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _APR_SUCCESS@GOTPAGEOFF]
	b	LBB0_18
LBB0_13:
Lloh20:
	adrp	x8, _APR_EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _APR_EINVAL@GOTPAGEOFF]
	b	LBB0_18
LBB0_14:
	cmn	w0, #1
	b.eq	LBB0_17
; %bb.15:
	ldr	w0, [x8, #4]
Lloh22:
	adrp	x8, _F_GETFD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _F_GETFD@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_fcntl
	cmn	w0, #1
	b.eq	LBB0_17
; %bb.16:
Lloh25:
	adrp	x8, _FD_CLOEXEC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FD_CLOEXEC@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	orr	w8, w8, w0
	ldr	x9, [x19]
	ldr	w0, [x9, #4]
Lloh28:
	adrp	x9, _F_SETFD@GOTPAGE
Lloh29:
	ldr	x9, [x9, _F_SETFD@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x9]
	str	x8, [sp]
	bl	_fcntl
	cmn	w0, #1
	b.ne	LBB0_7
LBB0_17:
Lloh31:
	adrp	x8, _errno@GOTPAGE
Lloh32:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_APR_EINVAL,4,2                 ; @APR_EINVAL
	.comm	_APR_FOPEN_NOCLEANUP,4,2        ; @APR_FOPEN_NOCLEANUP
	.comm	_APR_INHERIT,4,2                ; @APR_INHERIT
	.comm	_errno,4,2                      ; @errno
	.comm	_F_GETFD,4,2                    ; @F_GETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_APR_SUCCESS,4,2                ; @APR_SUCCESS
	.comm	_apr_unix_file_cleanup,4,2      ; @apr_unix_file_cleanup
	.comm	_apr_unix_child_file_cleanup,4,2 ; @apr_unix_child_file_cleanup
	.comm	_APR_THREAD_MUTEX_DEFAULT,4,2   ; @APR_THREAD_MUTEX_DEFAULT
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.no_dead_strip	_file_dup
.subsections_via_symbols
