	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function patch_generic_hdmi
_patch_generic_hdmi:                    ## @patch_generic_hdmi
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	movl	$4, %esi
	callq	_hdmi_array_init
	cmpl	$-2138691577, (%rbx)            ## imm = 0x80862807
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_intel_haswell_enable_all_pins
	movq	%rbx, %rdi
	callq	_intel_haswell_fixup_enable_dp12
LBB0_5:
	movq	%rbx, %rdi
	callq	_hdmi_parse_codec
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	movq	_generic_hdmi_patch_ops@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	cmpl	$-2138691577, (%rbx)            ## imm = 0x80862807
	jne	LBB0_9
## %bb.8:
	movq	_haswell_set_power_state@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
LBB0_9:
	movq	%rbx, %rdi
	callq	_generic_hdmi_init_per_pins
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_init_channel_allocations
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	$0, 8(%rbx)
	movq	%r14, %rdi
	callq	_kfree
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_generic_hdmi_patch_ops,4,2     ## @generic_hdmi_patch_ops
	.comm	_haswell_set_power_state,4,2    ## @haswell_set_power_state
	.no_dead_strip	_patch_generic_hdmi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function patch_generic_hdmi
_patch_generic_hdmi:                    ; @patch_generic_hdmi
	.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, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	mov	w21, #10247
	movk	w21, #32902, lsl #16
	str	x0, [x19, #8]
	mov	w1, #4
	bl	_hdmi_array_init
	ldr	w8, [x19]
	cmp	w8, w21
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_intel_haswell_enable_all_pins
	mov	x0, x19
	bl	_intel_haswell_fixup_enable_dp12
LBB0_3:
	mov	x0, x19
	bl	_hdmi_parse_codec
	tbnz	x0, #63, LBB0_8
; %bb.4:
Lloh3:
	adrp	x8, _generic_hdmi_patch_ops@GOTPAGE
Lloh4:
	ldr	x8, [x8, _generic_hdmi_patch_ops@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	w8, [x19]
	cmp	w8, w21
	b.ne	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _haswell_set_power_state@GOTPAGE
Lloh7:
	ldr	x8, [x8, _haswell_set_power_state@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_6:
	mov	x0, x19
	bl	_generic_hdmi_init_per_pins
	bl	_init_channel_allocations
	mov	w0, #0
	b	LBB0_10
LBB0_7:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
	str	xzr, [x19, #8]
	mov	x0, x20
	bl	_kfree
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_generic_hdmi_patch_ops,4,2     ; @generic_hdmi_patch_ops
	.comm	_haswell_set_power_state,4,2    ; @haswell_set_power_state
	.no_dead_strip	_patch_generic_hdmi
.subsections_via_symbols
