	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ultracam_veio
_ultracam_veio:                         ## @ultracam_veio
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_CAMERA_IS_OPERATIONAL
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movq	8(%r14), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.4:
	callq	_usb_sndctrlpipe
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rdx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	subq	$8, %rsp
	movzbl	%r13b, %edx
	movzwl	%r12w, %r8d
	movzwl	-64(%rbp), %r9d                 ## 2-byte Folded Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	pushq	$1000                           ## imm = 0x3E8
	pushq	$0
	pushq	$0
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jns	LBB0_7
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_3:
	callq	_usb_rcvctrlpipe
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rdx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	subq	$8, %rsp
	leaq	-56(%rbp), %r10
	movzbl	%r13b, %r13d
	movzwl	%r12w, %r12d
	movzwl	-64(%rbp), %r15d                ## 2-byte Folded Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	%r13d, %edx
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	pushq	$1000                           ## imm = 0x3E8
	pushq	$8
	pushq	%r10
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	movzbl	-56(%rbp), %edx
	movzbl	-55(%rbp), %ecx
	movzbl	-54(%rbp), %r8d
	movzbl	-53(%rbp), %r9d
	movzbl	-52(%rbp), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movzbl	-51(%rbp), %r11d
	movzbl	-50(%rbp), %r10d
	movzbl	-49(%rbp), %eax
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	pushq	%r15
	pushq	%r12
	pushq	%r13
	pushq	%rax
	pushq	%r10
	pushq	%r11
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_dev_info
	addq	$64, %rsp
	testl	%ebx, %ebx
	jns	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	leaq	_ultracam_veio.proc(%rip), %rsi
	movl	%ebx, %edx
	callq	_err
	movl	%ebx, (%r14)
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_ultracam_veio.proc:                    ## @ultracam_veio.proc
	.asciz	"ultracam_veio"

	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"USB => %02x%02x%02x%02x%02x%02x%02x%02x (req=$%02x val=$%04x ind=$%04x)\n"

	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
L_.str.1:                               ## @.str.1
	.asciz	"%s: ERROR=%d. Camera stopped; Reconnect or reload driver."

	.no_dead_strip	_ultracam_veio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ultracam_veio
_ultracam_veio:                         ; @ultracam_veio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x24, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_CAMERA_IS_OPERATIONAL
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x23, [x19, #8]
	mov	x0, x23
	mov	w1, #0
	cbz	w24, LBB0_4
; %bb.2:
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh3:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	w8, #1000
	str	w8, [sp]
	mov	x0, x23
	mov	x2, x22
	mov	x4, x21
	mov	x5, x20
	mov	x6, #0
	mov	w7, #0
	bl	_usb_control_msg
	mov	x23, x0
	tbz	w23, #31, LBB0_6
	b	LBB0_5
LBB0_3:
	mov	w23, #0
	b	LBB0_6
LBB0_4:
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh12:
	adrp	x8, _USB_DIR_IN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _USB_DIR_IN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	w8, #1000
	str	w8, [sp]
	add	x6, sp, #16
	mov	x0, x23
	mov	x2, x22
	mov	x4, x21
	mov	x5, x20
	mov	w7, #8
	bl	_usb_control_msg
	mov	x23, x0
	ldr	x0, [x19, #8]
	ldrb	w2, [sp, #16]
	ldrb	w3, [sp, #17]
	ldrb	w4, [sp, #18]
	ldrb	w5, [sp, #19]
	ldrb	w6, [sp, #20]
	ldrb	w7, [sp, #21]
	ldrh	w8, [sp, #22]
	strh	w20, [sp, #6]
	strh	w21, [sp, #4]
	strb	w22, [sp, #2]
	strh	w8, [sp]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	tbz	w23, #31, LBB0_6
LBB0_5:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh25:
	adrp	x1, _ultracam_veio.proc@PAGE
Lloh26:
	add	x1, x1, _ultracam_veio.proc@PAGEOFF
	mov	x2, x23
	bl	_err
	str	w23, [x19]
LBB0_6:
	ldr	x8, [sp, #24]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_ultracam_veio.proc:                    ; @ultracam_veio.proc
	.asciz	"ultracam_veio"

	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"USB => %02x%02x%02x%02x%02x%02x%02x%02x (req=$%02x val=$%04x ind=$%04x)\n"

	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
l_.str.1:                               ; @.str.1
	.asciz	"%s: ERROR=%d. Camera stopped; Reconnect or reload driver."

	.no_dead_strip	_ultracam_veio
.subsections_via_symbols
