	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_pcie_init_fw_sec           ## -- Begin function iwl_pcie_init_fw_sec
	.p2align	4, 0x90
_iwl_pcie_init_fw_sec:                  ## @iwl_pcie_init_fw_sec
	.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	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	16(%rdi), %rdi
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_WARN
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_iwl_pcie_ctxt_info_free_paging
LBB0_2:
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_iwl_pcie_get_num_sections
	movl	%eax, %r13d
	leal	1(%r13), %esi
	movq	%rbx, %rdi
	callq	_iwl_pcie_get_num_sections
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r13), %r14d
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leal	(%rax,%r13), %esi
	addl	$2, %esi
	movq	%rbx, %rdi
	callq	_iwl_pcie_get_num_sections
	movl	%eax, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_17
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_18
## %bb.4:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	testl	%r13d, %r13d
	jle	LBB0_8
## %bb.5:
	movl	%r13d, %r14d
	movq	(%r15), %rdx
	shlq	$2, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	shlq	$2, %rdx
	addq	24(%r15), %rdx
	movq	%r15, %rdi
	callq	_iwl_pcie_ctxt_info_alloc_dma
	testl	%eax, %eax
	jne	LBB0_21
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15), %rax
	movq	24(%r15), %rcx
	movl	(%rcx,%rax,4), %edi
	callq	_cpu_to_le64
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx), %rcx
	movq	%rax, (%rcx,%rbx,2)
	movq	(%r15), %rdx
	incq	%rdx
	movq	%rdx, (%r15)
	addq	$4, %rbx
	cmpq	%rbx, %r14
	jne	LBB0_6
LBB0_8:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_12
## %bb.9:
	movl	%eax, %r14d
	movq	(%r15), %rdx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	leaq	(%rax,%rdx,4), %rsi
	addq	$4, %rsi
	shlq	$2, %rdx
	addq	24(%r15), %rdx
	movq	%r15, %rdi
	callq	_iwl_pcie_ctxt_info_alloc_dma
	testl	%eax, %eax
	jne	LBB0_21
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r15), %rax
	movq	24(%r15), %rcx
	movl	(%rcx,%rax,4), %edi
	callq	_cpu_to_le64
	movq	8(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	(%r15), %rdx
	incq	%rdx
	movq	%rdx, (%r15)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_10
LBB0_12:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jle	LBB0_16
## %bb.13:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %eax
	addl	%ebx, %eax
	addl	$2, %eax
	movslq	%eax, %rsi
	shlq	$2, %rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rsi
	leaq	(,%rbx,4), %rdx
	addq	16(%r15), %rdx
	movq	%r15, %rdi
	callq	_iwl_pcie_ctxt_info_alloc_dma
	testl	%eax, %eax
	jne	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	16(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_cpu_to_le64
	movq	(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incl	8(%r15)
	incq	%rbx
	cmpq	%r14, %rbx
	jne	LBB0_14
LBB0_16:
	xorl	%r12d, %r12d
	jmp	LBB0_22
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_22
LBB0_21:
	movl	%eax, %r12d
	jmp	LBB0_22
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_22:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"paging shouldn't already be initialized (%d pages)\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_pcie_init_fw_sec           ; -- Begin function iwl_pcie_init_fw_sec
	.p2align	2
_iwl_pcie_init_fw_sec:                  ; @iwl_pcie_init_fw_sec
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x0, [x0, #16]
	ldr	w2, [x21, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_iwl_pcie_ctxt_info_free_paging
LBB0_2:
	mov	x0, x20
	mov	w1, #0
	bl	_iwl_pcie_get_num_sections
	mov	x24, x0
	add	w1, w0, #1
	mov	x0, x20
	bl	_iwl_pcie_get_num_sections
	mov	x23, x0
	add	w25, w0, w24
	add	w1, w25, #2
	mov	x0, x20
	bl	_iwl_pcie_get_num_sections
	mov	x22, x0
Lloh2:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x25
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x21, #24]
	cbz	x0, LBB0_17
; %bb.3:
	ldr	w2, [x26]
	mov	x0, x22
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x21, #16]
	cbz	x0, LBB0_17
; %bb.4:
	cmp	w24, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x25, #0
	mov	w24, w24
	ldr	x8, [x21]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	add	x1, x9, x25, lsl #2
	ldr	x9, [x21, #24]
	add	x2, x9, x8, lsl #2
	mov	x0, x21
	bl	_iwl_pcie_ctxt_info_alloc_dma
	cbnz	w0, LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x21, #24]
	ldr	x9, [x21]
	ldr	w0, [x8, x9, lsl #2]
	bl	_cpu_to_le64
	ldr	x8, [x19, #16]
	str	x0, [x8, x25, lsl #3]
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	add	x25, x25, #1
	cmp	x25, x24
	b.ne	LBB0_6
LBB0_8:
	cmp	w23, #1
	b.lt	LBB0_12
; %bb.9:
	mov	x24, #0
	mov	w9, w23
	ldr	x8, [x21]
	lsl	x23, x9, #3
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	lsl	x8, x8, #2
	add	x9, x8, x9
	add	x1, x9, #4
	ldr	x9, [x21, #24]
	add	x2, x9, x8
	mov	x0, x21
	bl	_iwl_pcie_ctxt_info_alloc_dma
	cbnz	w0, LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x21, #24]
	ldr	x9, [x21]
	ldr	w0, [x8, x9, lsl #2]
	bl	_cpu_to_le64
	ldr	x8, [x19, #8]
	str	x0, [x8, x24]
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	add	x24, x24, #8
	cmp	x23, x24
	b.ne	LBB0_10
LBB0_12:
	cmp	w22, #1
	b.lt	LBB0_16
; %bb.13:
	mov	x23, #0
	mov	w22, w22
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	add	w8, w23, w8
	add	w8, w8, #2
	ldr	x9, [x20]
	lsl	x8, x8, #32
	add	x1, x9, x8, asr #30
	ldr	x8, [x21, #16]
	add	x2, x8, x23, lsl #2
	mov	x0, x21
	bl	_iwl_pcie_ctxt_info_alloc_dma
	cbnz	w0, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x21, #16]
	ldr	w0, [x8, x23, lsl #2]
	bl	_cpu_to_le64
	ldr	x8, [x19]
	str	x0, [x8, x23, lsl #3]
	ldr	w8, [x21, #8]
	add	w8, w8, #1
	str	w8, [x21, #8]
	add	x23, x23, #1
	cmp	x23, x22
	b.ne	LBB0_14
LBB0_16:
	mov	w0, #0
	b	LBB0_18
LBB0_17:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"paging shouldn't already be initialized (%d pages)\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
