	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_get_temporary_directory     ## -- Begin function hb_get_temporary_directory
	.p2align	4, 0x90
_hb_get_temporary_directory:            ## @hb_get_temporary_directory
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	%rax, %rdi
LBB0_4:
	callq	_strdup
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_strlen
	cltq
	cmpb	$47, -1(%rax,%rbx)
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	movb	$0, -1(%rax,%rbx)
LBB0_6:
	xorl	%eax, %eax
	callq	_getpid
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_hb_strdup_printf
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_free
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TMPDIR"

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

L_.str.2:                               ## @.str.2
	.asciz	"/tmp"

L_.str.3:                               ## @.str.3
	.asciz	"%s/hb.%d"

	.comm	_MAX_PATH,4,2                   ## @MAX_PATH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_get_temporary_directory     ; -- Begin function hb_get_temporary_directory
	.p2align	2
_hb_get_temporary_directory:            ; @hb_get_temporary_directory
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbnz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	cbnz	x0, LBB0_3
; %bb.2:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_3:
	bl	_strdup
	mov	x19, x0
	bl	_strlen
	add	x8, x19, w0, sxtw
	ldurb	w8, [x8, #-1]
	cmp	w8, #47
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_strlen
	add	x8, x19, w0, sxtw
	sturb	wzr, [x8, #-1]
LBB0_5:
	bl	_getpid
	mov	x2, x0
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_hb_strdup_printf
	mov	x20, x0
	mov	x0, x19
	bl	_free
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TMPDIR"

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

l_.str.2:                               ; @.str.2
	.asciz	"/tmp"

l_.str.3:                               ; @.str.3
	.asciz	"%s/hb.%d"

	.comm	_MAX_PATH,4,2                   ; @MAX_PATH
.subsections_via_symbols
