	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altera_sdcard_get_mediasize    ## -- Begin function altera_sdcard_get_mediasize
	.p2align	4, 0x90
_altera_sdcard_get_mediasize:           ## @altera_sdcard_get_mediasize
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	_ALTERA_SDCARD_CSD_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	andq	$-4, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%rbx, %rdi
	callq	_altera_sdcard_read_csd
	movq	_ALTERA_SDCARD_CSD_READ_BL_LEN_BYTE@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movq	_ALTERA_SDCARD_CSD_READ_BL_LEN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_ALTERA_SDCARD_CSD_C_SIZE_BYTE0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ALTERA_SDCARD_CSD_C_SIZE_MASK0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	andl	(%rbx,%rax,4), %r10d
	movq	_ALTERA_SDCARD_CSD_C_SIZE_BYTE1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %edx
	movq	_ALTERA_SDCARD_CSD_C_SIZE_BYTE2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_ALTERA_SDCARD_CSD_C_SIZE_MASK2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ALTERA_SDCARD_CSD_C_SIZE_RSHIFT0@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %r10d
	andl	(%rbx,%rsi,4), %eax
	movq	_ALTERA_SDCARD_CSD_C_SIZE_LSHIFT1@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_ALTERA_SDCARD_CSD_C_SIZE_LSHIFT2@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	andl	(%rbx,%r9,4), %r8d
	movq	_ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE0@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK0@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	andl	(%rbx,%rcx,4), %edi
	movq	_ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK1@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	(%rbx,%rcx,4), %esi
	movq	_ALTERA_SDCARD_CSD_C_SIZE_MULT_RSHIFT0@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edi
	movq	_ALTERA_SDCARD_CSD_C_SIZE_MULT_LSHIFT1@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%r10d, %edx
	orl	%edx, %eax
	orl	%edi, %esi
	incl	%eax
	addb	$2, %sil
	movl	%esi, %ecx
	shll	%cl, %eax
	movl	%r8d, %ecx
	shll	%cl, %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_2
## %bb.1:
	leaq	-8(%rbp), %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ALTERA_SDCARD_CSD_SIZE,4,2     ## @ALTERA_SDCARD_CSD_SIZE
	.comm	_ALTERA_SDCARD_CSD_READ_BL_LEN_BYTE,8,3 ## @ALTERA_SDCARD_CSD_READ_BL_LEN_BYTE
	.comm	_ALTERA_SDCARD_CSD_READ_BL_LEN_MASK,4,2 ## @ALTERA_SDCARD_CSD_READ_BL_LEN_MASK
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_BYTE0,8,3 ## @ALTERA_SDCARD_CSD_C_SIZE_BYTE0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MASK0,4,2 ## @ALTERA_SDCARD_CSD_C_SIZE_MASK0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_BYTE1,8,3 ## @ALTERA_SDCARD_CSD_C_SIZE_BYTE1
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_BYTE2,8,3 ## @ALTERA_SDCARD_CSD_C_SIZE_BYTE2
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MASK2,4,2 ## @ALTERA_SDCARD_CSD_C_SIZE_MASK2
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_RSHIFT0,4,2 ## @ALTERA_SDCARD_CSD_C_SIZE_RSHIFT0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_LSHIFT1,4,2 ## @ALTERA_SDCARD_CSD_C_SIZE_LSHIFT1
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_LSHIFT2,4,2 ## @ALTERA_SDCARD_CSD_C_SIZE_LSHIFT2
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE0,8,3 ## @ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK0,4,2 ## @ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE1,8,3 ## @ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE1
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK1,4,2 ## @ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK1
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_RSHIFT0,4,2 ## @ALTERA_SDCARD_CSD_C_SIZE_MULT_RSHIFT0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_LSHIFT1,4,2 ## @ALTERA_SDCARD_CSD_C_SIZE_MULT_LSHIFT1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altera_sdcard_get_mediasize    ; -- Begin function altera_sdcard_get_mediasize
	.p2align	2
_altera_sdcard_get_mediasize:           ; @altera_sdcard_get_mediasize
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _ALTERA_SDCARD_CSD_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ALTERA_SDCARD_CSD_SIZE@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	and	x8, x8, #0xfffffffffffffffc
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xfffffffffffffff0
	sub	x19, x9, x8
	mov	sp, x19
	mov	x0, x19
	bl	_altera_sdcard_read_csd
Lloh8:
	adrp	x8, _ALTERA_SDCARD_CSD_READ_BL_LEN_BYTE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ALTERA_SDCARD_CSD_READ_BL_LEN_BYTE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	w8, [x19, x8, lsl #2]
Lloh11:
	adrp	x11, _ALTERA_SDCARD_CSD_READ_BL_LEN_MASK@GOTPAGE
Lloh12:
	ldr	x11, [x11, _ALTERA_SDCARD_CSD_READ_BL_LEN_MASK@GOTPAGEOFF]
Lloh13:
	adrp	x9, _ALTERA_SDCARD_CSD_C_SIZE_BYTE0@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ALTERA_SDCARD_CSD_C_SIZE_BYTE0@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	ldr	w10, [x19, x9, lsl #2]
Lloh16:
	adrp	x12, _ALTERA_SDCARD_CSD_C_SIZE_MASK0@GOTPAGE
Lloh17:
	ldr	x12, [x12, _ALTERA_SDCARD_CSD_C_SIZE_MASK0@GOTPAGEOFF]
Lloh18:
	adrp	x9, _ALTERA_SDCARD_CSD_C_SIZE_BYTE1@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ALTERA_SDCARD_CSD_C_SIZE_BYTE1@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	ldr	w9, [x19, x9, lsl #2]
Lloh21:
	adrp	x13, _ALTERA_SDCARD_CSD_C_SIZE_BYTE2@GOTPAGE
Lloh22:
	ldr	x13, [x13, _ALTERA_SDCARD_CSD_C_SIZE_BYTE2@GOTPAGEOFF]
Lloh23:
	ldr	w15, [x11]
Lloh24:
	ldr	x11, [x13]
	ldr	w13, [x19, x11, lsl #2]
Lloh25:
	adrp	x11, _ALTERA_SDCARD_CSD_C_SIZE_MASK2@GOTPAGE
Lloh26:
	ldr	x11, [x11, _ALTERA_SDCARD_CSD_C_SIZE_MASK2@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x12]
Lloh28:
	ldr	w17, [x11]
Lloh29:
	adrp	x11, _ALTERA_SDCARD_CSD_C_SIZE_RSHIFT0@GOTPAGE
Lloh30:
	ldr	x11, [x11, _ALTERA_SDCARD_CSD_C_SIZE_RSHIFT0@GOTPAGEOFF]
Lloh31:
	adrp	x12, _ALTERA_SDCARD_CSD_C_SIZE_LSHIFT1@GOTPAGE
Lloh32:
	ldr	x12, [x12, _ALTERA_SDCARD_CSD_C_SIZE_LSHIFT1@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x11]
Lloh34:
	ldr	w14, [x12]
Lloh35:
	adrp	x11, _ALTERA_SDCARD_CSD_C_SIZE_LSHIFT2@GOTPAGE
Lloh36:
	ldr	x11, [x11, _ALTERA_SDCARD_CSD_C_SIZE_LSHIFT2@GOTPAGEOFF]
Lloh37:
	adrp	x16, _ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE0@GOTPAGE
Lloh38:
	ldr	x16, [x16, _ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE0@GOTPAGEOFF]
Lloh39:
	ldr	w12, [x11]
Lloh40:
	ldr	x11, [x16]
	ldr	w11, [x19, x11, lsl #2]
Lloh41:
	adrp	x16, _ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK0@GOTPAGE
Lloh42:
	ldr	x16, [x16, _ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK0@GOTPAGEOFF]
Lloh43:
	ldr	w16, [x16]
Lloh44:
	adrp	x2, _ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE1@GOTPAGE
Lloh45:
	ldr	x2, [x2, _ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE1@GOTPAGEOFF]
Lloh46:
	ldr	x2, [x2]
	ldr	w2, [x19, x2, lsl #2]
Lloh47:
	adrp	x3, _ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK1@GOTPAGE
Lloh48:
	ldr	x3, [x3, _ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK1@GOTPAGEOFF]
Lloh49:
	ldr	w5, [x3]
Lloh50:
	adrp	x3, _ALTERA_SDCARD_CSD_C_SIZE_MULT_RSHIFT0@GOTPAGE
Lloh51:
	ldr	x3, [x3, _ALTERA_SDCARD_CSD_C_SIZE_MULT_RSHIFT0@GOTPAGEOFF]
Lloh52:
	ldr	w4, [x3]
Lloh53:
	adrp	x3, _ALTERA_SDCARD_CSD_C_SIZE_MULT_LSHIFT1@GOTPAGE
Lloh54:
	ldr	x3, [x3, _ALTERA_SDCARD_CSD_C_SIZE_MULT_LSHIFT1@GOTPAGEOFF]
Lloh55:
	ldr	w3, [x3]
Lloh56:
	adrp	x6, ___stack_chk_guard@GOTPAGE
Lloh57:
	ldr	x6, [x6, ___stack_chk_guard@GOTPAGEOFF]
Lloh58:
	ldr	x6, [x6]
	ldur	x7, [x29, #-24]
	cmp	x6, x7
	b.ne	LBB0_2
; %bb.1:
	and	w8, w15, w8
	and	w10, w0, w10
	and	w13, w17, w13
	asr	w10, w10, w1
	lsl	w9, w9, w14
	orr	w9, w9, w10
	lsl	w10, w13, w12
	orr	w9, w9, w10
	and	w10, w16, w11
	and	w11, w5, w2
	asr	w10, w10, w4
	lsl	w11, w11, w3
	orr	w10, w11, w10
	add	w9, w9, #1
	add	w10, w10, #2
	lsl	w9, w9, w10
	lsl	w0, w9, w8
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh39
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh33
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh27
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh23
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ALTERA_SDCARD_CSD_SIZE,4,2     ; @ALTERA_SDCARD_CSD_SIZE
	.comm	_ALTERA_SDCARD_CSD_READ_BL_LEN_BYTE,8,3 ; @ALTERA_SDCARD_CSD_READ_BL_LEN_BYTE
	.comm	_ALTERA_SDCARD_CSD_READ_BL_LEN_MASK,4,2 ; @ALTERA_SDCARD_CSD_READ_BL_LEN_MASK
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_BYTE0,8,3 ; @ALTERA_SDCARD_CSD_C_SIZE_BYTE0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MASK0,4,2 ; @ALTERA_SDCARD_CSD_C_SIZE_MASK0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_BYTE1,8,3 ; @ALTERA_SDCARD_CSD_C_SIZE_BYTE1
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_BYTE2,8,3 ; @ALTERA_SDCARD_CSD_C_SIZE_BYTE2
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MASK2,4,2 ; @ALTERA_SDCARD_CSD_C_SIZE_MASK2
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_RSHIFT0,4,2 ; @ALTERA_SDCARD_CSD_C_SIZE_RSHIFT0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_LSHIFT1,4,2 ; @ALTERA_SDCARD_CSD_C_SIZE_LSHIFT1
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_LSHIFT2,4,2 ; @ALTERA_SDCARD_CSD_C_SIZE_LSHIFT2
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE0,8,3 ; @ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK0,4,2 ; @ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE1,8,3 ; @ALTERA_SDCARD_CSD_C_SIZE_MULT_BYTE1
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK1,4,2 ; @ALTERA_SDCARD_CSD_C_SIZE_MULT_MASK1
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_RSHIFT0,4,2 ; @ALTERA_SDCARD_CSD_C_SIZE_MULT_RSHIFT0
	.comm	_ALTERA_SDCARD_CSD_C_SIZE_MULT_LSHIFT1,4,2 ; @ALTERA_SDCARD_CSD_C_SIZE_MULT_LSHIFT1
.subsections_via_symbols
