	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ns2501_mode_valid
_ns2501_mode_valid:                     ## @ns2501_mode_valid
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movl	16(%rsi), %edx
	movl	(%rsi), %esi
	movl	4(%rbx), %ecx
	movl	12(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	(%rbx), %eax
	cmpl	$1024, %eax                     ## imm = 0x400
	je	LBB0_6
## %bb.1:
	cmpl	$800, %eax                      ## imm = 0x320
	je	LBB0_9
## %bb.2:
	cmpl	$640, %eax                      ## imm = 0x280
	jne	LBB0_12
## %bb.3:
	cmpl	$480, 4(%rbx)                   ## imm = 0x1E0
	jne	LBB0_12
## %bb.4:
	cmpl	$25175, 8(%rbx)                 ## imm = 0x6257
	jne	LBB0_12
	jmp	LBB0_5
LBB0_6:
	cmpl	$768, 4(%rbx)                   ## imm = 0x300
	jne	LBB0_12
## %bb.7:
	cmpl	$65000, 8(%rbx)                 ## imm = 0xFDE8
	je	LBB0_5
	jmp	LBB0_12
LBB0_9:
	cmpl	$600, 4(%rbx)                   ## imm = 0x258
	jne	LBB0_12
## %bb.10:
	cmpl	$40000, 8(%rbx)                 ## imm = 0x9C40
	jne	LBB0_12
LBB0_5:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_MODE_ONE_SIZE@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n"

	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.comm	_MODE_ONE_SIZE,4,2              ## @MODE_ONE_SIZE
	.no_dead_strip	_ns2501_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ns2501_mode_valid
_ns2501_mode_valid:                     ; @ns2501_mode_valid
	.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
	mov	x19, x1
	ldr	w1, [x1]
	ldr	w3, [x19, #4]
	ldp	w4, w2, [x19, #12]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x19]
	cmp	w8, #1024
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #800
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #640
	b.ne	LBB0_10
; %bb.3:
	ldr	w8, [x19, #4]
	cmp	w8, #480
	b.ne	LBB0_10
; %bb.4:
	ldr	w8, [x19, #8]
	mov	w9, #25175
	cmp	w8, w9
	b.ne	LBB0_10
	b	LBB0_9
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w8, #768
	b.ne	LBB0_10
; %bb.6:
	ldr	w8, [x19, #8]
	mov	w9, #65000
	cmp	w8, w9
	b.eq	LBB0_9
	b	LBB0_10
LBB0_7:
	ldr	w8, [x19, #4]
	cmp	w8, #600
	b.ne	LBB0_10
; %bb.8:
	ldr	w8, [x19, #8]
	mov	w9, #40000
	cmp	w8, w9
	b.ne	LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh4:
	adrp	x8, _MODE_ONE_SIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MODE_ONE_SIZE@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n"

	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.comm	_MODE_ONE_SIZE,4,2              ; @MODE_ONE_SIZE
	.no_dead_strip	_ns2501_mode_valid
.subsections_via_symbols
