	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_discover_caps
_ice_discover_caps:                     ## @ice_discover_caps
	.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	%esi, %r14d
	movq	%rdi, %r13
	movl	$40, -44(%rbp)
	callq	_ice_hw_to_dev
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	$160, %ebx
	movl	%eax, %edi
	movl	$160, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	leaq	-44(%rbp), %rcx
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	callq	_ice_aq_discover_caps
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_ice_hw_to_dev
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_devm_kfree
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rax
	movq	_ICE_AQ_RC_ENOMEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%al
	orb	%al, %r12b
	testb	$1, %r12b
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %ebx
	shll	$2, %ebx
	movq	%r13, %rdi
	callq	_ice_hw_to_dev
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_devm_kzalloc
	movq	%rax, %r15
	movb	$1, %r12b
	testq	%rax, %rax
	jne	LBB0_2
LBB0_7:
	movq	_ICE_ERR_NO_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	movl	%ebx, %eax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %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	_ICE_ERR_NO_MEMORY,4,2          ## @ICE_ERR_NO_MEMORY
	.comm	_ICE_AQ_RC_ENOMEM,8,3           ## @ICE_AQ_RC_ENOMEM
	.comm	_ICE_GET_CAP_BUF_COUNT,4,2      ## @ICE_GET_CAP_BUF_COUNT
	.comm	_ICE_GET_CAP_RETRY_COUNT,8,3    ## @ICE_GET_CAP_RETRY_COUNT
	.no_dead_strip	_ice_discover_caps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_discover_caps
_ice_discover_caps:                     ; @ice_discover_caps
	.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
	mov	x20, x1
	mov	x19, x0
	mov	w8, #40
	str	w8, [sp, #12]
	bl	_ice_hw_to_dev
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #160
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x22, x0
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x22
	mov	w2, #160
	mov	x4, x20
	mov	x5, #0
	bl	_ice_aq_discover_caps
	mov	x21, x0
	mov	x0, x19
	bl	_ice_hw_to_dev
	mov	x1, x22
	bl	_devm_kfree
	cbz	w21, LBB0_6
; %bb.2:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _ICE_AQ_RC_ENOMEM@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ICE_AQ_RC_ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [sp, #12]
	lsl	w21, w8, #2
	mov	x0, x19
	bl	_ice_hw_to_dev
	ldr	w2, [x23]
	mov	x1, x21
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.4:
	mov	x22, x0
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x4, x20
	mov	x5, #0
	bl	_ice_aq_discover_caps
	mov	x20, x0
	mov	x0, x19
	bl	_ice_hw_to_dev
	mov	x1, x22
	bl	_devm_kfree
	cmp	w20, #0
	csel	w21, wzr, w20, eq
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _ICE_ERR_NO_MEMORY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ICE_ERR_NO_MEMORY@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
LBB0_6:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ICE_ERR_NO_MEMORY,4,2          ; @ICE_ERR_NO_MEMORY
	.comm	_ICE_AQ_RC_ENOMEM,8,3           ; @ICE_AQ_RC_ENOMEM
	.comm	_ICE_GET_CAP_BUF_COUNT,4,2      ; @ICE_GET_CAP_BUF_COUNT
	.comm	_ICE_GET_CAP_RETRY_COUNT,8,3    ; @ICE_GET_CAP_RETRY_COUNT
	.no_dead_strip	_ice_discover_caps
.subsections_via_symbols
