	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_test_alloc_mem
_mmc_test_alloc_mem:                    ## @mmc_test_alloc_mem
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rax
	movq	%rdi, %r14
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP
	movq	%rax, %r12
	movl	(%r13), %esi
	movl	%r14d, %edi
	callq	_DIV_ROUND_UP
	movq	%rax, %r15
	movl	(%r13), %esi
	movl	%ebx, %edi
	callq	_DIV_ROUND_UP
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_nr_free_buffer_pages
	sarl	$4, %eax
	movslq	%eax, %r14
	cmpq	%r14, %r12
	cmovbq	%r12, %r14
	cmpq	%r14, %r15
	cmovaeq	%r14, %r15
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	cmpq	%r14, %rbx
	cmovaeq	%r14, %rbx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %eax
	cmpq	%rax, %r14
	movl	%r14d, %r15d
	cmovael	%ecx, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %r13
	movl	(%rbx), %edx
	movl	%r15d, %edi
	movl	$16, %esi
	callq	_kcalloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movl	%r15d, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testq	%r14, %r14
	je	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_GFP_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	orl	(%rbx), %r13d
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	___GFP_NORETRY@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	shlq	%cl, %rdi
	callq	_get_order
	movl	%eax, %r12d
	incq	%r12
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rbx
	decq	%r12
	movl	%r13d, %edi
	movl	%r12d, %esi
	callq	_alloc_pages
	cmpl	$1, %ebx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	testq	%rax, %rax
	je	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rdx
	movq	8(%r13), %rcx
	movq	%rdx, %rsi
	shlq	$4, %rsi
	movq	%rax, 8(%rcx,%rsi)
	movl	%r12d, (%rcx,%rsi)
	incq	%rdx
	movq	%rdx, (%r13)
	movl	$1, %eax
	movl	%r12d, %ecx
	shlq	%cl, %rax
	subq	%rax, %r14
	jbe	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, %r15
	cmpq	-64(%rbp), %rdx                 ## 8-byte Folded Reload
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	jb	LBB0_3
## %bb.11:
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	jb	LBB0_12
	jmp	LBB0_14
LBB0_8:
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jae	LBB0_14
LBB0_12:
	movq	%r13, %rdi
	callq	_mmc_test_free_mem
LBB0_13:
	xorl	%r13d, %r13d
LBB0_14:
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	___GFP_NORETRY,4,2              ## @__GFP_NORETRY
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.no_dead_strip	_mmc_test_alloc_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_test_alloc_mem
_mmc_test_alloc_mem:                    ; @mmc_test_alloc_mem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x2
	mov	x8, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x8
	bl	_DIV_ROUND_UP
	mov	x22, x0
	ldr	w1, [x23]
	mov	x0, x21
	bl	_DIV_ROUND_UP
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x19
	bl	_DIV_ROUND_UP
	mov	x19, x0
	bl	_nr_free_buffer_pages
                                        ; kill: def $w0 killed $w0 def $x0
	sbfx	x8, x0, #4, #28
	cmp	x22, x8
	csel	x24, x22, x8, lo
	cmp	x21, x24
	csel	x21, x21, x24, lo
	cmp	x19, x24
	csel	x25, x19, x24, lo
	cmp	x24, w20, uxtw
	csel	w20, w24, w20, lo
Lloh2:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	w0, #16
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_12
; %bb.1:
	ldr	w2, [x26]
	mov	x0, x20
	mov	w1, #16
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_11
; %bb.2:
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	mov	x27, #0
Lloh4:
	adrp	x23, _PAGE_SHIFT@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PAGE_SHIFT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cbz	x24, LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
Lloh6:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, ___GFP_NOWARN@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___GFP_NOWARN@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, ___GFP_NORETRY@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___GFP_NORETRY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w22, w8, w9
	ldr	x8, [x23]
	lsl	x0, x25, x8
	bl	_get_order
	mov	w8, w0
	add	x21, x8, #1
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x28, x21
	sub	x21, x21, #1
	mov	x0, x22
	mov	x1, x21
	bl	_alloc_pages
	cmp	w28, #1
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	cbz	x0, LBB0_5
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x9, x8, [x19]
	add	x8, x8, x9, lsl #4
	str	x0, [x8, #8]
	str	w21, [x8]
	add	x8, x9, #1
	str	x8, [x19]
	mov	w9, #1
	lsl	x9, x9, x21
	subs	x24, x24, x9
	b.ls	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x9, x27
	cmp	x8, x20
	b.lo	LBB0_3
LBB0_10:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x27, x8
	b.hs	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_mmc_test_free_mem
	mov	x19, #0
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	___GFP_NORETRY,4,2              ; @__GFP_NORETRY
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.no_dead_strip	_mmc_test_alloc_mem
.subsections_via_symbols
