	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il3945_verify_bsm
_il3945_verify_bsm:                     ## @il3945_verify_bsm
	.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	%rdi, %r15
	movq	(%rdi), %r14
	movq	8(%rdi), %r13
	leaq	L_.str(%rip), %rdi
	callq	_D_INFO
	movq	_BSM_WR_DWCOUNT_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_il_rd_prph
	testq	%r14, %r14
	jle	LBB0_5
## %bb.1:
	movq	_BSM_SRAM_LOWER_BOUND@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_il_rd_prph
	movq	%rax, %r12
	movl	(%r13), %edi
	callq	_le32_to_cpu
	cmpq	%rax, %r12
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$8, %rbx
	addq	$4, %r13
	movq	_BSM_SRAM_LOWER_BOUND@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r14, %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	callq	_D_INFO
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	_BSM_SRAM_LOWER_BOUND@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	subq	%r15, %rbx
	movl	(%r13), %edi
	callq	_le32_to_cpu
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movq	%r12, %r8
	movq	%rax, %r9
	callq	_IL_ERR
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	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	"Begin verify bsm\n"

	.comm	_BSM_WR_DWCOUNT_REG,8,3         ## @BSM_WR_DWCOUNT_REG
	.comm	_BSM_SRAM_LOWER_BOUND,8,3       ## @BSM_SRAM_LOWER_BOUND
L_.str.1:                               ## @.str.1
	.asciz	"BSM uCode verification failed at addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"BSM bootstrap uCode image OK\n"

	.no_dead_strip	_il3945_verify_bsm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il3945_verify_bsm
_il3945_verify_bsm:                     ; @il3945_verify_bsm
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldp	x19, x23, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_INFO
Lloh2:
	adrp	x8, _BSM_WR_DWCOUNT_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BSM_WR_DWCOUNT_REG@GOTPAGEOFF]
Lloh4:
	ldr	x1, [x8]
	mov	x0, x20
	bl	_il_rd_prph
	cmp	x19, #1
	b.lt	LBB0_4
; %bb.1:
Lloh5:
	adrp	x24, _BSM_SRAM_LOWER_BOUND@GOTPAGE
Lloh6:
	ldr	x24, [x24, _BSM_SRAM_LOWER_BOUND@GOTPAGEOFF]
	ldr	x21, [x24]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_il_rd_prph
	mov	x22, x0
	ldr	w0, [x23]
	bl	_le32_to_cpu
	cmp	x22, x0
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #8
	add	x23, x23, #4
	ldr	x8, [x24]
	add	x8, x8, x19
	cmp	x21, x8
	b.lt	LBB0_2
LBB0_4:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_D_INFO
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	x20, [x24]
	sub	x21, x21, x20
	ldr	w0, [x23]
	bl	_le32_to_cpu
	mov	x5, x0
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	mov	x4, x22
	bl	_IL_ERR
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Begin verify bsm\n"

	.comm	_BSM_WR_DWCOUNT_REG,8,3         ; @BSM_WR_DWCOUNT_REG
	.comm	_BSM_SRAM_LOWER_BOUND,8,3       ; @BSM_SRAM_LOWER_BOUND
l_.str.1:                               ; @.str.1
	.asciz	"BSM uCode verification failed at addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"BSM bootstrap uCode image OK\n"

	.no_dead_strip	_il3945_verify_bsm
.subsections_via_symbols
