	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath_mci_add_profile
_ath_mci_add_profile:                   ## @ath_mci_add_profile
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	(%rsi), %rax
	movq	_ATH_MCI_MAX_SCO_PROFILE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	(%r14), %rcx
	movq	_MCI_GPM_COEX_PROFILE_VOICE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_10
LBB0_2:
	movq	%r15, %rdi
	callq	_NUM_PROF
	subq	(%r15), %rax
	movq	_ATH_MCI_MAX_ACL_PROFILE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	(%r14), %rcx
	movq	_MCI_GPM_COEX_PROFILE_VOICE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_10
LBB0_4:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r14, %rsi
	movl	$10, %edx
	callq	_memcpy
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_INC_PROF
	addq	$12, %rbx
	leaq	12(%r15), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	(%r14), %rcx
	movq	_MCI_GPM_COEX_PROFILE_VOICE@GOTPCREL(%rip), %rdx
	movl	$1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.7:
	movl	8(%r14), %ecx
	movl	$110, %edx
	cmpq	$35, %rcx
	ja	LBB0_9
## %bb.8:
	leaq	l___const.ath_mci_add_profile.voice_priority(%rip), %rdx
	movl	(%rdx,%rcx,4), %edx
LBB0_9:
	movl	%edx, 8(%r15)
	jmp	LBB0_10
LBB0_5:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.ath_mci_add_profile.voice_priority
l___const.ath_mci_add_profile.voice_priority:
	.long	110                             ## 0x6e
	.long	110                             ## 0x6e
	.long	110                             ## 0x6e
	.long	112                             ## 0x70
	.long	110                             ## 0x6e
	.long	110                             ## 0x6e
	.long	114                             ## 0x72
	.long	116                             ## 0x74
	.long	118                             ## 0x76

	.comm	_ATH_MCI_MAX_SCO_PROFILE,8,3    ## @ATH_MCI_MAX_SCO_PROFILE
	.comm	_MCI_GPM_COEX_PROFILE_VOICE,8,3 ## @MCI_GPM_COEX_PROFILE_VOICE
	.comm	_ATH_MCI_MAX_ACL_PROFILE,8,3    ## @ATH_MCI_MAX_ACL_PROFILE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.no_dead_strip	_ath_mci_add_profile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath_mci_add_profile
_ath_mci_add_profile:                   ; @ath_mci_add_profile
	.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	x20, x2
	mov	x19, x1
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _ATH_MCI_MAX_SCO_PROFILE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATH_MCI_MAX_SCO_PROFILE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _MCI_GPM_COEX_PROFILE_VOICE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MCI_GPM_COEX_PROFILE_VOICE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
LBB0_2:
	mov	x0, x19
	bl	_NUM_PROF
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _ATH_MCI_MAX_ACL_PROFILE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ATH_MCI_MAX_ACL_PROFILE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	sub	x8, x0, x8
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x20]
Lloh9:
	adrp	x9, _MCI_GPM_COEX_PROFILE_VOICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MCI_GPM_COEX_PROFILE_VOICE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_4:
Lloh12:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.5:
	mov	x21, x0
	mov	x1, x20
	mov	w2, #10
	bl	_memcpy
	mov	x0, x19
	mov	x1, x20
	bl	_INC_PROF
	add	x0, x21, #12
	add	x1, x19, #12
	bl	_list_add_tail
	ldr	x8, [x20]
Lloh15:
	adrp	x9, _MCI_GPM_COEX_PROFILE_VOICE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MCI_GPM_COEX_PROFILE_VOICE@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.6:
	ldr	w8, [x20, #8]
	cmp	w8, #35
	b.hi	LBB0_9
; %bb.7:
Lloh18:
	adrp	x9, l___const.ath_mci_add_profile.voice_priority@PAGE
Lloh19:
	add	x9, x9, l___const.ath_mci_add_profile.voice_priority@PAGEOFF
	ldr	w8, [x9, x8, lsl #2]
	b	LBB0_10
LBB0_8:
	mov	w0, #0
	b	LBB0_12
LBB0_9:
	mov	w8, #110
LBB0_10:
	str	w8, [x19, #8]
LBB0_11:
	mov	w0, #1
LBB0_12:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.ath_mci_add_profile.voice_priority
l___const.ath_mci_add_profile.voice_priority:
	.long	110                             ; 0x6e
	.long	110                             ; 0x6e
	.long	110                             ; 0x6e
	.long	112                             ; 0x70
	.long	110                             ; 0x6e
	.long	110                             ; 0x6e
	.long	114                             ; 0x72
	.long	116                             ; 0x74
	.long	118                             ; 0x76

	.comm	_ATH_MCI_MAX_SCO_PROFILE,8,3    ; @ATH_MCI_MAX_SCO_PROFILE
	.comm	_MCI_GPM_COEX_PROFILE_VOICE,8,3 ; @MCI_GPM_COEX_PROFILE_VOICE
	.comm	_ATH_MCI_MAX_ACL_PROFILE,8,3    ; @ATH_MCI_MAX_ACL_PROFILE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.no_dead_strip	_ath_mci_add_profile
.subsections_via_symbols
