	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pch_panel_fitting        ## -- Begin function intel_pch_panel_fitting
	.p2align	4, 0x90
_intel_pch_panel_fitting:               ## @intel_pch_panel_fitting
	.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
	.cfi_offset %rbx, -24
	movq	(%rsi), %r10
	movq	40(%rsi), %r9
	cmpq	%r10, %r9
	jne	LBB0_3
## %bb.1:
	movq	48(%rsi), %rax
	cmpq	8(%rsi), %rax
	jne	LBB0_3
## %bb.2:
	movq	16(%rsi), %r11
	movq	_INTEL_OUTPUT_FORMAT_YCBCR420@GOTPCREL(%rip), %rbx
	xorl	%ecx, %ecx
	movl	$0, %r8d
	movl	$0, %edi
	movl	$0, %eax
	cmpq	(%rbx), %r11
	jne	LBB0_19
LBB0_3:
	cmpl	$128, %edx
	je	LBB0_17
## %bb.4:
	cmpl	$130, %edx
	je	LBB0_7
## %bb.5:
	cmpl	$129, %edx
	jne	LBB0_20
## %bb.6:
	movq	8(%rsi), %r8
	movq	48(%rsi), %rcx
	movslq	%r10d, %rax
	subq	%rax, %r9
	leaq	1(%r9), %rax
	shrq	$63, %rax
	addq	%r9, %rax
	incq	%rax
	shrq	%rax
	movslq	%r8d, %rdx
	subq	%rdx, %rcx
	leaq	1(%rcx), %rdx
	shrq	$63, %rdx
	leaq	(%rcx,%rdx), %rdi
	incq	%rdi
	shrq	%rdi
	movl	%r10d, %ecx
	jmp	LBB0_19
LBB0_17:
	movl	48(%rsi), %r8d
LBB0_18:
	xorl	%edi, %edi
	movl	%r9d, %ecx
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_7:
	movq	8(%rsi), %rdi
	movq	48(%rsi), %r8
	movq	%rdi, %rax
	imulq	%r9, %rax
	movq	%r8, %rcx
	imulq	%r10, %rcx
	cmpl	%ecx, %eax
	jle	LBB0_12
## %bb.8:
	movslq	%ecx, %rax
	movq	%rax, %rdx
	orq	%rdi, %rdx
	shrq	$32, %rdx
	je	LBB0_9
## %bb.10:
	cqto
	idivq	%rdi
	jmp	LBB0_11
LBB0_20:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	popq	%rbx
	popq	%rbp
	jmp	_WARN                           ## TAILCALL
LBB0_12:
	jge	LBB0_18
## %bb.13:
	movslq	%eax, %rcx
	movq	%rcx, %rdx
	orq	%r10, %rdx
	shrq	$32, %rdx
	je	LBB0_14
## %bb.15:
	movq	%rcx, %rax
	cqto
	idivq	%r10
	jmp	LBB0_16
LBB0_9:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
LBB0_11:
	movl	%eax, %ecx
	andl	$1, %ecx
	addl	%eax, %ecx
	movslq	%ecx, %rax
	subq	%rax, %r9
	leaq	1(%r9), %rax
	shrq	$63, %rax
	addq	%r9, %rax
	incq	%rax
	shrq	%rax
	xorl	%edi, %edi
	jmp	LBB0_19
LBB0_14:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r10d
                                        ## kill: def $eax killed $eax def $rax
LBB0_16:
	movl	%eax, %edx
	andl	$1, %edx
	addl	%eax, %edx
	movslq	%edx, %rax
	subq	%rax, %r8
	leaq	1(%r8), %rax
	shrq	$63, %rax
	leaq	(%r8,%rax), %rdi
	incq	%rdi
	shrq	%rdi
	xorl	%eax, %eax
	movl	%r9d, %ecx
	movl	%edx, %r8d
LBB0_19:
	shll	$16, %eax
	orl	%edi, %eax
	movl	%eax, 24(%rsi)
	shll	$16, %ecx
	xorl	%eax, %eax
	orl	%r8d, %ecx
	movl	%ecx, 28(%rsi)
	setne	%al
	movl	%eax, 32(%rsi)
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_OUTPUT_FORMAT_YCBCR420,8,3 ## @INTEL_OUTPUT_FORMAT_YCBCR420
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad panel fit mode: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pch_panel_fitting        ; -- Begin function intel_pch_panel_fitting
	.p2align	2
_intel_pch_panel_fitting:               ; @intel_pch_panel_fitting
	.cfi_startproc
; %bb.0:
	ldr	x9, [x1, #40]
	ldr	x8, [x1]
	cmp	x9, x8
	b.ne	LBB0_3
; %bb.1:
	ldr	x10, [x1, #48]
	ldr	x11, [x1, #8]
	cmp	x10, x11
	b.ne	LBB0_3
; %bb.2:
	ldr	x10, [x1, #16]
Lloh0:
	adrp	x11, _INTEL_OUTPUT_FORMAT_YCBCR420@GOTPAGE
Lloh1:
	ldr	x11, [x11, _INTEL_OUTPUT_FORMAT_YCBCR420@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_11
LBB0_3:
	cmp	w2, #128
	b.eq	LBB0_7
; %bb.4:
	cmp	w2, #130
	b.eq	LBB0_8
; %bb.5:
	cmp	w2, #129
	b.ne	LBB0_10
; %bb.6:
	ldr	x10, [x1, #8]
	sub	x9, x9, w8, sxtw
	add	x11, x9, #1
	add	x12, x9, #2
	cmp	x11, #0
	csinc	x9, x12, x9, lt
	lsr	x11, x9, #1
	ldr	x9, [x1, #48]
	sub	x9, x9, w10, sxtw
	add	x12, x9, #1
	add	x13, x9, #2
	cmp	x12, #0
	csinc	x9, x13, x9, lt
	lsr	x12, x9, #1
	b	LBB0_15
LBB0_7:
	mov	w12, #0
	mov	w11, #0
	ldr	w10, [x1, #48]
	mov	x8, x9
	b	LBB0_15
LBB0_8:
	ldr	x11, [x1, #8]
	mul	x10, x11, x9
	ldr	x13, [x1, #48]
	mul	x14, x13, x8
	cmp	w10, w14
	b.le	LBB0_12
; %bb.9:
	mov	w12, #0
	sxtw	x8, w14
	sdiv	x8, x8, x11
	and	w10, w8, #0x1
	add	w8, w10, w8
	sub	x9, x9, w8, sxtw
	add	x10, x9, #1
	add	x11, x9, #2
	cmp	x10, #0
	csinc	x9, x11, x9, lt
	lsr	x11, x9, #1
	mov	x10, x13
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	b	LBB0_15
LBB0_10:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	b	_WARN
LBB0_11:
	mov	w8, #0
	mov	w10, #0
	mov	w12, #0
	mov	w11, #0
	b	LBB0_15
LBB0_12:
	b.ge	LBB0_14
; %bb.13:
	mov	w11, #0
	sxtw	x10, w10
	sdiv	x8, x10, x8
	and	w10, w8, #0x1
	add	w10, w10, w8
	sub	x8, x13, w10, sxtw
	add	x12, x8, #1
	add	x13, x8, #2
	cmp	x12, #0
	csinc	x8, x13, x8, lt
	lsr	x12, x8, #1
	mov	x8, x9
                                        ; kill: def $w12 killed $w12 killed $x12 def $x12
	b	LBB0_15
LBB0_14:
	mov	w12, #0
	mov	w11, #0
	mov	x8, x9
	mov	x10, x13
LBB0_15:
	orr	w9, w12, w11, lsl #16
	orr	w8, w10, w8, lsl #16
	stp	w9, w8, [x1, #24]
	cmp	w8, #0
	cset	w8, ne
	str	w8, [x1, #32]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_OUTPUT_FORMAT_YCBCR420,8,3 ; @INTEL_OUTPUT_FORMAT_YCBCR420
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad panel fit mode: %d\n"

.subsections_via_symbols
