	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_load_firmware
_il4965_load_firmware:                  ## @il4965_load_firmware
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rsi), %r12
	movl	32(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, (%rbx)
	movq	%rax, %rdi
	callq	_IL_UCODE_API
	cmpl	$23, (%r14)
	jg	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_IL_ERR
	jmp	LBB0_2
LBB0_3:
	movl	24(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, (%r15)
	movl	20(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, 4(%r15)
	movl	16(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, 8(%r15)
	movl	12(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, 12(%r15)
	movl	8(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, 16(%r15)
	movl	(%r14), %esi
	movslq	(%r15), %rdx
	movslq	4(%r15), %rdi
	movslq	8(%r15), %rbx
	movslq	12(%r15), %rcx
	addl	%edx, %eax
	addl	%edi, %eax
	addl	%ebx, %eax
	addl	%ecx, %eax
	addl	$24, %eax
	cmpl	%eax, %esi
	jne	LBB0_4
## %bb.5:
	movq	(%r12), %rax
	movq	%rax, 56(%r15)
	leaq	(%rax,%rdx,4), %rax
	movq	%rax, 48(%r15)
	leaq	(%rax,%rdi,4), %rax
	movq	%rax, 40(%r15)
	leaq	(%rax,%rbx,4), %rax
	movq	%rax, 32(%r15)
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 24(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_IL_ERR
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"File size too small!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"uCode file size %d does not match expected size\n"

	.no_dead_strip	_il4965_load_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_load_firmware
_il4965_load_firmware:                  ; @il4965_load_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x1, #8]
	ldr	w0, [x22, #32]
	bl	_le32_to_cpu
	str	x0, [x21]
	bl	_IL_UCODE_API
	ldr	w8, [x20]
	cmp	w8, #23
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_2:
	ldr	w0, [x22, #24]
	bl	_le32_to_cpu
	str	w0, [x19]
	ldr	w0, [x22, #20]
	bl	_le32_to_cpu
	str	w0, [x19, #4]
	ldr	w0, [x22, #16]
	bl	_le32_to_cpu
	str	w0, [x19, #8]
	ldr	w0, [x22, #12]
	bl	_le32_to_cpu
	str	w0, [x19, #12]
	ldr	w0, [x22, #8]
	bl	_le32_to_cpu
	str	w0, [x19, #16]
	ldr	w8, [x20]
	ldpsw	x9, x10, [x19]
	ldpsw	x11, x12, [x19, #8]
	add	w13, w0, w9
	add	w13, w13, w10
	add	w13, w13, w11
	add	w13, w13, w12
	add	w13, w13, #24
	cmp	w8, w13
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	ldr	x8, [x22]
	str	x8, [x19, #56]
	add	x8, x8, x9, lsl #2
	add	x9, x8, x10, lsl #2
	stp	x9, x8, [x19, #40]
	add	x8, x9, x11, lsl #2
	add	x9, x8, x12, lsl #2
	stp	x9, x8, [x19, #24]
	b	LBB0_6
LBB0_4:
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_IL_ERR
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"File size too small!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"uCode file size %d does not match expected size\n"

	.no_dead_strip	_il4965_load_firmware
.subsections_via_symbols
