	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tpg_fill_params_extras
_tpg_fill_params_extras:                ## @tpg_fill_params_extras
	.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	%rdx, %r14
	movq	%rdi, %rbx
	movl	(%rdx), %r15d
	movl	(%rdi), %eax
	movl	20(%rdi), %ecx
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	xorl	%r13d, %r13d
	subl	16(%rdi), %edx
	cmovlel	%r13d, %edx
	cmpl	%ecx, %edx
	cmovgel	%ecx, %edx
	movl	%edx, 4(%r14)
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	callq	_tpg_hscale_div
	movl	%eax, 4(%r14)
	movl	12(%r14), %r12d
	movl	(%rbx), %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	callq	_prandom_u32_max
	imull	%r12d, %eax
	movl	%eax, 8(%r14)
	movl	16(%rbx), %eax
	movl	24(%rbx), %edx
	movl	%edx, %ecx
	subl	%eax, %ecx
	jbe	LBB0_2
## %bb.1:
	movl	20(%rbx), %edx
	cmpl	%edx, %ecx
	cmovbl	%ecx, %edx
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_tpg_hscale_div
	movq	%rax, %r13
	movl	16(%rbx), %eax
	movl	24(%rbx), %edx
LBB0_2:
	movl	%r13d, 16(%r14)
	movl	20(%rbx), %ecx
	addl	%eax, %ecx
	addl	28(%rbx), %edx
	cmpl	%edx, %ecx
	jbe	LBB0_4
## %bb.3:
	subl	%eax, %edx
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_tpg_hscale_div
	movq	%rax, %r15
	movl	(%r14), %eax
	cmpl	%r15d, %eax
	cmovbl	%eax, %r15d
LBB0_4:
	movl	%r15d, 20(%r14)
	movq	8(%rbx), %rax
	cmpq	$0, 32(%r14)
	jne	LBB0_5
## %bb.6:
	movq	_V4L2_FIELD_BOTTOM@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	movq	_V4L2_FIELD_TOP@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movl	%edx, 24(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_FIELD_TOP,8,3             ## @V4L2_FIELD_TOP
	.comm	_V4L2_FIELD_BOTTOM,8,3          ## @V4L2_FIELD_BOTTOM
	.no_dead_strip	_tpg_fill_params_extras
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tpg_fill_params_extras
_tpg_fill_params_extras:                ; @tpg_fill_params_extras
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	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
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	ldp	w9, w10, [x0, #16]
	subs	w8, w8, w9
	ldr	w22, [x2]
	csel	w8, w8, wzr, gt
	cmp	w8, w10
	csel	w2, w8, w10, lt
	str	w2, [x19, #4]
	bl	_tpg_hscale_div
	str	w0, [x19, #4]
	ldr	w23, [x19, #12]
	ldr	w8, [x20]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w0, w8, #1
	bl	_prandom_u32_max
	mul	w8, w0, w23
	str	w8, [x19, #8]
	ldr	w8, [x20, #16]
	ldr	w9, [x20, #24]
	subs	w10, w9, w8
	b.ls	LBB0_2
; %bb.1:
	ldr	w8, [x20, #20]
	cmp	w10, w8
	csel	w2, w10, w8, lo
	mov	x0, x20
	mov	x1, x21
	bl	_tpg_hscale_div
	ldr	w8, [x20, #16]
	ldr	w9, [x20, #24]
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	str	w0, [x19, #16]
	ldr	w10, [x20, #20]
	add	w10, w10, w8
	ldr	w11, [x20, #28]
	add	w9, w11, w9
	cmp	w10, w9
	b.ls	LBB0_5
; %bb.4:
	sub	w2, w9, w8
	mov	x0, x20
	mov	x1, x21
	bl	_tpg_hscale_div
	ldr	w8, [x19]
	cmp	w8, w0
	csel	w22, w8, w0, lo
LBB0_5:
	str	w22, [x19, #20]
	ldr	x8, [x20, #8]
	ldr	x9, [x19, #32]
Lloh0:
	adrp	x10, _V4L2_FIELD_TOP@GOTPAGE
Lloh1:
	ldr	x10, [x10, _V4L2_FIELD_TOP@GOTPAGEOFF]
Lloh2:
	adrp	x11, _V4L2_FIELD_BOTTOM@GOTPAGE
Lloh3:
	ldr	x11, [x11, _V4L2_FIELD_BOTTOM@GOTPAGEOFF]
	cmp	x9, #0
	csel	x9, x11, x10, eq
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	str	w8, [x19, #24]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_FIELD_TOP,8,3             ; @V4L2_FIELD_TOP
	.comm	_V4L2_FIELD_BOTTOM,8,3          ; @V4L2_FIELD_BOTTOM
	.no_dead_strip	_tpg_fill_params_extras
.subsections_via_symbols
