	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm_get_media_info
_sm_get_media_info:                     ## @sm_get_media_info
	.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	%rdi, %r14
	movl	(%rsi), %eax
	leal	1048575(%rax), %r12d
	testl	%eax, %eax
	cmovnsl	%eax, %r12d
	sarl	$20, %r12d
	movq	8(%rsi), %rdx
	movq	_MTD_ROM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	xorl	%ecx, %ecx
	cmpq	%rdi, %rdx
	sete	%cl
	movl	%ecx, (%r14)
	movq	$1, 4(%r14)
	movb	$1, %r8b
	leal	-1(%r12), %ebx
	cmpl	$7, %ebx
	ja	LBB0_12
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rbx
	addq	%rcx, %rbx
	jmpq	*%rbx
LBB0_2:
	movabsq	$1073741824256, %rcx            ## imm = 0xFA00000100
	jmp	LBB0_3
LBB0_4:
	movl	16(%rsi), %ecx
	movq	_SM_SMALL_PAGE@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %ecx
	jne	LBB0_6
## %bb.5:
	movabsq	$2147483648512, %rcx            ## imm = 0x1F400000200
LBB0_3:
	movq	%rcx, 12(%r14)
	movq	_SM_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$3, %ecx
	movl	%ecx, 20(%r14)
	movl	$1, 8(%r14)
	xorl	%r8d, %r8d
LBB0_12:
	cmpl	$16777215, %eax                 ## imm = 0xFFFFFF
	jle	LBB0_13
LBB0_14:
	shrl	$24, %eax
	movl	%eax, 4(%r14)
	movabsq	$4294967297024, %rax            ## imm = 0x3E800000400
	movq	%rax, 12(%r14)
	movq	_SM_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$5, %eax
	movl	%eax, 20(%r14)
	cmpl	%eax, 20(%rsi)
	jle	LBB0_16
	jmp	LBB0_7
LBB0_9:
	movabsq	$2147483648512, %rcx            ## imm = 0x1F400000200
	jmp	LBB0_11
LBB0_10:
	movabsq	$4294967297024, %rcx            ## imm = 0x3E800000400
LBB0_11:
	movq	%rcx, 12(%r14)
	movq	_SM_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$4, %ecx
	movl	%ecx, 20(%r14)
	cmpl	$16777215, %eax                 ## imm = 0xFFFFFF
	jg	LBB0_14
LBB0_13:
	movl	20(%r14), %eax
	cmpl	%eax, 20(%rsi)
	jg	LBB0_7
LBB0_16:
	movl	16(%rsi), %eax
	movq	_SM_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_7
## %bb.17:
	movq	24(%rsi), %rax
	testb	%r8b, %r8b
	je	LBB0_18
## %bb.29:
	movq	_SM_OOB_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_20
	jmp	LBB0_7
LBB0_18:
	movq	_SM_SMALL_OOB_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_7
LBB0_20:
	movq	%rsi, %rdi
	callq	_mtd_has_oob
	testl	%eax, %eax
	je	LBB0_7
## %bb.21:
	movq	_chs_table@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_26
## %bb.22:
	movl	$12, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpl	%r12d, -12(%rdi,%r13)
	je	LBB0_24
## %bb.25:                              ##   in Loop: Header=BB0_23 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	addq	$16, %r13
	cmpq	%rax, %rbx
	jl	LBB0_23
LBB0_26:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_sm_printk
	movabsq	$141733921753, %rax             ## imm = 0x21000003D9
	movq	%rax, 24(%r14)
	movl	$63, 32(%r14)
	jmp	LBB0_27
LBB0_6:
	cmpq	%rdi, %rdx
	jne	LBB0_7
## %bb.8:
	movabsq	$1073741824256, %rcx            ## imm = 0xFA00000100
	jmp	LBB0_11
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_28:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movl	-8(%rdi,%r13), %eax
	movl	%eax, 24(%r14)
	movl	-4(%rdi,%r13), %eax
	movl	%eax, 28(%r14)
	movl	(%rdi,%r13), %eax
	movl	%eax, 32(%r14)
LBB0_27:
	xorl	%eax, %eax
	jmp	LBB0_28
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_12
	.long	L0_0_set_9
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_MTD_ROM,8,3                    ## @MTD_ROM
	.comm	_SM_SECTOR_SIZE,4,2             ## @SM_SECTOR_SIZE
	.comm	_SM_SMALL_PAGE,4,2              ## @SM_SMALL_PAGE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SM_SMALL_OOB_SIZE,8,3          ## @SM_SMALL_OOB_SIZE
	.comm	_SM_OOB_SIZE,8,3                ## @SM_OOB_SIZE
	.comm	_chs_table,8,3                  ## @chs_table
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"media has unknown size : %dMiB"

	.no_dead_strip	_sm_get_media_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function sm_get_media_info
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
lCPI0_1:
	.long	1024                            ; 0x400
	.long	1000                            ; 0x3e8
lCPI0_2:
	.long	512                             ; 0x200
	.long	500                             ; 0x1f4
lCPI0_3:
	.long	256                             ; 0x100
	.long	250                             ; 0xfa
lCPI0_4:
	.long	1                               ; 0x1
	.long	512                             ; 0x200
lCPI0_5:
	.long	1                               ; 0x1
	.long	256                             ; 0x100
lCPI0_6:
	.long	985                             ; 0x3d9
	.long	33                              ; 0x21
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_sm_get_media_info:                     ; @sm_get_media_info
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x1]
	mov	w9, #1048575
	add	w9, w8, w9
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w20, w9, #20
	ldr	x10, [x1, #8]
Lloh0:
	adrp	x9, _MTD_ROM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MTD_ROM@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x9]
	cmp	x10, x11
	cset	w9, eq
	str	w9, [x0]
Lloh3:
	adrp	x9, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	stur	d0, [x0, #4]
	mov	w9, #1
	sub	w12, w20, #1
	cmp	w12, #7
	b.hi	LBB0_8
; %bb.1:
Lloh5:
	adrp	x13, lJTI0_0@PAGE
Lloh6:
	add	x13, x13, lJTI0_0@PAGEOFF
	adr	x14, LBB0_2
	ldrb	w15, [x13, x12]
	add	x14, x14, x15, lsl #2
	br	x14
LBB0_2:
	mov	w9, #0
	mov	w10, #250
Lloh7:
	adrp	x11, _SM_SECTOR_SIZE@GOTPAGE
Lloh8:
	ldr	x11, [x11, _SM_SECTOR_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	lsl	w11, w11, #3
	stp	w10, w11, [x19, #16]
Lloh10:
	adrp	x10, lCPI0_5@PAGE
Lloh11:
	ldr	d0, [x10, lCPI0_5@PAGEOFF]
	str	d0, [x19, #8]
	b	LBB0_8
LBB0_3:
	ldr	w9, [x1, #16]
Lloh12:
	adrp	x12, _SM_SMALL_PAGE@GOTPAGE
Lloh13:
	ldr	x12, [x12, _SM_SMALL_PAGE@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	cmp	w9, w12
	b.ne	LBB0_23
; %bb.4:
	mov	w9, #0
	mov	w10, #500
Lloh15:
	adrp	x11, _SM_SECTOR_SIZE@GOTPAGE
Lloh16:
	ldr	x11, [x11, _SM_SECTOR_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	lsl	w11, w11, #3
	stp	w10, w11, [x19, #16]
Lloh18:
	adrp	x10, lCPI0_4@PAGE
Lloh19:
	ldr	d0, [x10, lCPI0_4@PAGEOFF]
	str	d0, [x19, #8]
	b	LBB0_8
LBB0_5:
Lloh20:
	adrp	x9, lCPI0_2@PAGE
Lloh21:
	ldr	d0, [x9, lCPI0_2@PAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh22:
	adrp	x9, lCPI0_1@PAGE
Lloh23:
	ldr	d0, [x9, lCPI0_1@PAGEOFF]
LBB0_7:
	stur	d0, [x19, #12]
Lloh24:
	adrp	x9, _SM_SECTOR_SIZE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SM_SECTOR_SIZE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	lsl	w9, w9, #4
	str	w9, [x19, #20]
	mov	w9, #1
LBB0_8:
	mov	w10, #16777215
	cmp	w8, w10
	b.le	LBB0_10
; %bb.9:
	lsr	w8, w8, #24
	str	w8, [x19, #4]
Lloh27:
	adrp	x8, lCPI0_1@PAGE
Lloh28:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	stur	d0, [x19, #12]
Lloh29:
	adrp	x8, _SM_SECTOR_SIZE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SM_SECTOR_SIZE@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	lsl	w8, w8, #5
	str	w8, [x19, #20]
	b	LBB0_11
LBB0_10:
	ldr	w8, [x19, #20]
LBB0_11:
	ldr	w10, [x1, #20]
	cmp	w10, w8
	b.gt	LBB0_25
; %bb.12:
	ldr	w8, [x1, #16]
Lloh32:
	adrp	x10, _SM_SECTOR_SIZE@GOTPAGE
Lloh33:
	ldr	x10, [x10, _SM_SECTOR_SIZE@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	cmp	w8, w10
	b.gt	LBB0_25
; %bb.13:
	ldr	x8, [x1, #24]
	tbz	w9, #0, LBB0_15
; %bb.14:
Lloh35:
	adrp	x9, _SM_OOB_SIZE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _SM_OOB_SIZE@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh37:
	adrp	x9, _SM_SMALL_OOB_SIZE@GOTPAGE
Lloh38:
	ldr	x9, [x9, _SM_SMALL_OOB_SIZE@GOTPAGEOFF]
LBB0_16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_25
; %bb.17:
	mov	x0, x1
	bl	_mtd_has_oob
	cbz	w0, LBB0_25
; %bb.18:
Lloh39:
	adrp	x21, _chs_table@GOTPAGE
Lloh40:
	ldr	x21, [x21, _chs_table@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_22
; %bb.19:
	mov	x22, #0
	mov	x23, #0
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w9, [x8, x22]
	cmp	w9, w20
	b.eq	LBB0_27
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x23, x23, #1
	mov	x0, x8
	bl	_ARRAY_SIZE
	add	x22, x22, #16
	cmp	x23, w0, sxtw
	b.lt	LBB0_20
LBB0_22:
Lloh41:
	adrp	x0, l_.str@PAGE
Lloh42:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_sm_printk
	mov	w0, #0
Lloh43:
	adrp	x8, lCPI0_6@PAGE
Lloh44:
	ldr	d0, [x8, lCPI0_6@PAGEOFF]
	str	d0, [x19, #24]
	mov	w8, #63
	b	LBB0_28
LBB0_23:
	cmp	x10, x11
	b.ne	LBB0_25
; %bb.24:
Lloh45:
	adrp	x9, lCPI0_3@PAGE
Lloh46:
	ldr	d0, [x9, lCPI0_3@PAGEOFF]
	b	LBB0_7
LBB0_25:
Lloh47:
	adrp	x8, _ENODEV@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_26:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_27:
	mov	w0, #0
	add	x8, x8, x22
	ldur	d0, [x8, #4]
	str	d0, [x19, #24]
	ldr	w8, [x8, #12]
LBB0_28:
	str	w8, [x19, #32]
	b	LBB0_26
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdr	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdr	Lloh20, Lloh21
	.loh AdrpLdr	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdrp	Lloh27, Lloh29
	.loh AdrpLdr	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdr	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdr	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_MTD_ROM,8,3                    ; @MTD_ROM
	.comm	_SM_SECTOR_SIZE,4,2             ; @SM_SECTOR_SIZE
	.comm	_SM_SMALL_PAGE,4,2              ; @SM_SMALL_PAGE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SM_SMALL_OOB_SIZE,8,3          ; @SM_SMALL_OOB_SIZE
	.comm	_SM_OOB_SIZE,8,3                ; @SM_OOB_SIZE
	.comm	_chs_table,8,3                  ; @chs_table
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"media has unknown size : %dMiB"

	.no_dead_strip	_sm_get_media_info
.subsections_via_symbols
