	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function journal_balloc
_journal_balloc:                        ## @journal_balloc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_disk@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_cgballoc
	movq	%rax, %r15
	testq	%rax, %rax
	jg	LBB0_13
## %bb.1:
	leaq	L_.str.1(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_cgballoc
	testq	%rax, %rax
	jg	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%rbx, %rdi
	callq	_cgwrite
	testq	%rax, %rax
	js	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_cgread
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	8(%rbx), %eax
	cmpl	$262144, %eax                   ## imm = 0x40000
	jg	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpb	$1, _journal_balloc.contig(%rip)
	jne	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	testl	%eax, %eax
	je	LBB0_4
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, _journal_balloc.contig(%rip)
	jne	LBB0_18
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	$1, _journal_balloc.contig(%rip)
	movq	$0, (%rbx)
	movq	%r14, %rdi
	callq	_warnx
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_15
LBB0_12:
	movq	%rax, %r15
LBB0_13:
	movq	_sblock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_fsbtodb
	movq	_clrbuf@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rbx), %ecx
	movq	_disk@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_bwrite
	testq	%rax, %rax
	jg	LBB0_17
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
LBB0_15:
	callq	_warn
LBB0_16:
	movq	$-1, %r15
LBB0_17:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	leaq	L_.str.2(%rip), %rdi
	callq	_warnx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_journal_balloc.contig,1,2 ## @journal_balloc.contig
	.comm	_disk,16,3                      ## @disk
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to write updated cg"

L_.str.1:                               ## @.str.1
	.asciz	"Journal file fragmented."

L_.str.2:                               ## @.str.2
	.asciz	"Failed to find sufficient free blocks for the journal"

	.comm	_sblock,4,2                     ## @sblock
	.comm	_clrbuf,4,2                     ## @clrbuf
L_.str.3:                               ## @.str.3
	.asciz	"Failed to initialize new block"

	.no_dead_strip	_journal_balloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function journal_balloc
_journal_balloc:                        ; @journal_balloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x19, _disk@GOTPAGE
Lloh1:
	ldr	x19, [x19, _disk@GOTPAGEOFF]
	mov	x0, x19
	bl	_cgballoc
	mov	x21, x0
	cmp	x0, #0
	b.gt	LBB0_12
; %bb.1:
	adrp	x22, _journal_balloc.contig@PAGE
	mov	w23, #1
Lloh2:
	adrp	x20, l_.str.1@PAGE
Lloh3:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_cgballoc
	cmp	x0, #0
	b.gt	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	x0, x19
	bl	_cgwrite
	tbnz	x0, #63, LBB0_10
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	bl	_cgread
	cmp	w0, #1
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	w8, [x19, #8]
	cmp	w8, #64, lsl #12                ; =262144
	b.gt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=2
	ldrb	w9, [x22, _journal_balloc.contig@PAGEOFF]
	cmp	w9, #1
	ccmp	w8, #0, #4, eq
	b.eq	LBB0_4
	b	LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w8, [x22, _journal_balloc.contig@PAGEOFF]
	tbnz	w8, #0, LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	strb	w23, [x22, _journal_balloc.contig@PAGEOFF]
	str	xzr, [x19]
	mov	x0, x20
	bl	_warnx
	b	LBB0_2
LBB0_10:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_11:
	mov	x21, x0
LBB0_12:
Lloh6:
	adrp	x19, _sblock@GOTPAGE
Lloh7:
	ldr	x19, [x19, _sblock@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x21
	bl	_fsbtodb
	mov	x1, x0
Lloh8:
	adrp	x8, _clrbuf@GOTPAGE
Lloh9:
	ldr	x8, [x8, _clrbuf@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	ldr	w3, [x19]
Lloh11:
	adrp	x0, _disk@GOTPAGE
Lloh12:
	ldr	x0, [x0, _disk@GOTPAGEOFF]
	bl	_bwrite
	cmp	x0, #0
	b.gt	LBB0_16
; %bb.13:
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_14:
	bl	_warn
LBB0_15:
	mov	x21, #-1
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_journal_balloc.contig,1,2 ; @journal_balloc.contig
	.comm	_disk,16,3                      ; @disk
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to write updated cg"

l_.str.1:                               ; @.str.1
	.asciz	"Journal file fragmented."

l_.str.2:                               ; @.str.2
	.asciz	"Failed to find sufficient free blocks for the journal"

	.comm	_sblock,4,2                     ; @sblock
	.comm	_clrbuf,4,2                     ; @clrbuf
l_.str.3:                               ; @.str.3
	.asciz	"Failed to initialize new block"

	.no_dead_strip	_journal_balloc
.subsections_via_symbols
