	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_do_open_temporary_file
_php_do_open_temporary_file:            ## @php_do_open_temporary_file
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	$-1, %r13d
	testq	%r14, %r14
	je	LBB0_13
## %bb.1:
	cmpb	$0, (%r14)
	je	LBB0_13
## %bb.2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_TRUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_VCWD_GETCWD
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movb	$0, (%r15)
LBB0_4:
	movq	%r15, %rdi
	callq	_estrdup
	movq	%rax, -64(%rbp)
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, -56(%rbp)
	movq	_CWD_REALPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-64(%rbp), %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_virtual_file_ex
	movl	$-1, %r13d
	movq	-64(%rbp), %rdi
	testq	%rax, %rax
	jne	LBB0_12
## %bb.5:
	movq	-56(%rbp), %rax
	movsbl	-1(%rax,%rdi), %edi
	callq	_IS_SLASH
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %r8
	cmoveq	%rax, %r8
	movq	_MAXPATHLEN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	-64(%rbp), %rcx
	leaq	L_.str.2(%rip), %rdx
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	callq	_snprintf
	cmpl	(%r15), %eax
	jge	LBB0_11
## %bb.6:
	movq	%r14, %rdi
	callq	_mktemp
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_VCWD_OPEN
	movl	%eax, %r13d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.9:
	cmpl	$-1, %r13d
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_zend_string_init
	movq	%rax, (%rbx)
	jmp	LBB0_11
LBB0_7:
	movl	$-1, %r13d
LBB0_11:
	movq	-64(%rbp), %rdi
LBB0_12:
	callq	_efree
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_CWD_REALPATH,4,2               ## @CWD_REALPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

L_.str.1:                               ## @.str.1
	.asciz	"/"

L_.str.2:                               ## @.str.2
	.asciz	"%s%s%sXXXXXX"

	.comm	_ERROR_INVALID_NAME,4,2         ## @ERROR_INVALID_NAME
	.comm	_PHP_WIN32_CP_IGNORE_LEN,4,2    ## @PHP_WIN32_CP_IGNORE_LEN
	.comm	__O_BINARY,4,2                  ## @_O_BINARY
	.no_dead_strip	_php_do_open_temporary_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_do_open_temporary_file
_php_do_open_temporary_file:            ; @php_do_open_temporary_file
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x24, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MAXPATHLEN@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x9, x1
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x12, x9, #0x1fffffff0
	sub	x20, x8, x12
	mov	sp, x20
	mov	x9, x1
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x23, x8, x12
	mov	sp, x23
	cbz	x0, LBB0_6
; %bb.1:
	ldrb	w8, [x22]
	cbz	w8, LBB0_6
; %bb.2:
Lloh9:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh11:
	ldr	w25, [x8]
Lloh12:
	adrp	x8, _O_TRUNC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _O_TRUNC@GOTPAGEOFF]
Lloh14:
	ldr	w26, [x8]
Lloh15:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh17:
	ldr	w27, [x8]
	mov	x0, x23
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_VCWD_GETCWD
	cbnz	w0, LBB0_4
; %bb.3:
	strb	wzr, [x23]
LBB0_4:
	mov	x0, x23
	bl	_estrdup
	stur	x0, [x29, #-104]
	mov	x0, x23
	bl	_strlen
	stur	x0, [x29, #-96]
Lloh18:
	adrp	x8, _CWD_REALPATH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CWD_REALPATH@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	sub	x0, x29, #104
	mov	x1, x22
	mov	x2, #0
	bl	_virtual_file_ex
	mov	x8, x0
	ldur	x0, [x29, #-104]
	cbz	x8, LBB0_7
; %bb.5:
	mov	w21, #-1
	b	LBB0_14
LBB0_6:
	mov	w21, #-1
	b	LBB0_15
LBB0_7:
	ldur	x8, [x29, #-96]
	add	x8, x8, x0
	ldursb	w0, [x8, #-1]
	bl	_IS_SLASH
Lloh21:
	adrp	x8, l_.str@PAGE
Lloh22:
	add	x8, x8, l_.str@PAGEOFF
Lloh23:
	adrp	x9, l_.str.1@PAGE
Lloh24:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x0, #0
	csel	x4, x9, x8, eq
	ldr	w1, [x24]
	ldur	x3, [x29, #-104]
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x5, x21
	bl	_snprintf
	ldr	w8, [x24]
	cmp	w0, w8
	b.ge	LBB0_12
; %bb.8:
	mov	x0, x20
	bl	_mktemp
	cbz	x0, LBB0_12
; %bb.9:
	orr	w8, w26, w25
	orr	w1, w8, w27
	mov	x0, x20
	bl	_VCWD_OPEN
	mov	x21, x0
	cbz	x19, LBB0_13
; %bb.10:
	cmn	w21, #1
	b.eq	LBB0_13
; %bb.11:
	mov	x0, x20
	bl	_strlen
	mov	x1, x0
	mov	x0, x20
	mov	w2, #0
	bl	_zend_string_init
	str	x0, [x19]
	b	LBB0_13
LBB0_12:
	mov	w21, #-1
LBB0_13:
	ldur	x0, [x29, #-104]
LBB0_14:
	bl	_efree
LBB0_15:
	ldur	x8, [x29, #-88]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x21
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_CWD_REALPATH,4,2               ; @CWD_REALPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

l_.str.1:                               ; @.str.1
	.asciz	"/"

l_.str.2:                               ; @.str.2
	.asciz	"%s%s%sXXXXXX"

	.comm	_ERROR_INVALID_NAME,4,2         ; @ERROR_INVALID_NAME
	.comm	_PHP_WIN32_CP_IGNORE_LEN,4,2    ; @PHP_WIN32_CP_IGNORE_LEN
	.comm	__O_BINARY,4,2                  ; @_O_BINARY
	.no_dead_strip	_php_do_open_temporary_file
.subsections_via_symbols
