	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movl	%edi, %r15d
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$1, -60(%rbp)
	movq	_MAX_CHANNELS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -112(%rbp)                ## 8-byte Spill
	movl	(%rbx), %r14d
	leaq	(,%r14,4), %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	leal	-6(%r15), %eax
	cmpl	$-5, %eax
	jbe	LBB0_53
## %bb.1:
	movl	$44100, %r12d                   ## imm = 0xAC44
	movl	$2, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	$3, %r15d
	jb	LBB0_11
## %bb.2:
	movq	16(%r13), %rdi
	callq	_atoi
	movq	%rax, %r12
	testl	%r12d, %r12d
	jle	LBB0_3
## %bb.5:
	cmpl	$4, %r15d
	jb	LBB0_11
## %bb.6:
	movq	24(%r13), %rdi
	callq	_atoi
	movq	%rax, %rdx
	testl	%edx, %edx
	jle	LBB0_8
## %bb.7:
	cmpl	%edx, %r14d
	jl	LBB0_8
## %bb.9:
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$5, %r15d
	jb	LBB0_11
## %bb.10:
	movq	32(%r13), %rdi
	callq	_atoi
	movl	%eax, -60(%rbp)
LBB0_11:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%r13), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_fopen
	movq	_outfile@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	8(%r13), %rdi
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	$46, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	leaq	L_.str.4(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	leal	(%r12,%r12), %eax
	leal	(%rax,%rax,2), %edx
	movl	%r12d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_put_wav_header
LBB0_16:
	xorl	%r14d, %r14d
	movq	_FRAC_BITS@GOTPCREL(%rip), %rbx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_17:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_18 Depth 2
	movl	%r15d, %edi
	callq	_int_cos
	imull	$10000, %eax, %r13d             ## imm = 0x2710
	movb	(%rbx), %cl
	sarl	%cl, %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r13d, %edi
	callq	_put16
	decl	%ebx
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_FRAC_ONE@GOTPCREL(%rip), %rax
	imull	$1000, (%rax), %eax             ## imm = 0x3E8
	cltd
	idivl	%r12d
	addl	%eax, %r15d
	incl	%r14d
	cmpl	%r12d, %r14d
	movq	_FRAC_BITS@GOTPCREL(%rip), %rbx
	jne	LBB0_17
## %bb.20:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=1
	imull	$9900, %r14d, %eax              ## imm = 0x26AC
	cltd
	idivl	%r12d
	addl	$100, %eax
	movq	_FRAC_ONE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	cltd
	idivl	%r12d
	addl	%eax, %r15d
	incl	%r14d
	cmpl	%r12d, %r14d
	je	LBB0_25
LBB0_21:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
	movl	%r15d, %edi
	callq	_int_cos
	imull	$10000, %eax, %r13d             ## imm = 0x2710
	movq	_FRAC_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r13d
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_21 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r13d, %edi
	callq	_put16
	decl	%ebx
	jne	LBB0_23
	jmp	LBB0_24
LBB0_25:
	cmpl	$2, %r12d
	jl	LBB0_36
## %bb.26:
	movl	%r12d, %r15d
	shrl	$31, %r15d
	addl	%r12d, %r15d
	sarl	%r15d
	xorl	%r14d, %r14d
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_27 Depth=1
	incl	%r14d
	cmpl	%r15d, %r14d
	je	LBB0_31
LBB0_27:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_29 Depth 2
	leaq	-60(%rbp), %rdi
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_myrnd
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	%eax, %r13d
	addl	$-10000, %r13d                  ## imm = 0xD8F0
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_27 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r13d, %edi
	callq	_put16
	decl	%ebx
	jne	LBB0_29
	jmp	LBB0_30
LBB0_31:
	xorl	%r14d, %r14d
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_32 Depth=1
	incl	%r14d
	cmpl	%r15d, %r14d
	je	LBB0_36
LBB0_32:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_34 Depth 2
	leaq	-60(%rbp), %rdi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_myrnd
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_35
## %bb.33:                              ##   in Loop: Header=BB0_32 Depth=1
	movl	%eax, %r13d
	addl	$-32768, %r13d                  ## imm = 0x8000
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_34:                                ##   Parent Loop BB0_32 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r13d, %edi
	callq	_put16
	decl	%ebx
	jne	LBB0_34
	jmp	LBB0_35
LBB0_36:
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ecx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	testl	%eax, %eax
	movq	-112(%rbp), %r12                ## 8-byte Reload
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_39
## %bb.37:
	xorl	%ebx, %ebx
	leaq	-60(%rbp), %r14
	.p2align	4, 0x90
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	movl	$0, (%r13,%rbx,4)
	movq	%r14, %rdi
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_myrnd
	addl	$100, %eax
	movl	%eax, (%r12,%rbx,4)
	movq	%r14, %rdi
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_myrnd
	addl	$100, %eax
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, -120(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_38
LBB0_39:
	xorl	%ebx, %ebx
	movq	_FRAC_ONE@GOTPCREL(%rip), %r8
	movq	-112(%rbp), %r14                ## 8-byte Reload
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	-104(%rbp), %r15                ## 8-byte Reload
	jmp	LBB0_40
	.p2align	4, 0x90
LBB0_43:                                ##   in Loop: Header=BB0_40 Depth=1
	incl	%ebx
	cmpl	%r12d, %ebx
	je	LBB0_44
LBB0_40:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_42 Depth 2
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	jle	LBB0_43
## %bb.41:                              ##   in Loop: Header=BB0_40 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_42:                                ##   Parent Loop BB0_40 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdx,%r13,4), %edi
	movl	%edi, -76(%rbp)                 ## 4-byte Spill
	callq	_int_cos
	imull	$10000, %eax, %edi              ## imm = 0x2710
	movq	_FRAC_BITS@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	sarl	%cl, %edi
	callq	_put16
	movq	_FRAC_ONE@GOTPCREL(%rip), %r8
	movl	(%r14,%r13,4), %esi
	movl	(%r15,%r13,4), %eax
	subl	%esi, %eax
	imull	%ebx, %eax
	cltd
	idivl	%r12d
	addl	%esi, %eax
	imull	(%r8), %eax
	cltd
	idivl	%r12d
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	addl	-76(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, (%rdx,%r13,4)
	incq	%r13
	cmpq	%r13, -120(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_42
	jmp	LBB0_43
LBB0_44:
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	leal	(%r12,%r12), %eax
	cmpl	$2, %eax
	movl	$1, %ecx
	cmovgel	%eax, %ecx
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_45
	.p2align	4, 0x90
LBB0_48:                                ##   in Loop: Header=BB0_45 Depth=1
	movl	-76(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpl	-88(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_49
LBB0_45:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_47 Depth 2
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_48
## %bb.46:                              ##   in Loop: Header=BB0_45 Depth=1
	movl	(%r8), %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_47:                                ##   Parent Loop BB0_45 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r13d, %edi
	callq	_int_cos
	addl	%ebx, %eax
	imull	$5000, %eax, %eax               ## imm = 0x1388
	movq	_FRAC_BITS@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarl	%cl, %eax
	movl	$10000, %ebx                    ## imm = 0x2710
	subl	%eax, %ebx
	testb	$1, %r14b
	cmovel	%eax, %ebx
	movl	%r15d, %edi
	callq	_int_cos
	imull	%eax, %ebx
	movq	_FRAC_BITS@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	sarl	%cl, %ebx
	movl	%ebx, %edi
	callq	_put16
	movq	_FRAC_ONE@GOTPCREL(%rip), %r8
	movl	(%r8), %ebx
	imull	$500, %ebx, %eax                ## imm = 0x1F4
	cltd
	idivl	%r12d
	movl	%eax, %ecx
	leal	(%rbx,%rbx), %eax
	cltd
	addl	%ecx, %r15d
	idivl	%r12d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%eax, %r13d
	incl	%r14d
	cmpl	%r14d, %ecx
	jne	LBB0_47
	jmp	LBB0_48
LBB0_49:
	movq	_outfile@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fclose
	xorl	%eax, %eax
	jmp	LBB0_50
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	jmp	LBB0_4
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
LBB0_4:
	callq	_fprintf
	movl	$1, %eax
LBB0_50:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_51:
	movq	%rbx, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_54
## %bb.52:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	_perror
	movl	$1, %eax
	jmp	LBB0_51
LBB0_53:
	movq	(%r13), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movl	$1, %edi
	callq	_exit
LBB0_54:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CHANNELS,4,2               ## @MAX_CHANNELS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usage: %s file [<sample rate> [<channels>] [<random seed>]]\ngenerate a test raw 16 bit audio stream\nIf the file extension is .wav a WAVE header will be added.\ndefault: 44100 Hz stereo\n"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"invalid sample rate: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"invalid number of channels: %d\n"

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

	.comm	_outfile,4,2                    ## @outfile
L_.str.4:                               ## @.str.4
	.asciz	".wav"

	.comm	_FRAC_BITS,4,2                  ## @FRAC_BITS
	.comm	_FRAC_ONE,4,2                   ## @FRAC_ONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	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
	.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
	sub	sp, sp, #64
	mov	x21, x1
	mov	x22, x0
	mov	x20, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	mov	w8, #1
	stur	w8, [x29, #-92]
Lloh3:
	adrp	x12, _MAX_CHANNELS@GOTPAGE
Lloh4:
	ldr	x12, [x12, _MAX_CHANNELS@GOTPAGEOFF]
	ldr	w8, [x12]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x8, x9, x8
	mov	x27, x8
	mov	sp, x8
	ldr	w23, [x12]
	lsl	x8, x23, #2
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x9, x9, x12
	stur	x9, [x29, #-112]                ; 8-byte Folded Spill
	mov	sp, x9
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x8, x8, x12
	stur	x8, [x29, #-120]                ; 8-byte Folded Spill
	mov	sp, x8
	sub	w8, w0, #6
	cmn	w8, #5
	b.ls	LBB0_54
; %bb.1:
	cmp	w22, #3
	b.lo	LBB0_8
; %bb.2:
	ldr	x0, [x21, #16]
	bl	_atoi
	mov	x19, x0
	cmp	w19, #0
	b.le	LBB0_47
; %bb.3:
	cmp	w22, #4
	b.lo	LBB0_9
; %bb.4:
	ldr	x0, [x21, #24]
	bl	_atoi
	mov	x26, x0
	cmp	w26, #1
	b.lt	LBB0_48
; %bb.5:
	cmp	w23, w26
	b.lt	LBB0_48
; %bb.6:
	cmp	w22, #5
	b.lo	LBB0_10
; %bb.7:
	ldr	x0, [x21, #32]
	bl	_atoi
	stur	w0, [x29, #-92]
	b	LBB0_10
LBB0_8:
	mov	w19, #44100
LBB0_9:
	mov	w26, #2
LBB0_10:
	ldr	x0, [x21, #8]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fopen
	mov	x8, x0
Lloh13:
	adrp	x9, _outfile@GOTPAGE
Lloh14:
	ldr	x9, [x9, _outfile@GOTPAGEOFF]
Lloh15:
	str	w0, [x9]
	ldr	x0, [x21, #8]
	cbz	w8, LBB0_53
; %bb.11:
	stur	x20, [x29, #-144]               ; 8-byte Folded Spill
	mov	w1, #46
	bl	_strrchr
	cbz	x0, LBB0_14
; %bb.12:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_14
; %bb.13:
	add	w8, w19, w19, lsl #1
	lsl	w2, w8, #1
	mov	x0, x19
	mov	x1, x26
	bl	_put_wav_header
LBB0_14:
	mov	w23, #0
	mov	w21, #0
	mov	w24, #10000
Lloh18:
	adrp	x28, _FRAC_BITS@GOTPAGE
Lloh19:
	ldr	x28, [x28, _FRAC_BITS@GOTPAGEOFF]
	mov	w25, #1000
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	mov	x0, x21
	bl	_int_cos
	mul	w8, w0, w24
	ldr	w9, [x28]
	asr	w22, w8, w9
	mov	x20, x26
LBB0_16:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	bl	_put16
	subs	w20, w20, #1
	b.ne	LBB0_16
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
Lloh20:
	adrp	x8, _FRAC_ONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FRAC_ONE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	mul	w8, w8, w25
	sdiv	w8, w8, w19
	add	w21, w8, w21
	add	w23, w23, #1
	cmp	w23, w19
	b.ne	LBB0_15
; %bb.18:
	mov	w23, #0
	mov	w21, #0
	mov	w24, #10000
	mov	w25, #9900
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	mul	w8, w23, w25
	sdiv	w8, w8, w19
	add	w8, w8, #100
Lloh23:
	adrp	x9, _FRAC_ONE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _FRAC_ONE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	mul	w8, w8, w9
	sdiv	w8, w8, w19
	add	w21, w8, w21
	add	w23, w23, #1
	cmp	w23, w19
	b.eq	LBB0_23
LBB0_20:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_22 Depth 2
	mov	x0, x21
	bl	_int_cos
	cmp	w26, #1
	b.lt	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	mul	w8, w0, w24
	ldr	w9, [x28]
	asr	w22, w8, w9
	mov	x20, x26
LBB0_22:                                ;   Parent Loop BB0_20 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	bl	_put16
	subs	w20, w20, #1
	b.ne	LBB0_22
	b	LBB0_19
LBB0_23:
	cmp	w19, #0
	cinc	w8, w19, lt
	cmp	w19, #1
	b.le	LBB0_34
; %bb.24:
	mov	w23, #0
	asr	w22, w8, #1
	mov	w20, #-10000
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	add	w23, w23, #1
	cmp	w23, w22
	b.eq	LBB0_29
LBB0_26:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_28 Depth 2
	sub	x0, x29, #92
	mov	w1, #20000
	bl	_myrnd
	cmp	w26, #1
	b.lt	LBB0_25
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	add	w21, w0, w20
	mov	x24, x26
LBB0_28:                                ;   Parent Loop BB0_26 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_put16
	subs	w24, w24, #1
	b.ne	LBB0_28
	b	LBB0_25
LBB0_29:
	mov	w20, #0
	b	LBB0_31
LBB0_30:                                ;   in Loop: Header=BB0_31 Depth=1
	add	w20, w20, #1
	cmp	w20, w22
	b.eq	LBB0_34
LBB0_31:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_33 Depth 2
	sub	x0, x29, #92
	mov	w1, #65535
	bl	_myrnd
	cmp	w26, #1
	b.lt	LBB0_30
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=1
	sub	w21, w0, #8, lsl #12            ; =32768
	mov	x23, x26
LBB0_33:                                ;   Parent Loop BB0_31 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_put16
	subs	w23, w23, #1
	b.ne	LBB0_33
	b	LBB0_30
LBB0_34:
	mov	w8, w26
	stp	x27, x8, [x29, #-136]           ; 16-byte Folded Spill
	stur	x26, [x29, #-104]               ; 8-byte Folded Spill
	cmp	w26, #1
	b.lt	LBB0_37
; %bb.35:
	ldp	x21, x22, [x29, #-128]          ; 16-byte Folded Reload
	ldur	x23, [x29, #-136]               ; 8-byte Folded Reload
	ldur	x24, [x29, #-112]               ; 8-byte Folded Reload
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	str	wzr, [x22], #4
	sub	x0, x29, #92
	mov	w1, #5000
	bl	_myrnd
	add	w8, w0, #100
	str	w8, [x23], #4
	sub	x0, x29, #92
	mov	w1, #5000
	bl	_myrnd
	add	w8, w0, #100
	str	w8, [x24], #4
	subs	x21, x21, #1
	b.ne	LBB0_36
LBB0_37:
	mov	w23, #0
	mov	w24, #10000
Lloh26:
	adrp	x20, _FRAC_ONE@GOTPAGE
Lloh27:
	ldr	x20, [x20, _FRAC_ONE@GOTPAGEOFF]
	b	LBB0_39
LBB0_38:                                ;   in Loop: Header=BB0_39 Depth=1
	add	w23, w23, #1
	cmp	w23, w19
	b.eq	LBB0_41
LBB0_39:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_40 Depth 2
	ldp	x25, x27, [x29, #-128]          ; 16-byte Folded Reload
	ldur	x26, [x29, #-136]               ; 8-byte Folded Reload
	ldp	x22, x8, [x29, #-112]           ; 16-byte Folded Reload
	cmp	w8, #1
	b.lt	LBB0_38
LBB0_40:                                ;   Parent Loop BB0_39 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w21, [x27]
	mov	x0, x21
	bl	_int_cos
	mul	w8, w0, w24
	ldr	w9, [x28]
	asr	w0, w8, w9
	bl	_put16
	ldr	w8, [x26], #4
	ldr	w9, [x22], #4
	sub	w9, w9, w8
	mul	w9, w9, w23
	sdiv	w9, w9, w19
	add	w8, w9, w8
	ldr	w9, [x20]
	mul	w8, w8, w9
	sdiv	w8, w8, w19
	add	w8, w8, w21
	str	w8, [x27], #4
	subs	x25, x25, #1
	b.ne	LBB0_40
	b	LBB0_38
LBB0_41:
	mov	w10, #0
	mov	w21, #0
	mov	w22, #0
	lsl	w8, w19, #1
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	stur	w8, [x29, #-120]                ; 4-byte Folded Spill
	mov	w27, #5000
	mov	w23, #10000
	mov	w26, #500
Lloh28:
	adrp	x9, _FRAC_ONE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _FRAC_ONE@GOTPAGEOFF]
	ldur	x24, [x29, #-104]               ; 8-byte Folded Reload
	b	LBB0_43
LBB0_42:                                ;   in Loop: Header=BB0_43 Depth=1
	ldur	w10, [x29, #-112]               ; 4-byte Folded Reload
	add	w10, w10, #1
	ldur	w8, [x29, #-120]                ; 4-byte Folded Reload
	cmp	w10, w8
	b.eq	LBB0_46
LBB0_43:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_45 Depth 2
	stur	w10, [x29, #-112]               ; 4-byte Folded Spill
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	cmp	w8, #1
	b.lt	LBB0_42
; %bb.44:                               ;   in Loop: Header=BB0_43 Depth=1
	mov	w25, #0
	ldr	w20, [x9]
LBB0_45:                                ;   Parent Loop BB0_43 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	bl	_int_cos
	add	w8, w0, w20
	mul	w8, w8, w27
	ldr	w9, [x28]
	asr	w8, w8, w9
	sub	w9, w23, w8
	tst	w25, #0x1
	csel	w20, w8, w9, eq
	mov	x0, x21
	bl	_int_cos
	mul	w8, w20, w0
	ldr	w9, [x28]
	asr	w0, w8, w9
	bl	_put16
Lloh30:
	adrp	x9, _FRAC_ONE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _FRAC_ONE@GOTPAGEOFF]
	ldr	w20, [x9]
	mul	w8, w20, w26
	sdiv	w8, w8, w19
	add	w21, w8, w21
	lsl	w8, w20, #1
	sdiv	w8, w8, w19
	add	w22, w8, w22
	add	w25, w25, #1
	cmp	w24, w25
	b.ne	LBB0_45
	b	LBB0_42
LBB0_46:
Lloh32:
	adrp	x8, _outfile@GOTPAGE
Lloh33:
	ldr	x8, [x8, _outfile@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_fclose
	mov	w0, #0
	ldur	x20, [x29, #-144]               ; 8-byte Folded Reload
	b	LBB0_51
LBB0_47:
Lloh35:
	adrp	x8, _stderr@GOTPAGE
Lloh36:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
Lloh38:
	adrp	x1, l_.str.1@PAGE
Lloh39:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	b	LBB0_49
LBB0_48:
Lloh40:
	adrp	x8, _stderr@GOTPAGE
Lloh41:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
Lloh43:
	adrp	x1, l_.str.2@PAGE
Lloh44:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x26
LBB0_49:
	bl	_fprintf
LBB0_50:
	mov	w0, #1
LBB0_51:
	mov	sp, x20
	ldur	x8, [x29, #-88]
Lloh45:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh46:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_55
; %bb.52:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_53:
	bl	_perror
	b	LBB0_50
LBB0_54:
	ldr	x1, [x21]
Lloh48:
	adrp	x0, l_.str@PAGE
Lloh49:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	w0, #1
	bl	_exit
LBB0_55:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CHANNELS,4,2               ; @MAX_CHANNELS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usage: %s file [<sample rate> [<channels>] [<random seed>]]\ngenerate a test raw 16 bit audio stream\nIf the file extension is .wav a WAVE header will be added.\ndefault: 44100 Hz stereo\n"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"invalid sample rate: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"invalid number of channels: %d\n"

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

	.comm	_outfile,4,2                    ; @outfile
l_.str.4:                               ; @.str.4
	.asciz	".wav"

	.comm	_FRAC_BITS,4,2                  ; @FRAC_BITS
	.comm	_FRAC_ONE,4,2                   ; @FRAC_ONE
.subsections_via_symbols
