	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ast_get_modes
_ast_get_modes:                         ## @ast_get_modes
	.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, %r15
	callq	_to_ast_connector
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	(%rax), %r12
	movq	(%r12), %rax
	movq	_AST_TX_DP501@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movl	$255, 8(%r12)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$128, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	(%r15), %rdi
	movq	%rax, %rsi
	callq	_ast_dp501_read_edid
	testl	%eax, %eax
	je	LBB0_4
## %bb.10:
	movq	(%r15), %rdi
	callq	_ast_get_dp501_max_clk
	movl	%eax, 8(%r12)
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_5:
	movq	8(%r14), %rsi
	movq	%r15, %rdi
	callq	_drm_get_edid
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_drm_connector_update_edid_property
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_add_edid_modes
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %eax
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_drm_connector_update_edid_property
LBB0_8:
	movl	%ebx, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AST_TX_DP501,8,3               ## @AST_TX_DP501
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ast_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ast_get_modes
_ast_get_modes:                         ; @ast_get_modes
	.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
	bl	_to_ast_connector
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x22, [x8]
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _AST_TX_DP501@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AST_TX_DP501@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	mov	w8, #255
	str	w8, [x22, #8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #128
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	x0, [x19]
	mov	x1, x21
	bl	_ast_dp501_read_edid
	cbz	w0, LBB0_5
; %bb.3:
	ldr	x0, [x19]
	bl	_ast_get_dp501_max_clk
	str	w0, [x22, #8]
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	x0, x21
	bl	_kfree
LBB0_6:
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_drm_get_edid
	mov	x21, x0
	cbz	x0, LBB0_8
LBB0_7:
	mov	x0, x20
	mov	x1, x21
	bl	_drm_connector_update_edid_property
	mov	x0, x19
	mov	x1, x21
	bl	_drm_add_edid_modes
	mov	x19, x0
	mov	x0, x21
	bl	_kfree
	mov	x0, x19
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	mov	x1, #0
	bl	_drm_connector_update_edid_property
	mov	w0, #0
LBB0_9:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_AST_TX_DP501,8,3               ; @AST_TX_DP501
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ast_get_modes
.subsections_via_symbols
