	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	3                               ## -- Begin function aw_pulse_set2
LCPI0_0:
	.quad	0xbff0000000000000              ## double -1
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_aw_pulse_set2:                         ## @aw_pulse_set2
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movslq	%edx, %rsi
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movl	(%rax,%rsi,4), %r12d
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	movq	(%rcx,%rsi,8), %r8
	testq	%r8, %r8
	jle	LBB0_4
## %bb.1:
	movl	16(%rbx), %eax
	movl	%eax, %esi
	addl	%r12d, %esi
	jg	LBB0_4
## %bb.2:
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	movl	(%rsi), %esi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addl	%esi, %r12d
	leal	(%rax,%r12), %edi
	testl	%edi, %edi
	jle	LBB0_3
LBB0_4:
	leaq	-88(%rbp), %r13
	cmpq	$0, (%rcx)
	movl	%edx, -108(%rbp)                ## 4-byte Spill
	jle	LBB0_5
## %bb.6:
	movl	$-16, %ecx
	movl	$-4, %r14d
	testl	%edx, %edx
	cmovel	%ecx, %r14d
	je	LBB0_9
## %bb.7:
	testq	%r8, %r8
	jle	LBB0_9
## %bb.8:
	movl	20(%rbx), %r12d
	movl	$-4, %r14d
	jmp	LBB0_9
LBB0_5:
	movl	$-8, %r14d
LBB0_9:
	addl	%r12d, %r14d
	xorl	%r15d, %r15d
	testq	%r8, %r8
	cmovlel	%r15d, %r14d
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	callq	_memset
	movq	%r13, %rdi
	movl	$-1, %esi
	movl	$20, %edx
	callq	_memset
	leaq	-68(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movq	8(%rcx), %r8
	movq	-136(%rbp), %rax                ## 8-byte Reload
	cmpq	$0, (%r8,%rax,8)
	jle	LBB0_15
## %bb.10:
	movq	_MAX_FRAMESIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	cmpl	%esi, %r12d
	jge	LBB0_15
## %bb.11:
	movl	16(%rcx), %r9d
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %edx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	$65535, %eax                    ## imm = 0xFFFF
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %eax
	andl	%eax, (%rbx)
	addl	%edx, %r12d
	cmpl	%esi, %r12d
	jge	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %ebx
	sarl	$4, %ebx
	movl	%r12d, %ecx
	andl	$15, %ecx
	movl	$16, %eax
	subl	%ecx, %eax
	movl	$65535, %edi                    ## imm = 0xFFFF
	movl	%eax, %ecx
	shll	%cl, %edi
	movslq	%ebx, %rcx
	andl	%edi, -88(%rbp,%rcx,4)
	leaq	4(,%rcx,4), %rbx
	addq	%r13, %rbx
	movl	%r9d, %ecx
	subl	%eax, %ecx
	cmpl	$16, %ecx
	jl	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$0, (%rbx)
	addq	$4, %rbx
	addl	$-16, %ecx
	jmp	LBB0_14
LBB0_15:
	movl	-108(%rbp), %ecx                ## 4-byte Reload
	addl	%ecx, %ecx
	movl	$5, %eax
	subl	%ecx, %eax
	cmpq	$0, (%r8)
	movl	$4, %esi
	cmovgl	%eax, %esi
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	callq	_get_bits
	testl	%eax, %eax
	js	LBB0_32
## %bb.16:
	movl	%eax, %r12d
	xorl	%r13d, %r13d
	movq	_MAX_FRAMESIZE@GOTPCREL(%rip), %rdi
	xorl	%r10d, %r10d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%r15d, %eax
	shrl	$4, %eax
	movl	-88(%rbp,%rax,4), %edi
	movl	%r14d, %ebx
	movl	%r10d, %r14d
	callq	_av_log2_16bit
	movl	%r14d, %r10d
	movl	%ebx, %r14d
	movq	_MAX_FRAMESIZE@GOTPCREL(%rip), %rdi
	subl	%eax, %r15d
LBB0_28:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%r15d, %eax
	sarl	$4, %eax
	cltq
	movl	-88(%rbp,%rax,4), %edx
	movl	%r15d, %ecx
	andl	$15, %ecx
	movl	%edx, %esi
	shll	%cl, %esi
	testl	$32768, %esi                    ## imm = 0x8000
	je	LBB0_29
## %bb.30:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$-32769, %esi                   ## imm = 0xFFFF7FFF
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %esi
	andl	%edx, %esi
	movl	%esi, -88(%rbp,%rax,4)
	incl	%r10d
	movl	%r15d, %r13d
LBB0_31:                                ##   in Loop: Header=BB0_17 Depth=1
	incl	%r14d
	cmpl	%r12d, %r10d
	jg	LBB0_32
LBB0_17:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	movl	%r14d, %r15d
	testl	%r14d, %r14d
	jns	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %eax
	movl	%r14d, %r15d
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	%eax, %r15d
	js	LBB0_19
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	(%rdi), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r15d
	jl	LBB0_28
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$15, %r15d
	cmpl	$0, -88(%rbp)
	jne	LBB0_27
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$31, %r15d
	cmpl	$0, -84(%rbp)
	jne	LBB0_27
## %bb.23:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$47, %r15d
	cmpl	$0, -80(%rbp)
	jne	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$63, %r15d
	cmpl	$0, -76(%rbp)
	jne	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$79, %r15d
	cmpl	$0, -72(%rbp)
	jne	LBB0_27
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%r13d, %r15d
	jmp	LBB0_31
LBB0_32:
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	%r15d, (%rax,%rcx,4)
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	callq	_get_bits1
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	leaq	LCPI0_0(%rip), %rax
	movsd	(%rax,%rcx,8), %xmm0            ## xmm0 = mem[0],zero
	movq	16(%rbx), %rax
	movq	24(%rbx), %rcx
	movsd	%xmm0, (%rcx,%rax,8)
	incq	%rax
	movq	%rax, 16(%rbx)
	movq	_MAX_FRAMESIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	subl	%r15d, %eax
	movl	(%rbx), %ecx
	cltd
	idivl	%ecx
	subl	%edx, %ecx
	testl	%edx, %edx
	cmovel	%edx, %ecx
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	%ecx, 20(%rax)
	xorl	%eax, %eax
LBB0_33:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_35
## %bb.34:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movl	$-1, %eax
	jmp	LBB0_33
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_FRAMESIZE,4,2              ## @MAX_FRAMESIZE
	.no_dead_strip	_aw_pulse_set2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_pulse_set2
_aw_pulse_set2:                         ; @aw_pulse_set2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x20, x3
	mov	x23, x2
	mov	x27, x1
	mov	x26, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	add	x8, sp, #20
	add	x22, x8, #8
	ldp	x8, x9, [x0]
	ldr	w21, [x8, w2, sxtw #2]
	ldr	x8, [x9, w2, sxtw #3]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.1:
	ldr	w10, [x26, #16]
	add	w11, w10, w21
	cmp	w11, #0
	b.gt	LBB0_4
; %bb.2:
	ldr	w11, [x20]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w21, w21, w11
	add	w12, w10, w21
	cmp	w12, #1
	b.lt	LBB0_3
LBB0_4:
	sxtw	x19, w23
	ldr	x9, [x9]
	cmp	x9, #1
	b.lt	LBB0_8
; %bb.5:
	mov	w9, #-4
	mov	w10, #-16
	cmp	w23, #0
	csel	w9, w10, w9, eq
	cbz	w23, LBB0_9
; %bb.6:
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.7:
	ldr	w21, [x26, #20]
	mov	w9, #-4
	b	LBB0_9
LBB0_8:
	mov	w9, #-8
LBB0_9:
	add	w9, w21, w9
	cmp	x8, #0
	csel	w8, w9, wzr, gt
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
	add	x24, sp, #20
	add	x0, sp, #20
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	x0, x22
	mov	w1, #-1
	mov	w2, #20
	bl	_memset
	add	x0, x24, #28
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x26, #8]
	ldr	x9, [x8, x19, lsl #3]
Lloh3:
	adrp	x25, _MAX_FRAMESIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MAX_FRAMESIZE@GOTPAGEOFF]
	cmp	x9, #1
	b.lt	LBB0_15
; %bb.10:
	ldr	w9, [x25]
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	cmp	w21, w9
	b.ge	LBB0_15
; %bb.11:
	ldr	w10, [x26, #16]
	ldr	w11, [x20]
	mov	w12, #16
	mov	w13, #65535
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	lsr	w15, w13, w15
	ldr	w16, [x14]
	and	w15, w16, w15
	str	w15, [x14]
	add	w21, w21, w11
	cmp	w21, w9
	b.ge	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	asr	w14, w21, #4
	add	x14, x22, w14, sxtw #2
	and	w15, w21, #0xf
	sub	w16, w12, w15
	sub	w15, w10, w16
	lsl	w16, w13, w16
	ldr	w17, [x14]
	and	w16, w17, w16
	str	w16, [x14], #4
	subs	w16, w15, #16
	b.lt	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	str	wzr, [x14], #4
	mov	x15, x16
	b	LBB0_12
LBB0_15:
	stp	x27, x26, [sp]                  ; 16-byte Folded Spill
	ldr	x8, [x8]
	mov	w9, #5
	sub	w9, w9, w23, lsl #1
	cmp	x8, #0
	mov	w8, #4
	csel	w1, w9, w8, gt
	mov	x0, x27
	bl	_get_bits
	tbnz	w0, #31, LBB0_39
; %bb.16:
	mov	x23, x0
	mov	w26, #0
	mov	w28, #0
	mov	w27, #0
	mov	w21, #-32769
	ldr	w24, [sp, #16]                  ; 4-byte Folded Reload
	b	LBB0_22
LBB0_17:                                ;   in Loop: Header=BB0_22 Depth=1
	mov	w19, #15
LBB0_18:                                ;   in Loop: Header=BB0_22 Depth=1
	lsr	w8, w19, #4
	ldr	w0, [x22, w8, uxtw #2]
	bl	_av_log2_16bit
	sub	w19, w19, w0
LBB0_19:                                ;   in Loop: Header=BB0_22 Depth=1
	asr	w8, w19, #4
	ldr	w8, [x22, w8, sxtw #2]
	and	w9, w19, #0xf
	lsl	w10, w8, w9
	tbz	w10, #15, LBB0_32
; %bb.20:                               ;   in Loop: Header=BB0_22 Depth=1
	sbfx	x10, x19, #4, #28
	asr	w9, w21, w9
	and	w8, w9, w8
	str	w8, [x22, x10, lsl #2]
	add	w27, w27, #1
	mov	x28, x19
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	w24, w24, #1
	add	w26, w26, #1
	cmp	w27, w23
	b.gt	LBB0_40
LBB0_22:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_25 Depth 2
                                        ;     Child Loop BB0_27 Depth 2
	mov	x19, x24
	tbz	w24, #31, LBB0_28
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	w8, [x20]
	add	w9, w8, w24
	cmp	w9, #0
	csel	w9, w9, wzr, gt
	ldr	w10, [sp, #16]                  ; 4-byte Folded Reload
	add	w10, w10, w26
	add	w10, w10, w8
	subs	w9, w9, w10
	cset	w10, ne
	sub	w9, w9, w10
	mov	w10, #1
	cinc	w10, w10, ne
	udiv	w9, w9, w8
	add	w9, w10, w9
	mov	x19, x24
	cmp	w9, #4
	b.lo	LBB0_27
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w11, #0
	and	w10, w9, #0xfffffffc
	madd	w19, w10, w8, w24
LBB0_25:                                ;   Parent Loop BB0_22 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w11, w11, #4
	cmp	w11, w10
	b.ne	LBB0_25
; %bb.26:                               ;   in Loop: Header=BB0_22 Depth=1
	cmp	w9, w10
	b.eq	LBB0_28
LBB0_27:                                ;   Parent Loop BB0_22 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	adds	w19, w19, w8
	b.mi	LBB0_27
LBB0_28:                                ;   in Loop: Header=BB0_22 Depth=1
	ldr	w8, [x25]
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w19, w8, asr #1
	b.lt	LBB0_19
; %bb.29:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	w8, [sp, #28]
	cbnz	w8, LBB0_17
; %bb.30:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	w8, [sp, #32]
	cbz	w8, LBB0_33
; %bb.31:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w19, #31
	b	LBB0_18
LBB0_32:                                ;   in Loop: Header=BB0_22 Depth=1
	mov	x19, x28
	b	LBB0_21
LBB0_33:                                ;   in Loop: Header=BB0_22 Depth=1
	ldr	w8, [sp, #36]
	cbz	w8, LBB0_35
; %bb.34:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w19, #47
	b	LBB0_18
LBB0_35:                                ;   in Loop: Header=BB0_22 Depth=1
	ldr	w8, [sp, #40]
	cbz	w8, LBB0_37
; %bb.36:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w19, #63
	b	LBB0_18
LBB0_37:                                ;   in Loop: Header=BB0_22 Depth=1
	ldr	w8, [sp, #44]
	cbz	w8, LBB0_43
; %bb.38:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w19, #79
	b	LBB0_18
LBB0_39:
	mov	w19, #0
LBB0_40:
	ldp	x8, x9, [x20, #8]
	str	w19, [x8, x9, lsl #2]
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_get_bits1
	mov	x8, x0
	mov	w0, #0
	cmp	x8, #0
	fmov	d0, #-1.00000000
	fmov	d1, #1.00000000
	fcsel	d0, d1, d0, eq
	ldp	x9, x8, [x20, #16]
	str	d0, [x8, x9, lsl #3]
	add	x8, x9, #1
	str	x8, [x20, #16]
	ldr	w8, [x25]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	sub	w8, w8, w19
	ldr	w9, [x20]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	sub	w9, w9, w8
	cmp	w8, #0
	csel	w8, wzr, w9, eq
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9, #20]
LBB0_41:
	ldr	x8, [sp, #56]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_44
; %bb.42:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_43:
	mov	w0, #-1
	b	LBB0_41
LBB0_44:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_FRAMESIZE,4,2              ; @MAX_FRAMESIZE
	.no_dead_strip	_aw_pulse_set2
.subsections_via_symbols
