	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_store_ucode_sec
_iwl_store_ucode_sec:                   ## @iwl_store_ucode_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r13
	testq	%rdi, %rdi
	sete	%al
	testq	%rsi, %rsi
	sete	%dl
	movq	_IWL_UCODE_TYPE_MAX@GOTPCREL(%rip), %rsi
	cmpl	%r12d, (%rsi)
	setbe	%bl
	movl	%ecx, %r14d
	orb	%al, %dl
	orb	%bl, %dl
	movzbl	%dl, %edi
	callq	_WARN_ON
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_4
## %bb.1:
	movq	(%r13), %r13
	movl	%r12d, %ebx
	shlq	$4, %rbx
	movslq	(%r13,%rbx), %rax
	leaq	(%rax,%rax,2), %rax
	leaq	12(,%rax,4), %rsi
	movq	8(%r13,%rbx), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_krealloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r12
	leaq	(%rbx,%r13), %rcx
	leaq	(%rbx,%r13), %rax
	addq	$8, %rax
	movq	%r12, (%rax)
	movslq	(%rcx), %rbx
	movq	%rcx, %r13
	movl	4(%r15), %edi
	callq	_le32_to_cpu
	leaq	(%rbx,%rbx,2), %rcx
	movl	%eax, 8(%r12,%rcx,4)
	movl	(%r15), %eax
	movl	%eax, 4(%r12,%rcx,4)
	addl	$-4, %r14d
	movl	%r14d, (%r12,%rcx,4)
	incl	(%r13)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_UCODE_TYPE_MAX,4,2         ## @IWL_UCODE_TYPE_MAX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_iwl_store_ucode_sec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_store_ucode_sec
_iwl_store_ucode_sec:                   ; @iwl_store_ucode_sec
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	cmp	x0, #0
Lloh0:
	adrp	x8, _IWL_UCODE_TYPE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IWL_UCODE_TYPE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	x1, #0, #4, ne
	ccmp	w8, w2, #0, ne
	cset	w0, ls
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_5
LBB0_2:
	ldr	x8, [x22]
	add	x22, x8, w21, uxtw #4
	ldrsw	x8, [x22]
	mov	w9, #12
	orr	x10, xzr, #0xc
	madd	x1, x8, x9, x10
	mov	x23, x22
	ldr	x0, [x23, #8]!
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_krealloc
	cbz	x0, LBB0_4
; %bb.3:
	mov	x21, x0
	str	x0, [x23]
	ldrsw	x23, [x22]
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	mov	x8, x0
	mov	w0, #0
	mov	w9, #12
	madd	x9, x23, x9, x21
	str	w8, [x9, #8]
	ldr	w8, [x20]
	sub	w10, w19, #4
	stp	w10, w8, [x9]
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_UCODE_TYPE_MAX,4,2         ; @IWL_UCODE_TYPE_MAX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_iwl_store_ucode_sec
.subsections_via_symbols
