	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_scdc_set_scrambling        ## -- Begin function drm_scdc_set_scrambling
	.p2align	4, 0x90
_drm_scdc_set_scrambling:               ## @drm_scdc_set_scrambling
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_SCDC_TMDS_CONFIG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	callq	_drm_scdc_readb
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_SCDC_SCRAMBLING_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	orl	-28(%rbp), %edx
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	jmp	LBB0_7
LBB0_4:
	notl	%edx
	andl	-28(%rbp), %edx
LBB0_5:
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_drm_scdc_writeb
	movl	%eax, %esi
	movl	$1, %eax
	testl	%esi, %esi
	jns	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	callq	_DRM_DEBUG_KMS
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCDC_TMDS_CONFIG,4,2           ## @SCDC_TMDS_CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read TMDS config: %d\n"

	.comm	_SCDC_SCRAMBLING_ENABLE,4,2     ## @SCDC_SCRAMBLING_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable scrambling: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_scdc_set_scrambling        ; -- Begin function drm_scdc_set_scrambling
	.p2align	2
_drm_scdc_set_scrambling:               ; @drm_scdc_set_scrambling
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _SCDC_TMDS_CONFIG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SCDC_TMDS_CONFIG@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_drm_scdc_readb
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _SCDC_SCRAMBLING_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SCDC_SCRAMBLING_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cbz	w20, LBB0_4
; %bb.2:
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	b	LBB0_5
LBB0_3:
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
LBB0_5:
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_drm_scdc_writeb
	tbnz	w0, #31, LBB0_7
; %bb.6:
	mov	w0, #1
	b	LBB0_9
LBB0_7:
	mov	x1, x0
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_DRM_DEBUG_KMS
	mov	w0, #0
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SCDC_TMDS_CONFIG,4,2           ; @SCDC_TMDS_CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read TMDS config: %d\n"

	.comm	_SCDC_SCRAMBLING_ENABLE,4,2     ; @SCDC_SCRAMBLING_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable scrambling: %d\n"

.subsections_via_symbols
