	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_object
_write_object:                          ## @write_object
	.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	%rcx, %rbx
	movq	%rdx, %r15
	movl	%esi, %r13d
	movl	%edi, %r12d
	movq	_strict@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.4:
	movq	_OBJ_BLOB@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_11
## %bb.5:
	movl	%r13d, %edi
	callq	_type_name
	movq	_obj_list@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r12d, %r14d
	shlq	$4, %r14
	addq	%r14, %rcx
	addq	$8, %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_write_object_file
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_7:
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_added_object
	movq	%r15, %rdi
	callq	_free
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_obj_list@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	leaq	(%rax,%r14), %rsi
	addq	$8, %rsi
	callq	_lookup_blob
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_FLAG_WRITTEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%rax)
	jmp	LBB0_10
LBB0_1:
	movl	%r13d, %edi
	callq	_type_name
	movq	%rbx, %r14
	movq	_obj_list@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r12d, %ebx
	shlq	$4, %rbx
	addq	%rbx, %rcx
	addq	$8, %rcx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_write_object_file
	testq	%rax, %rax
	jns	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_3:
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_added_object
	movq	%r15, %rdi
	callq	_free
	movq	_obj_list@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, (%rax,%rbx)
	jmp	LBB0_14
LBB0_11:
	movl	%r13d, %edi
	callq	_type_name
	movq	_obj_list@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r12d, %r14d
	shlq	$4, %r14
	addq	%r14, %rcx
	addq	$8, %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_hash_object_file
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_added_object
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_obj_list@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	8(%rax,%r14), %rsi
	leaq	-44(%rbp), %r9
	movl	%r13d, %edx
	movq	%rbx, %r12
	movq	%rbx, %rcx
	movq	%r15, %r8
	callq	_parse_object_buffer
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movl	%r13d, %edi
	callq	_type_name
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_die
LBB0_13:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_add_object_buffer
	movq	_FLAG_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	_obj_list@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rbx, (%rax,%r14)
	jmp	LBB0_14
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_die
LBB0_10:
	movq	(%rbx), %rax
	movq	$0, (%rax,%r14)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_strict,4,2                     ## @strict
	.comm	_obj_list,8,3                   ## @obj_list
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to write object"

	.comm	_OBJ_BLOB,4,2                   ## @OBJ_BLOB
	.comm	_the_repository,4,2             ## @the_repository
	.comm	_FLAG_WRITTEN,4,2               ## @FLAG_WRITTEN
L_.str.1:                               ## @.str.1
	.asciz	"invalid blob object"

L_.str.2:                               ## @.str.2
	.asciz	"invalid %s"

	.comm	_FLAG_OPEN,4,2                  ## @FLAG_OPEN
	.no_dead_strip	_write_object
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_object
_write_object:                          ; @write_object
	.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, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _strict@GOTPAGE
Lloh1:
	ldr	x8, [x8, _strict@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _OBJ_BLOB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OBJ_BLOB@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x0, x21
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.2:
	bl	_type_name
	mov	x2, x0
Lloh6:
	adrp	x23, _obj_list@GOTPAGE
Lloh7:
	ldr	x23, [x23, _obj_list@GOTPAGEOFF]
	ldr	x8, [x23]
	mov	w24, w22
	add	x8, x8, w22, uxtw #4
	add	x3, x8, #8
	mov	x0, x19
	mov	x1, x20
	bl	_write_object_file
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_die
LBB0_4:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	bl	_added_object
	mov	x0, x19
	bl	_free
Lloh10:
	adrp	x8, _the_repository@GOTPAGE
Lloh11:
	ldr	x8, [x8, _the_repository@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	x8, [x23]
	add	x8, x8, x24, lsl #4
	add	x1, x8, #8
	bl	_lookup_blob
	cbz	x0, LBB0_12
; %bb.5:
Lloh13:
	adrp	x8, _FLAG_WRITTEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FLAG_WRITTEN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
	b	LBB0_13
LBB0_6:
	mov	x0, x21
	bl	_type_name
	mov	x2, x0
Lloh16:
	adrp	x23, _obj_list@GOTPAGE
Lloh17:
	ldr	x23, [x23, _obj_list@GOTPAGEOFF]
	ldr	x8, [x23]
	mov	w24, w22
	add	x8, x8, w22, uxtw #4
	add	x3, x8, #8
	mov	x0, x19
	mov	x1, x20
	bl	_write_object_file
	tbz	x0, #63, LBB0_8
; %bb.7:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_die
LBB0_8:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	bl	_added_object
	mov	x0, x19
	bl	_free
	b	LBB0_13
LBB0_9:
	bl	_type_name
	mov	x2, x0
Lloh20:
	adrp	x23, _obj_list@GOTPAGE
Lloh21:
	ldr	x23, [x23, _obj_list@GOTPAGEOFF]
	ldr	x8, [x23]
	mov	w9, w22
	lsl	x24, x9, #4
	add	x8, x8, x24
	add	x3, x8, #8
	mov	x0, x19
	mov	x1, x20
	bl	_hash_object_file
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	bl	_added_object
Lloh22:
	adrp	x8, _the_repository@GOTPAGE
Lloh23:
	ldr	x8, [x8, _the_repository@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	x8, [x23]
	add	x8, x8, x24
	add	x1, x8, #8
	add	x5, sp, #12
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_parse_object_buffer
	mov	x22, x0
	cbnz	x0, LBB0_11
; %bb.10:
	mov	x0, x21
	bl	_type_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_die
LBB0_11:
	mov	x0, x22
	mov	x1, x19
	mov	x2, x20
	bl	_add_object_buffer
Lloh27:
	adrp	x8, _FLAG_OPEN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FLAG_OPEN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
	ldr	x8, [x23]
	str	x22, [x8, x24]
	b	LBB0_14
LBB0_12:
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_die
LBB0_13:
	ldr	x8, [x23]
	lsl	x9, x24, #4
	str	xzr, [x8, x9]
LBB0_14:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_strict,4,2                     ; @strict
	.comm	_obj_list,8,3                   ; @obj_list
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to write object"

	.comm	_OBJ_BLOB,4,2                   ; @OBJ_BLOB
	.comm	_the_repository,4,2             ; @the_repository
	.comm	_FLAG_WRITTEN,4,2               ; @FLAG_WRITTEN
l_.str.1:                               ; @.str.1
	.asciz	"invalid blob object"

l_.str.2:                               ; @.str.2
	.asciz	"invalid %s"

	.comm	_FLAG_OPEN,4,2                  ; @FLAG_OPEN
	.no_dead_strip	_write_object
.subsections_via_symbols
