	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tmpnam                         ## -- Begin function tmpnam
	.p2align	4, 0x90
_tmpnam:                                ## @tmpnam
	.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	%rdi, %rbx
	xorl	%eax, %eax
	callq	_getpid
	movl	%eax, %r14d
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	movq	_tmpnam_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_2:
	movq	_P_tmpdir@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_tmpnam_counter@GOTPCREL(%rip), %r15
	movl	(%r15), %r9d
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %r8d
	callq	_sprintf
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %r12
	leaq	L_.str.2(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	incl	(%r15)
	movq	%rax, %rdi
	callq	_fclose
	movq	_P_tmpdir@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	(%r15), %r9d
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rcx
	movl	%r14d, %r8d
	callq	_sprintf
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_fopen
	testq	%rax, %rax
	jne	LBB0_4
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tmpnam_buffer,8,3              ## @tmpnam_buffer
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/%s%x.%x"

	.comm	_P_tmpdir,8,3                   ## @P_tmpdir
L_.str.1:                               ## @.str.1
	.asciz	"t"

	.comm	_tmpnam_counter,4,2             ## @tmpnam_counter
L_.str.2:                               ## @.str.2
	.asciz	"r"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tmpnam                         ; -- Begin function tmpnam
	.p2align	2
_tmpnam:                                ; @tmpnam
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	bl	_getpid
	mov	x19, x0
Lloh0:
	adrp	x8, _tmpnam_buffer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tmpnam_buffer@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x20, #0
	csel	x20, x8, x20, eq
Lloh3:
	adrp	x24, _P_tmpdir@GOTPAGE
Lloh4:
	ldr	x24, [x24, _P_tmpdir@GOTPAGEOFF]
	ldr	x2, [x24]
Lloh5:
	adrp	x25, _tmpnam_counter@GOTPAGE
Lloh6:
	ldr	x25, [x25, _tmpnam_counter@GOTPAGEOFF]
	ldr	w5, [x25]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
Lloh9:
	adrp	x3, l_.str.1@PAGE
Lloh10:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x4, x19
	bl	_sprintf
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fopen
	cbz	x0, LBB0_3
; %bb.1:
Lloh13:
	adrp	x21, l_.str@PAGE
Lloh14:
	add	x21, x21, l_.str@PAGEOFF
Lloh15:
	adrp	x22, l_.str.1@PAGE
Lloh16:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh17:
	adrp	x23, l_.str.2@PAGE
Lloh18:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	add	w8, w8, #1
	str	w8, [x25]
	bl	_fclose
	ldr	x2, [x24]
	ldr	w5, [x25]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x22
	mov	x4, x19
	bl	_sprintf
	mov	x0, x20
	mov	x1, x23
	bl	_fopen
	cbnz	x0, LBB0_2
LBB0_3:
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_tmpnam_buffer,8,3              ; @tmpnam_buffer
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/%s%x.%x"

	.comm	_P_tmpdir,8,3                   ; @P_tmpdir
l_.str.1:                               ; @.str.1
	.asciz	"t"

	.comm	_tmpnam_counter,4,2             ; @tmpnam_counter
l_.str.2:                               ; @.str.2
	.asciz	"r"

.subsections_via_symbols
