	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_allocblock
___card_allocblock:                     ## @__card_allocblock
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	ja	LBB0_2
## %bb.1:
	movq	%rdi, %r13
	movq	_EXI_CHANNEL_2@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jbe	LBB0_2
## %bb.4:
	movq	_cardmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	(,%r13,2), %r12
	addq	%r13, %r12
	cmpl	$0, 16(%rbx,%r12,8)
	je	LBB0_5
## %bb.6:
	movl	%edx, %r14d
	movq	%rsi, %r15
	leaq	(%rbx,%r12,8), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	___card_getbatblock
	movq	(%rax), %rdx
	cmpq	%r15, %rdx
	jge	LBB0_8
## %bb.7:
	movq	_CARD_ERROR_INSSPACE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_CARD_ERROR_FATAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_CARD_ERROR_NOCARD@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_8:
	movq	8(%rax), %r11
	testq	%r15, %r15
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_9
## %bb.12:
	leaq	(%rbx,%r12,8), %r10
	addq	$8, %r10
	movl	$65535, %r14d                   ## imm = 0xFFFF
	xorl	%edi, %edi
	movq	_CARD_SYSAREA@GOTPCREL(%rip), %r8
	movq	%r15, %rdx
	xorl	%r12d, %r12d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	$65535, (%rbx,%rcx,8)           ## imm = 0xFFFF
	decq	%rdx
	movq	%r9, %r14
	movq	%r11, %r12
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	testq	%rdx, %rdx
	je	LBB0_10
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	incq	%rdi
	movq	(%r10), %rbx
	movq	(%r8), %rsi
	movq	%rbx, %rcx
	subq	%rsi, %rcx
	cmpq	%rcx, %rdi
	jae	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	incq	%r11
	cmpq	%rbx, %r11
	movq	%rsi, %rcx
	cmovbq	%r11, %rcx
	cmpq	%rsi, %r11
	movq	%rcx, %r11
	cmovbq	%rsi, %r11
	movq	16(%rax), %rbx
	movq	%r11, %rcx
	subq	%rsi, %rcx
	cmpq	$0, (%rbx,%rcx,8)
	jne	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r11, %r9
	cmpq	$65535, %r14                    ## imm = 0xFFFF
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	subq	%rsi, %r12
	movq	%r11, (%rbx,%r12,8)
	movq	%r11, %rcx
	subq	(%r8), %rcx
	movq	%r14, %r9
	jmp	LBB0_18
LBB0_9:
	movl	$65535, %r14d                   ## imm = 0xFFFF
	jmp	LBB0_11
LBB0_10:
	movq	(%rax), %rdx
LBB0_11:
	subq	%r15, %rdx
	movq	%rdx, (%rax)
	movq	%r11, 8(%rax)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, (%rcx)
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___card_updatefat               ## TAILCALL
LBB0_14:
	movq	_CARD_ERROR_BROKEN@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXI_CHANNEL_0,8,3              ## @EXI_CHANNEL_0
	.comm	_EXI_CHANNEL_2,8,3              ## @EXI_CHANNEL_2
	.comm	_CARD_ERROR_FATAL_ERROR,8,3     ## @CARD_ERROR_FATAL_ERROR
	.comm	_cardmap,8,3                    ## @cardmap
	.comm	_CARD_ERROR_NOCARD,8,3          ## @CARD_ERROR_NOCARD
	.comm	_CARD_ERROR_INSSPACE,8,3        ## @CARD_ERROR_INSSPACE
	.comm	_CARD_SYSAREA,8,3               ## @CARD_SYSAREA
	.comm	_CARD_ERROR_BROKEN,8,3          ## @CARD_ERROR_BROKEN
	.no_dead_strip	___card_allocblock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __card_allocblock
___card_allocblock:                     ; @__card_allocblock
	.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	x8, _EXI_CHANNEL_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXI_CHANNEL_0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _EXI_CHANNEL_2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EXI_CHANNEL_2@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x0
	ccmp	x9, x0, #0, ls
	b.hi	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _CARD_ERROR_FATAL_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CARD_ERROR_FATAL_ERROR@GOTPAGEOFF]
	b	LBB0_18
LBB0_2:
	mov	x20, x0
Lloh8:
	adrp	x8, _cardmap@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cardmap@GOTPAGEOFF]
Lloh10:
	ldr	x23, [x8]
	mov	w8, #24
	madd	x22, x0, x8, x23
	ldr	w8, [x22, #16]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x19, x2
	mov	x21, x1
	mov	x0, x22
	bl	___card_getbatblock
	ldr	x9, [x0]
	cmp	x9, x21
	b.ge	LBB0_6
; %bb.4:
Lloh11:
	adrp	x8, _CARD_ERROR_INSSPACE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CARD_ERROR_INSSPACE@GOTPAGEOFF]
	b	LBB0_18
LBB0_5:
Lloh13:
	adrp	x8, _CARD_ERROR_NOCARD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CARD_ERROR_NOCARD@GOTPAGEOFF]
	b	LBB0_18
LBB0_6:
	mov	x1, x0
	ldr	x8, [x0, #8]
	cbz	x21, LBB0_14
; %bb.7:
	mov	x9, #0
	mov	x15, #0
	mov	w10, #24
	madd	x10, x20, x10, x23
	add	x10, x10, #8
	mov	w12, #65535
Lloh15:
	adrp	x13, _CARD_SYSAREA@GOTPAGE
Lloh16:
	ldr	x13, [x13, _CARD_SYSAREA@GOTPAGEOFF]
	mov	x14, x21
	mov	w11, #65535
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	str	x12, [x17, x0, lsl #3]
	sub	x14, x14, #1
	mov	x11, x2
	mov	x15, x8
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	cbz	x14, LBB0_15
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x9, x9, #1
	ldr	x17, [x10]
	ldr	x16, [x13]
	sub	x0, x17, x16
	cmp	x9, x0
	b.hs	LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x0, x8, #1
	cmp	x0, x17
	ccmp	x0, x16, #0, lo
	csinc	x8, x16, x8, lo
	ldr	x17, [x1, #16]
	sub	x0, x8, x16
	ldr	x2, [x17, x0, lsl #3]
	cbnz	x2, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x2, x8
	cmp	x11, x12
	b.eq	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	sub	x15, x15, x16
	str	x8, [x17, x15, lsl #3]
	ldr	x15, [x13]
	sub	x0, x8, x15
	mov	x2, x11
	b	LBB0_8
LBB0_14:
	mov	w11, #65535
	b	LBB0_16
LBB0_15:
	ldr	x9, [x1]
LBB0_16:
	sub	x9, x9, x21
	stp	x9, x8, [x1]
	str	x11, [x22]
	mov	x0, x20
	mov	x2, x19
	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
	b	___card_updatefat
LBB0_17:
Lloh17:
	adrp	x8, _CARD_ERROR_BROKEN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CARD_ERROR_BROKEN@GOTPAGEOFF]
LBB0_18:
	ldr	x0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EXI_CHANNEL_0,8,3              ; @EXI_CHANNEL_0
	.comm	_EXI_CHANNEL_2,8,3              ; @EXI_CHANNEL_2
	.comm	_CARD_ERROR_FATAL_ERROR,8,3     ; @CARD_ERROR_FATAL_ERROR
	.comm	_cardmap,8,3                    ; @cardmap
	.comm	_CARD_ERROR_NOCARD,8,3          ; @CARD_ERROR_NOCARD
	.comm	_CARD_ERROR_INSSPACE,8,3        ; @CARD_ERROR_INSSPACE
	.comm	_CARD_SYSAREA,8,3               ; @CARD_SYSAREA
	.comm	_CARD_ERROR_BROKEN,8,3          ; @CARD_ERROR_BROKEN
	.no_dead_strip	___card_allocblock
.subsections_via_symbols
