	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_spi_fill_partition
_intel_spi_fill_partition:              ## @intel_spi_fill_partition
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	$4096, (%r14)                   ## imm = 0x1000
	leaq	L_.str(%rip), %rax
	movq	%rax, 8(%r14)
	cmpl	$2, (%r15)
	jl	LBB0_9
## %bb.1:
	movl	$1, %r12d
	movq	_FREG_LIMIT_SHIFT@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	cmpl	(%r15), %r12d
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rbx
	movl	%r12d, %edi
	callq	_FREG
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_FREG_BASE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	%ebx, %esi
	movq	_FREG_LIMIT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movzbl	(%r13), %ecx
	sarl	%cl, %ebx
	cmpl	%ebx, %esi
	jge	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_intel_spi_is_protected
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, 4(%r15)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	shll	$12, %ebx
	addl	$4096, %ebx                     ## imm = 0x1000
	cmpl	(%r14), %ebx
	jle	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, (%r14)
	jmp	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BIOS"

	.comm	_FREG_BASE_MASK,4,2             ## @FREG_BASE_MASK
	.comm	_FREG_LIMIT_MASK,4,2            ## @FREG_LIMIT_MASK
	.comm	_FREG_LIMIT_SHIFT,4,2           ## @FREG_LIMIT_SHIFT
	.no_dead_strip	_intel_spi_fill_partition
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_spi_fill_partition
_intel_spi_fill_partition:              ; @intel_spi_fill_partition
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	w8, #4096
	str	w8, [x19]
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x19, #8]
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.1:
	mov	w21, #1
Lloh2:
	adrp	x23, _FREG_BASE_MASK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FREG_BASE_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x24, _FREG_LIMIT_MASK@GOTPAGE
Lloh5:
	ldr	x24, [x24, _FREG_LIMIT_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x25, _FREG_LIMIT_SHIFT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _FREG_LIMIT_SHIFT@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w21, #1
	ldr	w8, [x20]
	cmp	w21, w8
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x20, #8]
	mov	x0, x21
	bl	_FREG
	add	x0, x0, x22
	bl	_readl
	ldr	w8, [x23]
	and	w1, w8, w0
	ldr	w8, [x24]
	and	w8, w8, w0
	ldr	w9, [x25]
	asr	w22, w8, w9
	cmp	w1, w22
	ccmp	w22, #0, #4, lt
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x2, x22
	bl	_intel_spi_is_protected
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x20, #4]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	lsl	w8, w22, #12
	add	w8, w8, #1, lsl #12             ; =4096
	ldr	w9, [x19]
	cmp	w8, w9
	b.le	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w8, [x19]
	b	LBB0_2
LBB0_8:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BIOS"

	.comm	_FREG_BASE_MASK,4,2             ; @FREG_BASE_MASK
	.comm	_FREG_LIMIT_MASK,4,2            ; @FREG_LIMIT_MASK
	.comm	_FREG_LIMIT_SHIFT,4,2           ; @FREG_LIMIT_SHIFT
	.no_dead_strip	_intel_spi_fill_partition
.subsections_via_symbols
