	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function typhoon_request_firmware
_typhoon_request_firmware:              ## @typhoon_request_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	%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	_typhoon_fw@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	cmpq	$0, (%rax)
	jne	LBB0_11
## %bb.1:
	movq	%rdi, %r15
	movq	_FIRMWARE_NAME@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	8(%rdi), %rdx
	movq	_typhoon_fw@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	movl	(%r15), %edi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	%ebx, %r13d
	jmp	LBB0_11
LBB0_3:
	movq	(%r12), %rax
	movl	(%rax), %ebx
	cmpl	$8, %ebx
	jb	LBB0_10
## %bb.4:
	movq	8(%rax), %r14
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$8, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_5
LBB0_10:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_netdev_err
	movq	_typhoon_fw@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_release_firmware
	movq	$0, (%rbx)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%r14), %edi
	callq	_le32_to_cpu
	testl	%eax, %eax
	je	LBB0_11
## %bb.6:
	movl	%eax, %r12d
	addl	$-8, %ebx
	addq	$32, %r14
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$4, %ebx
	jb	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r14), %edi
	callq	_le32_to_cpu
	subl	%eax, %ebx
	jl	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	cltq
	leaq	(%r14,%rax,4), %r14
	addq	$16, %r14
	decl	%r12d
	jne	LBB0_7
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_typhoon_fw,8,3                 ## @typhoon_fw
	.comm	_FIRMWARE_NAME,4,2              ## @FIRMWARE_NAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to load firmware \"%s\"\n"

L_.str.1:                               ## @.str.1
	.asciz	"TYPHOON"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid firmware image\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_typhoon_request_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function typhoon_request_firmware
_typhoon_request_firmware:              ; @typhoon_request_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x8, _typhoon_fw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _typhoon_fw@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w22, #0
	b	LBB0_7
LBB0_2:
	mov	x20, x0
Lloh3:
	adrp	x21, _FIRMWARE_NAME@GOTPAGE
Lloh4:
	ldr	x21, [x21, _FIRMWARE_NAME@GOTPAGEOFF]
	ldr	w1, [x21]
	ldr	x2, [x0, #8]
Lloh5:
	adrp	x19, _typhoon_fw@GOTPAGE
Lloh6:
	ldr	x19, [x19, _typhoon_fw@GOTPAGEOFF]
	mov	x0, x19
	bl	_request_firmware
	cbz	w0, LBB0_4
; %bb.3:
	mov	x22, x0
	ldr	w0, [x20]
	ldr	w8, [x21]
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_7
LBB0_4:
	ldr	x8, [x19]
	ldr	w9, [x8]
	subs	w23, w9, #8
	b.lo	LBB0_6
; %bb.5:
	ldr	x22, [x8, #8]
	ldr	w0, [x22, #4]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #8
	bl	_memcmp
	cbz	x0, LBB0_8
LBB0_6:
	ldr	w0, [x20]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_err
	ldr	x0, [x19]
	bl	_release_firmware
	str	xzr, [x19]
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
LBB0_8:
	ldr	w0, [x22]
	bl	_le32_to_cpu
	cbz	w0, LBB0_1
; %bb.9:
	mov	x21, x0
	add	x24, x22, #32
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	cmp	w23, #4
	b.lo	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x24]
	bl	_le32_to_cpu
	subs	w23, w23, w0
	b.lt	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w22, #0
	add	x8, x24, w0, sxtw #2
	add	x24, x8, #16
	sub	w21, w21, #1
	cbnz	w21, LBB0_10
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_typhoon_fw,8,3                 ; @typhoon_fw
	.comm	_FIRMWARE_NAME,4,2              ; @FIRMWARE_NAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to load firmware \"%s\"\n"

l_.str.1:                               ; @.str.1
	.asciz	"TYPHOON"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid firmware image\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_typhoon_request_firmware
.subsections_via_symbols
