	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_metadata
_write_metadata:                        ## @write_metadata
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, %r15
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	$1, %esi
	callq	_bio_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	$0, 24(%rax)
	movq	%r12, 16(%rax)
	movq	8(%r14), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bio_set_dev
	movq	_WRITE_LOG_SUPER_SECTOR@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	_log_end_super@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DMERR
	jmp	LBB0_11
LBB0_3:
	movq	_log_end_io@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, (%rbx)
	movq	_REQ_OP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bio_set_op_attrs
	movl	(%r13), %edi
	callq	_alloc_page
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_kmap_atomic
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_memcpy
	testq	%r15, %r15
	je	LBB0_9
## %bb.8:
	leaq	(%r12,%r13), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_memcpy
LBB0_9:
	movq	%r12, %rdi
	addq	%r13, %rdi
	addq	%r15, %rdi
	movq	(%r14), %rdx
	addq	%r13, %r15
	subq	%r15, %rdx
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_memset
	movq	%r12, %rdi
	callq	_kunmap_atomic
	movq	(%r14), %rdx
	movq	%rbx, %rdi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_bio_add_page
	cmpq	(%r14), %rax
	jne	LBB0_10
## %bb.13:
	movq	%rbx, %rdi
	callq	_submit_bio
	jmp	LBB0_12
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_DMERR
	movq	%rbx, %rdi
	callq	_bio_put
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	callq	_DMERR
	movq	%rbx, %rdi
	callq	_bio_put
	movq	%r12, %rdi
	callq	___free_page
LBB0_11:
	movq	%r14, %rdi
	callq	_put_io_block
	movl	$-1, %r15d
LBB0_12:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't alloc log bio"

	.comm	_WRITE_LOG_SUPER_SECTOR,8,3     ## @WRITE_LOG_SUPER_SECTOR
	.comm	_log_end_super,4,2              ## @log_end_super
	.comm	_log_end_io,4,2                 ## @log_end_io
	.comm	_REQ_OP_WRITE,4,2               ## @REQ_OP_WRITE
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't alloc log page"

L_.str.2:                               ## @.str.2
	.asciz	"Couldn't add page to the log block"

	.no_dead_strip	_write_metadata
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_metadata
_write_metadata:                        ; @write_metadata
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x5
	mov	x21, x4
	mov	x23, x3
	mov	x22, x2
	mov	x25, x1
	mov	x19, x0
Lloh0:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w0, [x26]
	mov	w1, #1
	bl	_bio_alloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	stp	x24, xzr, [x0, #16]
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	bl	_bio_set_dev
Lloh2:
	adrp	x8, _WRITE_LOG_SUPER_SECTOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WRITE_LOG_SUPER_SECTOR@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _log_end_super@GOTPAGE
Lloh6:
	ldr	x9, [x9, _log_end_super@GOTPAGEOFF]
Lloh7:
	adrp	x10, _log_end_io@GOTPAGE
Lloh8:
	ldr	x10, [x10, _log_end_io@GOTPAGEOFF]
	cmp	x8, x24
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x20, #8]
	str	x19, [x20]
Lloh9:
	adrp	x8, _REQ_OP_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REQ_OP_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_bio_set_op_attrs
	ldr	w0, [x26]
	bl	_alloc_page
	cbz	x0, LBB0_7
; %bb.2:
	mov	x24, x0
	bl	_kmap_atomic
	mov	x26, x0
	mov	x1, x25
	mov	x2, x22
	bl	_memcpy
	cbz	x21, LBB0_4
; %bb.3:
	add	x0, x26, x22
	mov	x1, x23
	mov	x2, x21
	bl	_memcpy
LBB0_4:
	add	x8, x26, x22
	add	x0, x8, x21
	ldr	x8, [x19]
	add	x9, x21, x22
	sub	x2, x8, x9
	mov	w1, #0
	bl	_memset
	mov	x0, x26
	bl	_kunmap_atomic
	ldr	x2, [x19]
	mov	x0, x20
	mov	x1, x24
	mov	w3, #0
	bl	_bio_add_page
	ldr	x8, [x19]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.5:
	mov	x0, x20
	bl	_submit_bio
	mov	w0, #0
	b	LBB0_10
LBB0_6:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DMERR
	mov	x0, x20
	bl	_bio_put
	b	LBB0_9
LBB0_8:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DMERR
	mov	x0, x20
	bl	_bio_put
	mov	x0, x24
	bl	___free_page
LBB0_9:
	mov	x0, x19
	bl	_put_io_block
	mov	w0, #-1
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't alloc log bio"

	.comm	_WRITE_LOG_SUPER_SECTOR,8,3     ; @WRITE_LOG_SUPER_SECTOR
	.comm	_log_end_super,4,2              ; @log_end_super
	.comm	_log_end_io,4,2                 ; @log_end_io
	.comm	_REQ_OP_WRITE,4,2               ; @REQ_OP_WRITE
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't alloc log page"

l_.str.2:                               ; @.str.2
	.asciz	"Couldn't add page to the log block"

	.no_dead_strip	_write_metadata
.subsections_via_symbols
