	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_di_adjust_videomode        ## -- Begin function ipu_di_adjust_videomode
	.p2align	4, 0x90
_ipu_di_adjust_videomode:               ## @ipu_di_adjust_videomode
	.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
	movl	(%rsi), %ecx
	xorl	%ebx, %ebx
	cmpl	$1, %ecx
	jg	LBB0_6
## %bb.1:
	movl	$2, %eax
	subl	%ecx, %eax
	movl	4(%rsi), %ecx
	cmpl	%eax, %ecx
	jge	LBB0_2
## %bb.3:
	movl	8(%rsi), %ecx
	cmpl	%eax, %ecx
	jle	LBB0_7
## %bb.4:
	leaq	8(%rsi), %rdx
	jmp	LBB0_5
LBB0_2:
	leaq	4(%rsi), %rdx
LBB0_5:
	movl	$2, (%rsi)
	subl	%eax, %ecx
	movl	%ecx, (%rdx)
	movq	(%rdi), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	jmp	LBB0_6
LBB0_7:
	movq	(%rdi), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to adjust videomode\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"videomode adapted for IPU restrictions\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_di_adjust_videomode        ; -- Begin function ipu_di_adjust_videomode
	.p2align	2
_ipu_di_adjust_videomode:               ; @ipu_di_adjust_videomode
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w10, [x1]
	cmp	w10, #1
	b.gt	LBB0_4
; %bb.1:
	mov	w8, #2
	mov	x9, x1
	ldr	w11, [x9, #4]!
	sub	w10, w8, w10
	cmp	w11, w10
	b.ge	LBB0_3
; %bb.2:
	mov	x9, x1
	ldr	w11, [x9, #8]!
	cmp	w11, w10
	b.le	LBB0_5
LBB0_3:
	str	w8, [x1]
	sub	w8, w11, w10
	str	w8, [x9]
	ldr	x8, [x0]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x8, [x0]
	ldr	w0, [x8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to adjust videomode\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"videomode adapted for IPU restrictions\n"

.subsections_via_symbols
