	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcom_iommu_sec_ptbl_init
_qcom_iommu_sec_ptbl_init:              ## @qcom_iommu_sec_ptbl_init
	.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	$0, -48(%rbp)
	xorl	%ebx, %ebx
	cmpb	$0, _qcom_iommu_sec_ptbl_init.allocated(%rip)
	jne	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	leaq	-48(%rbp), %rsi
	xorl	%edi, %edi
	callq	_qcom_scm_iommu_secure_ptbl_size
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	-48(%rbp), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	movq	_DMA_ATTR_NO_KERNEL_MAPPING@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	-48(%rbp), %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r14, %r8
	callq	_dma_alloc_attrs
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movl	-52(%rbp), %edi
	movq	-48(%rbp), %rsi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_qcom_scm_iommu_secure_ptbl_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r13d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	-48(%rbp), %rsi
	movl	-52(%rbp), %ecx
	movq	%r15, %rdi
	movq	%r12, %rdx
	movq	%r14, %r8
	callq	_dma_free_attrs
	movl	%r13d, %ebx
	jmp	LBB0_8
LBB0_4:
	movl	-48(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_7:
	movb	$1, _qcom_iommu_sec_ptbl_init.allocated(%rip)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_qcom_iommu_sec_ptbl_init.allocated,1,2 ## @qcom_iommu_sec_ptbl_init.allocated
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get iommu secure pgtable size (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"iommu sec: pgtable size: %zu\n"

	.comm	_DMA_ATTR_NO_KERNEL_MAPPING,8,3 ## @DMA_ATTR_NO_KERNEL_MAPPING
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"failed to allocate %zu bytes for pgtable\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"failed to init iommu pgtable (%d)\n"

	.no_dead_strip	_qcom_iommu_sec_ptbl_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcom_iommu_sec_ptbl_init
_qcom_iommu_sec_ptbl_init:              ; @qcom_iommu_sec_ptbl_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	xzr, [sp, #8]
	adrp	x23, _qcom_iommu_sec_ptbl_init.allocated@PAGE
	ldrb	w8, [x23, _qcom_iommu_sec_ptbl_init.allocated@PAGEOFF]
	tbz	w8, #0, LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_4
LBB0_2:
	mov	x19, x0
	add	x1, sp, #8
	mov	w0, #0
	bl	_qcom_scm_iommu_secure_ptbl_size
	cbz	w0, LBB0_5
; %bb.3:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	ldr	x2, [sp, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_info
Lloh4:
	adrp	x8, _DMA_ATTR_NO_KERNEL_MAPPING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMA_ATTR_NO_KERNEL_MAPPING@GOTPAGEOFF]
Lloh6:
	ldr	x21, [x8]
	ldr	x1, [sp, #8]
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	add	x2, sp, #4
	mov	x0, x19
	mov	x4, x21
	bl	_dma_alloc_attrs
	cbz	x0, LBB0_8
; %bb.6:
	mov	x22, x0
	ldr	w0, [sp, #4]
	ldr	x1, [sp, #8]
	mov	w2, #0
	bl	_qcom_scm_iommu_secure_ptbl_init
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.7:
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
	ldr	x1, [sp, #8]
	ldr	w3, [sp, #4]
	mov	x0, x19
	mov	x2, x22
	mov	x4, x21
	bl	_dma_free_attrs
	b	LBB0_4
LBB0_8:
	ldr	w2, [sp, #8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_9:
	mov	w8, #1
	strb	w8, [x23, _qcom_iommu_sec_ptbl_init.allocated@PAGEOFF]
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_qcom_iommu_sec_ptbl_init.allocated,1,2 ; @qcom_iommu_sec_ptbl_init.allocated
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get iommu secure pgtable size (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"iommu sec: pgtable size: %zu\n"

	.comm	_DMA_ATTR_NO_KERNEL_MAPPING,8,3 ; @DMA_ATTR_NO_KERNEL_MAPPING
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"failed to allocate %zu bytes for pgtable\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"failed to init iommu pgtable (%d)\n"

	.no_dead_strip	_qcom_iommu_sec_ptbl_init
.subsections_via_symbols
