	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isdn_audio_adpcm2xlaw          ## -- Begin function isdn_audio_adpcm2xlaw
	.p2align	4, 0x90
_isdn_audio_adpcm2xlaw:                 ## @isdn_audio_adpcm2xlaw
	.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	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdx, -96(%rbp)
	movl	%r8d, -44(%rbp)
	movl	(%rdi), %ebx
	movl	4(%rdi), %r13d
	testl	%r8d, %r8d
	je	LBB0_1
## %bb.2:
	movslq	8(%rdi), %rcx
	movq	%rcx, %rax
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	leal	-1(%rcx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%esi, %esi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rsi
	cmpl	$0, -44(%rbp)
	je	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r15d
	xorl	$4, %r15d
	leaq	-96(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_isdn_audio_get_bits
	movl	%eax, %r14d
	orl	%eax, %r15d
	movl	$4, %eax
	cmovel	%eax, %r13d
	movl	%r14d, %eax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	movq	_bitmask@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	-4(%rcx,%r12,4), %r14d
	leal	(%r14,%r14), %ecx
	incl	%ecx
	movl	%ecx, %edx
	negl	%edx
	testl	%eax, %eax
	cmovel	%ecx, %edx
	imull	%r13d, %edx
	sarl	%edx
	movl	%r13d, %eax
	andl	$1, %eax
	addl	%eax, %ebx
	addl	%edx, %ebx
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_isdn_audio_ulaw_to_alaw@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	leal	(,%rbx,4), %edi
	callq	_isdn_audio_linear2ulaw
	movzbl	(%r15,%rax,4), %eax
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	leal	(,%rbx,4), %edi
	callq	_isdn_audio_linear2ulaw
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movslq	%r14d, %rcx
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movb	%al, (%rdx,%rsi)
	movq	_Mx@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-16(%rax,%rdx,8), %rax
	imull	(%rax,%rcx,4), %r13d
	addl	$8192, %r13d                    ## imm = 0x2000
	sarl	$14, %r13d
	cmpl	$6, %r13d
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$5, %r13d
	jmp	LBB0_8
LBB0_1:
	xorl	%esi, %esi
LBB0_9:
	movl	%ebx, (%rdi)
	movl	%r13d, 4(%rdi)
	movl	%esi, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bitmask,8,3                    ## @bitmask
	.comm	_isdn_audio_ulaw_to_alaw,8,3    ## @isdn_audio_ulaw_to_alaw
	.comm	_Mx,8,3                         ## @Mx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isdn_audio_adpcm2xlaw          ; -- Begin function isdn_audio_adpcm2xlaw
	.p2align	2
_isdn_audio_adpcm2xlaw:                 ; @isdn_audio_adpcm2xlaw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x3, [sp, #8]                    ; 8-byte Folded Spill
	mov	x19, x0
	str	x2, [sp, #24]
	str	w4, [sp, #20]
	ldp	w23, w28, [x0]
	cbz	w4, LBB0_6
; %bb.1:
	mov	x22, x1
	mov	x20, #0
	ldr	w24, [x19, #8]
	sub	w8, w24, #1
	sxtw	x25, w8
	sub	w8, w24, #2
	sxtw	x26, w8
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	lsl	w0, w23, #2
	bl	_isdn_audio_linear2ulaw
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	strb	w0, [x8, x20]
Lloh0:
	adrp	x8, _Mx@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Mx@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, x26, lsl #3]
	ldr	w8, [x8, w27, sxtw #2]
	orr	w9, wzr, #0x2000
	madd	w8, w8, w28, w9
	asr	w8, w8, #14
	cmp	w8, #5
	mov	w9, #5
	csel	w28, w8, w9, gt
	ldr	w8, [sp, #20]
	add	x20, x20, #1
	cbz	w8, LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #24
	add	x2, sp, #20
	mov	x0, x19
	bl	_isdn_audio_get_bits
	cmp	w0, #0
	ccmp	w24, #4, #0, eq
	mov	w8, #4
	csel	w28, w8, w28, eq
	asr	w8, w0, w25
Lloh3:
	adrp	x9, _bitmask@GOTPAGE
Lloh4:
	ldr	x9, [x9, _bitmask@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w9, [x9, x25, lsl #2]
	and	w27, w9, w0
	mov	w9, #1
	bfi	w9, w27, #1, #31
	cmp	w8, #0
	cneg	w8, w9, ne
	mul	w8, w8, w28
	and	w9, w28, #0x1
	add	w9, w9, w23
	add	w23, w9, w8, asr #1
	cbz	w22, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x8, _isdn_audio_ulaw_to_alaw@GOTPAGE
Lloh7:
	ldr	x8, [x8, _isdn_audio_ulaw_to_alaw@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
	lsl	w0, w23, #2
	bl	_isdn_audio_linear2ulaw
	ldr	w0, [x21, x0, lsl #2]
	b	LBB0_3
LBB0_6:
	mov	w20, #0
LBB0_7:
	stp	w23, w28, [x19]
	mov	x0, x20
	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
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_bitmask,8,3                    ; @bitmask
	.comm	_isdn_audio_ulaw_to_alaw,8,3    ; @isdn_audio_ulaw_to_alaw
	.comm	_Mx,8,3                         ; @Mx
.subsections_via_symbols
