	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_stream_temp_write
_php_stream_temp_write:                 ## @php_stream_temp_write
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	(%rdi), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	_PHP_STREAM_IS_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_php_stream_is
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	8(%r14), %rdi
	leaq	-48(%rbp), %rsi
	callq	_php_stream_memory_get_buffer
	movq	-48(%rbp), %rcx
	addq	%r15, %rcx
	cmpq	(%r14), %rcx
	jb	LBB0_6
## %bb.4:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_php_stream_fopen_temporary_file
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rax, %r13
	movq	-48(%rbp), %rdx
	movq	%rax, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_php_stream_write
	movq	8(%r14), %rdi
	movq	_PHP_STREAM_FREE_CLOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_php_stream_free_enclosed
	movq	%r13, 8(%r14)
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_php_stream_encloses
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_6:
	movq	8(%r14), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_php_stream_write
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_1:
	movl	$-1, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_E_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%edi, %edi
	callq	_php_error_docref
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_PHP_STREAM_IS_MEMORY,4,2       ## @PHP_STREAM_IS_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"php"

	.comm	_E_WARNING,4,2                  ## @E_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"Unable to create temporary file, Check permissions in temporary files directory."

	.comm	_PHP_STREAM_FREE_CLOSE,4,2      ## @PHP_STREAM_FREE_CLOSE
	.no_dead_strip	_php_stream_temp_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_stream_temp_write
_php_stream_temp_write:                 ; @php_stream_temp_write
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x24, [x0]
	cmp	x24, #0
	cset	w0, ne
	bl	_assert
	ldr	x0, [x24, #8]
	cbz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _PHP_STREAM_IS_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHP_STREAM_IS_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_php_stream_is
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x0, [x24, #8]
	add	x1, sp, #8
	bl	_php_stream_memory_get_buffer
	ldr	x8, [sp, #8]
	ldr	x9, [x24]
	add	x8, x8, x19
	cmp	x8, x9
	b.lo	LBB0_5
; %bb.3:
	mov	x22, x0
	ldr	w0, [x24, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_php_stream_fopen_temporary_file
	cbz	x0, LBB0_8
; %bb.4:
	mov	x23, x0
	ldr	x2, [sp, #8]
	mov	x1, x22
	bl	_php_stream_write
	ldr	x0, [x24, #8]
Lloh5:
	adrp	x8, _PHP_STREAM_FREE_CLOSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PHP_STREAM_FREE_CLOSE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_php_stream_free_enclosed
	str	x23, [x24, #8]
	mov	x0, x21
	mov	x1, x23
	bl	_php_stream_encloses
LBB0_5:
	ldr	x0, [x24, #8]
	mov	x1, x20
	mov	x2, x19
	bl	_php_stream_write
	b	LBB0_7
LBB0_6:
	mov	w0, #-1
LBB0_7:
	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
LBB0_8:
Lloh8:
	adrp	x8, _E_WARNING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _E_WARNING@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_php_error_docref
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PHP_STREAM_IS_MEMORY,4,2       ; @PHP_STREAM_IS_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"php"

	.comm	_E_WARNING,4,2                  ; @E_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"Unable to create temporary file, Check permissions in temporary files directory."

	.comm	_PHP_STREAM_FREE_CLOSE,4,2      ; @PHP_STREAM_FREE_CLOSE
	.no_dead_strip	_php_stream_temp_write
.subsections_via_symbols
