	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cglookup                       ## -- Begin function cglookup
	.p2align	4, 0x90
_cglookup:                              ## @cglookup
	.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
	movl	%edi, %r14d
	movq	_cgbufs@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	_sblock@GOTPCREL(%rip), %rax
	movl	8(%rax), %edi
	movl	$8, %esi
	callq	_calloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_EEXIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_errx
	movq	(%rbx), %rax
LBB0_3:
	movslq	%r14d, %rcx
	leaq	(%rax,%rcx,8), %rbx
	cmpq	$0, (%rax,%rcx,8)
	jne	LBB0_8
## %bb.4:
	movq	_flushtries@GOTPCREL(%rip), %rax
	movq	_cgblk@GOTPCREL(%rip), %r15
	cmpq	$0, (%rax)
	jne	LBB0_7
## %bb.5:
	movq	_sblock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, (%rbx)
	movq	_BT_CYLGRP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_initbarea
	movq	%rbx, %r15
LBB0_7:
	movq	_sblock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_cgtod
	movq	(%rbx), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_getblk
	movq	%r15, %rbx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cgbufs,8,3                     ## @cgbufs
	.comm	_sblock,16,3                    ## @sblock
	.comm	_EEXIT,4,2                      ## @EEXIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot allocate cylinder group buffers"

	.comm	_flushtries,8,3                 ## @flushtries
	.comm	_cgblk,8,3                      ## @cgblk
	.comm	_BT_CYLGRP,4,2                  ## @BT_CYLGRP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cglookup                       ; -- Begin function cglookup
	.p2align	2
_cglookup:                              ; @cglookup
	.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	x19, x0
Lloh0:
	adrp	x20, _cgbufs@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cgbufs@GOTPAGEOFF]
	ldr	x0, [x20]
	cbnz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _sblock@GOTPAGE
Lloh3:
	ldr	x8, [x8, _sblock@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8, #8]
	mov	w1, #8
	bl	_calloc
	str	x0, [x20]
	cbnz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _EEXIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EEXIT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_errx
	ldr	x0, [x20]
LBB0_3:
	add	x20, x0, w19, sxtw #3
	ldr	x8, [x20]
	cbnz	x8, LBB0_9
; %bb.4:
Lloh10:
	adrp	x8, _flushtries@GOTPAGE
Lloh11:
	ldr	x8, [x8, _flushtries@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x21, _sblock@GOTPAGE
Lloh14:
	ldr	x21, [x21, _sblock@GOTPAGEOFF]
	cbz	x8, LBB0_6
LBB0_5:
Lloh15:
	adrp	x20, _cgblk@GOTPAGE
Lloh16:
	ldr	x20, [x20, _cgblk@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldr	w0, [x21]
	bl	_malloc
	cbz	x0, LBB0_5
; %bb.7:
	str	x0, [x20]
Lloh17:
	adrp	x8, _BT_CYLGRP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BT_CYLGRP@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_initbarea
LBB0_8:
	mov	x0, x21
	mov	x1, x19
	bl	_cgtod
	mov	x1, x0
	ldr	x2, [x21]
	mov	x0, x20
	bl	_getblk
LBB0_9:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_cgbufs,8,3                     ; @cgbufs
	.comm	_sblock,16,3                    ; @sblock
	.comm	_EEXIT,4,2                      ; @EEXIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot allocate cylinder group buffers"

	.comm	_flushtries,8,3                 ; @flushtries
	.comm	_cgblk,8,3                      ; @cgblk
	.comm	_BT_CYLGRP,4,2                  ; @BT_CYLGRP
.subsections_via_symbols
