	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_wfx_ima_adpcm
_init_wfx_ima_adpcm:                    ## @init_wfx_ima_adpcm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	8(%rdi), %rax
	movq	_WAVE_FORMAT_IMA_ADPCM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	addq	$8, %rdi
	callq	_ADPCM_GetFormatIndex
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movl	16(%rbx), %r8d
	cmpl	$22049, %r8d                    ## imm = 0x5621
	jg	LBB0_9
## %bb.6:
	cmpl	$8000, %r8d                     ## imm = 0x1F40
	je	LBB0_8
## %bb.7:
	cmpl	$11025, %r8d                    ## imm = 0x2B11
	jne	LBB0_11
LBB0_8:
	movl	24(%rbx), %esi
	movl	%esi, %ecx
	shll	$8, %ecx
	jmp	LBB0_14
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_FIXME                          ## TAILCALL
LBB0_9:
	cmpl	$22050, %r8d                    ## imm = 0x5622
	je	LBB0_12
## %bb.10:
	cmpl	$44100, %r8d                    ## imm = 0xAC44
	jne	LBB0_11
## %bb.13:
	movl	24(%rbx), %esi
	movl	%esi, %ecx
	shll	$10, %ecx
	jmp	LBB0_14
LBB0_11:
	movl	20(%rbx), %ecx
	movl	24(%rbx), %esi
	jmp	LBB0_15
LBB0_12:
	movl	24(%rbx), %esi
	movl	%esi, %ecx
	shll	$9, %ecx
LBB0_14:
	movl	%ecx, 20(%rbx)
LBB0_15:
	movl	$4, 28(%rbx)
	leal	(,%rsi,4), %eax
	movl	%ecx, %edi
	subl	%eax, %edi
	movl	$2, %eax
	xorl	%edx, %edx
	idivl	%esi
	movl	%eax, %esi
	imull	%edi, %esi
	incl	%esi
	movl	%esi, (%rbx)
	imull	%ecx, %r8d
	movl	%r8d, %eax
	cltd
	idivl	%esi
	movl	%eax, 32(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WAVE_FORMAT_IMA_ADPCM,8,3      ## @WAVE_FORMAT_IMA_ADPCM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrong FT\n"

L_.str.1:                               ## @.str.1
	.asciz	"wrong fmt\n"

	.no_dead_strip	_init_wfx_ima_adpcm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_wfx_ima_adpcm
_init_wfx_ima_adpcm:                    ; @init_wfx_ima_adpcm
	.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	x8, [x0, #8]!
Lloh0:
	adrp	x9, _WAVE_FORMAT_IMA_ADPCM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WAVE_FORMAT_IMA_ADPCM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	bl	_ADPCM_GetFormatIndex
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.2:
	ldr	w8, [x19, #16]
	mov	w9, #22049
	cmp	w8, w9
	b.gt	LBB0_9
; %bb.3:
	mov	w9, #8000
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.4:
	mov	w9, #11025
	cmp	w8, w9
	b.ne	LBB0_12
LBB0_5:
	ldr	w9, [x19, #24]
	lsl	w10, w9, #8
	b	LBB0_14
LBB0_6:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_FIXME
LBB0_9:
	mov	w9, #22050
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.10:
	mov	w9, #44100
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.11:
	ldr	w9, [x19, #24]
	lsl	w10, w9, #10
	b	LBB0_14
LBB0_12:
	ldp	w10, w9, [x19, #20]
	b	LBB0_15
LBB0_13:
	ldr	w9, [x19, #24]
	lsl	w10, w9, #9
LBB0_14:
	str	w10, [x19, #20]
LBB0_15:
	mov	w11, #4
	sub	w12, w10, w9, lsl #2
	mov	w13, #2
	sdiv	w9, w13, w9
	orr	w13, wzr, #0x1
	madd	w9, w12, w9, w13
	str	w9, [x19]
	mul	w8, w10, w8
	sdiv	w8, w8, w9
	stp	w11, w8, [x19, #28]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_WAVE_FORMAT_IMA_ADPCM,8,3      ; @WAVE_FORMAT_IMA_ADPCM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrong FT\n"

l_.str.1:                               ; @.str.1
	.asciz	"wrong fmt\n"

	.no_dead_strip	_init_wfx_ima_adpcm
.subsections_via_symbols
