	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function createAnonymousFile
_createAnonymousFile:                   ## @createAnonymousFile
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_strlen
	leaq	20(%rax), %rdi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_strcpy
	leaq	_createAnonymousFile.template(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcat
	movq	%rbx, %rdi
	callq	_createTmpfileCloexec
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_free
	testl	%r15d, %r15d
	js	LBB0_6
## %bb.3:
	movl	%r15d, %edi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_posix_fallocate
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movl	%eax, %r14d
	movl	%r15d, %edi
	callq	_close
	jmp	LBB0_5
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
LBB0_6:
	movl	$-1, %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @createAnonymousFile.template
_createAnonymousFile.template:
	.asciz	"/glfw-shared-XXXXXX"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"XDG_RUNTIME_DIR"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_errno,4,2                      ## @errno
	.comm	_F_ADD_SEALS,4,2                ## @F_ADD_SEALS
	.comm	_F_SEAL_SEAL,4,2                ## @F_SEAL_SEAL
	.comm	_F_SEAL_SHRINK,4,2              ## @F_SEAL_SHRINK
	.comm	_MFD_ALLOW_SEALING,4,2          ## @MFD_ALLOW_SEALING
	.comm	_MFD_CLOEXEC,4,2                ## @MFD_CLOEXEC
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_SHM_ANON,4,2                   ## @SHM_ANON
	.no_dead_strip	_createAnonymousFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function createAnonymousFile
_createAnonymousFile:                   ; @createAnonymousFile
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_strlen
	add	x0, x0, #20
	mov	w1, #1
	bl	_calloc
	mov	x21, x0
	mov	x1, x20
	bl	_strcpy
Lloh2:
	adrp	x1, _createAnonymousFile.template@PAGE
Lloh3:
	add	x1, x1, _createAnonymousFile.template@PAGEOFF
	mov	x0, x21
	bl	_strcat
	mov	x0, x21
	bl	_createTmpfileCloexec
	mov	x20, x0
	mov	x0, x21
	bl	_free
	tbnz	w20, #31, LBB0_6
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	bl	_posix_fallocate
	cbz	w0, LBB0_7
; %bb.3:
	mov	x19, x0
	mov	x0, x20
	bl	_close
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x8, _ENOENT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh6:
	ldr	w19, [x8]
LBB0_5:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	str	w19, [x8]
LBB0_6:
	mov	w20, #-1
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_createAnonymousFile.template:          ; @createAnonymousFile.template
	.asciz	"/glfw-shared-XXXXXX"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"XDG_RUNTIME_DIR"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_errno,4,2                      ; @errno
	.comm	_F_ADD_SEALS,4,2                ; @F_ADD_SEALS
	.comm	_F_SEAL_SEAL,4,2                ; @F_SEAL_SEAL
	.comm	_F_SEAL_SHRINK,4,2              ; @F_SEAL_SHRINK
	.comm	_MFD_ALLOW_SEALING,4,2          ; @MFD_ALLOW_SEALING
	.comm	_MFD_CLOEXEC,4,2                ; @MFD_CLOEXEC
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_SHM_ANON,4,2                   ; @SHM_ANON
	.no_dead_strip	_createAnonymousFile
.subsections_via_symbols
