	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atf_fs_mkdtemp                 ## -- Begin function atf_fs_mkdtemp
	.p2align	4, 0x90
_atf_fs_mkdtemp:                        ## @atf_fs_mkdtemp
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %esi
	callq	_check_umask
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_copy_contents
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_atf_is_error
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movq	-24(%rbp), %rdi
	callq	_do_mkdtemp
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_atf_is_error
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_replace_contents
	movl	%ebx, %edi
	callq	_atf_is_error
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_INV
LBB0_4:
	movq	-24(%rbp), %rdi
	callq	_free
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	_atf_fs_stat_dir_type@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_current_umask
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_invalid_umask_error            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_S_IRWXU,4,2                    ## @S_IRWXU
	.comm	_atf_fs_stat_dir_type,4,2       ## @atf_fs_stat_dir_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atf_fs_mkdtemp                 ; -- Begin function atf_fs_mkdtemp
	.p2align	2
_atf_fs_mkdtemp:                        ; @atf_fs_mkdtemp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _S_IRWXU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _S_IRWXU@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x0
	bl	_check_umask
	cbz	w0, LBB0_6
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	bl	_copy_contents
	mov	x20, x0
	bl	_atf_is_error
	cbnz	x0, LBB0_5
; %bb.2:
	ldr	x0, [sp, #8]
	bl	_do_mkdtemp
	mov	x20, x0
	bl	_atf_is_error
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_replace_contents
	mov	x0, x20
	bl	_atf_is_error
	cmp	x0, #0
	cset	w0, eq
	bl	_INV
LBB0_4:
	ldr	x0, [sp, #8]
	bl	_free
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
Lloh3:
	adrp	x8, _atf_fs_stat_dir_type@GOTPAGE
Lloh4:
	ldr	x8, [x8, _atf_fs_stat_dir_type@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	bl	_current_umask
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_invalid_umask_error
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_S_IRWXU,4,2                    ; @S_IRWXU
	.comm	_atf_fs_stat_dir_type,4,2       ; @atf_fs_stat_dir_type
.subsections_via_symbols
