	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_smmu_init_one_queue
_arm_smmu_init_one_queue:               ## @arm_smmu_init_one_queue
	.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
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	%r8, %r14
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r12
	leaq	(,%r8,8), %r15
	movb	24(%rsi), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movslq	%eax, %r13
	imulq	%r15, %r13
	movl	(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_dmam_alloc_coherent
	movq	%rax, 64(%rbx)
	testq	%rax, %rax
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_4
## %bb.1:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%r14), %r13
	jb	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%rbx), %ecx
	decl	%ecx
	movl	%ecx, 24(%rbx)
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movslq	%eax, %r13
	imulq	%r15, %r13
	movl	(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_dmam_alloc_coherent
	movq	%rax, 64(%rbx)
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	decq	%r13
	andq	(%rbx), %r13
	movq	%r13, %rdi
	callq	_WARN_ON
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	(%r12), %edi
	movb	24(%rbx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_dev_info
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_arm_smmu_page1_fixup
	movq	%rax, 56(%rbx)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_arm_smmu_page1_fixup
	movq	%rax, 48(%rbx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movq	_Q_BASE_RWA@GOTPCREL(%rip), %rax
	movq	_Q_BASE_ADDR_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rbx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movq	_Q_BASE_LOG2SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%rbx), %esi
	callq	_FIELD_PREP
	orl	%eax, 16(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_5:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$40, %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	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate queue (0x%zx bytes) for %s\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"allocated %u entries for %s\n"

	.comm	_Q_BASE_RWA,4,2                 ## @Q_BASE_RWA
	.comm	_Q_BASE_ADDR_MASK,4,2           ## @Q_BASE_ADDR_MASK
	.comm	_Q_BASE_LOG2SIZE,4,2            ## @Q_BASE_LOG2SIZE
	.no_dead_strip	_arm_smmu_init_one_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_smmu_init_one_queue
_arm_smmu_init_one_queue:               ; @arm_smmu_init_one_queue
	.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	x23, x5
	mov	x20, x4
	str	x3, [sp, #8]                    ; 8-byte Folded Spill
	mov	x24, x2
	mov	x19, x1
	mov	x22, x0
	lsl	x26, x4, #3
	ldr	w8, [x1, #24]
	mov	w27, #1
	lsl	w8, w27, w8
	sxtw	x8, w8
	mul	x25, x26, x8
	ldr	w0, [x0]
Lloh0:
	adrp	x28, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x28, [x28, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x28]
	mov	x1, x25
	mov	x2, x19
	bl	_dmam_alloc_coherent
	str	x0, [x19, #64]
Lloh2:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	cmp	x0, #0
	ccmp	x25, x8, #0, eq
	b.lo	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x19, #24]
	sub	w8, w8, #1
	str	w8, [x19, #24]
	lsl	w8, w27, w8
	sxtw	x8, w8
	mul	x25, x26, x8
	ldr	w0, [x22]
	ldr	w3, [x28]
	mov	x1, x25
	mov	x2, x19
	bl	_dmam_alloc_coherent
	str	x0, [x19, #64]
	b	LBB0_1
LBB0_3:
	cbz	x0, LBB0_7
; %bb.4:
	ldr	x8, [x19]
	sub	x9, x25, #1
	and	x0, x8, x9
	bl	_WARN_ON
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w0, [x22]
	ldr	w8, [x19, #24]
	mov	w9, #1
	lsl	w2, w9, w8
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x23
	bl	_dev_info
LBB0_6:
	mov	x0, x24
	mov	x1, x22
	bl	_arm_smmu_page1_fixup
	str	x0, [x19, #56]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x22
	bl	_arm_smmu_page1_fixup
	str	x0, [x19, #48]
	str	x20, [x19, #8]
Lloh6:
	adrp	x8, _Q_BASE_RWA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Q_BASE_RWA@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19]
Lloh9:
	adrp	x10, _Q_BASE_ADDR_MASK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _Q_BASE_ADDR_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	and	w9, w10, w9
	orr	w8, w9, w8
	str	w8, [x19, #16]
Lloh12:
	adrp	x8, _Q_BASE_LOG2SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _Q_BASE_LOG2SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x19, #24]
	bl	_FIELD_PREP
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	stp	xzr, xzr, [x19, #32]
	b	LBB0_8
LBB0_7:
	ldr	w0, [x22]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	mov	x3, x23
	bl	_dev_err
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate queue (0x%zx bytes) for %s\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"allocated %u entries for %s\n"

	.comm	_Q_BASE_RWA,4,2                 ; @Q_BASE_RWA
	.comm	_Q_BASE_ADDR_MASK,4,2           ; @Q_BASE_ADDR_MASK
	.comm	_Q_BASE_LOG2SIZE,4,2            ; @Q_BASE_LOG2SIZE
	.no_dead_strip	_arm_smmu_init_one_queue
.subsections_via_symbols
