	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_wmemstream                ## -- Begin function open_wmemstream
	.p2align	4, 0x90
_open_wmemstream:                       ## @open_wmemstream
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.2:
	movq	%rdi, %r15
	movl	$1, %edi
	movl	$40, %esi
	callq	_calloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movl	$40, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%rax, %r14
	movq	%r15, 32(%rax)
	movq	%rbx, (%rax)
	movq	%rax, %rdi
	addq	$8, %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax)
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r14, %rdi
	callq	_wmemstream_update
	movq	_wmemstream_write@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_wmemstream_seek@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_wmemstream_close@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_funopen
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_fwide
	jmp	LBB0_11
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	(%r15), %rdi
	callq	_free
	movq	$0, (%r15)
	movl	%ebx, (%r14)
	jmp	LBB0_10
LBB0_9:
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	%r14, %rdi
	callq	_free
	movq	(%r15), %rdi
	callq	_free
	movq	$0, (%r15)
	movl	%ebx, (%r12)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_wmemstream_write,4,2           ## @wmemstream_write
	.comm	_wmemstream_seek,4,2            ## @wmemstream_seek
	.comm	_wmemstream_close,4,2           ## @wmemstream_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_wmemstream                ; -- Begin function open_wmemstream
	.p2align	2
_open_wmemstream:                       ; @open_wmemstream
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x1
	cbz	x1, LBB0_6
; %bb.2:
	mov	x19, x0
	mov	w0, #1
	mov	w1, #40
	bl	_calloc
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.3:
	mov	w0, #40
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.4:
	mov	x20, x0
	str	x19, [x0, #32]
	str	x21, [x0], #8
	stp	xzr, xzr, [x20, #16]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x20
	bl	_wmemstream_update
Lloh0:
	adrp	x8, _wmemstream_write@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wmemstream_write@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _wmemstream_seek@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wmemstream_seek@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _wmemstream_close@GOTPAGE
Lloh7:
	ldr	x8, [x8, _wmemstream_close@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, #0
	bl	_funopen
	mov	x21, x0
	cbz	x0, LBB0_9
; %bb.5:
	mov	x0, x21
	mov	w1, #1
	bl	_fwide
	b	LBB0_10
LBB0_6:
	mov	x21, #0
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _errno@GOTPAGE
Lloh13:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
	b	LBB0_10
LBB0_7:
	mov	x21, #0
	b	LBB0_10
LBB0_8:
Lloh15:
	adrp	x20, _errno@GOTPAGE
Lloh16:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w22, [x20]
	ldr	x0, [x19]
	bl	_free
	mov	x21, #0
	str	xzr, [x19]
	str	w22, [x20]
	b	LBB0_10
LBB0_9:
Lloh17:
	adrp	x22, _errno@GOTPAGE
Lloh18:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	w23, [x22]
	mov	x0, x20
	bl	_free
	ldr	x0, [x19]
	bl	_free
	str	xzr, [x19]
	str	w23, [x22]
LBB0_10:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_wmemstream_write,4,2           ; @wmemstream_write
	.comm	_wmemstream_seek,4,2            ; @wmemstream_seek
	.comm	_wmemstream_close,4,2           ; @wmemstream_close
.subsections_via_symbols
