	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7511_wait_for_edid
_adv7511_wait_for_edid:                 ## @adv7511_wait_for_edid
	.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, %ebx
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.7:
	movl	8(%r14), %r15d
	movq	(%r14), %r12
	movl	%ebx, %edi
	callq	_msecs_to_jiffies
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_wait_event_interruptible_timeout
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	cmpq	$0, (%r14)
	cmovnel	%edx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	testl	%ebx, %ebx
	jle	LBB0_6
## %bb.2:
	addl	$25, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_adv7511_irq_process
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, (%r14)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$25, %edi
	callq	_msleep
	addl	$-25, %ebx
	cmpl	$25, %ebx
	jg	LBB0_3
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_adv7511_wait_for_edid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7511_wait_for_edid
_adv7511_wait_for_edid:                 ; @adv7511_wait_for_edid
	.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
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w20, [x19, #8]
	ldr	x21, [x19]
	mov	x0, x1
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_wait_event_interruptible_timeout
LBB0_2:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _EIO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	x8, #0
	csneg	w0, wzr, w9, ne
	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_3:
	cmp	w1, #1
	b.lt	LBB0_2
; %bb.4:
	add	w20, w1, #25
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_adv7511_irq_process
	tbnz	w0, #31, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	cbnz	x8, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #25
	bl	_msleep
	sub	w20, w20, #25
	cmp	w20, #25
	b.gt	LBB0_5
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_adv7511_wait_for_edid
.subsections_via_symbols
