	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvb_video_get_event
_dvb_video_get_event:                   ## @dvb_video_get_event
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpq	$0, 40(%rdi)
	je	LBB0_2
## %bb.1:
	movq	$0, 40(%rbx)
	movq	_EOVERFLOW@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_2:
	movq	%rsi, %r15
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jne	LBB0_7
## %bb.3:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_6
## %bb.4:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_6:
	movl	32(%rbx), %edi
	xorl	%esi, %esi
	callq	_wait_event_interruptible
	testl	%eax, %eax
	js	LBB0_11
LBB0_7:
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	8(%rbx), %rsi
	shlq	$2, %rsi
	addq	24(%rbx), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	8(%rbx), %rax
	incq	%rax
	movq	_MAX_VIDEO_EVENT@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_8
## %bb.9:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_10
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_10:
	movq	%rdx, 8(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_EWOULDBLOCK,4,2                ## @EWOULDBLOCK
	.comm	_MAX_VIDEO_EVENT,4,2            ## @MAX_VIDEO_EVENT
	.no_dead_strip	_dvb_video_get_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvb_video_get_event
_dvb_video_get_event:                   ; @dvb_video_get_event
	.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, #40]
	cbz	x8, LBB0_3
; %bb.1:
	str	xzr, [x19, #40]
Lloh0:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_3:
	mov	x20, x1
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
Lloh2:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _EWOULDBLOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EWOULDBLOCK@GOTPAGEOFF]
	b	LBB0_2
LBB0_6:
	ldr	w0, [x19, #32]
	mov	w1, #0
	bl	_wait_event_interruptible
	tbnz	w0, #31, LBB0_8
LBB0_7:
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	x8, [x19, #24]
	ldr	x9, [x19, #8]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x19, #8]
	add	x8, x8, #1
Lloh7:
	adrp	x9, _MAX_VIDEO_EVENT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAX_VIDEO_EVENT@GOTPAGEOFF]
Lloh9:
	ldrsw	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x19, #8]
	mov	x0, x21
	bl	_spin_unlock_bh
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_EWOULDBLOCK,4,2                ; @EWOULDBLOCK
	.comm	_MAX_VIDEO_EVENT,4,2            ; @MAX_VIDEO_EVENT
	.no_dead_strip	_dvb_video_get_event
.subsections_via_symbols
