	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function t4_get_flash_params
_t4_get_flash_params:                   ## @t4_get_flash_params
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$0, -36(%rbp)
	movq	_SF_RD_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$1, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_sf1_write
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	_SF_OP_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_t4_write_reg
	jmp	LBB0_28
LBB0_2:
	leaq	-36(%rbp), %r8
	movq	%r14, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_sf1_read
	movl	%eax, %ebx
	movq	_SF_OP_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_t4_write_reg
	testl	%ebx, %ebx
	jne	LBB0_28
## %bb.3:
	leaq	_t4_get_flash_params.supported_flash(%rip), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	leaq	_t4_get_flash_params.supported_flash+12(%rip), %r12
	xorl	%ebx, %ebx
	leaq	_t4_get_flash_params.supported_flash(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%r12), %eax
	cmpl	-36(%rbp), %eax
	je	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$16, %r12
	cmpq	%rax, %rbx
	jb	LBB0_5
LBB0_7:
	movl	-36(%rbp), %edx
	cmpb	$-18, %dl
	jg	LBB0_13
## %bb.8:
	cmpb	$-99, %dl
	je	LBB0_19
## %bb.9:
	cmpb	$-62, %dl
	jne	LBB0_25
## %bb.10:
	movl	%edx, %eax
	shrl	$16, %eax
	cmpb	$23, %al
	je	LBB0_29
## %bb.11:
	cmpb	$24, %al
	je	LBB0_12
	jmp	LBB0_25
LBB0_13:
	cmpb	$-17, %dl
	je	LBB0_22
## %bb.14:
	cmpb	$32, %dl
	jne	LBB0_25
## %bb.15:
	movl	%edx, %eax
	shrl	$16, %eax
	addb	$-20, %al
	cmpb	$15, %al
	jae	LBB0_25
## %bb.16:
	movzbl	%al, %ecx
	movl	$28735, %esi                    ## imm = 0x703F
	btl	%ecx, %esi
	jae	LBB0_25
## %bb.17:
	movsbq	%al, %rax
	leaq	l_switch.table.t4_get_flash_params(%rip), %rcx
	movl	(%rcx,%rax,4), %ecx
	jmp	LBB0_26
LBB0_18:
	movl	(%r12), %ecx
	jmp	LBB0_26
LBB0_19:
	movl	%edx, %eax
	shrl	$16, %eax
	cmpb	$22, %al
	je	LBB0_30
## %bb.20:
	cmpb	$23, %al
	jne	LBB0_25
## %bb.21:
	movl	$67108864, %ecx                 ## imm = 0x4000000
	jmp	LBB0_26
LBB0_22:
	movl	%edx, %eax
	shrl	$16, %eax
	cmpb	$23, %al
	je	LBB0_29
## %bb.23:
	cmpb	$24, %al
	jne	LBB0_25
LBB0_12:
	movl	$16777216, %ecx                 ## imm = 0x1000000
	jmp	LBB0_26
LBB0_25:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
	movl	$4194304, %ecx                  ## imm = 0x400000
LBB0_26:
	movl	%ecx, (%r14)
	movq	_SF_SEC_SIZE@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	(%rsi)
	movl	%eax, 4(%r14)
	movq	_FLASH_MIN_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	%r8d, %ecx
	jae	LBB0_28
## %bb.27:
	movl	8(%r14), %edi
	movl	-36(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_28:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	movl	$8388608, %ecx                  ## imm = 0x800000
	jmp	LBB0_26
LBB0_30:
	movl	$33554432, %ecx                 ## imm = 0x2000000
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @t4_get_flash_params.supported_flash
_t4_get_flash_params.supported_flash:
	.long	1376769                         ## 0x150201
	.long	4194304                         ## 0x400000
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.comm	_SF_RD_ID,4,2                   ## @SF_RD_ID
	.comm	_SF_OP_A,4,2                    ## @SF_OP_A
	.comm	_SF_SEC_SIZE,4,2                ## @SF_SEC_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown Flash Part, ID = %#x, assuming 4MB\n"

	.comm	_FLASH_MIN_SIZE,4,2             ## @FLASH_MIN_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"WARNING: Flash Part ID %#x, size %#x < %#x\n"

	.no_dead_strip	_t4_get_flash_params
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.t4_get_flash_params
l_switch.table.t4_get_flash_params:
	.long	1048576                         ## 0x100000
	.long	2097152                         ## 0x200000
	.long	4194304                         ## 0x400000
	.long	8388608                         ## 0x800000
	.long	16777216                        ## 0x1000000
	.long	33554432                        ## 0x2000000
	.long	1048576                         ## 0x100000
	.long	1048576                         ## 0x100000
	.long	1048576                         ## 0x100000
	.long	1048576                         ## 0x100000
	.long	1048576                         ## 0x100000
	.long	1048576                         ## 0x100000
	.long	67108864                        ## 0x4000000
	.long	134217728                       ## 0x8000000
	.long	268435456                       ## 0x10000000

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function t4_get_flash_params
_t4_get_flash_params:                   ; @t4_get_flash_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	str	wzr, [sp, #28]
Lloh0:
	adrp	x8, _SF_RD_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SF_RD_ID@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	w1, #1
	mov	w2, #1
	mov	w3, #0
	bl	_sf1_write
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _SF_OP_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SF_OP_A@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_t4_write_reg
	b	LBB0_28
LBB0_2:
	add	x4, sp, #28
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	mov	w3, #1
	bl	_sf1_read
	mov	x20, x0
Lloh6:
	adrp	x8, _SF_OP_A@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SF_OP_A@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_t4_write_reg
	cbnz	w20, LBB0_28
; %bb.3:
Lloh9:
	adrp	x0, _t4_get_flash_params.supported_flash@PAGE
Lloh10:
	add	x0, x0, _t4_get_flash_params.supported_flash@PAGEOFF
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_7
; %bb.4:
	mov	x21, #0
Lloh11:
	adrp	x22, _t4_get_flash_params.supported_flash@PAGE+12
Lloh12:
	add	x22, x22, _t4_get_flash_params.supported_flash@PAGEOFF+12
Lloh13:
	adrp	x20, _t4_get_flash_params.supported_flash@PAGE
Lloh14:
	add	x20, x20, _t4_get_flash_params.supported_flash@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x22, #-4]
	ldr	w9, [sp, #28]
	cmp	w8, w9
	b.eq	LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	mov	x0, x20
	bl	_ARRAY_SIZE
	add	x22, x22, #16
	cmp	x21, w0, uxtw
	b.lo	LBB0_5
LBB0_7:
	ldr	w2, [sp, #28]
	and	w8, w2, #0xff
	cmp	w8, #193
	b.gt	LBB0_13
; %bb.8:
	cmp	w8, #32
	b.eq	LBB0_18
; %bb.9:
	cmp	w8, #157
	b.ne	LBB0_24
; %bb.10:
	ubfx	w8, w2, #16, #8
	cmp	w8, #22
	b.eq	LBB0_30
; %bb.11:
	cmp	w8, #23
	b.ne	LBB0_24
; %bb.12:
	mov	w8, #67108864
	b	LBB0_25
LBB0_13:
	cmp	w8, #194
	b.eq	LBB0_21
; %bb.14:
	cmp	w8, #239
	b.ne	LBB0_24
; %bb.15:
	ubfx	w8, w2, #16, #8
	cmp	w8, #23
	b.eq	LBB0_29
; %bb.16:
	cmp	w8, #24
	b.eq	LBB0_23
	b	LBB0_24
LBB0_17:
	ldr	w8, [x22]
	b	LBB0_25
LBB0_18:
	lsr	w8, w2, #16
	sub	w8, w8, #20
	and	w9, w8, #0xff
	cmp	w9, #15
	b.hs	LBB0_24
; %bb.19:
	mov	w9, #28735
	lsr	w9, w9, w8
	tbz	w9, #0, LBB0_24
; %bb.20:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtb	x8, w8
Lloh15:
	adrp	x9, l_switch.table.t4_get_flash_params@PAGE
Lloh16:
	add	x9, x9, l_switch.table.t4_get_flash_params@PAGEOFF
	ldr	w8, [x9, x8, lsl #2]
	b	LBB0_25
LBB0_21:
	ubfx	w8, w2, #16, #8
	cmp	w8, #23
	b.eq	LBB0_29
; %bb.22:
	cmp	w8, #24
	b.ne	LBB0_24
LBB0_23:
	mov	w8, #16777216
	b	LBB0_25
LBB0_24:
	ldr	w0, [x19, #8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	mov	w8, #4194304
LBB0_25:
	str	w8, [x19]
Lloh19:
	adrp	x9, _SF_SEC_SIZE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SF_SEC_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	udiv	w9, w8, w9
	str	w9, [x19, #4]
Lloh22:
	adrp	x9, _FLASH_MIN_SIZE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _FLASH_MIN_SIZE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w9
	b.hs	LBB0_27
; %bb.26:
	ldr	w0, [x19, #8]
	ldr	w2, [sp, #28]
	stp	x8, x9, [sp]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_27:
	mov	w20, #0
LBB0_28:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_29:
	mov	w8, #8388608
	b	LBB0_25
LBB0_30:
	mov	w8, #33554432
	b	LBB0_25
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @t4_get_flash_params.supported_flash
_t4_get_flash_params.supported_flash:
	.long	1376769                         ; 0x150201
	.long	4194304                         ; 0x400000
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.comm	_SF_RD_ID,4,2                   ; @SF_RD_ID
	.comm	_SF_OP_A,4,2                    ; @SF_OP_A
	.comm	_SF_SEC_SIZE,4,2                ; @SF_SEC_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown Flash Part, ID = %#x, assuming 4MB\n"

	.comm	_FLASH_MIN_SIZE,4,2             ; @FLASH_MIN_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"WARNING: Flash Part ID %#x, size %#x < %#x\n"

	.no_dead_strip	_t4_get_flash_params
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.t4_get_flash_params
l_switch.table.t4_get_flash_params:
	.long	1048576                         ; 0x100000
	.long	2097152                         ; 0x200000
	.long	4194304                         ; 0x400000
	.long	8388608                         ; 0x800000
	.long	16777216                        ; 0x1000000
	.long	33554432                        ; 0x2000000
	.long	1048576                         ; 0x100000
	.long	1048576                         ; 0x100000
	.long	1048576                         ; 0x100000
	.long	1048576                         ; 0x100000
	.long	1048576                         ; 0x100000
	.long	1048576                         ; 0x100000
	.long	67108864                        ; 0x4000000
	.long	134217728                       ; 0x8000000
	.long	268435456                       ; 0x10000000

.subsections_via_symbols
