	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function drm_client_rotation
LCPI0_0:
	.quad	1                               ## 0x1
	.quad	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_drm_client_rotation
	.p2align	4, 0x90
_drm_client_rotation:                   ## @drm_client_rotation
	.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
	xorl	%r14d, %r14d
	cmpl	$0, (%rdi)
	je	LBB0_22
## %bb.1:
	movq	%rsi, %r13
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	movq	(%rcx), %rbx
	movl	16(%rbx), %ecx
	addl	$-128, %ecx
	cmpl	$2, %ecx
	ja	LBB0_2
## %bb.3:
	movslq	%ecx, %rcx
	leaq	l_switch.table.drm_client_rotation(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_DRM_MODE_ROTATE_0@GOTPCREL(%rip), %rcx
LBB0_4:
	movq	(%rax), %r12
	movl	(%rcx), %edi
	movl	%edi, (%r13)
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.5:
	cmpl	$0, (%rbx)
	je	LBB0_7
## %bb.6:
	movq	_DRM_MODE_ROTATE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_ilog2
	movl	%eax, %r15d
	movq	_DRM_MODE_ROTATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	(%rbx), %edi
	callq	_ilog2
	addl	%r15d, %eax
	movq	_DRM_MODE_ROTATE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movl	(%rbx), %edi
	xorl	(%r13), %edi
	andl	%ecx, %edi
	andb	$3, %al
	btsl	%eax, %edi
	movl	%edi, (%r13)
LBB0_7:
	movq	_DRM_MODE_ROTATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edi, %eax
	movq	_DRM_MODE_ROTATE_180@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_22
## %bb.8:
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_22
## %bb.9:
	movl	(%rcx), %eax
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	8(%rcx), %rcx
	cmpl	$4, %eax
	jae	LBB0_13
## %bb.12:
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_20
LBB0_10:
	xorl	%esi, %esi
	jmp	LBB0_21
LBB0_13:
	movl	%eax, %edx
	andl	$-4, %edx
	leaq	-4(%rdx), %rsi
	movq	%rsi, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.15:
	movq	%r8, %rsi
	andq	$-2, %rsi
	pxor	%xmm0, %xmm0
	xorl	%ebx, %ebx
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [1,1]
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rbx,8), %xmm3
	movdqu	16(%rcx,%rbx,8), %xmm4
	movdqu	32(%rcx,%rbx,8), %xmm5
	movdqu	48(%rcx,%rbx,8), %xmm6
	movdqa	%xmm8, %xmm7
	psllq	%xmm3, %xmm7
	pshufd	$238, %xmm3, %xmm3              ## xmm3 = xmm3[2,3,2,3]
	movdqa	%xmm8, %xmm2
	psllq	%xmm3, %xmm2
	pblendw	$15, %xmm7, %xmm2               ## xmm2 = xmm7[0,1,2,3],xmm2[4,5,6,7]
	por	%xmm0, %xmm2
	movdqa	%xmm8, %xmm0
	psllq	%xmm4, %xmm0
	pshufd	$238, %xmm4, %xmm3              ## xmm3 = xmm4[2,3,2,3]
	movdqa	%xmm8, %xmm4
	psllq	%xmm3, %xmm4
	movdqa	%xmm8, %xmm3
	psllq	%xmm5, %xmm3
	pblendw	$15, %xmm0, %xmm4               ## xmm4 = xmm0[0,1,2,3],xmm4[4,5,6,7]
	pshufd	$238, %xmm5, %xmm5              ## xmm5 = xmm5[2,3,2,3]
	movdqa	%xmm8, %xmm0
	psllq	%xmm5, %xmm0
	por	%xmm1, %xmm4
	pblendw	$15, %xmm3, %xmm0               ## xmm0 = xmm3[0,1,2,3],xmm0[4,5,6,7]
	movdqa	%xmm8, %xmm3
	psllq	%xmm6, %xmm3
	por	%xmm2, %xmm0
	pshufd	$238, %xmm6, %xmm2              ## xmm2 = xmm6[2,3,2,3]
	movdqa	%xmm8, %xmm1
	psllq	%xmm2, %xmm1
	pblendw	$15, %xmm3, %xmm1               ## xmm1 = xmm3[0,1,2,3],xmm1[4,5,6,7]
	por	%xmm4, %xmm1
	addq	$8, %rbx
	addq	$-2, %rsi
	jne	LBB0_16
## %bb.17:
	testb	$1, %r8b
	je	LBB0_19
LBB0_18:
	movdqu	(%rcx,%rbx,8), %xmm2
	movdqu	16(%rcx,%rbx,8), %xmm3
	movdqa	LCPI0_0(%rip), %xmm4            ## xmm4 = [1,1]
	movdqa	%xmm4, %xmm5
	psllq	%xmm2, %xmm5
	pshufd	$238, %xmm2, %xmm2              ## xmm2 = xmm2[2,3,2,3]
	movdqa	%xmm4, %xmm6
	psllq	%xmm2, %xmm6
	pblendw	$15, %xmm5, %xmm6               ## xmm6 = xmm5[0,1,2,3],xmm6[4,5,6,7]
	por	%xmm6, %xmm0
	movdqa	%xmm4, %xmm2
	psllq	%xmm3, %xmm2
	pshufd	$238, %xmm3, %xmm3              ## xmm3 = xmm3[2,3,2,3]
	psllq	%xmm3, %xmm4
	pblendw	$15, %xmm2, %xmm4               ## xmm4 = xmm2[0,1,2,3],xmm4[4,5,6,7]
	por	%xmm4, %xmm1
LBB0_19:
	por	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	por	%xmm0, %xmm1
	movq	%xmm1, %rsi
	cmpq	%rax, %rdx
	je	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rcx,%rdx,8), %ebx
	btsq	%rbx, %rsi
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_20
LBB0_21:
	xorl	%r14d, %r14d
	testl	%edi, %esi
	setne	%r14b
LBB0_22:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	pxor	%xmm0, %xmm0
	xorl	%ebx, %ebx
	pxor	%xmm1, %xmm1
	testb	$1, %r8b
	jne	LBB0_18
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_ROTATE_180,4,2        ## @DRM_MODE_ROTATE_180
	.comm	_DRM_MODE_ROTATE_90,4,2         ## @DRM_MODE_ROTATE_90
	.comm	_DRM_MODE_ROTATE_270,4,2        ## @DRM_MODE_ROTATE_270
	.comm	_DRM_MODE_ROTATE_0,4,2          ## @DRM_MODE_ROTATE_0
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ## @DRM_MODE_ROTATE_MASK
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.drm_client_rotation
l_switch.table.drm_client_rotation:
	.quad	_DRM_MODE_ROTATE_270
	.quad	_DRM_MODE_ROTATE_90
	.quad	_DRM_MODE_ROTATE_180

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_client_rotation            ; -- Begin function drm_client_rotation
	.p2align	2
_drm_client_rotation:                   ; @drm_client_rotation
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_12
; %bb.1:
	mov	x19, x1
	ldp	x8, x9, [x0, #8]
	ldr	x22, [x9]
	ldr	w9, [x22, #16]
	sub	w9, w9, #128
	cmp	w9, #2
	b.hi	LBB0_3
; %bb.2:
Lloh0:
	adrp	x10, l_switch.table.drm_client_rotation@PAGE
Lloh1:
	add	x10, x10, l_switch.table.drm_client_rotation@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x9, _DRM_MODE_ROTATE_0@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DRM_MODE_ROTATE_0@GOTPAGEOFF]
LBB0_4:
	ldr	x21, [x8]
	ldr	w8, [x9]
	str	w8, [x19]
	ldr	x9, [x22, #8]
Lloh4:
	adrp	x23, _DRM_MODE_ROTATE_MASK@GOTPAGE
Lloh5:
	ldr	x23, [x23, _DRM_MODE_ROTATE_MASK@GOTPAGEOFF]
	cbz	x9, LBB0_7
; %bb.5:
	ldr	w9, [x22]
	cbz	w9, LBB0_7
; %bb.6:
	ldr	w9, [x23]
	and	w0, w9, w8
	bl	_ilog2
	mov	x20, x0
	ldr	w8, [x22]
	ldr	w9, [x23]
	and	w0, w9, w8
	bl	_ilog2
	add	w8, w0, w20
	and	w8, w8, #0x3
	ldr	w9, [x19]
	ldr	w10, [x23]
	ldr	w11, [x22]
	eor	w9, w11, w9
	bic	w9, w9, w10
	mov	w10, #1
	lsl	w8, w10, w8
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_7:
	ldr	w9, [x23]
	and	w9, w9, w8
Lloh6:
	adrp	x10, _DRM_MODE_ROTATE_180@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DRM_MODE_ROTATE_180@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_12
; %bb.8:
	ldr	x10, [x21]
	cbz	x10, LBB0_12
; %bb.9:
	ldr	w9, [x10]
	cbz	w9, LBB0_14
; %bb.10:
	ldr	x10, [x10, #8]
	cmp	w9, #8
	b.hs	LBB0_15
; %bb.11:
	mov	x11, #0
	mov	x12, #0
	b	LBB0_18
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	x12, #0
	b	LBB0_20
LBB0_15:
	and	x11, x9, #0xfffffff8
	add	x12, x10, #32
	movi.2d	v0, #0000000000000000
	mov	w13, #1
	dup.2d	v1, x13
	mov	x13, x11
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldp	q5, q6, [x12, #-32]
	ldp	q7, q16, [x12], #64
	ushl.2d	v5, v1, v5
	ushl.2d	v6, v1, v6
	ushl.2d	v7, v1, v7
	ushl.2d	v16, v1, v16
	orr.16b	v0, v5, v0
	orr.16b	v2, v6, v2
	orr.16b	v3, v7, v3
	orr.16b	v4, v16, v4
	subs	x13, x13, #8
	b.ne	LBB0_16
; %bb.17:
	orr.16b	v0, v2, v0
	orr.16b	v0, v3, v0
	orr.16b	v0, v4, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	fmov	x12, d0
	cmp	x11, x9
	b.eq	LBB0_20
LBB0_18:
	add	x10, x10, x11, lsl #3
	sub	x9, x9, x11
	mov	w11, #1
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x10], #8
	lsl	x13, x11, x13
	orr	x12, x13, x12
	subs	x9, x9, #1
	b.ne	LBB0_19
LBB0_20:
	mov	w8, w8
	tst	x12, x8
	cset	w0, ne
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_ROTATE_180,4,2        ; @DRM_MODE_ROTATE_180
	.comm	_DRM_MODE_ROTATE_90,4,2         ; @DRM_MODE_ROTATE_90
	.comm	_DRM_MODE_ROTATE_270,4,2        ; @DRM_MODE_ROTATE_270
	.comm	_DRM_MODE_ROTATE_0,4,2          ; @DRM_MODE_ROTATE_0
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ; @DRM_MODE_ROTATE_MASK
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.drm_client_rotation
l_switch.table.drm_client_rotation:
	.quad	_DRM_MODE_ROTATE_270
	.quad	_DRM_MODE_ROTATE_90
	.quad	_DRM_MODE_ROTATE_180

.subsections_via_symbols
