	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_spi_opcode_index
_intel_spi_opcode_index:                ## @intel_spi_opcode_index
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	cmpq	$0, 16(%rdi)
	je	LBB0_6
## %bb.1:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpq	%r14, (%rdi,%rbx,8)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_6:
	movl	%edx, %ebx
	movq	_OPMENU0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	movl	%r14d, %edi
	callq	_writel
	movq	_PREOP_OPTYPE@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	8(%r15), %rdi
	callq	_readw
	shll	$16, %ebx
	orl	%eax, %ebx
	movq	(%r14), %rsi
	addq	8(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_OPMENU0,8,3                    ## @OPMENU0
	.comm	_PREOP_OPTYPE,8,3               ## @PREOP_OPTYPE
	.no_dead_strip	_intel_spi_opcode_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_spi_opcode_index
_intel_spi_opcode_index:                ; @intel_spi_opcode_index
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	x0, [x19]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	ldr	x8, [x0, x21, lsl #3]
	cmp	x8, x20
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_3
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_6:
	mov	x21, x2
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _OPMENU0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OPMENU0@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x20, _PREOP_OPTYPE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _PREOP_OPTYPE@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readw
	orr	w0, w0, w21, lsl #16
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	mov	w21, #0
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_OPMENU0,8,3                    ; @OPMENU0
	.comm	_PREOP_OPTYPE,8,3               ; @PREOP_OPTYPE
	.no_dead_strip	_intel_spi_opcode_index
.subsections_via_symbols
