	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdn_dp_set_firmware_active     ## -- Begin function cdn_dp_set_firmware_active
	.p2align	4, 0x90
_cdn_dp_set_firmware_active:            ## @cdn_dp_set_firmware_active
	.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
	movl	%esi, %eax
	movq	%rdi, %r14
	movq	_GENERAL_MAIN_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_MB_MODULE_ID_GENERAL@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_FW_STANDBY@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_FW_ACTIVE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rcx), %ebx
	movl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.4:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.6:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.7:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.8:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.9:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.10:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.11:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.12:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.13:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.14:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.15:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.16:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.17:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.18:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.19:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.20:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.21:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.22:
	movq	%r14, %rdi
	callq	_cdp_dp_mailbox_write
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_26
LBB0_23:
	testl	%r12d, %r12d
	jns	LBB0_25
LBB0_24:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_ERROR
LBB0_25:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.27:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.28:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.29:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.30:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.31:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.32:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.33:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.34:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.35:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.36:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.37:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.38:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.39:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.40:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.41:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.42:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.43:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.44:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	testl	%eax, %eax
	js	LBB0_47
## %bb.45:
	movq	%r14, %rdi
	callq	_cdn_dp_mailbox_read
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jns	LBB0_25
LBB0_47:
	movl	%eax, %r12d
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_GENERAL_MAIN_CONTROL,4,2       ## @GENERAL_MAIN_CONTROL
	.comm	_MB_MODULE_ID_GENERAL,4,2       ## @MB_MODULE_ID_GENERAL
	.comm	_FW_ACTIVE,4,2                  ## @FW_ACTIVE
	.comm	_FW_STANDBY,4,2                 ## @FW_STANDBY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set firmware active failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdn_dp_set_firmware_active     ; -- Begin function cdn_dp_set_firmware_active
	.p2align	2
_cdn_dp_set_firmware_active:            ; @cdn_dp_set_firmware_active
	.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	x19, x0
Lloh0:
	adrp	x8, _GENERAL_MAIN_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GENERAL_MAIN_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MB_MODULE_ID_GENERAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MB_MODULE_ID_GENERAL@GOTPAGEOFF]
Lloh5:
	adrp	x10, _FW_ACTIVE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _FW_ACTIVE@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x9]
Lloh8:
	adrp	x9, _FW_STANDBY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FW_STANDBY@GOTPAGEOFF]
	cmp	w1, #0
	csel	x9, x9, x10, eq
	ldr	w21, [x9]
	mov	x1, x8
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.5:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.6:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.7:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.8:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.9:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.10:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.11:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.12:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.13:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.14:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.15:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.16:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.17:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.18:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.19:
	mov	x0, x19
	bl	_cdp_dp_mailbox_write
	mov	x20, x0
	cbz	w0, LBB0_23
LBB0_20:
	tbz	w20, #31, LBB0_22
LBB0_21:
	ldr	w0, [x19]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
LBB0_22:
	mov	x0, x20
	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_23:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.24:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.25:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.26:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.27:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.28:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.29:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.30:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.31:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.32:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.33:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.34:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.35:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.36:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.37:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.38:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.39:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.40:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.41:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.42:
	mov	x0, x19
	bl	_cdn_dp_mailbox_read
	tbnz	w0, #31, LBB0_44
; %bb.43:
	mov	w20, #0
	b	LBB0_22
LBB0_44:
	mov	x20, x0
	b	LBB0_21
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GENERAL_MAIN_CONTROL,4,2       ; @GENERAL_MAIN_CONTROL
	.comm	_MB_MODULE_ID_GENERAL,4,2       ; @MB_MODULE_ID_GENERAL
	.comm	_FW_ACTIVE,4,2                  ; @FW_ACTIVE
	.comm	_FW_STANDBY,4,2                 ; @FW_STANDBY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set firmware active failed\n"

.subsections_via_symbols
