	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t3_get_edc_fw                  ## -- Begin function t3_get_edc_fw
	.p2align	4, 0x90
_t3_get_edc_fw:                         ## @t3_get_edc_fw
	.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
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rbx
	movq	(%rdi), %r13
	movl	%esi, %edi
	callq	_get_edc_fw_name
	leaq	-112(%rbp), %r14
	movq	%r14, %rdi
	movl	$64, %esi
	movq	%rax, %rdx
	callq	_snprintf
	movq	(%rbx), %rdx
	leaq	-120(%rbp), %rdi
	movq	%r14, %rsi
	callq	_request_firmware
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-120(%rbp), %rax
	movl	(%rax), %edx
	leal	4(%r12), %ecx
	cmpl	%ecx, %edx
	movq	%rbx, -136(%rbp)                ## 8-byte Spill
	jle	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_CH_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movq	-120(%rbp), %rax
	movl	(%rax), %edx
LBB0_4:
	movq	8(%rax), %r15
	movl	$0, %ebx
	cmpl	$4, %edx
	jb	LBB0_8
## %bb.5:
	movl	%r14d, -124(%rbp)               ## 4-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%r14,4), %edi
	callq	_ntohl
	addl	%eax, %ebx
	incq	%r14
	movq	-120(%rbp), %rax
	movslq	(%rax), %rax
	shrq	$2, %rax
	cmpq	%r14, %rax
	ja	LBB0_6
## %bb.7:
	cmpl	$-1, %ebx
	movl	-124(%rbp), %r14d               ## 4-byte Reload
	je	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_CH_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	cmpl	$4, %r12d
	jl	LBB0_12
## %bb.10:
	shrl	$2, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,4), %edi
	callq	_be32_to_cpu
	shrl	$16, %eax
	movl	%eax, (%r13,%rbx,8)
	movl	(%r15,%rbx,4), %edi
	callq	_be32_to_cpu
	movzwl	%ax, %eax
	movl	%eax, 4(%r13,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_11
LBB0_12:
	movq	-120(%rbp), %rdi
	callq	_release_firmware
	jmp	LBB0_13
LBB0_1:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-112(%rbp), %rdx
	callq	_dev_err
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%r14d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not upgrade firmware: unable to load %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"firmware image too large %u, expected %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"corrupted firmware image, checksum %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t3_get_edc_fw                  ; -- Begin function t3_get_edc_fw
	.p2align	2
_t3_get_edc_fw:                         ; @t3_get_edc_fw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x20, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldp	x23, x21, [x0]
	mov	x0, x1
	bl	_get_edc_fw_name
	mov	x2, x0
	add	x0, sp, #24
	mov	w1, #64
	bl	_snprintf
	ldr	x2, [x21]
	add	x0, sp, #16
	add	x1, sp, #24
	bl	_request_firmware
	mov	x19, x0
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x8, [sp, #16]
	ldr	w2, [x8]
	add	w9, w20, #4
Lloh3:
	adrp	x25, _EINVAL@GOTPAGE
Lloh4:
	ldr	x25, [x25, _EINVAL@GOTPAGEOFF]
	cmp	w2, w9
	b.le	LBB0_3
; %bb.2:
	str	x9, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_CH_ERR
	ldr	w8, [x25]
	neg	w19, w8
	ldr	x8, [sp, #16]
	ldr	w2, [x8]
LBB0_3:
	ldr	x24, [x8, #8]
	cmp	w2, #4
	b.hs	LBB0_6
; %bb.4:
	mov	w22, #0
	b	LBB0_9
LBB0_5:
	ldr	x0, [x21]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #24
	bl	_dev_err
	b	LBB0_14
LBB0_6:
	mov	x26, #0
	mov	w22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24, x26, lsl #2]
	bl	_ntohl
	add	w22, w22, w0
	add	x26, x26, #1
	ldr	x8, [sp, #16]
	ldrsw	x8, [x8]
	cmp	x26, x8, lsr #2
	b.lo	LBB0_7
; %bb.8:
	cmn	w22, #1
	b.eq	LBB0_10
LBB0_9:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_CH_ERR
	ldr	w8, [x25]
	neg	w19, w8
LBB0_10:
	cmp	w20, #4
	b.lt	LBB0_13
; %bb.11:
	lsr	w20, w20, #2
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_be32_to_cpu
	lsr	w8, w0, #16
	str	w8, [x23]
	ldr	w0, [x24], #4
	bl	_be32_to_cpu
	and	w8, w0, #0xffff
	str	w8, [x23, #4]
	add	x23, x23, #8
	subs	x20, x20, #1
	b.ne	LBB0_12
LBB0_13:
	ldr	x0, [sp, #16]
	bl	_release_firmware
LBB0_14:
	ldur	x8, [x29, #-72]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x19
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not upgrade firmware: unable to load %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"firmware image too large %u, expected %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"corrupted firmware image, checksum %u\n"

.subsections_via_symbols
