	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cgget                          ## -- Begin function cgget
	.p2align	4, 0x90
_cgget:                                 ## @cgget
	.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	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r12
	leaq	4(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_cgtod
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_fsbtodb
	movl	8(%r12), %ecx
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_bread
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.1:
	movq	_CK_CYLGRP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	(%r15), %rbx
	movq	$0, (%r15)
	movl	8(%r12), %edx
	movq	$-1, %rdi
	movq	%r15, %rsi
	callq	_calculate_crc32c
	movq	%rbx, (%r15)
	cmpq	%rax, %rbx
	jne	LBB0_6
LBB0_3:
	movq	%r15, %rdi
	callq	_cg_chkmagic
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	cmpl	%r14d, 8(%r15)
	jne	LBB0_6
## %bb.5:
	movl	%r14d, (%r12)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_ERROR
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_ERROR
LBB0_8:
	movl	$-1, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to read cylinder group"

	.comm	_CK_CYLGRP,4,2                  ## @CK_CYLGRP
L_.str.1:                               ## @.str.1
	.asciz	"cylinder group checks failed"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cgget                          ; -- Begin function cgget
	.p2align	2
_cgget:                                 ; @cgget
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	add	x22, x0, #4
	mov	x0, x22
	bl	_cgtod
	mov	x1, x0
	mov	x0, x22
	bl	_fsbtodb
	mov	x1, x0
	ldr	w3, [x19, #8]
	mov	x0, x19
	mov	x2, x21
	bl	_bread
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.1:
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _CK_CYLGRP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CK_CYLGRP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	x22, [x21]
	str	xzr, [x21]
	ldr	w2, [x19, #8]
	mov	x0, #-1
	mov	x1, x21
	bl	_calculate_crc32c
	str	x22, [x21]
	cmp	x22, x0
	b.ne	LBB0_6
LBB0_3:
	mov	x0, x21
	bl	_cg_chkmagic
	cbz	w0, LBB0_6
; %bb.4:
	ldr	w8, [x21, #8]
	cmp	w8, w20
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	str	w20, [x19]
	b	LBB0_9
LBB0_6:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ERROR
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _errno@GOTPAGE
Lloh9:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ERROR
LBB0_8:
	mov	w0, #-1
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to read cylinder group"

	.comm	_CK_CYLGRP,4,2                  ; @CK_CYLGRP
l_.str.1:                               ; @.str.1
	.asciz	"cylinder group checks failed"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
