	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hgo_configure_stream
_hgo_configure_stream:                  ## @hgo_configure_stream
	.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	%rcx, %r14
	movq	%rdi, %rbx
	addq	$4, %rdi
	callq	_to_hgo
	movq	%rax, %r13
	movl	(%rbx), %esi
	movq	_HISTO_PAD_SINK@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_V4L2_SEL_TGT_CROP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_vsp1_entity_get_pad_selection
	movq	%rax, %r12
	movl	(%rbx), %esi
	movl	(%r15), %edx
	movq	_V4L2_SEL_TGT_COMPOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_vsp1_entity_get_pad_selection
	movq	%rax, %r15
	movq	_VI6_HGO_REGRST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_VI6_HGO_REGRST_RCLEA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_vsp1_hgo_write
	movq	_VI6_HGO_OFFSET@GOTPCREL(%rip), %rax
	movq	_VI6_HGO_OFFSET_HOFFSET_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	(%r12), %esi
	shll	%cl, %esi
	movl	(%rax), %edx
	movl	4(%r12), %eax
	movq	_VI6_HGO_OFFSET_VOFFSET_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%esi, %eax
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%eax, %ecx
	callq	_vsp1_hgo_write
	movq	_VI6_HGO_SIZE@GOTPCREL(%rip), %rax
	movq	_VI6_HGO_SIZE_HSIZE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	8(%r12), %esi
	shll	%cl, %esi
	movl	(%rax), %edx
	movl	12(%r12), %eax
	movq	_VI6_HGO_SIZE_VSIZE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%esi, %eax
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%eax, %ecx
	callq	_vsp1_hgo_write
	movl	16(%r13), %edi
	callq	_mutex_lock
	movq	24(%r13), %rax
	movq	32(%r13), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%r13)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_hgo_num_bins@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax), %rax
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%r13)
LBB0_2:
	movl	16(%r13), %edi
	callq	_mutex_unlock
	movl	8(%r12), %eax
	movl	12(%r12), %ecx
	addl	%eax, %eax
	xorl	%edi, %edi
	xorl	%edx, %edx
	divl	8(%r15)
	movl	%eax, %esi
	movl	$2863311531, %ebx               ## imm = 0xAAAAAAAB
	imulq	%rbx, %rsi
	shrq	$33, %rsi
	addl	%ecx, %ecx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	12(%r15)
                                        ## kill: def $eax killed $eax def $rax
	imulq	%rbx, %rax
	shrq	$33, %rax
	movq	_VI6_HGO_MODE@GOTPCREL(%rip), %rcx
	cmpl	$256, (%r13)                    ## imm = 0x100
	movl	$0, %ebx
	jne	LBB0_4
## %bb.3:
	movq	_VI6_HGO_MODE_STEP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
LBB0_4:
	movl	(%rcx), %edx
	cmpq	$0, 8(%r13)
	je	LBB0_6
## %bb.5:
	movq	_VI6_HGO_MODE_MAXRGB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
LBB0_6:
	movq	_VI6_HGO_MODE_HRATIO_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%ebx, %edi
	orl	%edi, %esi
	movq	_VI6_HGO_MODE_VRATIO_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%esi, %eax
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vsp1_hgo_write                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HISTO_PAD_SINK,4,2             ## @HISTO_PAD_SINK
	.comm	_V4L2_SEL_TGT_CROP,4,2          ## @V4L2_SEL_TGT_CROP
	.comm	_V4L2_SEL_TGT_COMPOSE,4,2       ## @V4L2_SEL_TGT_COMPOSE
	.comm	_VI6_HGO_REGRST,4,2             ## @VI6_HGO_REGRST
	.comm	_VI6_HGO_REGRST_RCLEA,4,2       ## @VI6_HGO_REGRST_RCLEA
	.comm	_VI6_HGO_OFFSET,4,2             ## @VI6_HGO_OFFSET
	.comm	_VI6_HGO_OFFSET_HOFFSET_SHIFT,4,2 ## @VI6_HGO_OFFSET_HOFFSET_SHIFT
	.comm	_VI6_HGO_OFFSET_VOFFSET_SHIFT,4,2 ## @VI6_HGO_OFFSET_VOFFSET_SHIFT
	.comm	_VI6_HGO_SIZE,4,2               ## @VI6_HGO_SIZE
	.comm	_VI6_HGO_SIZE_HSIZE_SHIFT,4,2   ## @VI6_HGO_SIZE_HSIZE_SHIFT
	.comm	_VI6_HGO_SIZE_VSIZE_SHIFT,4,2   ## @VI6_HGO_SIZE_VSIZE_SHIFT
	.comm	_hgo_num_bins,8,3               ## @hgo_num_bins
	.comm	_VI6_HGO_MODE,4,2               ## @VI6_HGO_MODE
	.comm	_VI6_HGO_MODE_STEP,4,2          ## @VI6_HGO_MODE_STEP
	.comm	_VI6_HGO_MODE_MAXRGB,4,2        ## @VI6_HGO_MODE_MAXRGB
	.comm	_VI6_HGO_MODE_HRATIO_SHIFT,4,2  ## @VI6_HGO_MODE_HRATIO_SHIFT
	.comm	_VI6_HGO_MODE_VRATIO_SHIFT,4,2  ## @VI6_HGO_MODE_VRATIO_SHIFT
	.no_dead_strip	_hgo_configure_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hgo_configure_stream
_hgo_configure_stream:                  ; @hgo_configure_stream
	.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, x3
	mov	x22, x0
	add	x0, x0, #4
	bl	_to_hgo
	mov	x20, x0
	ldr	w1, [x22]
Lloh0:
	adrp	x23, _HISTO_PAD_SINK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _HISTO_PAD_SINK@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh2:
	adrp	x8, _V4L2_SEL_TGT_CROP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_SEL_TGT_CROP@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x22
	bl	_vsp1_entity_get_pad_selection
	mov	x21, x0
	ldr	w1, [x22]
	ldr	w2, [x23]
Lloh5:
	adrp	x8, _V4L2_SEL_TGT_COMPOSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_SEL_TGT_COMPOSE@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x22
	bl	_vsp1_entity_get_pad_selection
	mov	x22, x0
Lloh8:
	adrp	x8, _VI6_HGO_REGRST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VI6_HGO_REGRST@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _VI6_HGO_REGRST_RCLEA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VI6_HGO_REGRST_RCLEA@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_vsp1_hgo_write
Lloh14:
	adrp	x8, _VI6_HGO_OFFSET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VI6_HGO_OFFSET@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _VI6_HGO_OFFSET_HOFFSET_SHIFT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VI6_HGO_OFFSET_HOFFSET_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldp	w9, w10, [x21]
	lsl	w8, w9, w8
Lloh20:
	adrp	x9, _VI6_HGO_OFFSET_VOFFSET_SHIFT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _VI6_HGO_OFFSET_VOFFSET_SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	orr	w3, w9, w8
	mov	x0, x20
	mov	x1, x19
	bl	_vsp1_hgo_write
Lloh23:
	adrp	x8, _VI6_HGO_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VI6_HGO_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
Lloh26:
	adrp	x8, _VI6_HGO_SIZE_HSIZE_SHIFT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _VI6_HGO_SIZE_HSIZE_SHIFT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldp	w9, w10, [x21, #8]
	lsl	w8, w9, w8
Lloh29:
	adrp	x9, _VI6_HGO_SIZE_VSIZE_SHIFT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _VI6_HGO_SIZE_VSIZE_SHIFT@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	orr	w3, w9, w8
	mov	x0, x20
	mov	x1, x19
	bl	_vsp1_hgo_write
	ldr	w0, [x20, #16]
	bl	_mutex_lock
	ldp	x8, x9, [x20, #24]
	ldr	x9, [x9]
	str	x9, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh32:
	adrp	x9, _hgo_num_bins@GOTPAGE
Lloh33:
	ldr	x9, [x9, _hgo_num_bins@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	ldr	x8, [x8]
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x20]
LBB0_2:
	ldr	w0, [x20, #16]
	bl	_mutex_unlock
	ldp	w8, w9, [x21, #8]
	lsl	w8, w8, #1
	ldp	w10, w11, [x22, #8]
	udiv	w8, w8, w10
	mov	w10, #43691
	movk	w10, #43690, lsl #16
	umull	x8, w8, w10
	lsr	x8, x8, #33
	lsl	w9, w9, #1
	udiv	w9, w9, w11
	umull	x9, w9, w10
	lsr	x9, x9, #33
Lloh35:
	adrp	x10, _VI6_HGO_MODE@GOTPAGE
Lloh36:
	ldr	x10, [x10, _VI6_HGO_MODE@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x10]
	ldr	w10, [x20]
Lloh38:
	adrp	x11, _VI6_HGO_MODE_STEP@GOTPAGE
Lloh39:
	ldr	x11, [x11, _VI6_HGO_MODE_STEP@GOTPAGEOFF]
Lloh40:
	ldr	w11, [x11]
	cmp	w10, #256
	csel	w10, w11, wzr, eq
	ldr	x11, [x20, #8]
Lloh41:
	adrp	x12, _VI6_HGO_MODE_MAXRGB@GOTPAGE
Lloh42:
	ldr	x12, [x12, _VI6_HGO_MODE_MAXRGB@GOTPAGEOFF]
Lloh43:
	ldr	w12, [x12]
	cmp	x11, #0
	csel	w11, wzr, w12, eq
	orr	w10, w11, w10
Lloh44:
	adrp	x11, _VI6_HGO_MODE_HRATIO_SHIFT@GOTPAGE
Lloh45:
	ldr	x11, [x11, _VI6_HGO_MODE_HRATIO_SHIFT@GOTPAGEOFF]
Lloh46:
	ldr	w11, [x11]
	lsl	w8, w8, w11
	orr	w8, w10, w8
Lloh47:
	adrp	x10, _VI6_HGO_MODE_VRATIO_SHIFT@GOTPAGE
Lloh48:
	ldr	x10, [x10, _VI6_HGO_MODE_VRATIO_SHIFT@GOTPAGEOFF]
Lloh49:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w3, w8, w9
	mov	x0, x20
	mov	x1, x19
	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
	b	_vsp1_hgo_write
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_HISTO_PAD_SINK,4,2             ; @HISTO_PAD_SINK
	.comm	_V4L2_SEL_TGT_CROP,4,2          ; @V4L2_SEL_TGT_CROP
	.comm	_V4L2_SEL_TGT_COMPOSE,4,2       ; @V4L2_SEL_TGT_COMPOSE
	.comm	_VI6_HGO_REGRST,4,2             ; @VI6_HGO_REGRST
	.comm	_VI6_HGO_REGRST_RCLEA,4,2       ; @VI6_HGO_REGRST_RCLEA
	.comm	_VI6_HGO_OFFSET,4,2             ; @VI6_HGO_OFFSET
	.comm	_VI6_HGO_OFFSET_HOFFSET_SHIFT,4,2 ; @VI6_HGO_OFFSET_HOFFSET_SHIFT
	.comm	_VI6_HGO_OFFSET_VOFFSET_SHIFT,4,2 ; @VI6_HGO_OFFSET_VOFFSET_SHIFT
	.comm	_VI6_HGO_SIZE,4,2               ; @VI6_HGO_SIZE
	.comm	_VI6_HGO_SIZE_HSIZE_SHIFT,4,2   ; @VI6_HGO_SIZE_HSIZE_SHIFT
	.comm	_VI6_HGO_SIZE_VSIZE_SHIFT,4,2   ; @VI6_HGO_SIZE_VSIZE_SHIFT
	.comm	_hgo_num_bins,8,3               ; @hgo_num_bins
	.comm	_VI6_HGO_MODE,4,2               ; @VI6_HGO_MODE
	.comm	_VI6_HGO_MODE_STEP,4,2          ; @VI6_HGO_MODE_STEP
	.comm	_VI6_HGO_MODE_MAXRGB,4,2        ; @VI6_HGO_MODE_MAXRGB
	.comm	_VI6_HGO_MODE_HRATIO_SHIFT,4,2  ; @VI6_HGO_MODE_HRATIO_SHIFT
	.comm	_VI6_HGO_MODE_VRATIO_SHIFT,4,2  ; @VI6_HGO_MODE_VRATIO_SHIFT
	.no_dead_strip	_hgo_configure_stream
.subsections_via_symbols
