	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AVIFILE_GetFileHandlerByExtension
_AVIFILE_GetFileHandlerByExtension:     ## @AVIFILE_GetFileHandlerByExtension
	.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
	subq	$536, %rsp                      ## imm = 0x218
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$46, %esi
	callq	_wcsrchr
	movq	%rax, %rbx
	leaq	-544(%rbp), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, -548(%rbp)
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	addq	$4, %rbx
	leaq	L_.str(%rip), %rsi
	leaq	-144(%rbp), %r15
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_wsprintfA
	movq	_HKEY_CLASSES_ROOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-544(%rbp), %rdx
	leaq	-548(%rbp), %rcx
	movq	%r15, %rsi
	callq	_RegQueryValueA
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	leaq	-544(%rbp), %rdi
	movl	%r14d, %esi
	callq	_AVIFILE_CLSIDFromString
	movq	%rax, %rcx
	movq	_S_OK@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	sete	%al
	jmp	LBB0_4
LBB0_1:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$536, %rsp                      ## imm = 0x218
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AVIFile\\Extensions\\%.3ls"

	.comm	_HKEY_CLASSES_ROOT,4,2          ## @HKEY_CLASSES_ROOT
	.comm	_ERROR_SUCCESS,8,3              ## @ERROR_SUCCESS
	.comm	_S_OK,8,3                       ## @S_OK
	.no_dead_strip	_AVIFILE_GetFileHandlerByExtension
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AVIFILE_GetFileHandlerByExtension
_AVIFILE_GetFileHandlerByExtension:     ; @AVIFILE_GetFileHandlerByExtension
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #512
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	w1, #46
	bl	_wcsrchr
	mov	x20, x0
	add	x0, sp, #4
	bl	_ARRAY_SIZE
	str	w0, [sp]
	cbz	x20, LBB0_3
; %bb.1:
	add	x2, x20, #4
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	sub	x0, x29, #140
	bl	_wsprintfA
Lloh5:
	adrp	x8, _HKEY_CLASSES_ROOT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HKEY_CLASSES_ROOT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	sub	x1, x29, #140
	add	x2, sp, #4
	mov	x3, sp
	bl	_RegQueryValueA
Lloh8:
	adrp	x8, _ERROR_SUCCESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR_SUCCESS@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
	add	x0, sp, #4
	mov	x1, x19
	bl	_AVIFILE_CLSIDFromString
Lloh11:
	adrp	x8, _S_OK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	b	LBB0_4
LBB0_3:
Lloh14:
	adrp	x8, _FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
LBB0_4:
	ldur	x8, [x29, #-40]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	add	sp, sp, #512
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AVIFile\\Extensions\\%.3ls"

	.comm	_HKEY_CLASSES_ROOT,4,2          ; @HKEY_CLASSES_ROOT
	.comm	_ERROR_SUCCESS,8,3              ; @ERROR_SUCCESS
	.comm	_S_OK,8,3                       ; @S_OK
	.no_dead_strip	_AVIFILE_GetFileHandlerByExtension
.subsections_via_symbols
