	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_tmpfile
_create_tmpfile:                        ## @create_tmpfile
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_directory_size
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_strbuf_reset
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_strbuf_add
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strbuf_addstr
	movl	(%rbx), %edi
	movl	$292, %esi                      ## imm = 0x124
	callq	_git_mkstemp_mode
	testl	%eax, %eax
	jns	LBB0_6
## %bb.1:
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	_ENOENT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_strbuf_reset
	decl	%r15d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_strbuf_add
	movl	(%rbx), %edi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_mkdir
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%r12), %rcx
	movq	_EEXIST@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_6
LBB0_5:
	movl	(%rbx), %edi
	callq	_adjust_shared_perm
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	je	LBB0_7
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strbuf_addstr
	movl	(%rbx), %edi
	movl	$292, %esi                      ## imm = 0x124
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_git_mkstemp_mode               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tmp_obj_XXXXXX"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_EEXIST,8,3                     ## @EEXIST
L_.str.1:                               ## @.str.1
	.asciz	"/tmp_obj_XXXXXX"

	.no_dead_strip	_create_tmpfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_tmpfile
_create_tmpfile:                        ; @create_tmpfile
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_directory_size
	mov	x21, x0
	mov	x0, x19
	bl	_strbuf_reset
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_strbuf_add
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_strbuf_addstr
	ldr	w0, [x19]
	mov	w1, #292
	bl	_git_mkstemp_mode
	tbz	w0, #31, LBB0_7
; %bb.1:
	cbz	w21, LBB0_7
; %bb.2:
Lloh2:
	adrp	x22, _errno@GOTPAGE
Lloh3:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh4:
	adrp	x9, _ENOENT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_strbuf_reset
	sub	w2, w21, #1
	mov	x0, x19
	mov	x1, x20
	bl	_strbuf_add
	ldr	w0, [x19]
	mov	w1, #511
	bl	_mkdir
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x22]
Lloh7:
	adrp	x9, _EEXIST@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EEXIST@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
LBB0_5:
	ldr	w0, [x19]
	bl	_adjust_shared_perm
	cbz	x0, LBB0_8
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_strbuf_addstr
	ldr	w0, [x19]
	mov	w1, #292
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_git_mkstemp_mode
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tmp_obj_XXXXXX"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_EEXIST,8,3                     ; @EEXIST
l_.str.1:                               ; @.str.1
	.asciz	"/tmp_obj_XXXXXX"

	.no_dead_strip	_create_tmpfile
.subsections_via_symbols
