	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calculate_device_limits
_calculate_device_limits:               ## @calculate_device_limits
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_calculate_journal_section_size
	movq	_SB_SECTORS@GOTPCREL(%rip), %rax
	movq	(%rbx), %rdx
	movq	8(%rbx), %rsi
	imulq	80(%rbx), %rdx
	addq	(%rax), %rdx
	movq	_METADATA_PADDING_SECTORS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rdx,%rax), %rcx
	cmpq	%rsi, %rcx
	jge	LBB0_11
## %bb.1:
	movq	_UINT_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jg	LBB0_11
## %bb.2:
	movq	%rdx, 16(%rbx)
	cmpl	$0, 72(%rbx)
	je	LBB0_3
## %bb.8:
	movq	64(%rbx), %rax
	movb	8(%rax), %cl
	movl	44(%rbx), %edi
	sarl	%cl, %edi
	movl	56(%rbx), %r8d
	movslq	%edi, %rax
	imulq	32(%rbx), %rax
	movq	_SECTOR_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%r8d, %ecx
	movl	$-1, %edi
	shll	%cl, %edi
	notl	%edi
	addq	%rax, %rdi
                                        ## kill: def $cl killed $cl killed $ecx
	sarq	%cl, %rdi
	movl	%r8d, %ecx
	shlq	%cl, %rdi
	testq	%rdi, %rdi
	js	LBB0_11
## %bb.9:
	addq	%rdx, %rdi
	cmpq	%rsi, %rdi
	jg	LBB0_11
## %bb.10:
	movl	$1, 24(%rbx)
	movl	$0, 40(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_3:
	movq	64(%rbx), %rdx
	movl	(%rdx), %ecx
	subl	8(%rdx), %ecx
	movq	32(%rbx), %rdi
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rdi
	movq	_SECTOR_SHIFT@GOTPCREL(%rip), %r14
	movb	(%r14), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movslq	%edx, %rsi
	callq	_roundup
                                        ## kill: def $eax killed $eax def $rax
	movb	(%r14), %cl
	sarl	%cl, %eax
	movl	%eax, 24(%rbx)
	leal	-1(%rax), %edx
	movl	$-1, %ecx
	testl	%edx, %eax
	jne	LBB0_5
## %bb.4:
	movl	%eax, %edi
	callq	___ffs
	movl	%eax, %ecx
LBB0_5:
	movl	%ecx, 40(%rbx)
	movl	44(%rbx), %esi
	decl	%esi
	leaq	-32(%rbp), %rdx
	leaq	-24(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_get_area_and_offset
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_get_data_sector
	cmpq	48(%rbx), %rax
	jl	LBB0_11
## %bb.6:
	cmpq	8(%rbx), %rax
	jge	LBB0_11
## %bb.7:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SB_SECTORS,8,3                 ## @SB_SECTORS
	.comm	_METADATA_PADDING_SECTORS,4,2   ## @METADATA_PADDING_SECTORS
	.comm	_UINT_MAX,8,3                   ## @UINT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SECTOR_SHIFT,4,2               ## @SECTOR_SHIFT
	.no_dead_strip	_calculate_device_limits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calculate_device_limits
_calculate_device_limits:               ; @calculate_device_limits
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_calculate_journal_section_size
Lloh0:
	adrp	x8, _SB_SECTORS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SB_SECTORS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	x10, [x19, #80]
	ldp	x11, x8, [x19]
	madd	x9, x11, x10, x9
Lloh3:
	adrp	x10, _METADATA_PADDING_SECTORS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _METADATA_PADDING_SECTORS@GOTPAGEOFF]
Lloh5:
	ldrsw	x10, [x10]
Lloh6:
	adrp	x11, _UINT_MAX@GOTPAGE
Lloh7:
	ldr	x11, [x11, _UINT_MAX@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	add	x12, x9, x10
	cmp	x12, x8
	ccmp	x9, x11, #0, lt
	b.le	LBB0_3
LBB0_1:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
	str	x9, [x19, #16]
	ldr	w11, [x19, #72]
	cbz	w11, LBB0_7
; %bb.4:
	ldr	w10, [x19, #44]
	ldr	x11, [x19, #64]
	ldr	w11, [x11, #8]
	asr	w10, w10, w11
	sxtw	x10, w10
	ldr	x11, [x19, #32]
	ldr	w12, [x19, #56]
Lloh12:
	adrp	x13, _SECTOR_SHIFT@GOTPAGE
Lloh13:
	ldr	x13, [x13, _SECTOR_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w13, [x13]
	add	w13, w13, w12
	mov	w14, #-1
	lsl	w14, w14, w13
	mvn	w14, w14
	madd	x10, x11, x10, x14
	asr	x10, x10, x13
	lsl	x10, x10, x12
	tbnz	x10, #63, LBB0_1
; %bb.5:
	add	x9, x10, x9
	cmp	x9, x8
	b.gt	LBB0_1
; %bb.6:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #24]
	str	wzr, [x19, #40]
	b	LBB0_2
LBB0_7:
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #64]
	ldp	x11, x9, [x9]
	sub	x9, x11, x9
Lloh15:
	adrp	x20, _SECTOR_SHIFT@GOTPAGE
Lloh16:
	ldr	x20, [x20, _SECTOR_SHIFT@GOTPAGEOFF]
	lsl	x0, x8, x9
	ldr	w8, [x20]
	mov	w9, #1
	lsl	w8, w9, w8
	lsl	w8, w8, w10
	sxtw	x1, w8
	bl	_roundup
	ldr	w8, [x20]
	asr	w0, w0, w8
	str	w0, [x19, #24]
	sub	w8, w0, #1
	tst	w0, w8
	b.ne	LBB0_9
; %bb.8:
	bl	___ffs
	b	LBB0_10
LBB0_9:
	mov	w0, #-1
LBB0_10:
	str	w0, [x19, #40]
	ldr	w8, [x19, #44]
	sub	w1, w8, #1
	add	x2, sp, #8
	mov	x3, sp
	mov	x0, x19
	bl	_get_area_and_offset
	ldp	x2, x1, [sp]
	mov	x0, x19
	bl	_get_data_sector
	ldr	x8, [x19, #48]
	cmp	x0, x8
	b.lt	LBB0_1
; %bb.11:
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.ge	LBB0_1
; %bb.12:
	mov	w0, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SB_SECTORS,8,3                 ; @SB_SECTORS
	.comm	_METADATA_PADDING_SECTORS,4,2   ; @METADATA_PADDING_SECTORS
	.comm	_UINT_MAX,8,3                   ; @UINT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SECTOR_SHIFT,4,2               ; @SECTOR_SHIFT
	.no_dead_strip	_calculate_device_limits
.subsections_via_symbols
