	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prepare_temp_file
_prepare_temp_file:                     ## @prepare_temp_file
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_claim_diff_tempfile
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_DIFF_FILE_VALID
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	callq	_S_ISGITLINK
	testl	%eax, %eax
	je	LBB0_3
LBB0_19:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_diff_populate_filespec
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movl	16(%rbx), %esi
	leaq	L_.str.5(%rip), %rdi
	callq	_die
LBB0_21:
	movl	(%r12), %edi
	movl	12(%rbx), %ecx
	movl	(%rbx), %eax
	movl	8(%rbx), %r8d
	addq	$4, %rbx
	movl	%eax, (%rsp)
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%rbx, %r9
	callq	_prep_temp_blob
	jmp	LBB0_22
LBB0_3:
	cmpq	$0, 24(%rbx)
	je	LBB0_5
## %bb.4:
	movl	(%r12), %edi
	leaq	4(%rbx), %rdx
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	_reuse_worktree_file
	testq	%rax, %rax
	je	LBB0_19
LBB0_5:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_lstat
	testq	%rax, %rax
	jns	LBB0_8
## %bb.6:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r14)
	movl	12(%r14), %edi
	leaq	L_.str.1(%rip), %rbx
	movl	$4, %esi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_xsnprintf
	movl	8(%r14), %edi
	movl	$4, %esi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_xsnprintf
LBB0_22:
	movq	%r14, %rax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	callq	_die_errno
LBB0_8:
	movl	-44(%rbp), %edi
	callq	_S_ISLNK
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	-48(%rbp), %edx
	leaq	-40(%rbp), %rdi
	movq	%r15, %rsi
	callq	_strbuf_readlink
	testq	%rax, %rax
	jns	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	callq	_die_errno
LBB0_11:
	movl	(%r12), %edi
	movl	-40(%rbp), %r8d
	movl	-36(%rbp), %ecx
	cmpq	$0, 24(%rbx)
	jne	LBB0_12
## %bb.13:
	movq	_null_oid@GOTPCREL(%rip), %r9
	movq	_S_IFLNK@GOTPCREL(%rip), %rbx
	jmp	LBB0_14
LBB0_15:
	movq	%r15, (%r14)
	cmpq	$0, 24(%rbx)
	movl	12(%r14), %edi
	jne	LBB0_16
## %bb.17:
	movq	_null_oid@GOTPCREL(%rip), %rsi
	jmp	LBB0_18
LBB0_12:
	leaq	4(%rbx), %r9
LBB0_14:
	movl	(%rbx), %eax
	movl	%eax, (%rsp)
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_prep_temp_blob
	leaq	-40(%rbp), %rdi
	callq	_strbuf_release
	jmp	LBB0_22
LBB0_16:
	leaq	4(%rbx), %rsi
LBB0_18:
	callq	_oid_to_hex_r
	movl	8(%r14), %edi
	movl	(%rbx), %ecx
	leaq	L_.str.4(%rip), %rdx
	movl	$4, %esi
	xorl	%eax, %eax
	callq	_xsnprintf
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/null"

L_.str.1:                               ## @.str.1
	.asciz	"."

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.2:                               ## @.str.2
	.asciz	"stat(%s)"

	.comm	_STRBUF_INIT,8,2                ## @STRBUF_INIT
L_.str.3:                               ## @.str.3
	.asciz	"readlink(%s)"

	.comm	_null_oid,4,2                   ## @null_oid
	.comm	_S_IFLNK,4,2                    ## @S_IFLNK
L_.str.4:                               ## @.str.4
	.asciz	"%06o"

L_.str.5:                               ## @.str.5
	.asciz	"cannot read data blob for %s"

	.no_dead_strip	_prepare_temp_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prepare_temp_file
_prepare_temp_file:                     ; @prepare_temp_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_claim_diff_tempfile
	mov	x19, x0
	mov	x0, x20
	bl	_DIFF_FILE_VALID
	cbz	w0, LBB0_9
; %bb.1:
	ldr	w0, [x20]
	bl	_S_ISGITLINK
	cbz	w0, LBB0_5
LBB0_2:
	mov	x0, x22
	mov	x1, x20
	mov	w2, #0
	bl	_diff_populate_filespec
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x20, #16]
Lloh0:
	adrp	x0, l_.str.5@PAGE
Lloh1:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_die
LBB0_4:
	ldr	w0, [x22]
	ldp	w4, w3, [x20, #8]
	add	x5, x20, #4
	ldr	w6, [x20]
	mov	x1, x21
	mov	x2, x19
	bl	_prep_temp_blob
	b	LBB0_11
LBB0_5:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x22]
	add	x2, x20, #4
	mov	x1, x21
	mov	w3, #1
	bl	_reuse_worktree_file
	cbz	x0, LBB0_2
LBB0_7:
	add	x1, sp, #24
	mov	x0, x21
	bl	_lstat
	tbz	x0, #63, LBB0_13
; %bb.8:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _ENOENT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
LBB0_9:
Lloh8:
	adrp	x8, l_.str@PAGE
Lloh9:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x19]
	ldr	w0, [x19, #12]
Lloh10:
	adrp	x20, l_.str.1@PAGE
Lloh11:
	add	x20, x20, l_.str.1@PAGEOFF
	mov	w1, #4
	mov	x2, x20
	bl	_xsnprintf
	ldr	w0, [x19, #8]
	mov	w1, #4
	mov	x2, x20
LBB0_10:
	bl	_xsnprintf
LBB0_11:
	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
	add	sp, sp, #80
	ret
LBB0_12:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_die_errno
LBB0_13:
	ldr	w0, [sp, #28]
	bl	_S_ISLNK
	cbz	x0, LBB0_17
; %bb.14:
Lloh14:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	x8, [sp, #16]
	ldr	w2, [sp, #24]
	add	x0, sp, #16
	mov	x1, x21
	bl	_strbuf_readlink
	tbz	x0, #63, LBB0_16
; %bb.15:
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x21
	bl	_die_errno
LBB0_16:
	ldr	w0, [x22]
	ldp	w4, w3, [sp, #16]
	ldr	x8, [x20, #24]
	add	x9, x20, #4
Lloh19:
	adrp	x10, _null_oid@GOTPAGE
Lloh20:
	ldr	x10, [x10, _null_oid@GOTPAGEOFF]
	cmp	x8, #0
	csel	x5, x10, x9, eq
Lloh21:
	adrp	x8, _S_IFLNK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _S_IFLNK@GOTPAGEOFF]
	csel	x8, x8, x20, eq
	ldr	w6, [x8]
	mov	x1, x21
	mov	x2, x19
	bl	_prep_temp_blob
	add	x0, sp, #16
	bl	_strbuf_release
	b	LBB0_11
LBB0_17:
	str	x21, [x19]
	ldr	x8, [x20, #24]
	ldr	w0, [x19, #12]
	add	x9, x20, #4
Lloh23:
	adrp	x10, _null_oid@GOTPAGE
Lloh24:
	ldr	x10, [x10, _null_oid@GOTPAGEOFF]
	cmp	x8, #0
	csel	x1, x10, x9, eq
	bl	_oid_to_hex_r
	ldr	w0, [x19, #8]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh25:
	adrp	x2, l_.str.4@PAGE
Lloh26:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	w1, #4
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/null"

l_.str.1:                               ; @.str.1
	.asciz	"."

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.2:                               ; @.str.2
	.asciz	"stat(%s)"

	.comm	_STRBUF_INIT,8,2                ; @STRBUF_INIT
l_.str.3:                               ; @.str.3
	.asciz	"readlink(%s)"

	.comm	_null_oid,4,2                   ; @null_oid
	.comm	_S_IFLNK,4,2                    ; @S_IFLNK
l_.str.4:                               ; @.str.4
	.asciz	"%06o"

l_.str.5:                               ; @.str.5
	.asciz	"cannot read data blob for %s"

	.no_dead_strip	_prepare_temp_file
.subsections_via_symbols
