Program: audio-codec

x86 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encode                         ## -- Begin function encode
	.p2align	4, 0x90
_encode:                                ## @encode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movb	$0, -25(%rbp)
	movw	$0, -28(%rbp)
	movl	$0, -32(%rbp)
	movl	$0, -36(%rbp)
	movl	$0, -40(%rbp)
	movl	$0, -44(%rbp)
	movq	$0, -56(%rbp)
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	-56(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jae	LBB0_15
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-16(%rbp), %rax
	movq	%rax, %rcx
	addq	$2, %rcx
	movq	%rcx, -16(%rbp)
	movw	(%rax), %ax
	movw	%ax, -28(%rbp)
	movl	$7, -40(%rbp)
	movl	$16384, -44(%rbp)               ## imm = 0x4000
	movswl	-28(%rbp), %eax
	andl	$32768, %eax                    ## imm = 0x8000
	sarl	$8, %eax
	movl	%eax, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movswl	-28(%rbp), %ecx
	xorl	%eax, %eax
	subl	%ecx, %eax
	subl	$1, %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movswl	-28(%rbp), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-60(%rbp), %eax                 ## 4-byte Reload
                                        ## kill: def $ax killed $ax killed $eax
	movw	%ax, -28(%rbp)
LBB0_6:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movswl	-28(%rbp), %ecx
	andl	-44(%rbp), %ecx
	xorl	%eax, %eax
                                        ## kill: def $al killed $al killed $eax
	cmpl	$0, %ecx
	movb	%al, -61(%rbp)                  ## 1-byte Spill
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpl	$0, -40(%rbp)
	setg	%al
	movb	%al, -61(%rbp)                  ## 1-byte Spill
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	movb	-61(%rbp), %al                  ## 1-byte Reload
	testb	$1, %al
	jne	LBB0_9
	jmp	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	movl	-40(%rbp), %eax
	addl	$-1, %eax
	movl	%eax, -40(%rbp)
	movl	-44(%rbp), %eax
	sarl	$1, %eax
	movl	%eax, -44(%rbp)
	jmp	LBB0_6
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movswl	-28(%rbp), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	cmpl	$0, -40(%rbp)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	-40(%rbp), %eax
	addl	$3, %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	jmp	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$4, %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	jmp	LBB0_13
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $ecx
	sarl	%cl, %eax
	andl	$15, %eax
	movl	%eax, -36(%rbp)
	movl	-40(%rbp), %eax
	shll	$4, %eax
	movl	%eax, -40(%rbp)
	movl	-32(%rbp), %eax
	orl	-40(%rbp), %eax
	orl	-36(%rbp), %eax
                                        ## kill: def $al killed $al killed $eax
	movb	%al, -25(%rbp)
	movzbl	-25(%rbp), %eax
	xorl	$213, %eax
	movb	%al, %cl
	movq	-8(%rbp), %rax
	movq	%rax, %rdx
	addq	$1, %rdx
	movq	%rdx, -8(%rbp)
	movb	%cl, (%rax)
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -56(%rbp)
	jmp	LBB0_1
LBB0_15:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.globl	_decode                         ## -- Begin function decode
	.p2align	4, 0x90
_decode:                                ## @decode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movb	$0, -25(%rbp)
	movl	$0, -32(%rbp)
	movl	$0, -36(%rbp)
	movl	$0, -40(%rbp)
	movq	$0, -48(%rbp)
LBB1_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jae	LBB1_10
## %bb.2:                               ##   in Loop: Header=BB1_1 Depth=1
	movq	-16(%rbp), %rax
	movq	%rax, %rcx
	addq	$1, %rcx
	movq	%rcx, -16(%rbp)
	movb	(%rax), %al
	movb	%al, -25(%rbp)
	movzbl	-25(%rbp), %eax
	xorl	$213, %eax
                                        ## kill: def $al killed $al killed $eax
	movb	%al, -25(%rbp)
	movzbl	-25(%rbp), %eax
	andl	$128, %eax
	movl	%eax, -36(%rbp)
	movzbl	-25(%rbp), %eax
	andl	$112, %eax
	sarl	$4, %eax
	movl	%eax, -40(%rbp)
	movzbl	-25(%rbp), %eax
	andl	$15, %eax
	shll	$4, %eax
	orl	$8, %eax
	movl	%eax, -32(%rbp)
	movl	-40(%rbp), %edx
	xorl	%eax, %eax
	movl	$256, %ecx                      ## imm = 0x100
	cmpl	$0, %edx
	cmovnel	%ecx, %eax
	addl	-32(%rbp), %eax
	movl	%eax, -32(%rbp)
	cmpl	$1, -40(%rbp)
	jle	LBB1_4
## %bb.3:                               ##   in Loop: Header=BB1_1 Depth=1
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB1_5
LBB1_4:                                 ##   in Loop: Header=BB1_1 Depth=1
	xorl	%eax, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB1_5
LBB1_5:                                 ##   in Loop: Header=BB1_1 Depth=1
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-32(%rbp), %eax
                                        ## kill: def $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, -32(%rbp)
	cmpl	$0, -36(%rbp)
	je	LBB1_7
## %bb.6:                               ##   in Loop: Header=BB1_1 Depth=1
	xorl	%eax, %eax
	subl	-32(%rbp), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB1_8
LBB1_7:                                 ##   in Loop: Header=BB1_1 Depth=1
	movl	-32(%rbp), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
LBB1_8:                                 ##   in Loop: Header=BB1_1 Depth=1
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movw	%ax, %cx
	movq	-8(%rbp), %rax
	movq	%rax, %rdx
	addq	$2, %rdx
	movq	%rdx, -8(%rbp)
	movw	%cx, (%rax)
## %bb.9:                               ##   in Loop: Header=BB1_1 Depth=1
	movq	-48(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -48(%rbp)
	jmp	LBB1_1
LBB1_10:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$80, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	$0, -36(%rbp)
	movl	%edi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	leaq	-16(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	leaq	_pcm(%rip), %rdi
	movl	$8, %ecx
	callq	_test
	leaq	L_.str(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	movq	$0, -56(%rbp)
LBB2_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$8, -56(%rbp)
	jae	LBB2_4
## %bb.2:                               ##   in Loop: Header=BB2_1 Depth=1
	movq	-56(%rbp), %rcx
	leaq	_pcm(%rip), %rax
	movswl	(%rax,%rcx,2), %esi
	leaq	L_.str.1(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
## %bb.3:                               ##   in Loop: Header=BB2_1 Depth=1
	movq	-56(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -56(%rbp)
	jmp	LBB2_1
LBB2_4:
	leaq	L_.str.2(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	leaq	L_.str.3(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	movq	$0, -64(%rbp)
LBB2_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$8, -64(%rbp)
	jae	LBB2_8
## %bb.6:                               ##   in Loop: Header=BB2_5 Depth=1
	movq	-64(%rbp), %rax
	movzbl	-16(%rbp,%rax), %esi
	leaq	L_.str.4(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
## %bb.7:                               ##   in Loop: Header=BB2_5 Depth=1
	movq	-64(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -64(%rbp)
	jmp	LBB2_5
LBB2_8:
	leaq	L_.str.2(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	leaq	L_.str.5(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	movq	$0, -72(%rbp)
LBB2_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$8, -72(%rbp)
	jae	LBB2_12
## %bb.10:                              ##   in Loop: Header=BB2_9 Depth=1
	movq	-72(%rbp), %rax
	movswl	-32(%rbp,%rax,2), %esi
	leaq	L_.str.1(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
## %bb.11:                              ##   in Loop: Header=BB2_9 Depth=1
	movq	-72(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -72(%rbp)
	jmp	LBB2_9
LBB2_12:
	leaq	L_.str.2(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	callq	_libmin_success
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rcx
	cmpq	%rcx, %rax
	jne	LBB2_14
## %bb.13:
	xorl	%eax, %eax
	addq	$80, %rsp
	popq	%rbp
	retq
LBB2_14:
	callq	___stack_chk_fail
	ud2
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function test
_test:                                  ## @test
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$48, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	%rcx, -32(%rbp)
	movq	-16(%rbp), %rdi
	movq	-8(%rbp), %rsi
	movq	-32(%rbp), %rdx
	callq	_encode
	movq	$0, -40(%rbp)
LBB3_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-40(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jae	LBB3_7
## %bb.2:                               ##   in Loop: Header=BB3_1 Depth=1
	movq	-16(%rbp), %rax
	movq	-40(%rbp), %rcx
	movzbl	(%rax,%rcx), %eax
	movq	-40(%rbp), %rdx
	leaq	_r_coded(%rip), %rcx
	movzbl	(%rcx,%rdx), %ecx
	cmpl	%ecx, %eax
	jne	LBB3_4
## %bb.3:                               ##   in Loop: Header=BB3_1 Depth=1
	jmp	LBB3_5
LBB3_4:                                 ##   in Loop: Header=BB3_1 Depth=1
	movl	$1, %edi
	callq	_libmin_fail
LBB3_5:                                 ##   in Loop: Header=BB3_1 Depth=1
	jmp	LBB3_6
LBB3_6:                                 ##   in Loop: Header=BB3_1 Depth=1
	movq	-40(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -40(%rbp)
	jmp	LBB3_1
LBB3_7:
	movq	-24(%rbp), %rdi
	movq	-16(%rbp), %rsi
	movq	-32(%rbp), %rdx
	callq	_decode
	movq	$0, -48(%rbp)
LBB3_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jae	LBB3_14
## %bb.9:                               ##   in Loop: Header=BB3_8 Depth=1
	movq	-24(%rbp), %rax
	movq	-48(%rbp), %rcx
	movswl	(%rax,%rcx,2), %eax
	movq	-48(%rbp), %rdx
	leaq	_r_decoded(%rip), %rcx
	movswl	(%rcx,%rdx,2), %ecx
	cmpl	%ecx, %eax
	jne	LBB3_11
## %bb.10:                              ##   in Loop: Header=BB3_8 Depth=1
	jmp	LBB3_12
LBB3_11:                                ##   in Loop: Header=BB3_8 Depth=1
	movl	$1, %edi
	callq	_libmin_fail
LBB3_12:                                ##   in Loop: Header=BB3_8 Depth=1
	jmp	LBB3_13
LBB3_13:                                ##   in Loop: Header=BB3_8 Depth=1
	movq	-48(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -48(%rbp)
	jmp	LBB3_8
LBB3_14:
	addq	$48, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.globl	_pcm                            ## @pcm
	.p2align	4
_pcm:
	.short	1000                            ## 0x3e8
	.short	64536                           ## 0xfc18
	.short	1234                            ## 0x4d2
	.short	3200                            ## 0xc80
	.short	64222                           ## 0xfade
	.short	0                               ## 0x0
	.short	32767                           ## 0x7fff
	.short	32768                           ## 0x8000

	.globl	_r_coded                        ## @r_coded
_r_coded:
	.ascii	"\372z\346\234a\325\252*"

	.globl	_r_decoded                      ## @r_decoded
	.p2align	4
_r_decoded:
	.short	1008                            ## 0x3f0
	.short	64528                           ## 0xfc10
	.short	1248                            ## 0x4e0
	.short	3264                            ## 0xcc0
	.short	64224                           ## 0xfae0
	.short	8                               ## 0x8
	.short	32256                           ## 0x7e00
	.short	33280                           ## 0x8200

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"inputs: "

L_.str.1:                               ## @.str.1
	.asciz	"%d "

L_.str.2:                               ## @.str.2
	.asciz	"\n"

L_.str.3:                               ## @.str.3
	.asciz	"encode: "

L_.str.4:                               ## @.str.4
	.asciz	"%u "

L_.str.5:                               ## @.str.5
	.asciz	"decode: "

.subsections_via_symbols


ARM64 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encode                         ; -- Begin function encode
	.p2align	2
_encode:                                ; @encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	str	x0, [sp, #72]
	str	x1, [sp, #64]
	str	x2, [sp, #56]
	strb	wzr, [sp, #55]
	strh	wzr, [sp, #52]
	str	wzr, [sp, #48]
	str	wzr, [sp, #44]
	str	wzr, [sp, #40]
	str	wzr, [sp, #36]
	str	xzr, [sp, #24]
	b	LBB0_1
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x8, [sp, #24]
	ldr	x9, [sp, #56]
	subs	x8, x8, x9
	cset	w8, hs
	tbnz	w8, #0, LBB0_15
	b	LBB0_2
LBB0_2:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [sp, #64]
	add	x9, x8, #2
	str	x9, [sp, #64]
	ldrh	w8, [x8]
	strh	w8, [sp, #52]
	mov	w8, #7
	str	w8, [sp, #40]
	mov	w8, #16384
	str	w8, [sp, #36]
	ldrsh	w8, [sp, #52]
	and	w8, w8, #0x8000
	asr	w8, w8, #8
	str	w8, [sp, #48]
	ldr	w8, [sp, #48]
	subs	w8, w8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB0_4
	b	LBB0_3
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldrsh	w9, [sp, #52]
	mov	w8, #0
	subs	w8, w8, w9
	subs	w8, w8, #1
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldrsh	w8, [sp, #52]
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	b	LBB0_5
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	strh	w8, [sp, #52]
	b	LBB0_6
LBB0_6:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsh	w8, [sp, #52]
	ldr	w9, [sp, #36]
	ands	w8, w8, w9
	cset	w8, ne
	mov	w9, #0
	str	w9, [sp, #16]                   ; 4-byte Folded Spill
	tbnz	w8, #0, LBB0_8
	b	LBB0_7
LBB0_7:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [sp, #40]
	subs	w8, w8, #0
	cset	w8, gt
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
	b	LBB0_8
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	tbz	w8, #0, LBB0_10
	b	LBB0_9
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [sp, #40]
	subs	w8, w8, #1
	str	w8, [sp, #40]
	ldr	w8, [sp, #36]
	asr	w8, w8, #1
	str	w8, [sp, #36]
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrsh	w8, [sp, #52]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	ldr	w8, [sp, #40]
	subs	w8, w8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB0_12
	b	LBB0_11
LBB0_11:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #40]
	add	w8, w8, #3
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w8, #4
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	b	LBB0_13
LBB0_13:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	asr	w8, w8, w9
	and	w8, w8, #0xf
	str	w8, [sp, #44]
	ldr	w8, [sp, #40]
	lsl	w8, w8, #4
	str	w8, [sp, #40]
	ldr	w8, [sp, #48]
	ldr	w9, [sp, #40]
	orr	w8, w8, w9
	ldr	w9, [sp, #44]
	orr	w8, w8, w9
	strb	w8, [sp, #55]
	ldrb	w8, [sp, #55]
	mov	w9, #213
	eor	w8, w8, w9
	ldr	x9, [sp, #72]
	add	x10, x9, #1
	str	x10, [sp, #72]
	strb	w8, [x9]
	b	LBB0_14
LBB0_14:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [sp, #24]
	add	x8, x8, #1
	str	x8, [sp, #24]
	b	LBB0_1
LBB0_15:
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_decode                         ; -- Begin function decode
	.p2align	2
_decode:                                ; @decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	str	x0, [sp, #56]
	str	x1, [sp, #48]
	str	x2, [sp, #40]
	strb	wzr, [sp, #39]
	str	wzr, [sp, #32]
	str	wzr, [sp, #28]
	str	wzr, [sp, #24]
	str	xzr, [sp, #16]
	b	LBB1_1
LBB1_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #16]
	ldr	x9, [sp, #40]
	subs	x8, x8, x9
	cset	w8, hs
	tbnz	w8, #0, LBB1_10
	b	LBB1_2
LBB1_2:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	x8, [sp, #48]
	add	x9, x8, #1
	str	x9, [sp, #48]
	ldrb	w8, [x8]
	strb	w8, [sp, #39]
	ldrb	w8, [sp, #39]
	mov	w9, #213
	eor	w8, w8, w9
	strb	w8, [sp, #39]
	ldrb	w8, [sp, #39]
	and	w8, w8, #0x80
	str	w8, [sp, #28]
	ldrb	w8, [sp, #39]
	and	w8, w8, #0x70
	asr	w8, w8, #4
	str	w8, [sp, #24]
	ldrb	w8, [sp, #39]
	and	w8, w8, #0xf
	lsl	w8, w8, #4
	orr	w8, w8, #0x8
	str	w8, [sp, #32]
	ldr	w8, [sp, #24]
	mov	w9, #0
	subs	w8, w8, #0
	cset	w8, ne
	and	w10, w8, #0x1
	mov	w8, #256
	ands	w10, w10, #0x1
	csel	w9, w8, w9, ne
	ldr	w8, [sp, #32]
	add	w8, w8, w9
	str	w8, [sp, #32]
	ldr	w8, [sp, #24]
	subs	w8, w8, #1
	cset	w8, le
	tbnz	w8, #0, LBB1_4
	b	LBB1_3
LBB1_3:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #24]
	subs	w8, w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB1_5
LBB1_4:                                 ;   in Loop: Header=BB1_1 Depth=1
	mov	w8, #0
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB1_5
LBB1_5:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	ldr	w8, [sp, #32]
	lsl	w8, w8, w9
	str	w8, [sp, #32]
	ldr	w8, [sp, #28]
	subs	w8, w8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB1_7
	b	LBB1_6
LBB1_6:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	w9, [sp, #32]
	mov	w8, #0
	subs	w8, w8, w9
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	b	LBB1_8
LBB1_7:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #32]
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	b	LBB1_8
LBB1_8:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	ldr	x9, [sp, #56]
	add	x10, x9, #2
	str	x10, [sp, #56]
	strh	w8, [x9]
	b	LBB1_9
LBB1_9:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	x8, [sp, #16]
	add	x8, x8, #1
	str	x8, [sp, #16]
	b	LBB1_1
LBB1_10:
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
	stur	wzr, [x29, #-36]
	str	w0, [sp, #40]
	str	x1, [sp, #32]
	adrp	x0, _pcm@PAGE
	add	x0, x0, _pcm@PAGEOFF
	sub	x1, x29, #16
	sub	x2, x29, #32
	mov	x3, #8
	bl	_test
	adrp	x0, l_.str@PAGE
	add	x0, x0, l_.str@PAGEOFF
	bl	_libmin_printf
	str	xzr, [sp, #24]
	b	LBB2_1
LBB2_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #24]
	subs	x8, x8, #8
	cset	w8, hs
	tbnz	w8, #0, LBB2_4
	b	LBB2_2
LBB2_2:                                 ;   in Loop: Header=BB2_1 Depth=1
	ldr	x9, [sp, #24]
	adrp	x8, _pcm@PAGE
	add	x8, x8, _pcm@PAGEOFF
	ldrsh	w10, [x8, x9, lsl #1]
	mov	x9, sp
                                        ; implicit-def: $x8
	mov	x8, x10
	str	x8, [x9]
	adrp	x0, l_.str.1@PAGE
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_libmin_printf
	b	LBB2_3
LBB2_3:                                 ;   in Loop: Header=BB2_1 Depth=1
	ldr	x8, [sp, #24]
	add	x8, x8, #1
	str	x8, [sp, #24]
	b	LBB2_1
LBB2_4:
	adrp	x0, l_.str.2@PAGE
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_libmin_printf
	adrp	x0, l_.str.3@PAGE
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_libmin_printf
	str	xzr, [sp, #16]
	b	LBB2_5
LBB2_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #16]
	subs	x8, x8, #8
	cset	w8, hs
	tbnz	w8, #0, LBB2_8
	b	LBB2_6
LBB2_6:                                 ;   in Loop: Header=BB2_5 Depth=1
	ldr	x9, [sp, #16]
	sub	x8, x29, #16
	ldrb	w10, [x8, x9]
	mov	x9, sp
                                        ; implicit-def: $x8
	mov	x8, x10
	str	x8, [x9]
	adrp	x0, l_.str.4@PAGE
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_libmin_printf
	b	LBB2_7
LBB2_7:                                 ;   in Loop: Header=BB2_5 Depth=1
	ldr	x8, [sp, #16]
	add	x8, x8, #1
	str	x8, [sp, #16]
	b	LBB2_5
LBB2_8:
	adrp	x0, l_.str.2@PAGE
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_libmin_printf
	adrp	x0, l_.str.5@PAGE
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_libmin_printf
	str	xzr, [sp, #8]
	b	LBB2_9
LBB2_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]
	subs	x8, x8, #8
	cset	w8, hs
	tbnz	w8, #0, LBB2_12
	b	LBB2_10
LBB2_10:                                ;   in Loop: Header=BB2_9 Depth=1
	ldr	x9, [sp, #8]
	sub	x8, x29, #32
	ldrsh	w10, [x8, x9, lsl #1]
	mov	x9, sp
                                        ; implicit-def: $x8
	mov	x8, x10
	str	x8, [x9]
	adrp	x0, l_.str.1@PAGE
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_libmin_printf
	b	LBB2_11
LBB2_11:                                ;   in Loop: Header=BB2_9 Depth=1
	ldr	x8, [sp, #8]
	add	x8, x8, #1
	str	x8, [sp, #8]
	b	LBB2_9
LBB2_12:
	adrp	x0, l_.str.2@PAGE
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_libmin_printf
	bl	_libmin_success
	ldur	x9, [x29, #-8]
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	subs	x8, x8, x9
	cset	w8, eq
	tbnz	w8, #0, LBB2_14
	b	LBB2_13
LBB2_13:
	bl	___stack_chk_fail
LBB2_14:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function test
_test:                                  ; @test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	stur	x0, [x29, #-8]
	stur	x1, [x29, #-16]
	str	x2, [sp, #24]
	str	x3, [sp, #16]
	ldur	x0, [x29, #-16]
	ldur	x1, [x29, #-8]
	ldr	x2, [sp, #16]
	bl	_encode
	str	xzr, [sp, #8]
	b	LBB3_1
LBB3_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [sp, #16]
	subs	x8, x8, x9
	cset	w8, hs
	tbnz	w8, #0, LBB3_7
	b	LBB3_2
LBB3_2:                                 ;   in Loop: Header=BB3_1 Depth=1
	ldur	x8, [x29, #-16]
	ldr	x9, [sp, #8]
	ldrb	w8, [x8, x9]
	ldr	x10, [sp, #8]
	adrp	x9, _r_coded@PAGE
	add	x9, x9, _r_coded@PAGEOFF
	ldrb	w9, [x9, x10]
	subs	w8, w8, w9
	cset	w8, ne
	tbnz	w8, #0, LBB3_4
	b	LBB3_3
LBB3_3:                                 ;   in Loop: Header=BB3_1 Depth=1
	b	LBB3_5
LBB3_4:                                 ;   in Loop: Header=BB3_1 Depth=1
	mov	w0, #1
	bl	_libmin_fail
	b	LBB3_5
LBB3_5:                                 ;   in Loop: Header=BB3_1 Depth=1
	b	LBB3_6
LBB3_6:                                 ;   in Loop: Header=BB3_1 Depth=1
	ldr	x8, [sp, #8]
	add	x8, x8, #1
	str	x8, [sp, #8]
	b	LBB3_1
LBB3_7:
	ldr	x0, [sp, #24]
	ldur	x1, [x29, #-16]
	ldr	x2, [sp, #16]
	bl	_decode
	str	xzr, [sp]
	b	LBB3_8
LBB3_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp]
	ldr	x9, [sp, #16]
	subs	x8, x8, x9
	cset	w8, hs
	tbnz	w8, #0, LBB3_14
	b	LBB3_9
LBB3_9:                                 ;   in Loop: Header=BB3_8 Depth=1
	ldr	x8, [sp, #24]
	ldr	x9, [sp]
	ldrsh	w8, [x8, x9, lsl #1]
	ldr	x10, [sp]
	adrp	x9, _r_decoded@PAGE
	add	x9, x9, _r_decoded@PAGEOFF
	ldrsh	w9, [x9, x10, lsl #1]
	subs	w8, w8, w9
	cset	w8, ne
	tbnz	w8, #0, LBB3_11
	b	LBB3_10
LBB3_10:                                ;   in Loop: Header=BB3_8 Depth=1
	b	LBB3_12
LBB3_11:                                ;   in Loop: Header=BB3_8 Depth=1
	mov	w0, #1
	bl	_libmin_fail
	b	LBB3_12
LBB3_12:                                ;   in Loop: Header=BB3_8 Depth=1
	b	LBB3_13
LBB3_13:                                ;   in Loop: Header=BB3_8 Depth=1
	ldr	x8, [sp]
	add	x8, x8, #1
	str	x8, [sp]
	b	LBB3_8
LBB3_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.globl	_pcm                            ; @pcm
	.p2align	1
_pcm:
	.short	1000                            ; 0x3e8
	.short	64536                           ; 0xfc18
	.short	1234                            ; 0x4d2
	.short	3200                            ; 0xc80
	.short	64222                           ; 0xfade
	.short	0                               ; 0x0
	.short	32767                           ; 0x7fff
	.short	32768                           ; 0x8000

	.globl	_r_coded                        ; @r_coded
_r_coded:
	.ascii	"\372z\346\234a\325\252*"

	.globl	_r_decoded                      ; @r_decoded
	.p2align	1
_r_decoded:
	.short	1008                            ; 0x3f0
	.short	64528                           ; 0xfc10
	.short	1248                            ; 0x4e0
	.short	3264                            ; 0xcc0
	.short	64224                           ; 0xfae0
	.short	8                               ; 0x8
	.short	32256                           ; 0x7e00
	.short	33280                           ; 0x8200

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"inputs: "

l_.str.1:                               ; @.str.1
	.asciz	"%d "

l_.str.2:                               ; @.str.2
	.asciz	"\n"

l_.str.3:                               ; @.str.3
	.asciz	"encode: "

l_.str.4:                               ; @.str.4
	.asciz	"%u "

l_.str.5:                               ; @.str.5
	.asciz	"decode: "

.subsections_via_symbols