	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_vga_calculate_mode_bandwidth
_mga_vga_calculate_mode_bandwidth:      ## @mga_vga_calculate_mode_bandwidth
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	leal	7(%rbx), %eax
	addl	$14, %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	movl	(%rdi), %eax
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	4(%rdi), %esi
	testl	%esi, %esi
	je	LBB0_4
## %bb.2:
	movl	8(%rdi), %ecx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.3:
	sarl	$3, %ebx
	imull	12(%rdi), %ecx
	imull	%eax, %esi
	imull	16(%rdi), %ecx
	imull	$1000, %ecx, %r14d              ## imm = 0x3E8
	movl	%r14d, %edi
	callq	_do_div
	imull	%r14d, %ebx
	imull	$100, %ebx, %r14d
	movl	%r14d, %edi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_do_div
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mga_vga_calculate_mode_bandwidth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_vga_calculate_mode_bandwidth
_mga_vga_calculate_mode_bandwidth:      ; @mga_vga_calculate_mode_bandwidth
	.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
	add	w8, w1, #7
	add	w9, w1, #14
	cmp	w8, #0
	csel	w9, w9, w8, lt
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	w10, [x0, #4]
	cbz	w10, LBB0_4
; %bb.2:
	ldr	w11, [x0, #8]
	cbz	w11, LBB0_4
; %bb.3:
	asr	w20, w9, #3
	ldp	w9, w12, [x0, #12]
	mul	w1, w10, w8
	mul	w8, w11, w9
	mul	w8, w8, w12
	mov	w9, #1000
	mul	w19, w8, w9
	mov	x0, x19
	bl	_do_div
	mul	w8, w20, w19
	mov	w9, #100
	mul	w19, w8, w9
	mov	x0, x19
	mov	w1, #1024
	bl	_do_div
	b	LBB0_5
LBB0_4:
	mov	w19, #0
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mga_vga_calculate_mode_bandwidth
.subsections_via_symbols
