	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_manage_gp_partitions
_mmc_manage_gp_partitions:              ## @mmc_manage_gp_partitions
	.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	_EXT_CSD_PARTITION_SUPPORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EXT_CSD_PART_SUPPORT_PART_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rsi,%rax,4)
	je	LBB0_9
## %bb.1:
	movq	_MMC_NUM_GP_PARTITION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_EXT_CSD_HC_WP_GRP_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_EXT_CSD_HC_ERASE_GRP_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rsi,%rdx,4), %r13d
	imull	(%rsi,%rcx,4), %r13d
	shll	$19, %r13d
	movl	$1, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_EXT_CSD_GP_SIZE_MULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leal	(%r12,%rdx), %ecx
	decl	%ecx
	movslq	%ecx, %rcx
	movl	(%r15,%rcx,4), %ecx
	testl	%ecx, %ecx
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	(%r12,%rdx), %esi
	movslq	%esi, %rsi
	cmpl	$0, (%r15,%rsi,4)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	(%r12,%rdx), %esi
	incl	%esi
	movslq	%esi, %rsi
	cmpl	$0, (%r15,%rsi,4)
	je	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 8(%r14)
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	%r12d, %edx
	movslq	%edx, %rax
	movl	(%r15,%rax,4), %esi
	shll	$8, %esi
	addl	%ecx, %esi
	imull	%r13d, %esi
	movq	_EXT_CSD_PART_CONFIG_ACC_GP0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%rbx, %rdx
	movq	_MMC_BLK_DATA_AREA_GP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rcx
	movl	%ebx, %r8d
	xorl	%r9d, %r9d
	callq	_mmc_part_add
	movq	_MMC_NUM_GP_PARTITION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	addl	$3, %r12d
	cmpq	%rcx, %rbx
	jl	LBB0_3
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	(%r14), %edi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_warn                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EXT_CSD_PARTITION_SUPPORT,8,3  ## @EXT_CSD_PARTITION_SUPPORT
	.comm	_EXT_CSD_PART_SUPPORT_PART_EN,4,2 ## @EXT_CSD_PART_SUPPORT_PART_EN
	.comm	_EXT_CSD_HC_ERASE_GRP_SIZE,8,3  ## @EXT_CSD_HC_ERASE_GRP_SIZE
	.comm	_EXT_CSD_HC_WP_GRP_SIZE,8,3     ## @EXT_CSD_HC_WP_GRP_SIZE
	.comm	_MMC_NUM_GP_PARTITION,4,2       ## @MMC_NUM_GP_PARTITION
	.comm	_EXT_CSD_GP_SIZE_MULT,4,2       ## @EXT_CSD_GP_SIZE_MULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: has partition size defined without partition complete\n"

	.comm	_EXT_CSD_PART_CONFIG_ACC_GP0,8,3 ## @EXT_CSD_PART_CONFIG_ACC_GP0
L_.str.1:                               ## @.str.1
	.asciz	"gp%d"

	.comm	_MMC_BLK_DATA_AREA_GP,4,2       ## @MMC_BLK_DATA_AREA_GP
	.no_dead_strip	_mmc_manage_gp_partitions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_manage_gp_partitions
_mmc_manage_gp_partitions:              ; @mmc_manage_gp_partitions
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _EXT_CSD_PARTITION_SUPPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXT_CSD_PARTITION_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x1, x8, lsl #2]
Lloh3:
	adrp	x9, _EXT_CSD_PART_SUPPORT_PART_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EXT_CSD_PART_SUPPORT_PART_EN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.1:
Lloh6:
	adrp	x23, _MMC_NUM_GP_PARTITION@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MMC_NUM_GP_PARTITION@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x20, x1
	mov	x19, x0
	mov	x21, #0
Lloh8:
	adrp	x9, _EXT_CSD_HC_WP_GRP_SIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EXT_CSD_HC_WP_GRP_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w9, [x1, x9, lsl #2]
Lloh11:
	adrp	x10, _EXT_CSD_HC_ERASE_GRP_SIZE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _EXT_CSD_HC_ERASE_GRP_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	ldr	w10, [x1, x10, lsl #2]
	mul	w9, w10, w9
	lsl	w24, w9, #19
	mov	w25, #1
Lloh14:
	adrp	x26, _EXT_CSD_GP_SIZE_MULT@GOTPAGE
Lloh15:
	ldr	x26, [x26, _EXT_CSD_GP_SIZE_MULT@GOTPAGEOFF]
Lloh16:
	adrp	x27, _EXT_CSD_PART_CONFIG_ACC_GP0@GOTPAGE
Lloh17:
	ldr	x27, [x27, _EXT_CSD_PART_CONFIG_ACC_GP0@GOTPAGEOFF]
Lloh18:
	adrp	x28, _MMC_BLK_DATA_AREA_GP@GOTPAGE
Lloh19:
	ldr	x28, [x28, _MMC_BLK_DATA_AREA_GP@GOTPAGEOFF]
Lloh20:
	adrp	x22, l_.str.1@PAGE
Lloh21:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x26]
	add	w11, w25, w9
	sub	w10, w11, #1
	ldr	w10, [x20, w10, sxtw #2]
	cbnz	w10, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x20, w11, sxtw #2]
	cbnz	w11, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w11, w25, w9
	add	w11, w11, #1
	ldr	w11, [x20, w11, sxtw #2]
	cbz	w11, LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w25, w9
	ldr	w8, [x20, w8, sxtw #2]
	add	w8, w10, w8, lsl #8
	mul	w1, w24, w8
	ldr	x8, [x27]
	add	x2, x21, x8
	ldr	w6, [x28]
	mov	x0, x19
	mov	x3, x22
	mov	x4, x21
	mov	w5, #0
	bl	_mmc_part_add
	ldr	w8, [x23]
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	add	w25, w25, #3
	cmp	x21, w8, sxtw
	b.lt	LBB0_3
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	w0, [x19]
	bl	_mmc_hostname
	mov	x1, x0
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_pr_warn
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EXT_CSD_PARTITION_SUPPORT,8,3  ; @EXT_CSD_PARTITION_SUPPORT
	.comm	_EXT_CSD_PART_SUPPORT_PART_EN,4,2 ; @EXT_CSD_PART_SUPPORT_PART_EN
	.comm	_EXT_CSD_HC_ERASE_GRP_SIZE,8,3  ; @EXT_CSD_HC_ERASE_GRP_SIZE
	.comm	_EXT_CSD_HC_WP_GRP_SIZE,8,3     ; @EXT_CSD_HC_WP_GRP_SIZE
	.comm	_MMC_NUM_GP_PARTITION,4,2       ; @MMC_NUM_GP_PARTITION
	.comm	_EXT_CSD_GP_SIZE_MULT,4,2       ; @EXT_CSD_GP_SIZE_MULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: has partition size defined without partition complete\n"

	.comm	_EXT_CSD_PART_CONFIG_ACC_GP0,8,3 ; @EXT_CSD_PART_CONFIG_ACC_GP0
l_.str.1:                               ; @.str.1
	.asciz	"gp%d"

	.comm	_MMC_BLK_DATA_AREA_GP,4,2       ; @MMC_BLK_DATA_AREA_GP
	.no_dead_strip	_mmc_manage_gp_partitions
.subsections_via_symbols
