	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_dwnld_cfg_bufs
_ice_dwnld_cfg_bufs:                    ## @ice_dwnld_cfg_bufs
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rdx, %r13
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.3:
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movq	_ICE_METADATA_BUF@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	testl	%eax, (%rcx)
	jne	LBB0_19
## %bb.4:
	movq	_ICE_AQ_RC_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, 4(%r15)
	movq	_ICE_RES_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ice_acquire_global_cfg_lock
	testl	%eax, %eax
	je	LBB0_5
## %bb.10:
	movl	%eax, %r14d
	movq	_ICE_ERR_AQ_NO_WORK@GOTPCREL(%rip), %rcx
	movq	%r15, %rax
	cmpl	(%rcx), %r14d
	jne	LBB0_12
## %bb.11:
	movq	_ICE_AQ_RC_EEXIST@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	jmp	LBB0_19
LBB0_2:
	movq	_ICE_ERR_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_19:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	testq	%r13, %r13
	movl	$0, %eax
	cmovgq	%r13, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	decq	%r13
	xorl	%r14d, %r14d
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movb	$1, %al
	cmpq	%r14, %r13
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	12(%rbx), %edi
	callq	_le16_to_cpu
	testq	%rax, %rax
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	4(%rbx), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movq	_ICE_METADATA_BUF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	setne	%al
	jmp	LBB0_14
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %r12d
	movzbl	%al, %ecx
	movq	_ICE_PKG_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	$0, (%rsp)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	leaq	-80(%rbp), %r8
	leaq	-72(%rbp), %r9
	callq	_ice_aq_download_pkg
	movl	%eax, %r13d
	movl	(%r15), %eax
	movl	%eax, 4(%r15)
	testl	%r13d, %r13d
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	addq	$4, %rbx
	incq	%r14
	testb	%r12b, %r12b
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_6
LBB0_17:
	xorl	%r14d, %r14d
	jmp	LBB0_18
LBB0_15:
	movq	_ICE_DBG_PKG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-80(%rbp), %r8
	movq	-72(%rbp), %r9
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %ecx
	callq	_ice_debug
	movl	%r13d, %r14d
LBB0_18:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ice_release_global_cfg_lock
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_ICE_ERR_PARAM,4,2              ## @ICE_ERR_PARAM
	.comm	_ICE_METADATA_BUF,4,2           ## @ICE_METADATA_BUF
	.comm	_ICE_AQ_RC_OK,4,2               ## @ICE_AQ_RC_OK
	.comm	_ICE_RES_WRITE,4,2              ## @ICE_RES_WRITE
	.comm	_ICE_ERR_AQ_NO_WORK,4,2         ## @ICE_ERR_AQ_NO_WORK
	.comm	_ICE_AQ_RC_EEXIST,4,2           ## @ICE_AQ_RC_EEXIST
	.comm	_ICE_PKG_BUF_SIZE,4,2           ## @ICE_PKG_BUF_SIZE
	.comm	_ICE_DBG_PKG,4,2                ## @ICE_DBG_PKG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Pkg download failed: err %d off %d inf %d\n"

	.no_dead_strip	_ice_dwnld_cfg_bufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_dwnld_cfg_bufs
_ice_dwnld_cfg_bufs:                    ; @ice_dwnld_cfg_bufs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x1, LBB0_4
; %bb.1:
	mov	x22, x2
	cbz	x2, LBB0_4
; %bb.2:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
	ldr	w0, [x8]
	bl	_le32_to_cpu
Lloh0:
	adrp	x23, _ICE_METADATA_BUF@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ICE_METADATA_BUF@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.3:
	mov	w21, #0
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _ICE_ERR_PARAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ICE_ERR_PARAM@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
Lloh5:
	adrp	x8, _ICE_AQ_RC_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ICE_AQ_RC_OK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #4]
Lloh8:
	adrp	x8, _ICE_RES_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ICE_RES_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ice_acquire_global_cfg_lock
	cbz	w0, LBB0_8
; %bb.7:
	mov	x21, x0
Lloh11:
	adrp	x8, _ICE_ERR_AQ_NO_WORK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ICE_ERR_AQ_NO_WORK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _ICE_AQ_RC_EEXIST@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ICE_AQ_RC_EEXIST@GOTPAGEOFF]
	cmp	w0, w8
	csel	x8, x9, x19, eq
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_5
LBB0_8:
	cmp	x22, #0
	csel	x24, x22, xzr, gt
	sub	x25, x22, #1
Lloh16:
	adrp	x26, _ICE_PKG_BUF_SIZE@GOTPAGE
Lloh17:
	ldr	x26, [x26, _ICE_PKG_BUF_SIZE@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x24, LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cbz	x25, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x20, #12]
	bl	_le16_to_cpu
	cbz	x0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldur	x8, [x20, #4]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	ldr	w8, [x23]
	tst	w8, w0
	cset	w22, ne
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	w22, #1
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	w22, #0
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w2, [x26]
	add	x4, sp, #8
	mov	x5, sp
	mov	x0, x19
	mov	x1, x20
	mov	x3, x22
	mov	x6, #0
	bl	_ice_aq_download_pkg
	ldr	w8, [x19]
	str	w8, [x19, #4]
	cbnz	w0, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x20, x20, #4
	sub	x24, x24, #1
	sub	x25, x25, #1
	cbz	w22, LBB0_9
LBB0_17:
	mov	w21, #0
	b	LBB0_19
LBB0_18:
	mov	x21, x0
Lloh18:
	adrp	x8, _ICE_DBG_PKG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ICE_DBG_PKG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldp	x5, x4, [sp]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_ice_debug
LBB0_19:
	mov	x0, x19
	bl	_ice_release_global_cfg_lock
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ICE_ERR_PARAM,4,2              ; @ICE_ERR_PARAM
	.comm	_ICE_METADATA_BUF,4,2           ; @ICE_METADATA_BUF
	.comm	_ICE_AQ_RC_OK,4,2               ; @ICE_AQ_RC_OK
	.comm	_ICE_RES_WRITE,4,2              ; @ICE_RES_WRITE
	.comm	_ICE_ERR_AQ_NO_WORK,4,2         ; @ICE_ERR_AQ_NO_WORK
	.comm	_ICE_AQ_RC_EEXIST,4,2           ; @ICE_AQ_RC_EEXIST
	.comm	_ICE_PKG_BUF_SIZE,4,2           ; @ICE_PKG_BUF_SIZE
	.comm	_ICE_DBG_PKG,4,2                ; @ICE_DBG_PKG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Pkg download failed: err %d off %d inf %d\n"

	.no_dead_strip	_ice_dwnld_cfg_bufs
.subsections_via_symbols
