	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function comp_tx
_comp_tx:                               ## @comp_tx
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movq	%rcx, %r14
	movq	%rsi, %r15
	testl	%r9d, %r9d
	je	LBB0_2
## %bb.1:
	movl	$0, (%r12)
	movl	$0, (%r14)
	movl	(%r12), %ecx
	xorl	%esi, %esi
	jmp	LBB0_18
LBB0_2:
	cmpl	$0, (%r15)
	jle	LBB0_9
## %bb.3:
	movl	$0, (%r14)
	movq	_TS_CLOCK@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	leal	255(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$8, %ecx
	movl	(%r15), %ebx
	cmpl	%ebx, %ecx
	jle	LBB0_4
## %bb.5:
	movl	$1, (%r14)
	movl	(%r13), %eax
	leal	1023(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$10, %ecx
	movl	(%r15), %ebx
	movl	$1, %eax
	cmpl	%ebx, %ecx
	jle	LBB0_8
## %bb.6:
	movl	$2, (%r14)
	movl	(%r13), %eax
	leal	8191(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$13, %ecx
	movl	(%r15), %ebx
	movl	$2, %eax
	cmpl	%ebx, %ecx
	jle	LBB0_8
## %bb.7:
	movl	$3, (%r14)
	movl	(%r15), %ebx
	movl	$3, %eax
	jmp	LBB0_8
LBB0_9:
	jne	LBB0_11
## %bb.10:
	addl	(%rdi), %edx
	movl	%edx, (%r15)
LBB0_11:
	movl	$3, (%r14)
	movq	_TS_CLOCK@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	leal	131071(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$17, %ecx
	movl	(%r15), %ebx
	movl	%ebx, %edx
	negl	%edx
	movl	$3, %eax
	cmpl	%edx, %ecx
	jg	LBB0_16
## %bb.12:
	movl	$2, (%r14)
	movl	(%r13), %eax
	leal	8191(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$13, %edx
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	subl	(%r15), %esi
	movl	$3, %eax
	cmpl	%esi, %edx
	jg	LBB0_15
## %bb.13:
	movl	$1, (%r14)
	movl	(%r13), %eax
	leal	1023(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$10, %edx
	subl	(%r15), %ecx
	movl	$2, %eax
	cmpl	%ecx, %edx
	jg	LBB0_15
## %bb.14:
	movl	$0, (%r14)
	movl	(%r13), %eax
	leal	255(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	xorl	%edx, %edx
	subl	(%r15), %edx
	sarl	$8, %ecx
	xorl	%eax, %eax
	cmpl	%edx, %ecx
	setg	%al
LBB0_15:
	movl	%eax, (%r14)
	movl	(%r15), %ebx
LBB0_16:
	movl	%eax, %eax
	leaq	_comp_tx.pre_div(%rip), %rcx
	imull	(%rcx,%rax,4), %ebx
	negl	%ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DPRINTK
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_DIV_ROUND_UP
	jmp	LBB0_17
LBB0_4:
	xorl	%eax, %eax
LBB0_8:
	leaq	_comp_tx.pre_div(%rip), %rcx
	imull	(%rcx,%rax,4), %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DPRINTK
	movl	(%r13), %eax
	cltd
	idivl	%ebx
LBB0_17:
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edx
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovgl	%edx, %ecx
	movl	%ecx, (%r12)
	movq	_MID_SEG_MAX_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	cmovgel	%eax, %ecx
	movl	%ecx, (%r12)
	movslq	(%r14), %rsi
LBB0_18:
	movq	_TS_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	_comp_tx.pre_div(%rip), %rdi
	cltd
	idivl	(%rdi,%rsi,4)
	incl	%ecx
	cltd
	idivl	%ecx
	movl	%eax, (%r15)
	movl	(%r14), %edx
	movl	(%r12), %ecx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DPRINTK
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @comp_tx.pre_div
_comp_tx.pre_div:
	.long	4                               ## 0x4
	.long	16                              ## 0x10
	.long	128                             ## 0x80
	.long	2048                            ## 0x800

	.comm	_TS_CLOCK,4,2                   ## @TS_CLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"min div %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"max div %d\n"

	.comm	_MID_SEG_MAX_RATE,4,2           ## @MID_SEG_MAX_RATE
L_.str.2:                               ## @.str.2
	.asciz	"out pcr: %d (%d:%d)\n"

	.no_dead_strip	_comp_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function comp_tx
_comp_tx:                               ; @comp_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x21, x1
Lloh0:
	adrp	x23, _TS_CLOCK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TS_CLOCK@GOTPAGEOFF]
Lloh2:
	adrp	x24, _comp_tx.pre_div@PAGE
Lloh3:
	add	x24, x24, _comp_tx.pre_div@PAGEOFF
	cbz	w5, LBB0_2
; %bb.1:
	mov	x9, #0
	str	wzr, [x19]
	str	wzr, [x20]
	ldr	w8, [x19]
	b	LBB0_20
LBB0_2:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	str	wzr, [x20]
	ldr	w8, [x23]
	add	w9, w8, #255
	cmp	w8, #0
	csel	w8, w9, w8, lt
	ldr	w9, [x21]
	cmp	w9, w8, asr #8
	b.ge	LBB0_12
; %bb.4:
	mov	w8, #1
	str	w8, [x20]
	ldr	w9, [x23]
	add	w10, w9, #1023
	cmp	w9, #0
	csel	w10, w10, w9, lt
	ldr	w9, [x21]
	cmp	w9, w10, asr #10
	b.ge	LBB0_13
; %bb.5:
	mov	w8, #2
	str	w8, [x20]
	ldr	w9, [x23]
	mov	w10, #8191
	add	w10, w9, w10
	cmp	w9, #0
	csel	w10, w10, w9, lt
	ldr	w9, [x21]
	cmp	w9, w10, asr #13
	b.ge	LBB0_13
; %bb.6:
	mov	w8, #3
	str	w8, [x20]
	ldr	w9, [x21]
	b	LBB0_13
LBB0_7:
	cbnz	w8, LBB0_9
; %bb.8:
	ldr	w8, [x0]
	add	w8, w8, w2
	str	w8, [x21]
LBB0_9:
	mov	w8, #3
	str	w8, [x20]
	ldr	w9, [x23]
	mov	w10, #131071
	add	w10, w9, w10
	cmp	w9, #0
	csel	w10, w10, w9, lt
	ldr	w9, [x21]
	neg	w11, w9
	cmp	w11, w10, asr #17
	b.lt	LBB0_18
; %bb.10:
	mov	w8, #2
	str	w8, [x20]
	ldr	w8, [x23]
	mov	w9, #8191
	add	w9, w8, w9
	cmp	w8, #0
	csel	w8, w9, w8, lt
	ldr	w9, [x21]
	neg	w9, w9
	cmp	w9, w8, asr #13
	b.ge	LBB0_14
; %bb.11:
	mov	w8, #3
	b	LBB0_17
LBB0_12:
	mov	x8, #0
LBB0_13:
	ldr	w8, [x24, x8, lsl #2]
	mul	w22, w9, w8
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_DPRINTK
	ldr	w8, [x23]
	sdiv	w0, w8, w22
	b	LBB0_19
LBB0_14:
	mov	w8, #1
	str	w8, [x20]
	ldr	w8, [x23]
	add	w9, w8, #1023
	cmp	w8, #0
	csel	w8, w9, w8, lt
	ldr	w9, [x21]
	neg	w9, w9
	cmp	w9, w8, asr #10
	b.ge	LBB0_16
; %bb.15:
	mov	w8, #2
	b	LBB0_17
LBB0_16:
	str	wzr, [x20]
	ldr	w8, [x23]
	add	w9, w8, #255
	cmp	w8, #0
	csel	w8, w9, w8, lt
	ldr	w9, [x21]
	neg	w9, w9
	cmp	w9, w8, asr #8
	cset	w8, lt
LBB0_17:
	str	w8, [x20]
	ldr	w9, [x21]
LBB0_18:
	ldr	w8, [x24, w8, uxtw #2]
	mneg	w22, w8, w9
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_DPRINTK
	ldr	w0, [x23]
	mov	x1, x22
	bl	_DIV_ROUND_UP
LBB0_19:
	sub	w8, w0, #1
	cmp	w0, #0
	csel	w8, w8, wzr, gt
Lloh8:
	adrp	x9, _MID_SEG_MAX_RATE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MID_SEG_MAX_RATE@GOTPAGEOFF]
	str	w8, [x19]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	str	w8, [x19]
	ldrsw	x9, [x20]
LBB0_20:
	ldr	w10, [x23]
	ldr	w9, [x24, x9, lsl #2]
	sdiv	w9, w10, w9
	add	w8, w8, #1
	sdiv	w1, w9, w8
	str	w1, [x21]
	ldr	w8, [x20]
	ldr	w9, [x19]
	stp	x8, x9, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DPRINTK
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @comp_tx.pre_div
_comp_tx.pre_div:
	.long	4                               ; 0x4
	.long	16                              ; 0x10
	.long	128                             ; 0x80
	.long	2048                            ; 0x800

	.comm	_TS_CLOCK,4,2                   ; @TS_CLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"min div %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"max div %d\n"

	.comm	_MID_SEG_MAX_RATE,4,2           ; @MID_SEG_MAX_RATE
l_.str.2:                               ; @.str.2
	.asciz	"out pcr: %d (%d:%d)\n"

	.no_dead_strip	_comp_tx
.subsections_via_symbols
