	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function synth_alloc_pages
_synth_alloc_pages:                     ## @synth_alloc_pages
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_emu10k1_memblk_init
	movl	24(%r15), %edi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rsi
	callq	_get_single_page_range
	movslq	-48(%rbp), %r12
	xorl	%eax, %eax
	cmpl	-44(%rbp), %r12d
	jg	LBB0_9
## %bb.1:
	decq	%r12
	movq	_GFP_DMA32@GOTPCREL(%rip), %r14
	movq	___GFP_NOWARN@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_GFP_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	___GFP_NORETRY@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	orl	(%r13), %edi
	callq	_alloc_page
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_page_to_phys
	movq	16(%r15), %rcx
	movl	%eax, 4(%rcx,%r12,4)
	movq	%rbx, %rdi
	callq	_page_address
	movq	8(%r15), %rcx
	movl	%eax, 4(%rcx,%r12,4)
	movslq	-44(%rbp), %rax
	incq	%r12
	cmpq	%rax, %r12
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	orl	(%r13), %edi
	callq	_alloc_page
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_page_to_pfn
	movl	(%r15), %edx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarl	%cl, %edx
	notl	%edx
	testl	%edx, %eax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	___free_page
	jmp	LBB0_5
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
	movl	-48(%rbp), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	___synth_free_pages
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA32,4,2                  ## @GFP_DMA32
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	___GFP_NORETRY,4,2              ## @__GFP_NORETRY
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_synth_alloc_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function synth_alloc_pages
_synth_alloc_pages:                     ; @synth_alloc_pages
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_emu10k1_memblk_init
	ldr	w0, [x19, #24]
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x1, x20
	bl	_get_single_page_range
	ldp	w8, w22, [sp, #8]
                                        ; kill: def $w22 killed $w22 def $x22
	sxtw	x22, w22
	cmp	w22, w8
	b.le	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_9
LBB0_2:
	sub	w20, w22, #1
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	adrp	x24, _GFP_DMA32@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GFP_DMA32@GOTPAGEOFF]
Lloh4:
	adrp	x25, ___GFP_NOWARN@GOTPAGE
Lloh5:
	ldr	x25, [x25, ___GFP_NOWARN@GOTPAGEOFF]
Lloh6:
	adrp	x27, _GFP_DMA@GOTPAGE
Lloh7:
	ldr	x27, [x27, _GFP_DMA@GOTPAGEOFF]
Lloh8:
	adrp	x28, ___GFP_NORETRY@GOTPAGE
Lloh9:
	ldr	x28, [x28, ___GFP_NORETRY@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh10:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x27]
	orr	w8, w9, w8
	ldr	w9, [x28]
	orr	w8, w8, w9
	ldr	w9, [x25]
	orr	w0, w8, w9
	bl	_alloc_page
	mov	x21, x0
	cbz	x0, LBB0_8
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_page_to_phys
	ldr	x8, [x19, #16]
	lsl	x26, x22, #2
	str	w0, [x8, x26]
	mov	x0, x21
	bl	_page_address
	ldr	x8, [x19, #8]
	str	w0, [x8, x26]
	add	x8, x22, #1
	ldrsw	x9, [sp, #8]
	add	w20, w20, #1
	cmp	x22, x9
	mov	x22, x8
	b.ge	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w0, w8, w9
	bl	_alloc_page
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, x0
	bl	_page_to_pfn
	ldr	w8, [x19]
Lloh13:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	asr	w8, w8, w9
	bics	wzr, w0, w8
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	___free_page
	b	LBB0_3
LBB0_8:
	ldr	w1, [sp, #12]
	mov	x0, x19
	mov	x2, x20
	bl	___synth_free_pages
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA32,4,2                  ; @GFP_DMA32
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	___GFP_NORETRY,4,2              ; @__GFP_NORETRY
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_synth_alloc_pages
.subsections_via_symbols
