	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdpvr_probe
_hdpvr_probe:                           ## @hdpvr_probe
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$104, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	$0, 8(%rax)
	leaq	24(%rax), %r14
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_v4l2_device_register
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
LBB0_4:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_destroy_workqueue
LBB0_6:
	movq	%r15, %rdi
	callq	_hdpvr_delete
	jmp	LBB0_31
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_31:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	28(%r15), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_mutex_init
	leaq	96(%r15), %rdi
	callq	_mutex_init
	leaq	92(%r15), %rdi
	callq	_mutex_init
	movl	(%r13), %esi
	movl	$64, %edi
	callq	_kmalloc
	movl	%eax, 88(%r15)
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	leaq	84(%r15), %rdi
	callq	_init_waitqueue_head
	leaq	80(%r15), %rdi
	callq	_init_waitqueue_head
	leaq	L_.str.3(%rip), %rdi
	callq	_create_singlethread_workqueue
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:
	leaq	76(%r15), %rdi
	callq	_INIT_LIST_HEAD
	leaq	72(%r15), %rdi
	callq	_INIT_LIST_HEAD
	movq	_hdpvr_default_options@GOTPCREL(%rip), %rax
	movq	16(%rax), %rcx
	movq	%rcx, 64(%r15)
	movups	(%rax), %xmm0
	movups	%xmm0, 48(%r15)
	movq	_default_video_input@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_HDPVR_VIDEO_INPUTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_12
## %bb.11:
	movq	%rax, 64(%r15)
LBB0_12:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_default_audio_input@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_HDPVR_AUDIO_INPUTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_15
## %bb.13:
	movq	%rax, 56(%r15)
	movq	_HDPVR_SPDIF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:
	movq	%r15, %rax
	addq	$48, %rax
	movq	_V4L2_MPEG_AUDIO_ENCODING_AC3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
LBB0_15:
	movq	%r12, %rdi
	callq	_interface_to_usbdev
	movl	%eax, %edi
	callq	_usb_get_dev
	movl	%eax, 40(%r15)
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %r13
	cmpl	$0, 8(%r13)
	jle	LBB0_21
## %bb.16:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%r12
	movslq	8(%r13), %rax
	addq	$8, %rbx
	cmpq	%rax, %r12
	jge	LBB0_21
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 32(%r15)
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	(%r13), %r14
	leaq	(%r14,%rbx), %rdi
	callq	_usb_endpoint_is_bulk_in
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	$8192, (%r15)                   ## imm = 0x2000
	movq	(%r14,%rbx), %rax
	movq	%rax, 32(%r15)
	jmp	LBB0_20
LBB0_21:
	cmpq	$0, 32(%r15)
	je	LBB0_22
## %bb.23:
	movq	%r15, %rdi
	callq	_hdpvr_device_init
	testq	%rax, %rax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_26
## %bb.24:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_25
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
	jmp	LBB0_4
LBB0_22:
	leaq	L_.str.4(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_v4l2_err
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_4
LBB0_26:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_NUM_BUFFERS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hdpvr_alloc_buffers
	movq	%rax, %r13
	movq	%r14, %rdi
	callq	_mutex_unlock
	testq	%r13, %r13
	je	LBB0_28
## %bb.27:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_25
LBB0_28:
	movq	_video_nr@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_dev_nr@GOTPCREL(%rip), %rdi
	callq	_atomic_inc_return
	movl	(%r14,%rax,4), %edx
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_hdpvr_register_videodev
	testq	%rax, %rax
	je	LBB0_30
## %bb.29:
	leaq	L_.str.7(%rip), %rsi
LBB0_25:
	movq	%r12, %rdi
	callq	_v4l2_err
	jmp	LBB0_4
LBB0_30:
	movl	20(%r15), %edi
	callq	_video_device_node_name
	leaq	L_.str.8(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_v4l2_info
	xorl	%ebx, %ebx
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory"

L_.str.1:                               ## @.str.1
	.asciz	"v4l2_device_register failed"

L_.str.2:                               ## @.str.2
	.asciz	"Out of memory\n"

L_.str.3:                               ## @.str.3
	.asciz	"hdpvr_buffer"

	.comm	_hdpvr_default_options,24,3     ## @hdpvr_default_options
	.comm	_default_video_input,8,3        ## @default_video_input
	.comm	_HDPVR_VIDEO_INPUTS,8,3         ## @HDPVR_VIDEO_INPUTS
	.comm	_default_audio_input,8,3        ## @default_audio_input
	.comm	_HDPVR_AUDIO_INPUTS,8,3         ## @HDPVR_AUDIO_INPUTS
	.comm	_HDPVR_SPDIF,8,3                ## @HDPVR_SPDIF
	.comm	_V4L2_MPEG_AUDIO_ENCODING_AC3,4,2 ## @V4L2_MPEG_AUDIO_ENCODING_AC3
L_.str.4:                               ## @.str.4
	.asciz	"Could not find bulk-in endpoint\n"

L_.str.5:                               ## @.str.5
	.asciz	"device init failed\n"

	.comm	_NUM_BUFFERS,4,2                ## @NUM_BUFFERS
L_.str.6:                               ## @.str.6
	.asciz	"allocating transfer buffers failed\n"

	.comm	_video_nr,8,3                   ## @video_nr
	.comm	_dev_nr,4,2                     ## @dev_nr
L_.str.7:                               ## @.str.7
	.asciz	"registering videodev failed\n"

L_.str.8:                               ## @.str.8
	.asciz	"device now attached to %s\n"

	.no_dead_strip	_hdpvr_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdpvr_probe
_hdpvr_probe:                           ; @hdpvr_probe
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
Lloh3:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w0, #104
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	xzr, [x0, #8]
	add	x21, x0, #24
	mov	x0, x22
	mov	x1, x21
	bl	_v4l2_device_register
	cbz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_err
	ldr	x0, [x20, #8]
	cbnz	x0, LBB0_27
	b	LBB0_28
LBB0_3:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
	b	LBB0_29
LBB0_4:
	add	x23, x20, #28
	mov	x0, x23
	bl	_mutex_init
	add	x0, x20, #96
	bl	_mutex_init
	add	x0, x20, #92
	bl	_mutex_init
	ldr	w1, [x24]
	mov	w0, #64
	bl	_kmalloc
	str	w0, [x20, #88]
	cbz	w0, LBB0_20
; %bb.5:
	add	x0, x20, #84
	bl	_init_waitqueue_head
	add	x0, x20, #80
	bl	_init_waitqueue_head
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_create_singlethread_workqueue
	str	x0, [x20, #8]
	cbz	x0, LBB0_28
; %bb.6:
	add	x0, x20, #76
	bl	_INIT_LIST_HEAD
	add	x0, x20, #72
	bl	_INIT_LIST_HEAD
Lloh11:
	adrp	x8, _hdpvr_default_options@GOTPAGE
Lloh12:
	ldr	x8, [x8, _hdpvr_default_options@GOTPAGEOFF]
	ldr	q0, [x8]
	str	q0, [x20, #48]
	ldr	x8, [x8, #16]
Lloh13:
	adrp	x9, _default_video_input@GOTPAGE
Lloh14:
	ldr	x9, [x9, _default_video_input@GOTPAGEOFF]
	str	x8, [x20, #64]
Lloh15:
	ldr	x8, [x9]
Lloh16:
	adrp	x9, _HDPVR_VIDEO_INPUTS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _HDPVR_VIDEO_INPUTS@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.7:
	str	x8, [x20, #64]
LBB0_8:
Lloh19:
	adrp	x8, _default_audio_input@GOTPAGE
Lloh20:
	ldr	x8, [x8, _default_audio_input@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
Lloh22:
	adrp	x9, _HDPVR_AUDIO_INPUTS@GOTPAGE
Lloh23:
	ldr	x9, [x9, _HDPVR_AUDIO_INPUTS@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_11
; %bb.9:
	str	x8, [x20, #56]
Lloh25:
	adrp	x9, _HDPVR_SPDIF@GOTPAGE
Lloh26:
	ldr	x9, [x9, _HDPVR_SPDIF@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	add	x8, x20, #48
Lloh28:
	adrp	x9, _V4L2_MPEG_AUDIO_ENCODING_AC3@GOTPAGE
Lloh29:
	ldr	x9, [x9, _V4L2_MPEG_AUDIO_ENCODING_AC3@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	str	w9, [x8]
LBB0_11:
	mov	x0, x22
	bl	_interface_to_usbdev
	bl	_usb_get_dev
	str	w0, [x20, #40]
	ldr	x24, [x22, #8]
	ldr	w8, [x24, #8]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.12:
	mov	x25, #0
	mov	x26, #0
	mov	w27, #8192
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x24, #8]
	add	x25, x25, #8
	cmp	x26, x8
	b.ge	LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x28, [x24]
	add	x0, x28, x25
	bl	_usb_endpoint_is_bulk_in
	cbz	x0, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	str	x27, [x20]
	ldr	x8, [x28, x25]
	str	x8, [x20, #32]
	b	LBB0_13
LBB0_17:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_21
; %bb.18:
	mov	x0, x20
	bl	_hdpvr_device_init
	cbz	x0, LBB0_22
; %bb.19:
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_26
LBB0_20:
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_26
LBB0_21:
Lloh35:
	adrp	x1, l_.str.4@PAGE
Lloh36:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_26
LBB0_22:
	mov	x0, x23
	bl	_mutex_lock
Lloh37:
	adrp	x8, _NUM_BUFFERS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _NUM_BUFFERS@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_hdpvr_alloc_buffers
	mov	x24, x0
	mov	x0, x23
	bl	_mutex_unlock
	cbz	x24, LBB0_24
; %bb.23:
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_26
LBB0_24:
Lloh42:
	adrp	x8, _video_nr@GOTPAGE
Lloh43:
	ldr	x8, [x8, _video_nr@GOTPAGEOFF]
Lloh44:
	ldr	x23, [x8]
Lloh45:
	adrp	x0, _dev_nr@GOTPAGE
Lloh46:
	ldr	x0, [x0, _dev_nr@GOTPAGEOFF]
	bl	_atomic_inc_return
	ldr	w2, [x23, x0, lsl #2]
	mov	x0, x20
	mov	x1, x22
	bl	_hdpvr_register_videodev
	cbz	x0, LBB0_30
; %bb.25:
Lloh47:
	adrp	x1, l_.str.7@PAGE
Lloh48:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_26:
	mov	x0, x21
	bl	_v4l2_err
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_28
LBB0_27:
	bl	_destroy_workqueue
LBB0_28:
	mov	x0, x20
	bl	_hdpvr_delete
LBB0_29:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_30:
	ldr	w0, [x20, #20]
	bl	_video_device_node_name
	mov	x2, x0
Lloh49:
	adrp	x1, l_.str.8@PAGE
Lloh50:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x21
	bl	_v4l2_info
	mov	w19, #0
	b	LBB0_29
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory"

l_.str.1:                               ; @.str.1
	.asciz	"v4l2_device_register failed"

l_.str.2:                               ; @.str.2
	.asciz	"Out of memory\n"

l_.str.3:                               ; @.str.3
	.asciz	"hdpvr_buffer"

	.comm	_hdpvr_default_options,24,3     ; @hdpvr_default_options
	.comm	_default_video_input,8,3        ; @default_video_input
	.comm	_HDPVR_VIDEO_INPUTS,8,3         ; @HDPVR_VIDEO_INPUTS
	.comm	_default_audio_input,8,3        ; @default_audio_input
	.comm	_HDPVR_AUDIO_INPUTS,8,3         ; @HDPVR_AUDIO_INPUTS
	.comm	_HDPVR_SPDIF,8,3                ; @HDPVR_SPDIF
	.comm	_V4L2_MPEG_AUDIO_ENCODING_AC3,4,2 ; @V4L2_MPEG_AUDIO_ENCODING_AC3
l_.str.4:                               ; @.str.4
	.asciz	"Could not find bulk-in endpoint\n"

l_.str.5:                               ; @.str.5
	.asciz	"device init failed\n"

	.comm	_NUM_BUFFERS,4,2                ; @NUM_BUFFERS
l_.str.6:                               ; @.str.6
	.asciz	"allocating transfer buffers failed\n"

	.comm	_video_nr,8,3                   ; @video_nr
	.comm	_dev_nr,4,2                     ; @dev_nr
l_.str.7:                               ; @.str.7
	.asciz	"registering videodev failed\n"

l_.str.8:                               ; @.str.8
	.asciz	"device now attached to %s\n"

	.no_dead_strip	_hdpvr_probe
.subsections_via_symbols
