	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_get_opt_fw_name
_ice_get_opt_fw_name:                   ## @ice_get_opt_fw_name
	.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
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r15
	movq	_PCI_EXT_CAP_ID_DSN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pci_find_ext_capability
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	%eax, %ebx
	movq	_NAME_MAX@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %r14
	leal	4(%rbx), %esi
	leaq	-84(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_pci_read_config_dword
	movl	-84(%rbp), %edi
	leaq	-80(%rbp), %rsi
	callq	_put_unaligned_le32
	addl	$8, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	callq	_pci_read_config_dword
	movl	-84(%rbp), %edi
	leaq	-64(%rbp), %rsi
	callq	_put_unaligned_le32
	movl	(%r13), %esi
	movq	_ICE_DDP_PKG_PATH@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	-52(%rbp), %r8d
	movl	-56(%rbp), %r9d
	movl	-60(%rbp), %r10d
	movl	-64(%rbp), %r11d
	movl	-68(%rbp), %r15d
	movl	-72(%rbp), %r12d
	movl	-80(%rbp), %eax
	movl	-76(%rbp), %ebx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	pushq	%rax
	pushq	%rbx
	pushq	%r12
	pushq	%r15
	pushq	%r11
	pushq	%r10
	callq	_snprintf
	addq	$48, %rsp
	jmp	LBB0_5
LBB0_4:
	xorl	%r14d, %r14d
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXT_CAP_ID_DSN,4,2         ## @PCI_EXT_CAP_ID_DSN
	.comm	_NAME_MAX,4,2                   ## @NAME_MAX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%sice-%02x%02x%02x%02x%02x%02x%02x%02x.pkg"

	.comm	_ICE_DDP_PKG_PATH,8,3           ## @ICE_DDP_PKG_PATH
	.no_dead_strip	_ice_get_opt_fw_name
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_get_opt_fw_name
_ice_get_opt_fw_name:                   ; @ice_get_opt_fw_name
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x20, [x0]
Lloh3:
	adrp	x8, _PCI_EXT_CAP_ID_DSN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_EXT_CAP_ID_DSN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pci_find_ext_capability
	cbz	w0, LBB0_3
; %bb.1:
	mov	x21, x0
Lloh6:
	adrp	x22, _NAME_MAX@GOTPAGE
Lloh7:
	ldr	x22, [x22, _NAME_MAX@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.2:
	add	w1, w21, #4
	add	x2, sp, #20
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w0, [sp, #20]
	add	x23, sp, #24
	add	x1, sp, #24
	bl	_put_unaligned_le32
	add	w1, w21, #8
	add	x2, sp, #20
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w0, [sp, #20]
	add	x1, x23, #16
	bl	_put_unaligned_le32
	ldr	w1, [x22]
Lloh11:
	adrp	x8, _ICE_DDP_PKG_PATH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ICE_DDP_PKG_PATH@GOTPAGEOFF]
Lloh13:
	ldr	x3, [x8]
	ldp	w5, w4, [sp, #48]
	ldp	w7, w6, [sp, #40]
	ldp	w9, w8, [sp, #32]
	ldp	w11, w10, [sp, #24]
	stp	w10, w11, [sp, #8]
	stp	w8, w9, [sp]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_snprintf
	b	LBB0_4
LBB0_3:
	mov	x19, #0
LBB0_4:
	ldr	x8, [sp, #56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXT_CAP_ID_DSN,4,2         ; @PCI_EXT_CAP_ID_DSN
	.comm	_NAME_MAX,4,2                   ; @NAME_MAX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%sice-%02x%02x%02x%02x%02x%02x%02x%02x.pkg"

	.comm	_ICE_DDP_PKG_PATH,8,3           ; @ICE_DDP_PKG_PATH
	.no_dead_strip	_ice_get_opt_fw_name
.subsections_via_symbols
