	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce4_program_fmt               ## -- Begin function dce4_program_fmt
	.p2align	4, 0x90
_dce4_program_fmt:                      ## @dce4_program_fmt
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_radeon_encoder
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_to_radeon_crtc
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_radeon_get_connector_for_encoder
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_radeon_connector
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_radeon_get_monitor_bpc
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
	movq	_RADEON_FMT_DITHER_DISABLE@GOTPCREL(%rip), %r15
LBB0_3:
	movq	_ATOM_DEVICE_LCD_SUPPORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r12)
	je	LBB0_4
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%r12), %rcx
	movq	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_17
## %bb.5:
	movq	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_17
## %bb.6:
	testl	%eax, %eax
	je	LBB0_17
## %bb.7:
	movl	(%r15), %ecx
	cmpl	$8, %eax
	je	LBB0_12
## %bb.8:
	xorl	%esi, %esi
	cmpl	$6, %eax
	jne	LBB0_16
## %bb.9:
	movq	_RADEON_FMT_DITHER_ENABLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_11
## %bb.10:
	movq	_FMT_FRAME_RANDOM_ENABLE@GOTPCREL(%rip), %rax
	movq	_FMT_HIGHPASS_RANDOM_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_FMT_SPATIAL_DITHER_EN@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_12:
	movq	_RADEON_FMT_DITHER_ENABLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_14
## %bb.13:
	movq	_FMT_FRAME_RANDOM_ENABLE@GOTPCREL(%rip), %rax
	movq	_FMT_HIGHPASS_RANDOM_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_FMT_RGB_RANDOM_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_FMT_SPATIAL_DITHER_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_FMT_SPATIAL_DITHER_DEPTH@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_11:
	movq	_FMT_TRUNCATE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_16
LBB0_14:
	movq	_FMT_TRUNCATE_EN@GOTPCREL(%rip), %rax
	movq	_FMT_TRUNCATE_DEPTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_15:
	orl	(%rax), %esi
LBB0_16:
	movq	_FMT_BIT_DEPTH_CONTROL@GOTPCREL(%rip), %rax
	movq	(%r14), %rdi
	addq	(%rax), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_FMT_DITHER_DISABLE,4,2  ## @RADEON_FMT_DITHER_DISABLE
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ## @ATOM_DEVICE_LCD_SUPPORT
	.comm	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1,8,3 ## @ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1
	.comm	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2,8,3 ## @ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2
	.comm	_RADEON_FMT_DITHER_ENABLE,4,2   ## @RADEON_FMT_DITHER_ENABLE
	.comm	_FMT_FRAME_RANDOM_ENABLE,4,2    ## @FMT_FRAME_RANDOM_ENABLE
	.comm	_FMT_HIGHPASS_RANDOM_ENABLE,4,2 ## @FMT_HIGHPASS_RANDOM_ENABLE
	.comm	_FMT_SPATIAL_DITHER_EN,4,2      ## @FMT_SPATIAL_DITHER_EN
	.comm	_FMT_TRUNCATE_EN,4,2            ## @FMT_TRUNCATE_EN
	.comm	_FMT_RGB_RANDOM_ENABLE,4,2      ## @FMT_RGB_RANDOM_ENABLE
	.comm	_FMT_SPATIAL_DITHER_DEPTH,4,2   ## @FMT_SPATIAL_DITHER_DEPTH
	.comm	_FMT_TRUNCATE_DEPTH,4,2         ## @FMT_TRUNCATE_DEPTH
	.comm	_FMT_BIT_DEPTH_CONTROL,8,3      ## @FMT_BIT_DEPTH_CONTROL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce4_program_fmt               ; -- Begin function dce4_program_fmt
	.p2align	2
_dce4_program_fmt:                      ; @dce4_program_fmt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x0
	bl	_to_radeon_encoder
	mov	x20, x0
	ldr	w0, [x21]
	bl	_to_radeon_crtc
	mov	x19, x0
	mov	x0, x21
	bl	_radeon_get_connector_for_encoder
	cbz	x0, LBB0_2
; %bb.1:
	mov	x22, x0
	bl	_to_radeon_connector
	mov	x21, x0
	mov	x0, x22
	bl	_radeon_get_monitor_bpc
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x21, _RADEON_FMT_DITHER_DISABLE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RADEON_FMT_DITHER_DISABLE@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x9, _ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	w0, #0, #4, ne
	b.ne	LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w8, [x21]
	cmp	w0, #8
	b.eq	LBB0_10
; %bb.7:
	cmp	w0, #6
	b.ne	LBB0_13
; %bb.8:
Lloh11:
	adrp	x9, _RADEON_FMT_DITHER_ENABLE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RADEON_FMT_DITHER_ENABLE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.9:
Lloh14:
	adrp	x8, _FMT_FRAME_RANDOM_ENABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FMT_FRAME_RANDOM_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _FMT_HIGHPASS_RANDOM_ENABLE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _FMT_HIGHPASS_RANDOM_ENABLE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _FMT_SPATIAL_DITHER_EN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _FMT_SPATIAL_DITHER_EN@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh22:
	adrp	x9, _RADEON_FMT_DITHER_ENABLE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _RADEON_FMT_DITHER_ENABLE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.11:
Lloh25:
	adrp	x8, _FMT_FRAME_RANDOM_ENABLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FMT_FRAME_RANDOM_ENABLE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _FMT_HIGHPASS_RANDOM_ENABLE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _FMT_HIGHPASS_RANDOM_ENABLE@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh31:
	adrp	x9, _FMT_RGB_RANDOM_ENABLE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _FMT_RGB_RANDOM_ENABLE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh34:
	adrp	x9, _FMT_SPATIAL_DITHER_EN@GOTPAGE
Lloh35:
	ldr	x9, [x9, _FMT_SPATIAL_DITHER_EN@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh37:
	adrp	x9, _FMT_SPATIAL_DITHER_DEPTH@GOTPAGE
Lloh38:
	ldr	x9, [x9, _FMT_SPATIAL_DITHER_DEPTH@GOTPAGEOFF]
LBB0_12:
	ldr	w9, [x9]
	orr	w1, w8, w9
	b	LBB0_16
LBB0_13:
	mov	w1, #0
	b	LBB0_16
LBB0_14:
Lloh39:
	adrp	x8, _FMT_TRUNCATE_EN@GOTPAGE
Lloh40:
	ldr	x8, [x8, _FMT_TRUNCATE_EN@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	b	LBB0_16
LBB0_15:
Lloh42:
	adrp	x8, _FMT_TRUNCATE_EN@GOTPAGE
Lloh43:
	ldr	x8, [x8, _FMT_TRUNCATE_EN@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
Lloh45:
	adrp	x9, _FMT_TRUNCATE_DEPTH@GOTPAGE
Lloh46:
	ldr	x9, [x9, _FMT_TRUNCATE_DEPTH@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	orr	w1, w9, w8
LBB0_16:
Lloh48:
	adrp	x8, _FMT_BIT_DEPTH_CONTROL@GOTPAGE
Lloh49:
	ldr	x8, [x8, _FMT_BIT_DEPTH_CONTROL@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
	ldr	x9, [x19]
	add	x0, x9, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_WREG32
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_FMT_DITHER_DISABLE,4,2  ; @RADEON_FMT_DITHER_DISABLE
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ; @ATOM_DEVICE_LCD_SUPPORT
	.comm	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1,8,3 ; @ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1
	.comm	_ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2,8,3 ; @ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2
	.comm	_RADEON_FMT_DITHER_ENABLE,4,2   ; @RADEON_FMT_DITHER_ENABLE
	.comm	_FMT_FRAME_RANDOM_ENABLE,4,2    ; @FMT_FRAME_RANDOM_ENABLE
	.comm	_FMT_HIGHPASS_RANDOM_ENABLE,4,2 ; @FMT_HIGHPASS_RANDOM_ENABLE
	.comm	_FMT_SPATIAL_DITHER_EN,4,2      ; @FMT_SPATIAL_DITHER_EN
	.comm	_FMT_TRUNCATE_EN,4,2            ; @FMT_TRUNCATE_EN
	.comm	_FMT_RGB_RANDOM_ENABLE,4,2      ; @FMT_RGB_RANDOM_ENABLE
	.comm	_FMT_SPATIAL_DITHER_DEPTH,4,2   ; @FMT_SPATIAL_DITHER_DEPTH
	.comm	_FMT_TRUNCATE_DEPTH,4,2         ; @FMT_TRUNCATE_DEPTH
	.comm	_FMT_BIT_DEPTH_CONTROL,8,3      ; @FMT_BIT_DEPTH_CONTROL
.subsections_via_symbols
