	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_rect_rotate                ## -- Begin function drm_rect_rotate
	.p2align	4, 0x90
_drm_rect_rotate:                       ## @drm_rect_rotate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_DRM_MODE_REFLECT_X@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_DRM_MODE_REFLECT_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r8d, %eax
	orl	%r9d, %eax
	testl	%ecx, %eax
	je	LBB0_5
## %bb.1:
	testl	%ecx, %r9d
	je	LBB0_3
## %bb.2:
	movslq	%esi, %rax
	movq	%rax, %r9
	subq	(%rdi), %r9
	subq	16(%rdi), %rax
	movq	%r9, 16(%rdi)
	movq	%rax, (%rdi)
LBB0_3:
	testl	%ecx, %r8d
	je	LBB0_5
## %bb.4:
	movslq	%edx, %rax
	movq	%rax, %r8
	subq	8(%rdi), %r8
	movq	24(%rdi), %r9
	movq	%r8, 24(%rdi)
	subq	%r9, %rax
	movq	%rax, 8(%rdi)
LBB0_5:
	movq	_DRM_MODE_ROTATE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	cmpl	$130, %ecx
	je	LBB0_9
## %bb.6:
	cmpl	$129, %ecx
	je	LBB0_10
## %bb.7:
	cmpl	$128, %ecx
	jne	LBB0_12
## %bb.8:
	movq	8(%rdi), %rax
	movslq	%esi, %rcx
	movq	%rcx, %rdx
	subq	16(%rdi), %rdx
	movq	24(%rdi), %rsi
	movq	%rsi, 16(%rdi)
	subq	(%rdi), %rcx
	movq	%rax, (%rdi)
	movq	%rcx, 24(%rdi)
	movq	%rdx, 8(%rdi)
	popq	%rbp
	retq
LBB0_9:
	movslq	%esi, %rax
	movq	%rax, %rcx
	subq	(%rdi), %rcx
	subq	16(%rdi), %rax
	movq	%rcx, 16(%rdi)
	movq	%rax, (%rdi)
	movslq	%edx, %rax
	movq	%rax, %rcx
	subq	8(%rdi), %rcx
	subq	24(%rdi), %rax
	movq	%rcx, 24(%rdi)
	jmp	LBB0_11
LBB0_10:
	movq	(%rdi), %rax
	movslq	%edx, %rcx
	movq	%rcx, %rdx
	subq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
	movq	%rdx, 16(%rdi)
	subq	24(%rdi), %rcx
	movq	%rcx, (%rdi)
	movq	%rsi, 24(%rdi)
LBB0_11:
	movq	%rax, 8(%rdi)
LBB0_12:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_REFLECT_X,4,2         ## @DRM_MODE_REFLECT_X
	.comm	_DRM_MODE_REFLECT_Y,4,2         ## @DRM_MODE_REFLECT_Y
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ## @DRM_MODE_ROTATE_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_rect_rotate                ; -- Begin function drm_rect_rotate
	.p2align	2
_drm_rect_rotate:                       ; @drm_rect_rotate
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w2 killed $w2 def $x2
                                        ; kill: def $w1 killed $w1 def $x1
Lloh0:
	adrp	x8, _DRM_MODE_REFLECT_X@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_REFLECT_X@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _DRM_MODE_REFLECT_Y@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_MODE_REFLECT_Y@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w10, w8, w9
	tst	w10, w3
	b.eq	LBB0_5
; %bb.1:
	tst	w9, w3
	b.eq	LBB0_3
; %bb.2:
	ldr	x9, [x0, #16]
	ldr	x10, [x0]
	sxtw	x11, w1
	sub	x10, x11, x10
	str	x10, [x0, #16]
	sub	x9, x11, x9
	str	x9, [x0]
LBB0_3:
	tst	w8, w3
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x0, #8]
	ldr	x9, [x0, #24]
	sxtw	x10, w2
	sub	x8, x10, x8
	str	x8, [x0, #24]
	sub	x8, x10, x9
	str	x8, [x0, #8]
LBB0_5:
Lloh6:
	adrp	x8, _DRM_MODE_ROTATE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRM_MODE_ROTATE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w3
	cmp	w8, #130
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.8:
	ldp	x8, x9, [x0]
	ldp	x10, x11, [x0, #16]
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
	sxtw	x12, w1
	sub	x8, x12, x8
	stp	x11, x8, [x0, #16]
	sub	x8, x12, x10
	str	x9, [x0]
	b	LBB0_11
LBB0_9:
	ldp	x8, x9, [x0]
	ldp	x10, x11, [x0, #16]
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
	sxtw	x12, w1
	sub	x8, x12, x8
	sub	x10, x12, x10
                                        ; kill: def $w2 killed $w2 killed $x2 def $x2
	sxtw	x12, w2
	sub	x9, x12, x9
	stp	x8, x9, [x0, #16]
	sub	x8, x12, x11
	str	x10, [x0]
	b	LBB0_11
LBB0_10:
	ldp	x8, x9, [x0]
	ldp	x10, x11, [x0, #16]
                                        ; kill: def $w2 killed $w2 killed $x2 def $x2
	sxtw	x12, w2
	sub	x9, x12, x9
	sub	x11, x12, x11
	stp	x9, x10, [x0, #16]
	str	x11, [x0]
LBB0_11:
	str	x8, [x0, #8]
LBB0_12:
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_REFLECT_X,4,2         ; @DRM_MODE_REFLECT_X
	.comm	_DRM_MODE_REFLECT_Y,4,2         ; @DRM_MODE_REFLECT_Y
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ; @DRM_MODE_ROTATE_MASK
.subsections_via_symbols
