	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isdn_audio_xlaw2adpcm          ## -- Begin function isdn_audio_xlaw2adpcm
	.p2align	4, 0x90
_isdn_audio_xlaw2adpcm:                 ## @isdn_audio_xlaw2adpcm
	.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
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rcx, -96(%rbp)
	movl	(%rdi), %esi
	movl	4(%rdi), %r14d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movslq	8(%rdi), %rbx
	movl	$0, -44(%rbp)
	testl	%r8d, %r8d
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r15
	leaq	-1(%rbx), %rcx
	movl	$1, %eax
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %eax
	leal	-1(%rax), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	$2, %r13d
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	subl	%eax, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	subl	%ecx, %r12d
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movl	%ebx, %eax
	xorl	$4, %eax
	movl	%r12d, %ecx
	andl	$15, %ecx
	orl	%eax, %ecx
	movl	$8, %eax
	cmovel	%eax, %r12d
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	leaq	-96(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_isdn_audio_put_bits
	movl	%r12d, %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $cl killed $cl killed $rcx
	sarl	%cl, %eax
	movq	_bitmask@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	-4(%rcx,%rbx,4), %r12d
	leal	(%r12,%r12), %ecx
	incl	%ecx
	movl	%ecx, %edx
	negl	%edx
	testl	%eax, %eax
	cmovel	%ecx, %edx
	movslq	%r12d, %rax
	imull	%r14d, %edx
	sarl	%edx
	movl	%r14d, %ecx
	andl	$1, %ecx
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	addl	%ecx, %esi
	addl	%edx, %esi
	movq	_Mx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-16(%rcx,%rbx,8), %rcx
	imull	(%rcx,%rax,4), %r14d
	addl	$8192, %r14d                    ## imm = 0x2000
	sarl	$14, %r14d
	cmpl	$6, %r14d
	movl	$5, %eax
	cmovll	%eax, %r14d
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	testl	%r8d, %r8d
	je	LBB0_12
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	_isdn_audio_alaw_to_s16@GOTPCREL(%rip), %rax
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_isdn_audio_ulaw_to_s16@GOTPCREL(%rip), %rax
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	decl	%r8d
	movq	(%rax), %rax
	movzbl	(%r15), %ecx
	movl	(%rax,%rcx,4), %ecx
	sarl	$2, %ecx
	subl	%esi, %ecx
	movl	%ecx, %r12d
	sarl	$31, %r12d
	andl	-80(%rbp), %r12d                ## 4-byte Folded Reload
	movl	%ecx, %eax
	negl	%eax
	cmovsl	%ecx, %eax
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	subl	%r14d, %eax
	jle	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ecx, %edx
	leal	-1(%rdx), %ecx
	cmpl	%edx, %r13d
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	subl	%r14d, %eax
	jg	LBB0_8
	jmp	LBB0_10
LBB0_12:
	movl	-44(%rbp), %eax
	jmp	LBB0_13
LBB0_1:
	xorl	%eax, %eax
LBB0_13:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%esi, (%rcx)
	movl	%r14d, 4(%rcx)
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_isdn_audio_alaw_to_s16,8,3     ## @isdn_audio_alaw_to_s16
	.comm	_isdn_audio_ulaw_to_s16,8,3     ## @isdn_audio_ulaw_to_s16
	.comm	_bitmask,8,3                    ## @bitmask
	.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_xlaw2adpcm          ; -- Begin function isdn_audio_xlaw2adpcm
	.p2align	2
_isdn_audio_xlaw2adpcm:                 ; @isdn_audio_xlaw2adpcm
	.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
	stp	w1, wzr, [sp, #16]              ; 4-byte Folded Spill
	mov	x19, x0
	str	x3, [sp, #24]
	ldp	w25, w26, [x0]
	ldr	w23, [x0, #8]
	cbz	w4, LBB0_9
; %bb.1:
	mov	x20, x4
	mov	x21, x2
	sub	w8, w23, #1
	mov	w9, #1
	lsl	w27, w9, w8
	sub	w9, w27, #1
	sxtw	x22, w8
	sub	w8, w23, #2
	sxtw	x28, w8
	sub	w8, w27, #2
	stp	w8, w9, [sp, #8]                ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	tst	w8, #0xf
	ccmp	w23, #4, #0, eq
	mov	w9, #8
	csel	w24, w9, w8, eq
	add	x3, sp, #24
	add	x4, sp, #20
	mov	x0, x24
	mov	x1, x23
	mov	x2, x19
	bl	_isdn_audio_put_bits
	asr	w8, w24, w22
Lloh0:
	adrp	x9, _bitmask@GOTPAGE
Lloh1:
	ldr	x9, [x9, _bitmask@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w9, [x9, x22, lsl #2]
	and	w9, w9, w24
	mov	w10, #1
	bfi	w10, w9, #1, #31
	cmp	w8, #0
	cneg	w8, w10, ne
	mul	w8, w8, w26
	and	w10, w26, #0x1
	add	w10, w10, w25
	add	w25, w10, w8, asr #1
Lloh3:
	adrp	x8, _Mx@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Mx@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8, x28, lsl #3]
	ldr	w8, [x8, w9, sxtw #2]
	orr	w9, wzr, #0x2000
	madd	w8, w8, w26, w9
	asr	w8, w8, #14
	cmp	w8, #5
	mov	w9, #5
	csel	w26, w8, w9, gt
	cbz	w20, LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	sub	w20, w20, #1
	ldp	w10, w8, [sp, #12]              ; 8-byte Folded Reload
	cmp	w8, #0
Lloh6:
	adrp	x8, _isdn_audio_ulaw_to_s16@GOTPAGE
Lloh7:
	ldr	x8, [x8, _isdn_audio_ulaw_to_s16@GOTPAGEOFF]
Lloh8:
	adrp	x9, _isdn_audio_alaw_to_s16@GOTPAGE
Lloh9:
	ldr	x9, [x9, _isdn_audio_alaw_to_s16@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	x8, [x8]
	ldrb	w9, [x21], #1
	ldr	w8, [x8, x9, lsl #2]
	asr	w8, w8, #2
	subs	w9, w8, w25
	and	w8, w27, w9, asr #31
	cneg	w9, w9, mi
	cbz	w10, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w9, w9, w26
	b.le	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [sp, #8]                   ; 4-byte Folded Reload
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w8, w8, #1
	subs	w10, w10, #1
	b.lo	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	sub	w11, w9, w26
	cmp	w9, w26
	mov	x9, x11
	b.gt	LBB0_6
	b	LBB0_2
LBB0_8:
	ldr	w0, [sp, #20]
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	stp	w25, w26, [x19]
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_isdn_audio_alaw_to_s16,8,3     ; @isdn_audio_alaw_to_s16
	.comm	_isdn_audio_ulaw_to_s16,8,3     ; @isdn_audio_ulaw_to_s16
	.comm	_bitmask,8,3                    ; @bitmask
	.comm	_Mx,8,3                         ; @Mx
.subsections_via_symbols
