	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cas_saturn_firmware_init
_cas_saturn_firmware_init:              ## @cas_saturn_firmware_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movaps	L___const.cas_saturn_firmware_init.fw_name(%rip), %xmm0
	movaps	%xmm0, -32(%rbp)
	movq	_PHY_NS_DP83065@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%rdi), %rax
	jne	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	24(%rdi), %rdx
	leaq	-40(%rbp), %rdi
	leaq	-32(%rbp), %rsi
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	leaq	-32(%rbp), %rsi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_8
LBB0_3:
	movq	-40(%rbp), %rax
	movl	(%rax), %esi
	cmpl	$1, %esi
	jg	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	leaq	-32(%rbp), %rdx
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_7
LBB0_5:
	movq	8(%rax), %rax
	movl	4(%rax), %ecx
	shll	$8, %ecx
	orl	(%rax), %ecx
	movl	%ecx, 8(%rbx)
	addl	$-2, %esi
	movl	%esi, 12(%rbx)
	movl	%esi, %edi
	callq	_vmalloc
	movl	%eax, 16(%rbx)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	-40(%rbp), %rcx
	movq	8(%rcx), %rsi
	addq	$8, %rsi
	movl	12(%rbx), %edx
	movl	%eax, %edi
	callq	_memcpy
LBB0_7:
	movq	-40(%rbp), %rdi
	callq	_release_firmware
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
	.p2align	4                               ## @__const.cas_saturn_firmware_init.fw_name
L___const.cas_saturn_firmware_init.fw_name:
	.asciz	"sun/cassini.bin"

	.comm	_PHY_NS_DP83065,8,3             ## @PHY_NS_DP83065
L_.str:                                 ## @.str
	.asciz	"Failed to load firmware \"%s\"\n"

L_.str.1:                               ## @.str.1
	.asciz	"bogus length %zu in \"%s\"\n"

	.no_dead_strip	_cas_saturn_firmware_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cas_saturn_firmware_init
_cas_saturn_firmware_init:              ; @cas_saturn_firmware_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, l___const.cas_saturn_firmware_init.fw_name@PAGE
Lloh4:
	add	x8, x8, l___const.cas_saturn_firmware_init.fw_name@PAGEOFF
Lloh5:
	ldr	q0, [x8]
	str	q0, [sp, #32]
Lloh6:
	adrp	x8, _PHY_NS_DP83065@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PHY_NS_DP83065@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x9, [x0]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x2, [x0, #24]
	add	x20, sp, #32
	add	x0, sp, #24
	add	x1, sp, #32
	bl	_request_firmware
	cbz	w0, LBB0_3
; %bb.2:
	str	x20, [sp]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_8
LBB0_3:
	ldr	x9, [sp, #24]
	ldr	w8, [x9]
	cmp	w8, #1
	b.gt	LBB0_5
; %bb.4:
	add	x9, sp, #32
	stp	x8, x9, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_7
LBB0_5:
	ldr	x9, [x9, #8]
	ldp	w9, w10, [x9]
	orr	w9, w9, w10, lsl #8
	sub	w0, w8, #2
	stp	w9, w0, [x19, #8]
	bl	_vmalloc
	str	w0, [x19, #16]
	cbz	w0, LBB0_7
; %bb.6:
	ldr	x8, [sp, #24]
	ldr	x8, [x8, #8]
	add	x1, x8, #8
	ldr	w2, [x19, #12]
	bl	_memcpy
LBB0_7:
	ldr	x0, [sp, #24]
	bl	_release_firmware
LBB0_8:
	ldur	x8, [x29, #-24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAddLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l___const.cas_saturn_firmware_init.fw_name: ; @__const.cas_saturn_firmware_init.fw_name
	.asciz	"sun/cassini.bin"

	.comm	_PHY_NS_DP83065,8,3             ; @PHY_NS_DP83065
l_.str:                                 ; @.str
	.asciz	"Failed to load firmware \"%s\"\n"

l_.str.1:                               ; @.str.1
	.asciz	"bogus length %zu in \"%s\"\n"

	.no_dead_strip	_cas_saturn_firmware_init
.subsections_via_symbols
