	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gtf_mode_complex           ## -- Begin function drm_gtf_mode_complex
	.p2align	4, 0x90
_drm_gtf_mode_complex:                  ## @drm_gtf_mode_complex
	.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
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%edx, %r14d
	movl	%esi, %ebx
	callq	_drm_mode_create
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	leal	4(%rbx), %eax
	addl	$11, %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	movl	%r14d, %r11d
	shrl	$31, %r11d
	addl	%r14d, %r11d
	sarl	%r11d
	xorl	%ecx, %ecx
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	testl	%r12d, %r12d
	cmovel	%r14d, %r11d
	setne	%cl
	shll	%cl, %r13d
	xorl	%r9d, %r9d
	movl	$0, %esi
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_3
## %bb.2:
	leal	(%r11,%r11,8), %eax
	addl	%eax, %eax
	addl	$500, %eax                      ## imm = 0x1F4
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	shrq	$37, %rsi
	andl	$-2, %esi
LBB0_3:
	movl	32(%rbp), %r12d
	movl	24(%rbp), %r14d
	movl	%ebx, %r8d
	andl	$-8, %r8d
	imull	$-550, %r13d, %eax              ## imm = 0xFDDA
	addl	$1000000, %eax                  ## imm = 0xF4240
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	shrq	$37, %rdi
	addl	%r11d, %esi
	leal	(%rcx,%rsi,2), %eax
	addl	$2, %eax
	imull	%r13d, %eax
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %ecx
	imull	$550, %eax, %eax                ## imm = 0x226
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	addl	$500, %eax                      ## imm = 0x1F4
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	leal	(%rax,%rsi), %r10d
	incl	%r10d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.4:
	sarl	$3, %ebx
	leal	(%rbx,%rbx,8), %eax
	shll	$4, %eax
	addl	$500, %eax                      ## imm = 0x1F4
	imulq	$274877907, %rax, %r9           ## imm = 0x10624DD3
	shrq	$37, %r9
	andl	$-2, %r9d
LBB0_5:
	addl	%r8d, %r9d
	movl	%r14d, %eax
	movl	40(%rbp), %ebx
	subl	%ebx, %eax
	imull	%r12d, %eax
	leal	255(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$8, %edx
	addl	%ebx, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	imull	$1000, %eax, %esi               ## imm = 0x3E8
	movl	%r12d, %eax
	movl	16(%rbp), %r13d
	imull	%r13d, %eax
	leal	255(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$8, %edx
	imull	$1000000, %edx, %eax            ## imm = 0xF4240
	xorl	%edx, %edx
	divl	%ecx
	subl	%eax, %esi
	movl	$100000, %edi                   ## imm = 0x186A0
	subl	%esi, %edi
	imull	%r9d, %esi
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
	addl	$8, %eax
	movl	%eax, %edx
	andl	$-16, %edx
	addl	%r9d, %edx
	leal	(,%rdx,8), %esi
	imulq	$1374389535, %rsi, %rsi         ## imm = 0x51EB851F
	shrq	$37, %rsi
	addl	$4, %esi
	andl	$-8, %esi
	shrl	$4, %eax
	leal	(%r8,%rax,8), %eax
	movl	%eax, %edi
	subl	%esi, %edi
	movl	%r8d, (%r15)
	movl	%edi, 4(%r15)
	movl	%eax, 8(%r15)
	imull	%edx, %ecx
	movl	%edx, 12(%r15)
	leal	1(%r11), %eax
	movl	%r11d, 16(%r15)
	movl	%eax, 20(%r15)
	leal	4(%r11), %eax
	movl	%eax, 24(%r15)
	imulq	$274877907, %rcx, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movl	%r10d, 28(%r15)
	movl	%eax, 32(%r15)
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:
	addl	%r10d, %r10d
	movl	%r10d, 28(%r15)
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 36(%r15)
LBB0_7:
	movq	%r15, %rdi
	callq	_drm_mode_set_name
	xorl	$600, %r13d                     ## imm = 0x258
	xorl	$80, %r14d
	orl	%r13d, %r14d
	xorl	$128, %r12d
	orl	%r14d, %r12d
	xorl	$40, %ebx
	movq	_DRM_MODE_FLAG_NHSYNC@GOTPCREL(%rip), %rax
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rcx
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_DRM_MODE_FLAG_NVSYNC@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rax), %edx
	orl	(%rcx), %esi
	orl	%r12d, %ebx
	cmovel	%edx, %esi
	movl	%esi, 36(%r15)
LBB0_8:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ## @DRM_MODE_FLAG_NHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ## @DRM_MODE_FLAG_PHSYNC
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ## @DRM_MODE_FLAG_NVSYNC
	.comm	_GTF_CELL_GRAN,4,2              ## @GTF_CELL_GRAN
	.comm	_GTF_C_PRIME,4,2                ## @GTF_C_PRIME
	.comm	_GTF_MARGIN_PERCENTAGE,4,2      ## @GTF_MARGIN_PERCENTAGE
	.comm	_GTF_MIN_V_PORCH,4,2            ## @GTF_MIN_V_PORCH
	.comm	_GTF_M_PRIME,4,2                ## @GTF_M_PRIME
	.comm	_H_SYNC_PERCENT,4,2             ## @H_SYNC_PERCENT
	.comm	_MIN_VSYNC_PLUS_BP,4,2          ## @MIN_VSYNC_PLUS_BP
	.comm	_V_SYNC_RQD,4,2                 ## @V_SYNC_RQD
.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 drm_gtf_mode_complex
lCPI0_0:
	.long	1                               ; 0x1
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_drm_gtf_mode_complex
	.p2align	2
_drm_gtf_mode_complex:                  ; @drm_gtf_mode_complex
	.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
	mov	x21, x7
	mov	x20, x6
	mov	x23, x5
	mov	x22, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	bl	_drm_mode_create
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	ldp	w27, w28, [x29, #16]
	add	w8, w26, #4
	add	w9, w26, #11
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w12, w8, #3
	and	w8, w8, #0xfffffff8
	cmp	w25, #0
	cinc	w9, w25, lt
	asr	w9, w9, #1
	cmp	w22, #0
	csel	w9, w25, w9, eq
	cset	w10, ne
	lsl	w13, w24, w10
	cbz	w23, LBB0_3
; %bb.2:
	mov	w11, #18
	mul	w11, w9, w11
	add	w11, w11, #500
	mov	w14, #19923
	movk	w14, #4194, lsl #16
	umull	x11, w11, w14
	lsr	x11, x11, #37
	and	w14, w11, #0xfffffe
	b	LBB0_4
LBB0_3:
	mov	w14, #0
LBB0_4:
	mov	w15, #16960
	movk	w15, #15, lsl #16
	mov	w11, #-550
	madd	w16, w13, w11, w15
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	umull	x16, w16, w11
	lsr	x16, x16, #37
	add	w14, w14, w9
	bfi	w10, w14, #1, #31
	add	w10, w10, #2
	mul	w10, w13, w10
	mov	w13, #1000
	mul	w10, w10, w13
	udiv	w16, w10, w16
	mov	w10, #550
	mul	w10, w16, w10
	umull	x10, w10, w11
	lsr	x10, x10, #38
	add	w10, w10, #500
	umull	x10, w10, w11
	lsr	x10, x10, #38
	add	w10, w14, w10
	add	w10, w10, #1
	mov	w14, #144
	mul	w12, w12, w14
	add	w12, w12, #500
	umull	x12, w12, w11
	lsr	x12, x12, #37
	and	w12, w12, #0xfffffe
	cmp	w23, #0
	csel	w12, wzr, w12, eq
	sub	w14, w21, w28
	mul	w14, w14, w27
	add	w17, w14, #255
	cmp	w14, #0
	csel	w14, w17, w14, lt
	add	w14, w28, w14, asr #8
	cmp	w14, #0
	cinc	w14, w14, lt
	asr	w14, w14, #1
	mul	w13, w14, w13
	mul	w14, w27, w20
	add	w17, w14, #255
	cmp	w14, #0
	csel	w14, w17, w14, lt
	asr	w14, w14, #8
	mul	w14, w14, w15
	udiv	w14, w14, w16
	mov	w15, #34464
	movk	w15, #1, lsl #16
	sub	w13, w13, w14
	sub	w14, w15, w13
	add	w12, w12, w8
	mul	w13, w13, w12
	udiv	w13, w13, w14
	add	w13, w13, #8
	and	w13, w13, #0xfffffff0
	add	w12, w13, w12
	mul	w14, w12, w16
	umull	x11, w14, w11
	lsl	w14, w12, #3
	mov	w15, #34079
	movk	w15, #20971, lsl #16
	umull	x14, w14, w15
	lsr	x14, x14, #37
	add	w14, w14, #4
	and	w14, w14, #0x7fffff8
	add	w13, w8, w13, lsr #1
	sub	w14, w13, w14
	stp	w8, w14, [x19]
	stp	w13, w12, [x19, #8]
	str	w9, [x19, #16]
	dup.2s	v0, w9
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	add.2s	v0, v0, v1
	stur	d0, [x19, #20]
	lsr	x8, x11, #38
	stp	w10, w8, [x19, #28]
	cbz	w22, LBB0_6
; %bb.5:
	lsl	w8, w10, #1
	str	w8, [x19, #28]
Lloh2:
	adrp	x8, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x19, #36]
	orr	w8, w9, w8
	str	w8, [x19, #36]
LBB0_6:
	mov	x0, x19
	bl	_drm_mode_set_name
	cmp	w28, #40
	mov	w8, #128
	ccmp	w27, w8, #0, eq
	mov	w8, #80
	ccmp	w21, w8, #0, eq
	mov	w8, #600
	ccmp	w20, w8, #0, eq
Lloh5:
	adrp	x8, _DRM_MODE_FLAG_NHSYNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_MODE_FLAG_NHSYNC@GOTPAGEOFF]
Lloh7:
	adrp	x9, _DRM_MODE_FLAG_PHSYNC@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DRM_MODE_FLAG_PHSYNC@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh12:
	ldr	x10, [x10, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh13:
	adrp	x11, _DRM_MODE_FLAG_NVSYNC@GOTPAGE
Lloh14:
	ldr	x11, [x11, _DRM_MODE_FLAG_NVSYNC@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
Lloh16:
	ldr	w11, [x11]
	orr	w8, w10, w8
	orr	w9, w11, w9
	csel	w8, w8, w9, eq
	str	w8, [x19, #36]
LBB0_7:
	mov	x0, x19
	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
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ; @DRM_MODE_FLAG_NHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ; @DRM_MODE_FLAG_PHSYNC
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ; @DRM_MODE_FLAG_NVSYNC
	.comm	_GTF_CELL_GRAN,4,2              ; @GTF_CELL_GRAN
	.comm	_GTF_C_PRIME,4,2                ; @GTF_C_PRIME
	.comm	_GTF_MARGIN_PERCENTAGE,4,2      ; @GTF_MARGIN_PERCENTAGE
	.comm	_GTF_MIN_V_PORCH,4,2            ; @GTF_MIN_V_PORCH
	.comm	_GTF_M_PRIME,4,2                ; @GTF_M_PRIME
	.comm	_H_SYNC_PERCENT,4,2             ; @H_SYNC_PERCENT
	.comm	_MIN_VSYNC_PLUS_BP,4,2          ; @MIN_VSYNC_PLUS_BP
	.comm	_V_SYNC_RQD,4,2                 ; @V_SYNC_RQD
.subsections_via_symbols
