	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tempnam                        ## -- Begin function tempnam
	.p2align	4, 0x90
_tempnam:                               ## @tempnam
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r13
	testq	%rbx, %rbx
	leaq	L_.str(%rip), %r14
	cmovneq	%rbx, %r14
	xorl	%eax, %eax
	callq	_issetugid
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_strlen
	cltq
	cmpb	$47, -1(%r15,%rax)
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r15, %rcx
	movq	%r14, %r9
	xorl	%eax, %eax
	callq	_snprintf
	movq	%r13, %rdi
	callq	__mktemp
	testq	%rax, %rax
	jne	LBB0_10
LBB0_6:
	movq	_P_tmpdir@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r13, %rdi
	movq	%r14, %r8
	xorl	%eax, %eax
	callq	_snprintf
	movq	%r13, %rdi
	callq	__mktemp
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:
	movq	__PATH_TMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r13, %rdi
	movq	%r14, %r8
	xorl	%eax, %eax
	callq	_snprintf
	movq	%r13, %rdi
	callq	__mktemp
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	%r13, %rdi
	callq	_free
	movl	%ebx, (%r14)
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r12
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_strlen
	cltq
	cmpb	$47, -1(%r12,%rax)
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r12, %rcx
	movq	%r14, %r9
	xorl	%eax, %eax
	callq	_snprintf
	movq	%r13, %rdi
	callq	__mktemp
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tmp."

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

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

L_.str.3:                               ## @.str.3
	.space	1

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

	.comm	_P_tmpdir,8,3                   ## @P_tmpdir
L_.str.5:                               ## @.str.5
	.asciz	"%s%sXXXXXX"

	.comm	__PATH_TMP,8,3                  ## @_PATH_TMP
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tempnam                        ; -- Begin function tempnam
	.p2align	2
_tempnam:                               ; @tempnam
	.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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x24, _MAXPATHLEN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MAXPATHLEN@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, l_.str@PAGE
Lloh3:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x20, #0
	csel	x20, x8, x20, eq
	bl	_issetugid
	cbz	x0, LBB0_7
LBB0_2:
	cbz	x21, LBB0_4
; %bb.3:
	ldr	w22, [x24]
	mov	x0, x21
	bl	_strlen
	add	x8, x21, w0, sxtw
	ldurb	w8, [x8, #-1]
Lloh4:
	adrp	x9, l_.str.4@PAGE
Lloh5:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh6:
	adrp	x10, l_.str.3@PAGE
Lloh7:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	w8, #47
	csel	x4, x10, x9, eq
Lloh8:
	adrp	x2, l_.str.2@PAGE
Lloh9:
	add	x2, x2, l_.str.2@PAGEOFF
	str	x20, [sp]
	mov	x0, x19
	mov	x1, x22
	mov	x3, x21
	bl	_snprintf
	mov	x0, x19
	bl	__mktemp
	cbnz	x0, LBB0_9
LBB0_4:
Lloh10:
	adrp	x8, _P_tmpdir@GOTPAGE
Lloh11:
	ldr	x8, [x8, _P_tmpdir@GOTPAGEOFF]
Lloh12:
	ldr	x3, [x8]
	ldr	w1, [x24]
Lloh13:
	adrp	x2, l_.str.5@PAGE
Lloh14:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x4, x20
	bl	_snprintf
	mov	x0, x19
	bl	__mktemp
	cbnz	x0, LBB0_9
; %bb.5:
Lloh15:
	adrp	x8, __PATH_TMP@GOTPAGE
Lloh16:
	ldr	x8, [x8, __PATH_TMP@GOTPAGEOFF]
Lloh17:
	ldr	x3, [x8]
	ldr	w1, [x24]
Lloh18:
	adrp	x2, l_.str.5@PAGE
Lloh19:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x4, x20
	bl	_snprintf
	mov	x0, x19
	bl	__mktemp
	cbnz	x0, LBB0_9
; %bb.6:
Lloh20:
	adrp	x20, _errno@GOTPAGE
Lloh21:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w21, [x20]
	mov	x0, x19
	bl	_free
	mov	x0, #0
	str	w21, [x20]
	b	LBB0_9
LBB0_7:
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_2
; %bb.8:
	mov	x22, x0
	ldr	w23, [x24]
	bl	_strlen
	add	x8, x22, w0, sxtw
	ldurb	w8, [x8, #-1]
Lloh24:
	adrp	x9, l_.str.4@PAGE
Lloh25:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh26:
	adrp	x10, l_.str.3@PAGE
Lloh27:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	w8, #47
	csel	x4, x10, x9, eq
Lloh28:
	adrp	x2, l_.str.2@PAGE
Lloh29:
	add	x2, x2, l_.str.2@PAGEOFF
	str	x20, [sp]
	mov	x0, x19
	mov	x1, x23
	mov	x3, x22
	bl	_snprintf
	mov	x0, x19
	bl	__mktemp
	cbz	x0, LBB0_2
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tmp."

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

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

l_.str.3:                               ; @.str.3
	.space	1

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

	.comm	_P_tmpdir,8,3                   ; @P_tmpdir
l_.str.5:                               ; @.str.5
	.asciz	"%s%sXXXXXX"

	.comm	__PATH_TMP,8,3                  ; @_PATH_TMP
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
