	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_m5mols_set_mode                ## -- Begin function m5mols_set_mode
	.p2align	4, 0x90
_m5mols_set_mode:                       ## @m5mols_set_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
	leaq	-131(%rsi), %rax
	cmpq	$-4, %rax
	ja	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	negl	%eax
	jmp	LBB0_17
LBB0_2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	8(%rdi), %r15
	movq	_SYSTEM_SYSMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%r15, %rdi
	callq	_m5mols_read_u8
	testl	%eax, %eax
	jne	LBB0_17
## %bb.3:
	movq	-32(%rbp), %rcx
	xorl	%eax, %eax
	cmpq	%rbx, %rcx
	je	LBB0_17
## %bb.4:
	cmpq	$130, %rcx
	je	LBB0_10
## %bb.5:
	cmpq	$129, %rcx
	je	LBB0_13
## %bb.6:
	cmpq	$128, %rcx
	jne	LBB0_12
## %bb.7:
	movl	$129, %esi
	movq	%r15, %rdi
	callq	_m5mols_reg_mode
	cmpq	$129, %rbx
	je	LBB0_15
## %bb.8:
	movl	$130, %esi
	jmp	LBB0_9
LBB0_10:
	movl	$129, %esi
	movq	%r15, %rdi
	callq	_m5mols_reg_mode
	cmpq	$129, %rbx
	je	LBB0_15
## %bb.11:
	movl	$128, %esi
LBB0_9:
	testl	%eax, %eax
	je	LBB0_14
	jmp	LBB0_15
LBB0_13:
	xorl	%eax, %eax
	cmpq	$128, %rbx
	setne	%al
	leaq	(%rax,%rax), %rsi
	addq	$128, %rsi
LBB0_14:
	movq	%r15, %rdi
	callq	_m5mols_reg_mode
LBB0_15:
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_16
LBB0_12:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_v4l2_warn
LBB0_16:
	movq	%rbx, (%r14)
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SYSTEM_SYSMODE,4,2             ## @SYSTEM_SYSMODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wrong mode: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_m5mols_set_mode                ; -- Begin function m5mols_set_mode
	.p2align	2
_m5mols_set_mode:                       ; @m5mols_set_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	sub	x8, x1, #131
	cmn	x8, #4
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	add	x21, x0, #8
Lloh3:
	adrp	x8, _SYSTEM_SYSMODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYSTEM_SYSMODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x21
	bl	_m5mols_read_u8
	cbnz	w0, LBB0_19
; %bb.3:
	ldr	x8, [sp, #8]
	cmp	x8, x19
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_19
LBB0_5:
	cmp	x8, #130
	b.eq	LBB0_11
; %bb.6:
	cmp	x8, #129
	b.eq	LBB0_14
; %bb.7:
	cmp	x8, #128
	b.ne	LBB0_17
; %bb.8:
	mov	x0, x21
	mov	w1, #129
	bl	_m5mols_reg_mode
	cmp	x19, #129
	b.eq	LBB0_16
; %bb.9:
	cbnz	w0, LBB0_16
; %bb.10:
	mov	w1, #130
	b	LBB0_15
LBB0_11:
	mov	x0, x21
	mov	w1, #129
	bl	_m5mols_reg_mode
	cmp	x19, #129
	b.eq	LBB0_16
; %bb.12:
	cbnz	w0, LBB0_16
; %bb.13:
	mov	w1, #128
	b	LBB0_15
LBB0_14:
	mov	w8, #130
	cmp	x19, #128
	csel	x1, x19, x8, eq
LBB0_15:
	mov	x0, x21
	bl	_m5mols_reg_mode
LBB0_16:
	cbnz	w0, LBB0_19
	b	LBB0_18
LBB0_17:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	bl	_v4l2_warn
LBB0_18:
	mov	w0, #0
	str	x19, [x20]
LBB0_19:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SYSTEM_SYSMODE,4,2             ; @SYSTEM_SYSMODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wrong mode: %d\n"

.subsections_via_symbols
