	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_convert_umode         ## -- Begin function drm_mode_convert_umode
	.p2align	4, 0x90
_drm_mode_convert_umode:                ## @drm_mode_convert_umode
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	(%rdx), %rcx
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmpq	%rdx, %rcx
	jg	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	cmpq	%rdx, %rax
	jle	LBB0_4
LBB0_2:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rcx, (%rsi)
	movl	64(%rbx), %ecx
	movl	%ecx, 84(%rsi)
	movl	60(%rbx), %ecx
	movl	%ecx, 80(%rsi)
	movups	44(%rbx), %xmm0
	movups	%xmm0, 64(%rsi)
	movups	28(%rbx), %xmm0
	movups	%xmm0, 48(%rsi)
	movq	%rax, 8(%rsi)
	movl	16(%rbx), %eax
	movl	%eax, 16(%rsi)
	movq	_DRM_MODE_TYPE_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	20(%rbx), %eax
	movl	%eax, 20(%rsi)
	movq	40(%rsi), %rdi
	movl	24(%rbx), %esi
	movq	_DRM_DISPLAY_MODE_LEN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_strncpy
	movq	40(%r15), %rax
	movslq	(%r12), %rcx
	movq	$0, -8(%rax,%rcx,8)
	movq	_DRM_MODE_FLAG_PIC_AR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	notl	%ecx
	andl	%ecx, 16(%r15)
	andl	16(%rbx), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	jae	LBB0_5
## %bb.6:
	cltq
	leaq	l_switch.table.drm_mode_convert_umode(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_mode_validate_driver
	movq	%rax, 24(%r15)
	movq	_MODE_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.7:
	movq	_CRTC_INTERLACE_HALVE_V@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_drm_mode_set_crtcinfo
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_DRM_MODE_TYPE_ALL,4,2          ## @DRM_MODE_TYPE_ALL
	.comm	_DRM_DISPLAY_MODE_LEN,4,2       ## @DRM_DISPLAY_MODE_LEN
	.comm	_DRM_MODE_FLAG_PIC_AR_MASK,4,2  ## @DRM_MODE_FLAG_PIC_AR_MASK
	.comm	_HDMI_PICTURE_ASPECT_4_3,4,2    ## @HDMI_PICTURE_ASPECT_4_3
	.comm	_HDMI_PICTURE_ASPECT_16_9,4,2   ## @HDMI_PICTURE_ASPECT_16_9
	.comm	_HDMI_PICTURE_ASPECT_64_27,4,2  ## @HDMI_PICTURE_ASPECT_64_27
	.comm	_HDMI_PICTURE_ASPECT_256_135,4,2 ## @HDMI_PICTURE_ASPECT_256_135
	.comm	_HDMI_PICTURE_ASPECT_NONE,4,2   ## @HDMI_PICTURE_ASPECT_NONE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MODE_OK,8,3                    ## @MODE_OK
	.comm	_CRTC_INTERLACE_HALVE_V,4,2     ## @CRTC_INTERLACE_HALVE_V
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.drm_mode_convert_umode
l_switch.table.drm_mode_convert_umode:
	.quad	_HDMI_PICTURE_ASPECT_NONE
	.quad	_HDMI_PICTURE_ASPECT_64_27
	.quad	_HDMI_PICTURE_ASPECT_4_3
	.quad	_HDMI_PICTURE_ASPECT_256_135
	.quad	_HDMI_PICTURE_ASPECT_16_9

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_convert_umode         ; -- Begin function drm_mode_convert_umode
	.p2align	2
_drm_mode_convert_umode:                ; @drm_mode_convert_umode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x9]
	cmp	x8, x10
	b.gt	LBB0_2
; %bb.1:
	mov	x21, x2
	ldr	x9, [x2, #8]
	cmp	x9, x10
	b.le	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _ERANGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x19, x1
	mov	x20, x0
	ldur	d0, [x21, #60]
	str	d0, [x1, #80]
	ldur	q0, [x21, #44]
	str	q0, [x1, #64]
	ldur	q0, [x21, #28]
	str	q0, [x1, #48]
	stp	x8, x9, [x1]
	ldp	w8, w9, [x21, #16]
Lloh5:
	adrp	x10, _DRM_MODE_TYPE_ALL@GOTPAGE
Lloh6:
	ldr	x10, [x10, _DRM_MODE_TYPE_ALL@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	and	w9, w10, w9
	stp	w8, w9, [x1, #16]
	ldr	x0, [x1, #40]
	ldr	w1, [x21, #24]
Lloh8:
	adrp	x22, _DRM_DISPLAY_MODE_LEN@GOTPAGE
Lloh9:
	ldr	x22, [x22, _DRM_DISPLAY_MODE_LEN@GOTPAGEOFF]
	ldr	w2, [x22]
	bl	_strncpy
	ldr	x8, [x19, #40]
	ldrsw	x9, [x22]
	add	x8, x8, x9, lsl #3
	stur	xzr, [x8, #-8]
Lloh10:
	adrp	x8, _DRM_MODE_FLAG_PIC_AR_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DRM_MODE_FLAG_PIC_AR_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	bic	w9, w9, w8
	str	w9, [x19, #16]
	ldr	w9, [x21, #16]
	and	w8, w9, w8
	sub	w8, w8, #128
	cmp	w8, #5
	b.hs	LBB0_8
; %bb.6:
Lloh13:
	adrp	x9, l_switch.table.drm_mode_convert_umode@PAGE
Lloh14:
	add	x9, x9, l_switch.table.drm_mode_convert_umode@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8]
	str	w8, [x19, #32]
	mov	x0, x20
	mov	x1, x19
	bl	_drm_mode_validate_driver
	str	x0, [x19, #24]
Lloh15:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
Lloh18:
	adrp	x8, _CRTC_INTERLACE_HALVE_V@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CRTC_INTERLACE_HALVE_V@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_drm_mode_set_crtcinfo
	mov	w0, #0
	b	LBB0_4
LBB0_8:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_DRM_MODE_TYPE_ALL,4,2          ; @DRM_MODE_TYPE_ALL
	.comm	_DRM_DISPLAY_MODE_LEN,4,2       ; @DRM_DISPLAY_MODE_LEN
	.comm	_DRM_MODE_FLAG_PIC_AR_MASK,4,2  ; @DRM_MODE_FLAG_PIC_AR_MASK
	.comm	_HDMI_PICTURE_ASPECT_4_3,4,2    ; @HDMI_PICTURE_ASPECT_4_3
	.comm	_HDMI_PICTURE_ASPECT_16_9,4,2   ; @HDMI_PICTURE_ASPECT_16_9
	.comm	_HDMI_PICTURE_ASPECT_64_27,4,2  ; @HDMI_PICTURE_ASPECT_64_27
	.comm	_HDMI_PICTURE_ASPECT_256_135,4,2 ; @HDMI_PICTURE_ASPECT_256_135
	.comm	_HDMI_PICTURE_ASPECT_NONE,4,2   ; @HDMI_PICTURE_ASPECT_NONE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MODE_OK,8,3                    ; @MODE_OK
	.comm	_CRTC_INTERLACE_HALVE_V,4,2     ; @CRTC_INTERLACE_HALVE_V
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.drm_mode_convert_umode
l_switch.table.drm_mode_convert_umode:
	.quad	_HDMI_PICTURE_ASPECT_NONE
	.quad	_HDMI_PICTURE_ASPECT_64_27
	.quad	_HDMI_PICTURE_ASPECT_4_3
	.quad	_HDMI_PICTURE_ASPECT_256_135
	.quad	_HDMI_PICTURE_ASPECT_16_9

.subsections_via_symbols
