	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_ftok                       ## -- Begin function get_ftok
	.p2align	4, 0x90
_get_ftok:                              ## @get_ftok
	.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	%r12
	pushq	%rbx
	subq	$144, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-112(%rbp), %r15
	movq	%r15, %rdi
	movl	$64, %edx
	callq	_strlcpy
	movq	%r15, %rdi
	callq	_mkdtemp
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_ATF_REQUIRE_MSG
	leaq	-176(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$64, %edx
	callq	_strlcpy
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$64, %edx
	callq	_strlcpy
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	$64, %edx
	callq	_strlcat
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_EXCL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r15, %rdi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %edi
	callq	_close
	leaq	-112(%rbp), %rbx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ftok
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_unlink
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	movl	(%r12), %edx
	leaq	L_.str.4(%rip), %rsi
	callq	_ATF_REQUIRE_MSG
	leaq	-176(%rbp), %rdi
	callq	_rmdir
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	movl	(%r12), %edx
	leaq	L_.str.5(%rip), %rsi
	callq	_ATF_REQUIRE_MSG
	jmp	LBB0_3
LBB0_1:
	movq	%rbx, %rdi
	callq	_rmdir
	movl	(%r12), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_atf_tc_fail
	movl	$-1, %r14d
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r14d, %eax
	addq	$144, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/tmp/t_sysv.XXXXXX"

L_.str.1:                               ## @.str.1
	.asciz	"mkdtemp() failed: %d"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"/token_key"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
L_.str.3:                               ## @.str.3
	.asciz	"open() of temp file failed: %d"

L_.str.4:                               ## @.str.4
	.asciz	"unlink() failed: %d"

L_.str.5:                               ## @.str.5
	.asciz	"rmdir() failed: %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_ftok                       ; -- Begin function get_ftok
	.p2align	2
_get_ftok:                              ; @get_ftok
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #72
	mov	w2, #64
	bl	_strlcpy
	add	x0, sp, #72
	bl	_mkdtemp
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
Lloh5:
	adrp	x21, _errno@GOTPAGE
Lloh6:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ATF_REQUIRE_MSG
	add	x0, sp, #8
	mov	x1, x20
	mov	w2, #64
	bl	_strlcpy
	add	x0, sp, #72
	mov	x1, x20
	mov	w2, #64
	bl	_strlcpy
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #72
	mov	w2, #64
	bl	_strlcat
Lloh11:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w8, w9
	add	x0, sp, #72
	mov	w2, #384
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
	bl	_close
	add	x0, sp, #72
	mov	x1, x19
	bl	_ftok
	mov	x19, x0
	add	x0, sp, #72
	bl	_unlink
	cmn	w0, #1
	cset	w0, ne
	ldr	w2, [x21]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_ATF_REQUIRE_MSG
	add	x0, sp, #8
	bl	_rmdir
	cmn	w0, #1
	cset	w0, ne
	ldr	w2, [x21]
Lloh22:
	adrp	x1, l_.str.5@PAGE
Lloh23:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_ATF_REQUIRE_MSG
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_rmdir
	ldr	w1, [x21]
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_atf_tc_fail
	mov	w19, #-1
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/tmp/t_sysv.XXXXXX"

l_.str.1:                               ; @.str.1
	.asciz	"mkdtemp() failed: %d"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"/token_key"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
l_.str.3:                               ; @.str.3
	.asciz	"open() of temp file failed: %d"

l_.str.4:                               ; @.str.4
	.asciz	"unlink() failed: %d"

l_.str.5:                               ; @.str.5
	.asciz	"rmdir() failed: %d"

.subsections_via_symbols
