	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ultracam_configure_video
_ultracam_configure_video:              ## @ultracam_configure_video
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	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	%rdi, %rbx
	movq	_init_brightness@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	xorl	%esi, %esi
	movl	$255, %edx
	callq	_RESTRICT_TO_RANGE
	movq	_init_contrast@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	xorl	%esi, %esi
	movl	$255, %edx
	callq	_RESTRICT_TO_RANGE
	movq	_init_color@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	xorl	%esi, %esi
	movl	$255, %edx
	callq	_RESTRICT_TO_RANGE
	movq	_init_hue@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	xorl	%esi, %esi
	movl	$255, %edx
	callq	_RESTRICT_TO_RANGE
	movq	_hue_correction@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movl	$255, %edx
	callq	_RESTRICT_TO_RANGE
	leaq	200(%rbx), %rdi
	xorl	%esi, %esi
	movl	$96, %edx
	callq	_memset
	leaq	296(%rbx), %rdi
	movl	$85, %esi
	movl	$96, %edx
	callq	_memset
	movd	(%r12), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pinsrd	$1, (%r13), %xmm0
	pinsrd	$2, (%r14), %xmm0
	pinsrd	$3, (%r15), %xmm0
	pslld	$8, %xmm0
	movdqu	%xmm0, 200(%rbx)
	movabsq	$103079241984, %rax             ## imm = 0x1800006900
	movq	%rax, 216(%rbx)
	movq	_VIDEO_PALETTE_RGB24@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 288(%rbx)
	leaq	96(%rbx), %rdi
	xorl	%esi, %esi
	movl	$96, %edx
	callq	_memset
	movl	124(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	_VID_TYPE_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 128(%rbx)
	movl	$1, 120(%rbx)
	movq	$0, 176(%rbx)
	movl	192(%rbx), %edi
	callq	_VIDEOSIZE_X
	movl	%eax, 172(%rbx)
	movl	192(%rbx), %edi
	callq	_VIDEOSIZE_Y
	movl	%eax, 168(%rbx)
	movq	_min_canvasWidth@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 164(%rbx)
	movq	_min_canvasHeight@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 160(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$96, %edx
	callq	_memset
	pxor	%xmm0, %xmm0
	movdqu	%xmm0, 40(%rbx)
	movq	$0, 56(%rbx)
	movq	_VIDEO_TYPE_CAMERA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movl	28(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_strcpy                         ## TAILCALL
LBB0_1:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_init_brightness,4,2            ## @init_brightness
	.comm	_init_contrast,4,2              ## @init_contrast
	.comm	_init_color,4,2                 ## @init_color
	.comm	_init_hue,4,2                   ## @init_hue
	.comm	_hue_correction,4,2             ## @hue_correction
	.comm	_VIDEO_PALETTE_RGB24,4,2        ## @VIDEO_PALETTE_RGB24
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IBM Ultra Camera"

	.comm	_VID_TYPE_CAPTURE,4,2           ## @VID_TYPE_CAPTURE
	.comm	_min_canvasWidth,4,2            ## @min_canvasWidth
	.comm	_min_canvasHeight,4,2           ## @min_canvasHeight
	.comm	_VIDEO_TYPE_CAMERA,4,2          ## @VIDEO_TYPE_CAMERA
L_.str.1:                               ## @.str.1
	.asciz	"Camera"

	.no_dead_strip	_ultracam_configure_video
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ultracam_configure_video
lCPI0_0:
	.long	26880                           ; 0x6900
	.long	24                              ; 0x18
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ultracam_configure_video:              ; @ultracam_configure_video
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_2
; %bb.1:
	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, x0
Lloh0:
	adrp	x20, _init_brightness@GOTPAGE
Lloh1:
	ldr	x20, [x20, _init_brightness@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	w1, #0
	mov	w2, #255
	bl	_RESTRICT_TO_RANGE
Lloh2:
	adrp	x21, _init_contrast@GOTPAGE
Lloh3:
	ldr	x21, [x21, _init_contrast@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #0
	mov	w2, #255
	bl	_RESTRICT_TO_RANGE
Lloh4:
	adrp	x22, _init_color@GOTPAGE
Lloh5:
	ldr	x22, [x22, _init_color@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	w1, #0
	mov	w2, #255
	bl	_RESTRICT_TO_RANGE
Lloh6:
	adrp	x23, _init_hue@GOTPAGE
Lloh7:
	ldr	x23, [x23, _init_hue@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #0
	mov	w2, #255
	bl	_RESTRICT_TO_RANGE
Lloh8:
	adrp	x8, _hue_correction@GOTPAGE
Lloh9:
	ldr	x8, [x8, _hue_correction@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #255
	bl	_RESTRICT_TO_RANGE
	add	x0, x19, #200
	mov	w1, #0
	mov	w2, #96
	bl	_memset
	add	x0, x19, #296
	mov	w1, #85
	mov	w2, #96
	bl	_memset
	ldr	w8, [x22]
	lsl	w8, w8, #8
	ldr	w9, [x23]
	lsl	w9, w9, #8
	stp	w8, w9, [x19, #200]
	ldr	w8, [x20]
	lsl	w8, w8, #8
	ldr	w9, [x21]
	lsl	w9, w9, #8
	stp	w8, w9, [x19, #208]
Lloh11:
	adrp	x8, lCPI0_0@PAGE
Lloh12:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #216]
Lloh13:
	adrp	x8, _VIDEO_PALETTE_RGB24@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VIDEO_PALETTE_RGB24@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19, #288]
	add	x0, x19, #96
	mov	w1, #0
	mov	w2, #96
	bl	_memset
	ldr	w0, [x19, #124]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
Lloh18:
	adrp	x8, _VID_TYPE_CAPTURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VID_TYPE_CAPTURE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19, #128]
	mov	w8, #1
	str	w8, [x19, #120]
	str	xzr, [x19, #176]
	ldr	w0, [x19, #192]
	bl	_VIDEOSIZE_X
	str	w0, [x19, #172]
	ldr	w0, [x19, #192]
	bl	_VIDEOSIZE_Y
	str	w0, [x19, #168]
Lloh21:
	adrp	x8, _min_canvasWidth@GOTPAGE
Lloh22:
	ldr	x8, [x8, _min_canvasWidth@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _min_canvasHeight@GOTPAGE
Lloh25:
	ldr	x9, [x9, _min_canvasHeight@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #160]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #96
	bl	_memset
	stp	xzr, xzr, [x19, #48]
	str	xzr, [x19, #40]
Lloh27:
	adrp	x8, _VIDEO_TYPE_CAMERA@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VIDEO_TYPE_CAMERA@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	ldr	w0, [x19, #28]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	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	_strcpy
LBB0_2:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	ret
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdrp	Lloh11, Lloh13
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_init_brightness,4,2            ; @init_brightness
	.comm	_init_contrast,4,2              ; @init_contrast
	.comm	_init_color,4,2                 ; @init_color
	.comm	_init_hue,4,2                   ; @init_hue
	.comm	_hue_correction,4,2             ; @hue_correction
	.comm	_VIDEO_PALETTE_RGB24,4,2        ; @VIDEO_PALETTE_RGB24
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IBM Ultra Camera"

	.comm	_VID_TYPE_CAPTURE,4,2           ; @VID_TYPE_CAPTURE
	.comm	_min_canvasWidth,4,2            ; @min_canvasWidth
	.comm	_min_canvasHeight,4,2           ; @min_canvasHeight
	.comm	_VIDEO_TYPE_CAMERA,4,2          ; @VIDEO_TYPE_CAMERA
l_.str.1:                               ; @.str.1
	.asciz	"Camera"

	.no_dead_strip	_ultracam_configure_video
.subsections_via_symbols
