	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_softing_load_app_fw            ## -- Begin function softing_load_app_fw
	.p2align	4, 0x90
_softing_load_app_fw:                   ## @softing_load_app_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	(%rsi), %rdx
	leaq	-56(%rbp), %rdi
	movq	%r14, %rsi
	callq	_request_firmware
	movq	(%r13), %rdi
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_alert
	jmp	LBB0_38
LBB0_2:
	movq	-56(%rbp), %rax
	movq	(%rax), %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	callq	_dev_dbg
	movq	-56(%rbp), %rax
	movq	8(%rax), %rbx
	movq	%rbx, -64(%rbp)
	movq	(%rax), %r12
	leaq	-64(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	leaq	-88(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	leaq	-80(%rbp), %r8
	callq	_fw_parse
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_36
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movl	-48(%rbp), %edx
	cmpl	$65535, %edx                    ## imm = 0xFFFF
	jne	LBB0_4
## %bb.5:
	movq	-80(%rbp), %rsi
	movl	-44(%rbp), %edx
	leaq	L_.str.3(%rip), %rdi
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.35:
	movq	(%r13), %rdi
	movl	-44(%rbp), %edx
	movq	-80(%rbp), %rcx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_alert
	jmp	LBB0_36
LBB0_4:
	movq	(%r13), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_alert
LBB0_36:
	movq	-56(%rbp), %rdi
	callq	_release_firmware
	testl	%r15d, %r15d
	jns	LBB0_38
LBB0_37:
	movq	(%r13), %rdi
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdx
	callq	_dev_info
LBB0_38:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	(%rbx,%r12,8), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	cmpq	%rax, -64(%rbp)
	jae	LBB0_36
## %bb.7:
	movb	$1, %al
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
                                        ##     Child Loop BB0_27 Depth 2
	leaq	-64(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	leaq	-88(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	leaq	-80(%rbp), %r8
	callq	_fw_parse
	testl	%eax, %eax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-48(%rbp), %edx
	testl	%edx, %edx
	jne	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-44(%rbp), %edx
	movq	-80(%rbp), %rsi
	testl	%edx, %edx
	jle	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$4, %edx
	jae	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_28
LBB0_20:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%edx, %eax
	andl	$-4, %eax
	leaq	-4(%rax), %rcx
	movq	%rcx, %rbx
	shrq	$2, %rbx
	incq	%rbx
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rcx
	andq	$-2, %rcx
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rsi,%rdi,8), %xmm2
	movdqu	16(%rsi,%rdi,8), %xmm3
	movdqu	32(%rsi,%rdi,8), %xmm4
	movdqu	48(%rsi,%rdi,8), %xmm5
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm0, %xmm2
	pshufd	$232, %xmm3, %xmm3              ## xmm3 = xmm3[0,2,2,3]
	paddd	%xmm1, %xmm3
	pshufd	$232, %xmm4, %xmm0              ## xmm0 = xmm4[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm5, %xmm1              ## xmm1 = xmm5[0,2,2,3]
	paddd	%xmm3, %xmm1
	addq	$8, %rdi
	addq	$-2, %rcx
	jne	LBB0_23
	jmp	LBB0_24
LBB0_21:                                ##   in Loop: Header=BB0_9 Depth=1
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
LBB0_24:                                ##   in Loop: Header=BB0_9 Depth=1
	testb	$1, %bl
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_9 Depth=1
	movdqu	(%rsi,%rdi,8), %xmm2
	movdqu	16(%rsi,%rdi,8), %xmm3
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm3, %xmm2              ## xmm2 = xmm3[0,2,2,3]
	paddd	%xmm2, %xmm1
LBB0_26:                                ##   in Loop: Header=BB0_9 Depth=1
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpq	%rdx, %rax
	je	LBB0_28
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	(%rsi,%rax,8), %ebx
	incq	%rax
	cmpq	%rax, %rdx
	jne	LBB0_27
LBB0_28:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	16(%r13), %rax
	movq	(%rax), %rdi
	shlq	$2, %rdi
	addq	8(%r13), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy_toio
	movq	8(%r13), %rax
	movq	16(%r13), %rcx
	movq	8(%rcx), %rdi
	addq	(%rcx), %rdi
	movq	_DPRAM_COMMAND@GOTPCREL(%rip), %r15
	movslq	(%r15), %rcx
	leaq	(%rax,%rcx,4), %rsi
	addq	$8, %rsi
	callq	_iowrite32
	movq	-88(%rbp), %rdi
	movq	8(%r13), %rax
	movslq	(%r15), %rcx
	leaq	(%rax,%rcx,4), %rsi
	addq	$24, %rsi
	callq	_iowrite32
	movl	-44(%rbp), %edi
	movq	8(%r13), %rax
	movslq	(%r15), %rcx
	leaq	(%rax,%rcx,4), %rsi
	addq	$40, %rsi
	callq	_iowrite16
	movq	8(%r13), %rax
	movslq	(%r15), %rcx
	leaq	(%rax,%rcx,4), %rsi
	addq	$48, %rsi
	movl	$1, %edi
	callq	_iowrite8
	movq	%r13, %rdi
	movl	$1, %esi
	leaq	L_.str.6(%rip), %rdx
	callq	_softing_bootloader_command
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_29
## %bb.30:                              ##   in Loop: Header=BB0_9 Depth=1
	movzwl	%bx, %r12d
	movq	8(%r13), %rax
	movq	_DPRAM_RECEIPT@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rax,%rcx,4), %rdi
	addq	$8, %rdi
	callq	_ioread16
	cmpl	%r12d, %eax
	jne	LBB0_31
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, -64(%rbp)
	jb	LBB0_9
	jmp	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$1, %edx
	je	LBB0_32
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$3, %edx
	jne	LBB0_39
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-88(%rbp), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	movl	$0, %r15d
	jmp	LBB0_8
LBB0_10:
	movl	%eax, %r15d
	jmp	LBB0_36
LBB0_29:
	movq	-56(%rbp), %rdi
	callq	_release_firmware
	jmp	LBB0_37
LBB0_31:
	movq	(%r13), %rdi
	leaq	L_.str.7(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_alert
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_36
LBB0_32:
	testb	$1, -68(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_34
## %bb.33:
	movq	-56(%rbp), %rdi
	callq	_release_firmware
	xorl	%r15d, %r15d
	jmp	LBB0_38
LBB0_39:
	movq	(%r13), %rdi
	leaq	L_.str.5(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_alert
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_36
LBB0_15:
	movq	-56(%rbp), %rdi
	callq	_release_firmware
	jmp	LBB0_38
LBB0_34:
	movq	8(%r13), %rax
	movq	_DPRAM_COMMAND@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rsi
	addq	$8, %rsi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_iowrite32
	movq	8(%r13), %rax
	movslq	(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rsi
	addq	$24, %rsi
	movl	$1, %edi
	callq	_iowrite8
	leaq	L_.str.8(%rip), %rdx
	movq	%r13, %rdi
	movl	$3, %esi
	callq	_softing_bootloader_command
	movl	%eax, %r15d
	sarl	$31, %r15d
	andl	%eax, %r15d
	jmp	LBB0_36
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"request_firmware(%s) got %i\n"

L_.str.1:                               ## @.str.1
	.asciz	"firmware(%s) got %lu bytes\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"firmware starts with type 0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Structured Binary Format, Softing GmbH"

L_.str.4:                               ## @.str.4
	.asciz	"firmware string '%.*s' fault\n"

L_.str.5:                               ## @.str.5
	.asciz	"unknown record type 0x%04x\n"

	.comm	_DPRAM_COMMAND,4,2              ## @DPRAM_COMMAND
L_.str.6:                               ## @.str.6
	.asciz	"loading app."

	.comm	_DPRAM_RECEIPT,4,2              ## @DPRAM_RECEIPT
L_.str.7:                               ## @.str.7
	.asciz	"SRAM seems to be damaged, wanted 0x%04x, got 0x%04x\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.8:                               ## @.str.8
	.asciz	"start app."

L_.str.9:                               ## @.str.9
	.asciz	"firmware %s failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_softing_load_app_fw            ; -- Begin function softing_load_app_fw
	.p2align	2
_softing_load_app_fw:                   ; @softing_load_app_fw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	x2, [x1]
	add	x0, sp, #56
	mov	x1, x19
	bl	_request_firmware
	mov	x23, x0
	ldr	x0, [x20]
	cbz	w23, LBB0_2
; %bb.1:
	stp	x19, x23, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_alert
	b	LBB0_10
LBB0_2:
	ldr	x8, [sp, #56]
	ldr	x3, [x8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
	ldr	x8, [sp, #56]
	ldr	x21, [x8, #8]
	str	x21, [sp, #48]
	ldr	x22, [x8]
	add	x0, sp, #48
	add	x1, sp, #36
	add	x2, sp, #24
	add	x3, sp, #32
	add	x4, sp, #40
	bl	_fw_parse
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.3:
Lloh4:
	adrp	x24, _EINVAL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _EINVAL@GOTPAGEOFF]
	ldr	w8, [x24]
	neg	w23, w8
	ldr	w8, [sp, #36]
	mov	w9, #65535
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.4:
	ldr	x1, [sp, #40]
	ldr	w2, [sp, #32]
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_strncmp
	cbz	x0, LBB0_11
; %bb.5:
	ldr	x0, [x20]
	ldr	x8, [sp, #40]
	ldr	w9, [sp, #32]
	stp	x9, x8, [sp]
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	x0, [x20]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	bl	_dev_alert
LBB0_8:
	ldr	x0, [sp, #56]
	bl	_release_firmware
	tbz	w23, #31, LBB0_10
LBB0_9:
	ldr	x0, [x20]
Lloh12:
	adrp	x1, l_.str.9@PAGE
Lloh13:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x2, x19
	bl	_dev_info
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_11:
	add	x25, x21, x22, lsl #3
	ldr	x8, [sp, #48]
	cmp	x8, x25
	b.hs	LBB0_8
; %bb.12:
	str	xzr, [sp, #16]                  ; 8-byte Folded Spill
	mov	w27, #1
Lloh14:
	adrp	x26, _DPRAM_COMMAND@GOTPAGE
Lloh15:
	ldr	x26, [x26, _DPRAM_COMMAND@GOTPAGEOFF]
Lloh16:
	adrp	x28, _DPRAM_RECEIPT@GOTPAGE
Lloh17:
	ldr	x28, [x28, _DPRAM_RECEIPT@GOTPAGEOFF]
Lloh18:
	adrp	x22, l_.str.6@PAGE
Lloh19:
	add	x22, x22, l_.str.6@PAGEOFF
LBB0_13:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
                                        ;     Child Loop BB0_23 Depth 2
	add	x0, sp, #48
	add	x1, sp, #36
	add	x2, sp, #24
	add	x3, sp, #32
	add	x4, sp, #40
	bl	_fw_parse
	cbnz	w0, LBB0_32
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [sp, #36]
	cbnz	w8, LBB0_27
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w2, [sp, #32]
	ldr	x1, [sp, #40]
	cmp	w2, #1
	b.lt	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	cmp	w2, #8
	b.hs	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x8, #0
	mov	w21, #0
	b	LBB0_22
LBB0_18:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	w21, #0
	b	LBB0_24
LBB0_19:                                ;   in Loop: Header=BB0_13 Depth=1
	and	x8, x2, #0xfffffff8
	movi.2d	v0, #0000000000000000
	add	x9, x1, #32
	mov	x10, x8
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_20:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q4, q5, [x9, #-32]
	ldp	q6, q7, [x9], #64
	xtn.2s	v4, v4
	xtn.2s	v5, v5
	xtn.2s	v6, v6
	xtn.2s	v7, v7
	add.2s	v0, v0, v4
	add.2s	v1, v1, v5
	add.2s	v2, v2, v6
	add.2s	v3, v3, v7
	subs	x10, x10, #8
	b.ne	LBB0_20
; %bb.21:                               ;   in Loop: Header=BB0_13 Depth=1
	add.2s	v0, v1, v0
	add.2s	v0, v2, v0
	add.2s	v0, v3, v0
	addp.2s	v0, v0, v0
	fmov	w21, s0
	cmp	x8, x2
	b.eq	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x9, x1, x8, lsl #3
	sub	x8, x2, x8
LBB0_23:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x9], #8
	add	w21, w21, w10
	subs	x8, x8, #1
	b.ne	LBB0_23
LBB0_24:                                ;   in Loop: Header=BB0_13 Depth=1
	ldp	x8, x9, [x20, #8]
	ldr	x9, [x9]
	add	x0, x8, x9, lsl #2
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy_toio
	ldp	x9, x8, [x20, #8]
	ldp	x10, x8, [x8]
	add	x0, x8, x10
	ldrsw	x8, [x26]
	add	x8, x9, x8, lsl #2
	add	x1, x8, #8
	bl	_iowrite32
	ldr	x0, [sp, #24]
	ldr	x8, [x20, #8]
	ldrsw	x9, [x26]
	add	x8, x8, x9, lsl #2
	add	x1, x8, #24
	bl	_iowrite32
	ldr	w0, [sp, #32]
	ldr	x8, [x20, #8]
	ldrsw	x9, [x26]
	add	x8, x8, x9, lsl #2
	add	x1, x8, #40
	bl	_iowrite16
	ldr	x8, [x20, #8]
	ldrsw	x9, [x26]
	add	x8, x8, x9, lsl #2
	add	x1, x8, #48
	mov	w0, #1
	bl	_iowrite8
	mov	x0, x20
	mov	w1, #1
	mov	x2, x22
	bl	_softing_bootloader_command
	mov	x23, x0
	tbnz	w0, #31, LBB0_36
; %bb.25:                               ;   in Loop: Header=BB0_13 Depth=1
	and	w21, w21, #0xffff
	ldr	x8, [x20, #8]
	ldrsw	x9, [x28]
	add	x8, x8, x9, lsl #2
	add	x0, x8, #8
	bl	_ioread16
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, w21
	b.ne	LBB0_37
; %bb.26:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [sp, #48]
	cmp	x8, x25
	b.lo	LBB0_13
	b	LBB0_31
LBB0_27:                                ;   in Loop: Header=BB0_13 Depth=1
	cmp	w8, #1
	b.eq	LBB0_33
; %bb.28:                               ;   in Loop: Header=BB0_13 Depth=1
	cmp	w8, #3
	b.ne	LBB0_35
; %bb.29:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	w27, #0
	ldr	x8, [sp, #24]
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	ldr	x8, [sp, #48]
	cmp	x8, x25
	b.lo	LBB0_13
; %bb.30:
	mov	w23, #0
LBB0_31:
	ldr	x0, [sp, #56]
	bl	_release_firmware
	b	LBB0_10
LBB0_32:
	mov	x23, x0
	b	LBB0_8
LBB0_33:
	tbz	w27, #0, LBB0_38
; %bb.34:
	ldr	x0, [sp, #56]
	bl	_release_firmware
	mov	w23, #0
	b	LBB0_10
LBB0_35:
	ldr	x0, [x20]
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_alert
	ldr	w8, [x24]
	neg	w23, w8
	b	LBB0_8
LBB0_36:
	ldr	x0, [sp, #56]
	bl	_release_firmware
	b	LBB0_9
LBB0_37:
	ldr	x8, [x20]
	stp	x21, x0, [sp]
Lloh22:
	adrp	x1, l_.str.7@PAGE
Lloh23:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x8
	bl	_dev_alert
Lloh24:
	adrp	x8, _EIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_8
LBB0_38:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x26]
	add	x8, x8, x9, lsl #2
	add	x1, x8, #8
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_iowrite32
	ldr	x8, [x20, #8]
	ldrsw	x9, [x26]
	add	x8, x8, x9, lsl #2
	add	x1, x8, #24
	mov	w0, #1
	bl	_iowrite8
Lloh27:
	adrp	x2, l_.str.8@PAGE
Lloh28:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x20
	mov	w1, #3
	bl	_softing_bootloader_command
	cmp	w0, #0
	csel	w23, w0, wzr, lt
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"request_firmware(%s) got %i\n"

l_.str.1:                               ; @.str.1
	.asciz	"firmware(%s) got %lu bytes\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"firmware starts with type 0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Structured Binary Format, Softing GmbH"

l_.str.4:                               ; @.str.4
	.asciz	"firmware string '%.*s' fault\n"

l_.str.5:                               ; @.str.5
	.asciz	"unknown record type 0x%04x\n"

	.comm	_DPRAM_COMMAND,4,2              ; @DPRAM_COMMAND
l_.str.6:                               ; @.str.6
	.asciz	"loading app."

	.comm	_DPRAM_RECEIPT,4,2              ; @DPRAM_RECEIPT
l_.str.7:                               ; @.str.7
	.asciz	"SRAM seems to be damaged, wanted 0x%04x, got 0x%04x\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.8:                               ; @.str.8
	.asciz	"start app."

l_.str.9:                               ; @.str.9
	.asciz	"firmware %s failed\n"

.subsections_via_symbols
