	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwc_video_poll
_pwc_video_poll:                        ## @pwc_video_poll
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	callq	_video_get_drvdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	leaq	20(%rax), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_pwc_isoc_init
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.4:
	movq	%r12, %rsi
	addq	$16, %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_poll_wait
	cmpq	$0, 8(%r12)
	je	LBB0_6
## %bb.5:
	movq	_POLLERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_9
LBB0_1:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, (%r12)
	je	LBB0_7
## %bb.8:
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_POLLERR,4,2                    ## @POLLERR
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.no_dead_strip	_pwc_video_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwc_video_poll
_pwc_video_poll:                        ; @pwc_video_poll
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x1
	bl	_video_get_drvdata
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
	add	x23, x0, #20
	mov	x0, x23
	bl	_mutex_lock
	mov	x0, x21
	bl	_pwc_isoc_init
	mov	x22, x0
	mov	x0, x23
	bl	_mutex_unlock
	cbnz	w22, LBB0_6
; %bb.3:
	add	x1, x21, #16
	mov	x0, x20
	mov	x2, x19
	bl	_poll_wait
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_7
; %bb.4:
Lloh0:
	adrp	x8, _POLLERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POLLERR@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _EFAULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x21]
	cbz	x8, LBB0_9
; %bb.8:
Lloh6:
	adrp	x8, _POLLIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _POLLRDNORM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _POLLRDNORM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w22, w9, w8
	b	LBB0_6
LBB0_9:
	mov	w22, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_POLLERR,4,2                    ; @POLLERR
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.no_dead_strip	_pwc_video_poll
.subsections_via_symbols
