	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alc_determine_headset_type
_alc_determine_headset_type:            ## @alc_determine_headset_type
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movl	(%rdi), %eax
	movq	_ALC_HEADSET_TYPE_OMTP@GOTPCREL(%rip), %r12
	leaq	L_.str.2(%rip), %r14
	cmpl	$283902595, %eax                ## imm = 0x10EC0283
	je	LBB0_5
## %bb.1:
	cmpl	$283903592, %eax                ## imm = 0x10EC0668
	je	LBB0_4
## %bb.2:
	cmpl	$283902610, %eax                ## imm = 0x10EC0292
	jne	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	movl	$107, %esi
	movl	$54313, %edx                    ## imm = 0xD429
	callq	_alc_write_coef_idx
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep
	movq	%rbx, %rdi
	movl	$108, %esi
	callq	_alc_read_coef_idx
	notl	%eax
	testb	$28, %al
	je	LBB0_6
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	movl	$69, %esi
	movl	$53289, %edx                    ## imm = 0xD029
	callq	_alc_write_coef_idx
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep
	movq	%rbx, %rdi
	movl	$70, %esi
	callq	_alc_read_coef_idx
	notl	%eax
	testb	$112, %al
	je	LBB0_6
	jmp	LBB0_7
LBB0_4:
	movq	%rbx, %rdi
	movl	$17, %esi
	movl	$1, %edx
	callq	_alc_write_coef_idx
	movq	%rbx, %rdi
	movl	$183, %esi
	movl	$32811, %edx                    ## imm = 0x802B
	callq	_alc_write_coef_idx
	movq	%rbx, %rdi
	movl	$21, %esi
	movl	$3424, %edx                     ## imm = 0xD60
	callq	_alc_write_coef_idx
	movq	%rbx, %rdi
	movl	$195, %esi
	movl	$3072, %edx                     ## imm = 0xC00
	callq	_alc_write_coef_idx
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep
	movq	%rbx, %rdi
	movl	$190, %esi
	callq	_alc_read_coef_idx
	notl	%eax
	testl	$7170, %eax                     ## imm = 0x1C02
	jne	LBB0_7
LBB0_6:
	movq	_ALC_HEADSET_TYPE_CTIA@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r14
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_snd_printdd
	movl	(%r12), %eax
	movl	%eax, (%r15)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Headset jack detected iPhone-style headset: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"yes"

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

	.comm	_ALC_HEADSET_TYPE_CTIA,4,2      ## @ALC_HEADSET_TYPE_CTIA
	.comm	_ALC_HEADSET_TYPE_OMTP,4,2      ## @ALC_HEADSET_TYPE_OMTP
	.no_dead_strip	_alc_determine_headset_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alc_determine_headset_type
_alc_determine_headset_type:            ; @alc_determine_headset_type
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w8, [x0]
	mov	w9, #643
	movk	w9, #4332, lsl #16
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.1:
	mov	w9, #1640
	movk	w9, #4332, lsl #16
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.2:
	mov	w9, #658
	movk	w9, #4332, lsl #16
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #107
	mov	w2, #54313
	bl	_alc_write_coef_idx
	mov	w0, #300
	bl	_msleep
	mov	x0, x19
	mov	w1, #108
	bl	_alc_read_coef_idx
	mvn	w8, w0
	tst	w8, #0x1c
	b.eq	LBB0_7
LBB0_4:
Lloh0:
	adrp	x19, _ALC_HEADSET_TYPE_OMTP@GOTPAGE
Lloh1:
	ldr	x19, [x19, _ALC_HEADSET_TYPE_OMTP@GOTPAGEOFF]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	mov	w1, #69
	mov	w2, #53289
	bl	_alc_write_coef_idx
	mov	w0, #300
	bl	_msleep
	mov	x0, x19
	mov	w1, #70
	bl	_alc_read_coef_idx
	mvn	w8, w0
	tst	w8, #0x70
	b.ne	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	w1, #17
	mov	w2, #1
	bl	_alc_write_coef_idx
	mov	x0, x19
	mov	w1, #183
	mov	w2, #32811
	bl	_alc_write_coef_idx
	mov	x0, x19
	mov	w1, #21
	mov	w2, #3424
	bl	_alc_write_coef_idx
	mov	x0, x19
	mov	w1, #195
	mov	w2, #3072
	bl	_alc_write_coef_idx
	mov	w0, #300
	bl	_msleep
	mov	x0, x19
	mov	w1, #190
	bl	_alc_read_coef_idx
	mov	w8, #7170
	bics	wzr, w8, w0
	b.ne	LBB0_4
LBB0_7:
Lloh4:
	adrp	x19, _ALC_HEADSET_TYPE_CTIA@GOTPAGE
Lloh5:
	ldr	x19, [x19, _ALC_HEADSET_TYPE_CTIA@GOTPAGEOFF]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printdd
	ldr	w8, [x19]
	str	w8, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Headset jack detected iPhone-style headset: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"yes"

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

	.comm	_ALC_HEADSET_TYPE_CTIA,4,2      ; @ALC_HEADSET_TYPE_CTIA
	.comm	_ALC_HEADSET_TYPE_OMTP,4,2      ; @ALC_HEADSET_TYPE_OMTP
	.no_dead_strip	_alc_determine_headset_type
.subsections_via_symbols
