	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hw_device_init_from_string     ## -- Begin function hw_device_init_from_string
	.p2align	4, 0x90
_hw_device_init_from_string:            ## @hw_device_init_from_string
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	$0, -72(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -48(%rbp)
	leaq	L_.str(%rip), %rsi
	callq	_strcspn
	movq	%rax, %rbx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_av_strndup
	movq	%rax, -88(%rbp)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rdi
	callq	_av_hwdevice_find_type_by_name
	movl	%eax, %r15d
	movq	_AV_HWDEVICE_TYPE_NONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %r8
LBB0_5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.9(%rip), %rdx
	xorl	%edi, %edi
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_32
LBB0_6:
	addq	%r13, %rbx
	cmpb	$61, (%rbx)
	jne	LBB0_10
## %bb.7:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	leaq	1(%rbx), %r12
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcspn
	movq	%rax, %r14
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_av_strndup
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_1
## %bb.8:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_hw_device_get_by_name
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	leaq	L_.str.3(%rip), %r8
	jmp	LBB0_5
LBB0_10:
	movl	%r15d, %edi
	callq	_hw_device_default_name
	movq	%rax, %r12
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_1
LBB0_11:
	addq	%r14, %rbx
	incq	%rbx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_12:
	movb	(%rbx), %al
	cmpb	$64, %al
	je	LBB0_33
## %bb.13:
	cmpb	$58, %al
	je	LBB0_17
## %bb.14:
	testb	%al, %al
	jne	LBB0_15
## %bb.16:
	leaq	-48(%rbp), %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_26
LBB0_33:
	incq	%rbx
	movq	%rbx, %rdi
	callq	_hw_device_get_by_name
	testq	%rax, %rax
	je	LBB0_34
## %bb.35:
	movq	16(%rax), %rdx
	leaq	-48(%rbp), %rdi
	movl	%r15d, %esi
	xorl	%ecx, %ecx
	callq	_av_hwdevice_ctx_create_derived
	jmp	LBB0_27
LBB0_17:
	incq	%rbx
	movq	%rbx, %rdi
	movl	$44, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_24
## %bb.18:
	movq	%rax, %rsi
	subq	%rbx, %rsi
	testq	%rsi, %rsi
	jle	LBB0_19
## %bb.20:
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	callq	_av_strndup
	movq	%rax, %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, -80(%rbp)
	testq	%rbx, %rbx
	jne	LBB0_21
	jmp	LBB0_1
LBB0_15:
	leaq	L_.str.8(%rip), %r8
	jmp	LBB0_5
LBB0_34:
	leaq	L_.str.7(%rip), %r8
	jmp	LBB0_5
LBB0_24:
	xorl	%ecx, %ecx
	cmpb	$0, (%rbx)
	cmoveq	%rcx, %rbx
	jmp	LBB0_25
LBB0_19:
	xorl	%ebx, %ebx
LBB0_21:
	incq	%rax
	leaq	L_.str.4(%rip), %rdx
	leaq	L_.str.5(%rip), %rcx
	leaq	-72(%rbp), %rdi
	movq	%rax, %rsi
	xorl	%r8d, %r8d
	callq	_av_dict_parse_string
	testl	%eax, %eax
	js	LBB0_22
## %bb.23:
	movq	-72(%rbp), %rcx
LBB0_25:
	leaq	-48(%rbp), %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
LBB0_26:
	xorl	%r8d, %r8d
	callq	_av_hwdevice_ctx_create
LBB0_27:
	testl	%eax, %eax
	js	LBB0_2
## %bb.28:
	xorl	%eax, %eax
	callq	_hw_device_add
	testq	%rax, %rax
	je	LBB0_1
## %bb.29:
	movq	%r12, (%rax)
	movl	%r15d, 8(%rax)
	movq	-48(%rbp), %rcx
	movq	%rcx, 16(%rax)
	testq	%r14, %r14
	je	LBB0_31
## %bb.30:
	movq	%rax, (%r14)
LBB0_31:
	movq	$0, -56(%rbp)
	xorl	%ebx, %ebx
	jmp	LBB0_32
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_2:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.10(%rip), %rdx
	xorl	%edi, %edi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_av_log
	leaq	-48(%rbp), %rdi
	callq	_av_buffer_unref
LBB0_32:
	leaq	-88(%rbp), %rdi
	callq	_av_freep
	leaq	-56(%rbp), %rdi
	callq	_av_freep
	leaq	-80(%rbp), %rdi
	callq	_av_freep
	leaq	-72(%rbp), %rdi
	callq	_av_dict_free
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	leaq	L_.str.6(%rip), %r8
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	":=@"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_HWDEVICE_TYPE_NONE,4,2      ## @AV_HWDEVICE_TYPE_NONE
L_.str.1:                               ## @.str.1
	.asciz	"unknown device type"

L_.str.2:                               ## @.str.2
	.asciz	":@"

L_.str.3:                               ## @.str.3
	.asciz	"named device already exists"

L_.str.4:                               ## @.str.4
	.asciz	"="

L_.str.5:                               ## @.str.5
	.asciz	","

L_.str.6:                               ## @.str.6
	.asciz	"failed to parse options"

L_.str.7:                               ## @.str.7
	.asciz	"invalid source device name"

L_.str.8:                               ## @.str.8
	.asciz	"parse error"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.9:                               ## @.str.9
	.asciz	"Invalid device specification \"%s\": %s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.10:                              ## @.str.10
	.asciz	"Device creation failed: %d.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hw_device_init_from_string     ; -- Begin function hw_device_init_from_string
	.p2align	2
_hw_device_init_from_string:            ; @hw_device_init_from_string
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x1
	mov	x21, x0
	str	xzr, [sp, #56]
	stp	xzr, xzr, [sp, #32]
	str	xzr, [sp, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcspn
	mov	x22, x0
	mov	x0, x21
	mov	x1, x22
	bl	_av_strndup
	str	x0, [sp, #48]
	cbz	x0, LBB0_31
; %bb.1:
	bl	_av_hwdevice_find_type_by_name
Lloh2:
	adrp	x8, _AV_HWDEVICE_TYPE_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_HWDEVICE_TYPE_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
LBB0_3:
Lloh7:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x9]
	stp	x21, x8, [sp]
Lloh10:
	adrp	x2, l_.str.9@PAGE
Lloh11:
	add	x2, x2, l_.str.9@PAGEOFF
	mov	x0, #0
	bl	_av_log
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
	b	LBB0_33
LBB0_4:
	mov	x20, x0
	add	x24, x21, x22
	ldrb	w8, [x24]
	cmp	w8, #61
	b.ne	LBB0_8
; %bb.5:
	add	x22, x24, #1
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_strcspn
	mov	x23, x0
	mov	x0, x22
	mov	x1, x23
	bl	_av_strndup
	str	x0, [sp, #40]
	cbz	x0, LBB0_31
; %bb.6:
	mov	x22, x0
	bl	_hw_device_get_by_name
	cbz	x0, LBB0_9
; %bb.7:
Lloh17:
	adrp	x8, l_.str.3@PAGE
Lloh18:
	add	x8, x8, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_8:
	mov	x0, x20
	bl	_hw_device_default_name
	mov	x22, x0
	str	x0, [sp, #40]
	cbnz	x0, LBB0_10
	b	LBB0_31
LBB0_9:
	add	x8, x23, x24
	add	x24, x8, #1
LBB0_10:
	ldrb	w8, [x24]
	cmp	w8, #64
	b.eq	LBB0_14
; %bb.11:
	cmp	w8, #58
	b.eq	LBB0_16
; %bb.12:
	cbnz	w8, LBB0_19
; %bb.13:
	add	x0, sp, #24
	mov	x1, x20
	mov	x2, #0
	mov	x3, #0
	b	LBB0_26
LBB0_14:
	add	x0, x24, #1
	bl	_hw_device_get_by_name
	cbz	x0, LBB0_20
; %bb.15:
	ldr	x2, [x0, #16]
	add	x0, sp, #24
	mov	x1, x20
	mov	w3, #0
	bl	_av_hwdevice_ctx_create_derived
	tbz	w0, #31, LBB0_27
	b	LBB0_32
LBB0_16:
	add	x23, x24, #1
	mov	x0, x23
	mov	w1, #44
	bl	_strchr
	cbz	x0, LBB0_21
; %bb.17:
	mov	x24, x0
	sub	x1, x0, x23
	cmp	x1, #1
	b.lt	LBB0_22
; %bb.18:
	mov	x0, x23
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_av_strndup
	mov	x23, x0
	str	x0, [sp, #32]
	cbnz	x0, LBB0_23
	b	LBB0_31
LBB0_19:
Lloh19:
	adrp	x8, l_.str.8@PAGE
Lloh20:
	add	x8, x8, l_.str.8@PAGEOFF
	b	LBB0_3
LBB0_20:
Lloh21:
	adrp	x8, l_.str.7@PAGE
Lloh22:
	add	x8, x8, l_.str.7@PAGEOFF
	b	LBB0_3
LBB0_21:
	mov	x3, #0
	ldrb	w8, [x23]
	cmp	w8, #0
	csel	x23, xzr, x23, eq
	b	LBB0_25
LBB0_22:
	mov	x23, #0
LBB0_23:
	add	x1, x24, #1
Lloh23:
	adrp	x2, l_.str.4@PAGE
Lloh24:
	add	x2, x2, l_.str.4@PAGEOFF
Lloh25:
	adrp	x3, l_.str.5@PAGE
Lloh26:
	add	x3, x3, l_.str.5@PAGEOFF
	add	x0, sp, #56
	mov	w4, #0
	bl	_av_dict_parse_string
	tbnz	w0, #31, LBB0_34
; %bb.24:
	ldr	x3, [sp, #56]
LBB0_25:
	add	x0, sp, #24
	mov	x1, x20
	mov	x2, x23
LBB0_26:
	mov	w4, #0
	bl	_av_hwdevice_ctx_create
	tbnz	w0, #31, LBB0_32
LBB0_27:
	bl	_hw_device_add
	cbz	x0, LBB0_31
; %bb.28:
	str	x22, [x0]
	str	w20, [x0, #8]
	ldr	x8, [sp, #24]
	str	x8, [x0, #16]
	cbz	x19, LBB0_30
; %bb.29:
	str	x0, [x19]
LBB0_30:
	mov	w21, #0
	str	xzr, [sp, #40]
	b	LBB0_33
LBB0_31:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_32:
	mov	x21, x0
Lloh30:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	str	x21, [sp]
Lloh33:
	adrp	x2, l_.str.10@PAGE
Lloh34:
	add	x2, x2, l_.str.10@PAGEOFF
	mov	x0, #0
	bl	_av_log
	add	x0, sp, #24
	bl	_av_buffer_unref
LBB0_33:
	add	x0, sp, #48
	bl	_av_freep
	add	x0, sp, #40
	bl	_av_freep
	add	x0, sp, #32
	bl	_av_freep
	add	x0, sp, #56
	bl	_av_dict_free
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_34:
Lloh35:
	adrp	x8, l_.str.6@PAGE
Lloh36:
	add	x8, x8, l_.str.6@PAGEOFF
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	":=@"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_HWDEVICE_TYPE_NONE,4,2      ; @AV_HWDEVICE_TYPE_NONE
l_.str.1:                               ; @.str.1
	.asciz	"unknown device type"

l_.str.2:                               ; @.str.2
	.asciz	":@"

l_.str.3:                               ; @.str.3
	.asciz	"named device already exists"

l_.str.4:                               ; @.str.4
	.asciz	"="

l_.str.5:                               ; @.str.5
	.asciz	","

l_.str.6:                               ; @.str.6
	.asciz	"failed to parse options"

l_.str.7:                               ; @.str.7
	.asciz	"invalid source device name"

l_.str.8:                               ; @.str.8
	.asciz	"parse error"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.9:                               ; @.str.9
	.asciz	"Invalid device specification \"%s\": %s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.10:                              ; @.str.10
	.asciz	"Device creation failed: %d.\n"

.subsections_via_symbols
