	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vhd_geometry
_vhd_geometry:                          ## @vhd_geometry
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, %eax
	movq	_VHD_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	_nheads@GOTPCREL(%rip), %r8
	movl	(%r8), %edx
	leal	-2(%rdx), %ecx
	cmpl	$253, %ecx
	ja	LBB0_7
## %bb.1:
	movq	_nsecs@GOTPCREL(%rip), %r9
	movl	(%r9), %edi
	cmpl	$2, %edi
	jl	LBB0_7
## %bb.2:
	cmpl	$255, %edi
	jg	LBB0_7
## %bb.3:
	movq	_ncyls@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$65535, %ecx                    ## imm = 0xFFFF
	jg	LBB0_7
## %bb.4:
	testl	%ecx, %ecx
	jne	LBB0_6
## %bb.5:
	imull	%edx, %edi
	cltd
	idivl	%edi
	movl	%eax, %ecx
LBB0_6:
	movl	%ecx, (%rsi)
	movl	(%r8), %eax
	movl	%eax, 4(%rsi)
	movl	(%r9), %eax
	movl	%eax, 8(%rsi)
	popq	%rbp
	retq
LBB0_7:
	cmpl	$267386880, %eax                ## imm = 0xFF00000
	movl	$267386880, %r9d                ## imm = 0xFF00000
	cmovll	%eax, %r9d
	cmpl	$66059280, %r9d                 ## imm = 0x3EFFC10
	jl	LBB0_9
## %bb.8:
	movl	%r9d, %eax
	movl	$2155905153, %ecx               ## imm = 0x80808081
	imulq	%rax, %rcx
	shrq	$43, %rcx
	movl	%ecx, (%rsi)
	movabsq	$1095216660496, %rax            ## imm = 0xFF00000010
	movq	%rax, 4(%rsi)
	popq	%rbp
	retq
LBB0_9:
	movslq	%r9d, %r8
	imulq	$2021161081, %r8, %rax          ## imm = 0x78787879
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$35, %rax
	leal	(%rax,%rdx), %edi
	addl	$1023, %edi                     ## imm = 0x3FF
	leal	(%rax,%rdx), %ecx
	addl	$2046, %ecx                     ## imm = 0x7FE
	testl	%edi, %edi
	cmovnsl	%edi, %ecx
	movl	$17, 8(%rsi)
	sarl	$10, %ecx
	cmpl	$5, %ecx
	movl	$4, %edi
	cmovgel	%ecx, %edi
	movl	%edi, 4(%rsi)
	cmpl	$16, %edi
	ja	LBB0_11
## %bb.10:
	addl	%edx, %eax
	movl	%edi, %ecx
	shll	$10, %ecx
	cmpl	%ecx, %eax
	jl	LBB0_12
LBB0_11:
	movabsq	$133143986192, %rax             ## imm = 0x1F00000010
	movq	%rax, 4(%rsi)
	imulq	$-2078209981, %r8, %rax         ## imm = 0x84210843
	shrq	$32, %rax
	addl	%r9d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$4, %eax
	addl	%ecx, %eax
	movl	$16, %edi
LBB0_12:
	movl	%edi, %ecx
	shll	$10, %ecx
	cmpl	%ecx, %eax
	jl	LBB0_14
## %bb.13:
	movabsq	$270582939664, %rax             ## imm = 0x3F00000010
	movq	%rax, 4(%rsi)
	imulq	$-2113396605, %r8, %rax         ## imm = 0x82082083
	shrq	$32, %rax
	addl	%r9d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$5, %eax
	addl	%ecx, %eax
	movl	$16, %edi
LBB0_14:
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%edi
	movl	%eax, (%rsi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VHD_SECTOR_SIZE,4,2            ## @VHD_SECTOR_SIZE
	.comm	_nheads,4,2                     ## @nheads
	.comm	_nsecs,4,2                      ## @nsecs
	.comm	_ncyls,4,2                      ## @ncyls
	.no_dead_strip	_vhd_geometry
.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 vhd_geometry
lCPI0_0:
	.long	16                              ; 0x10
	.long	31                              ; 0x1f
lCPI0_1:
	.long	16                              ; 0x10
	.long	63                              ; 0x3f
lCPI0_2:
	.long	16                              ; 0x10
	.long	255                             ; 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vhd_geometry:                          ; @vhd_geometry
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _VHD_SECTOR_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VHD_SECTOR_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sdiv	w10, w0, w8
Lloh3:
	adrp	x8, _nheads@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nheads@GOTPAGEOFF]
	ldr	w11, [x8]
	sub	w13, w11, #2
Lloh5:
	adrp	x9, _nsecs@GOTPAGE
Lloh6:
	ldr	x9, [x9, _nsecs@GOTPAGEOFF]
	ldr	w12, [x9]
	cmp	w13, #253
	ccmp	w12, #2, #8, ls
	b.lt	LBB0_6
; %bb.1:
	cmp	w12, #255
	b.gt	LBB0_6
; %bb.2:
Lloh7:
	adrp	x13, _ncyls@GOTPAGE
Lloh8:
	ldr	x13, [x13, _ncyls@GOTPAGEOFF]
Lloh9:
	ldr	w13, [x13]
	cmp	w13, #16, lsl #12               ; =65536
	b.ge	LBB0_6
; %bb.3:
	cbnz	w13, LBB0_5
; %bb.4:
	mul	w11, w12, w11
	sdiv	w13, w10, w11
LBB0_5:
	str	w13, [x1]
	ldr	w8, [x8]
	ldr	w9, [x9]
	stp	w8, w9, [x1, #4]
	ret
LBB0_6:
	mov	w8, #267386880
	cmp	w10, w8
	csel	w8, w10, w8, lt
	mov	w9, #64528
	movk	w9, #1007, lsl #16
	cmp	w8, w9
	b.lt	LBB0_8
; %bb.7:
	mov	w9, #32897
	movk	w9, #32896, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #43
	str	w8, [x1]
Lloh10:
	adrp	x8, lCPI0_2@PAGE
Lloh11:
	ldr	d0, [x8, lCPI0_2@PAGEOFF]
	stur	d0, [x1, #4]
	ret
LBB0_8:
	mov	w9, #30841
	movk	w9, #30840, lsl #16
	smull	x9, w8, w9
	lsr	x10, x9, #63
	asr	x9, x9, #35
	add	w9, w9, w10
	add	w10, w9, #1023
	add	w11, w9, #2046
	cmp	w10, #0
	csel	w10, w11, w10, lt
	asr	w10, w10, #10
	mov	w11, #4
	cmp	w10, #4
	csel	w10, w10, w11, gt
	mov	w11, #17
	stp	w10, w11, [x1, #4]
	lsl	w11, w10, #10
	cmp	w10, #16
	ccmp	w9, w11, #0, ls
	b.lt	LBB0_10
; %bb.9:
Lloh12:
	adrp	x9, lCPI0_0@PAGE
Lloh13:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	stur	d0, [x1, #4]
	mov	w9, #2115
	movk	w9, #33825, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w9, w9, w8
	asr	w10, w9, #4
	add	w9, w10, w9, lsr #31
	mov	w10, #16
LBB0_10:
	cmp	w9, w10, lsl #10
	b.lt	LBB0_12
; %bb.11:
Lloh14:
	adrp	x9, lCPI0_1@PAGE
Lloh15:
	ldr	d0, [x9, lCPI0_1@PAGEOFF]
	stur	d0, [x1, #4]
	mov	w9, #8323
	movk	w9, #33288, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #5
	add	w9, w9, w8, lsr #31
	mov	w10, #16
LBB0_12:
	sdiv	w8, w9, w10
	str	w8, [x1]
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpLdr	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_VHD_SECTOR_SIZE,4,2            ; @VHD_SECTOR_SIZE
	.comm	_nheads,4,2                     ; @nheads
	.comm	_nsecs,4,2                      ; @nsecs
	.comm	_ncyls,4,2                      ; @ncyls
	.no_dead_strip	_vhd_geometry
.subsections_via_symbols
