	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0680_set_video_mode
_stv0680_set_video_mode:                ## @stv0680_set_video_mode
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	xorl	%eax, %eax
	cmpq	%rsi, %rdi
	je	LBB0_5
## %bb.1:
	movq	%rsi, %r14
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	(%rbx), %rax
	movq	%r14, (%rax)
	movq	%rbx, %rdi
	movl	$3, %esi
	movl	$7, %edx
	movl	$256, %ecx                      ## imm = 0x100
	movl	$8, %r8d
	callq	_stv_sndctrl
	cmpl	$8, %eax
	jne	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	callq	_stv0680_get_video_mode
	cmpq	%r14, %rax
	jne	LBB0_3
## %bb.4:
	movq	%r14, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_6:
	movq	_D_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_PDEBUG
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stv0680_handle_error           ## TAILCALL
LBB0_3:
	movq	_D_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_PDEBUG
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D_ERR,4,2                      ## @D_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set_Camera_Mode failed"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Error setting camera video mode!"

	.no_dead_strip	_stv0680_set_video_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0680_set_video_mode
_stv0680_set_video_mode:                ; @stv0680_set_video_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0]
	cmp	x0, x1
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	mov	x20, x1
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x19]
	str	x20, [x8]
	mov	x0, x19
	mov	w1, #3
	mov	w2, #7
	mov	w3, #256
	mov	w4, #8
	bl	_stv_sndctrl
	cmp	w0, #8
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_stv0680_get_video_mode
	cmp	x0, x20
	b.ne	LBB0_6
; %bb.4:
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_7
LBB0_5:
Lloh0:
	adrp	x8, _D_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w1, w8
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_stv0680_handle_error
LBB0_6:
Lloh8:
	adrp	x8, _D_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _D_ERR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_D_ERR,4,2                      ; @D_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set_Camera_Mode failed"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Error setting camera video mode!"

	.no_dead_strip	_stv0680_set_video_mode
.subsections_via_symbols
