	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scaler_set_rotation
_scaler_set_rotation:                   ## @scaler_set_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	movq	_DRM_MODE_ROTATE_90@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_SCALER_ROT_MODE_90@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	movq	_DRM_MODE_ROTATE_180@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_SCALER_ROT_MODE_180@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_DRM_MODE_ROTATE_270@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_12
## %bb.5:
	movq	_SCALER_ROT_MODE_270@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	callq	_SCALER_ROT_CFG_SET_ROTMODE
LBB0_7:
	movq	_DRM_MODE_REFLECT_X@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	%ebx, %edi
	je	LBB0_9
## %bb.8:
	movq	_SCALER_ROT_CFG_FLIP_X_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
LBB0_9:
	orl	%eax, %edi
	movq	_DRM_MODE_REFLECT_Y@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	je	LBB0_11
## %bb.10:
	movq	_SCALER_ROT_CFG_FLIP_Y_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_11:
	orl	%ebx, %edi
	movq	_SCALER_ROT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_scaler_write                   ## TAILCALL
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_ROTATE_90,4,2         ## @DRM_MODE_ROTATE_90
	.comm	_SCALER_ROT_MODE_90,4,2         ## @SCALER_ROT_MODE_90
	.comm	_DRM_MODE_ROTATE_180,4,2        ## @DRM_MODE_ROTATE_180
	.comm	_SCALER_ROT_MODE_180,4,2        ## @SCALER_ROT_MODE_180
	.comm	_DRM_MODE_ROTATE_270,4,2        ## @DRM_MODE_ROTATE_270
	.comm	_SCALER_ROT_MODE_270,4,2        ## @SCALER_ROT_MODE_270
	.comm	_DRM_MODE_REFLECT_X,4,2         ## @DRM_MODE_REFLECT_X
	.comm	_SCALER_ROT_CFG_FLIP_X_EN,4,2   ## @SCALER_ROT_CFG_FLIP_X_EN
	.comm	_DRM_MODE_REFLECT_Y,4,2         ## @DRM_MODE_REFLECT_Y
	.comm	_SCALER_ROT_CFG_FLIP_Y_EN,4,2   ## @SCALER_ROT_CFG_FLIP_Y_EN
	.comm	_SCALER_ROT_CFG,4,2             ## @SCALER_ROT_CFG
	.no_dead_strip	_scaler_set_rotation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scaler_set_rotation
_scaler_set_rotation:                   ; @scaler_set_rotation
	.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
Lloh0:
	adrp	x8, _DRM_MODE_ROTATE_90@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_ROTATE_90@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _SCALER_ROT_MODE_90@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCALER_ROT_MODE_90@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
Lloh5:
	adrp	x8, _DRM_MODE_ROTATE_180@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_MODE_ROTATE_180@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _SCALER_ROT_MODE_180@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SCALER_ROT_MODE_180@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x8, _DRM_MODE_ROTATE_270@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DRM_MODE_ROTATE_270@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_8
; %bb.5:
Lloh13:
	adrp	x8, _SCALER_ROT_MODE_270@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SCALER_ROT_MODE_270@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	bl	_SCALER_ROT_CFG_SET_ROTMODE
LBB0_7:
Lloh15:
	adrp	x8, _DRM_MODE_REFLECT_X@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DRM_MODE_REFLECT_X@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _SCALER_ROT_CFG_FLIP_X_EN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SCALER_ROT_CFG_FLIP_X_EN@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w8, w19
	csel	w8, wzr, w9, eq
	orr	w8, w8, w0
Lloh21:
	adrp	x9, _DRM_MODE_REFLECT_Y@GOTPAGE
Lloh22:
	ldr	x9, [x9, _DRM_MODE_REFLECT_Y@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _SCALER_ROT_CFG_FLIP_Y_EN@GOTPAGE
Lloh25:
	ldr	x10, [x10, _SCALER_ROT_CFG_FLIP_Y_EN@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	tst	w9, w19
	csel	w9, wzr, w10, eq
	orr	w0, w8, w9
Lloh27:
	adrp	x8, _SCALER_ROT_CFG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SCALER_ROT_CFG@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_scaler_write
LBB0_8:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_ROTATE_90,4,2         ; @DRM_MODE_ROTATE_90
	.comm	_SCALER_ROT_MODE_90,4,2         ; @SCALER_ROT_MODE_90
	.comm	_DRM_MODE_ROTATE_180,4,2        ; @DRM_MODE_ROTATE_180
	.comm	_SCALER_ROT_MODE_180,4,2        ; @SCALER_ROT_MODE_180
	.comm	_DRM_MODE_ROTATE_270,4,2        ; @DRM_MODE_ROTATE_270
	.comm	_SCALER_ROT_MODE_270,4,2        ; @SCALER_ROT_MODE_270
	.comm	_DRM_MODE_REFLECT_X,4,2         ; @DRM_MODE_REFLECT_X
	.comm	_SCALER_ROT_CFG_FLIP_X_EN,4,2   ; @SCALER_ROT_CFG_FLIP_X_EN
	.comm	_DRM_MODE_REFLECT_Y,4,2         ; @DRM_MODE_REFLECT_Y
	.comm	_SCALER_ROT_CFG_FLIP_Y_EN,4,2   ; @SCALER_ROT_CFG_FLIP_Y_EN
	.comm	_SCALER_ROT_CFG,4,2             ; @SCALER_ROT_CFG
	.no_dead_strip	_scaler_set_rotation
.subsections_via_symbols
