	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_in_place_tempfile
_create_in_place_tempfile:              ## @create_in_place_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	leaq	-32(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_die_errno
LBB0_2:
	movl	-32(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_die
LBB0_4:
	movq	_S_IWUSR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -32(%rbp)
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_die
LBB0_6:
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	subl	%ebx, %eax
	incl	%eax
	leaq	-24(%rbp), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strbuf_add
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
	leaq	-24(%rbp), %r14
	movq	%r14, %rdi
	callq	_strbuf_addstr
	movl	-24(%rbp), %edi
	movl	-32(%rbp), %esi
	callq	_xmks_tempfile_m
	movq	_trailers_tempfile@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movq	%r14, %rdi
	callq	_strbuf_release
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_fdopen_tempfile
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.5(%rip), %rdi
	callq	__
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_die_errno
LBB0_10:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not stat %s"

L_.str.1:                               ## @.str.1
	.asciz	"file %s is not a regular file"

	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
L_.str.2:                               ## @.str.2
	.asciz	"file %s is not writable by user"

L_.str.3:                               ## @.str.3
	.asciz	"git-interpret-trailers-XXXXXX"

	.comm	_trailers_tempfile,4,2          ## @trailers_tempfile
L_.str.4:                               ## @.str.4
	.asciz	"w"

L_.str.5:                               ## @.str.5
	.asciz	"could not open temporary file"

	.no_dead_strip	_create_in_place_tempfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_in_place_tempfile
_create_in_place_tempfile:              ; @create_in_place_tempfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	add	x1, sp, #24
	bl	_stat
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	str	x19, [sp]
	bl	_die_errno
LBB0_2:
	ldr	w0, [sp, #24]
	bl	_S_ISREG
	cbnz	w0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_die
LBB0_4:
	ldr	w8, [sp, #24]
Lloh7:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.5:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_die
LBB0_6:
	mov	x0, x19
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_8
; %bb.7:
	sub	w8, w0, w19
	add	w2, w8, #1
	add	x0, sp, #16
	mov	x1, x19
	bl	_strbuf_add
LBB0_8:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x0, sp, #16
	bl	_strbuf_addstr
	ldr	w0, [sp, #16]
	ldr	w1, [sp, #24]
	bl	_xmks_tempfile_m
Lloh14:
	adrp	x19, _trailers_tempfile@GOTPAGE
Lloh15:
	ldr	x19, [x19, _trailers_tempfile@GOTPAGEOFF]
	str	w0, [x19]
	add	x0, sp, #16
	bl	_strbuf_release
	ldr	w0, [x19]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fdopen_tempfile
	mov	x19, x0
	cbnz	x0, LBB0_10
; %bb.9:
Lloh18:
	adrp	x0, l_.str.5@PAGE
Lloh19:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	__
	bl	_die_errno
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not stat %s"

l_.str.1:                               ; @.str.1
	.asciz	"file %s is not a regular file"

	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
l_.str.2:                               ; @.str.2
	.asciz	"file %s is not writable by user"

l_.str.3:                               ; @.str.3
	.asciz	"git-interpret-trailers-XXXXXX"

	.comm	_trailers_tempfile,4,2          ; @trailers_tempfile
l_.str.4:                               ; @.str.4
	.asciz	"w"

l_.str.5:                               ; @.str.5
	.asciz	"could not open temporary file"

	.no_dead_strip	_create_in_place_tempfile
.subsections_via_symbols
