	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_tempfile                ## -- Begin function create_tempfile
	.p2align	4, 0x90
_create_tempfile:                       ## @create_tempfile
	.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, %r14
	xorl	%eax, %eax
	callq	_new_tempfile
	movq	%rax, %rbx
	movq	%rax, -48(%rbp)
	leaq	8(%rax), %rdi
	movq	%r14, %rsi
	callq	_strbuf_add_absolute_path
	movq	_O_RDWR@GOTPCREL(%rip), %r14
	movq	_O_CREAT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	orl	(%r14), %esi
	movq	_O_EXCL@GOTPCREL(%rip), %r12
	orl	(%r12), %esi
	movl	8(%rbx), %edi
	movq	_O_CLOEXEC@GOTPCREL(%rip), %r13
	orl	(%r13), %esi
	movl	$438, %edx                      ## imm = 0x1B6
	callq	_open
	movq	%rax, (%rbx)
	cmpl	$0, (%r13)
	je	LBB0_4
## %bb.1:
	testq	%rax, %rax
	jns	LBB0_4
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_EINVAL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	movl	(%r15), %esi
	orl	(%r14), %esi
	orl	(%r12), %esi
	movl	$438, %edx                      ## imm = 0x1B6
	callq	_open
	movq	%rax, (%rbx)
LBB0_4:
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_activate_tempfile
	movl	8(%rbx), %edi
	callq	_adjust_shared_perm
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movl	8(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_error
	leaq	-48(%rbp), %rdi
	callq	_delete_tempfile
	movl	%r15d, (%r14)
	jmp	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	callq	_deactivate_tempfile
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_errno,4,2                      ## @errno
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot fix permission bits on %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_tempfile                ; -- Begin function create_tempfile
	.p2align	2
_create_tempfile:                       ; @create_tempfile
	.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, x0
	bl	_new_tempfile
	mov	x19, x0
	str	x0, [sp, #8]
	add	x0, x0, #8
	mov	x1, x20
	bl	_strbuf_add_absolute_path
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x20, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _O_RDWR@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x21, _O_CREAT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _O_CREAT@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w9, w8
Lloh4:
	adrp	x22, _O_EXCL@GOTPAGE
Lloh5:
	ldr	x22, [x22, _O_EXCL@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w8, w8, w9
Lloh6:
	adrp	x23, _O_CLOEXEC@GOTPAGE
Lloh7:
	ldr	x23, [x23, _O_CLOEXEC@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w1, w8, w9
	mov	w2, #438
	bl	_open
	str	x0, [x19]
	ldr	w8, [x23]
	cbz	w8, LBB0_4
; %bb.1:
	tbz	x0, #63, LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _EINVAL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
	ldr	w8, [x20]
	ldr	w9, [x21]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w1, w8, w9
	mov	w2, #438
	bl	_open
	str	x0, [x19]
LBB0_4:
	tbnz	x0, #63, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_activate_tempfile
	ldr	w0, [x19, #8]
	bl	_adjust_shared_perm
	cbz	x0, LBB0_8
; %bb.6:
Lloh14:
	adrp	x20, _errno@GOTPAGE
Lloh15:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w21, [x20]
	ldr	w1, [x19, #8]
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
	add	x0, sp, #8
	bl	_delete_tempfile
	mov	x19, #0
	str	w21, [x20]
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_deactivate_tempfile
	mov	x19, #0
LBB0_8:
	mov	x0, x19
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_errno,4,2                      ; @errno
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot fix permission bits on %s"

.subsections_via_symbols
