	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m5mols_set_white_balance
_m5mols_set_white_balance:              ## @m5mols_set_white_balance
	.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
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	_m5mols_set_white_balance.wb(%rip), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	xorl	%r12d, %r12d
                                        ## implicit-def: $r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%ebx, %ebx
	cmovsl	%ebx, %r14d
	movl	%r14d, %eax
	js	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movslq	%eax, %rcx
	movl	%ebx, %eax
	cmpq	%rcx, %r12
	jge	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzwl	(%r15,%r12,4), %eax
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_m5mols_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movzwl	%ax, %r8d
	movl	$1, %edi
	movq	%r13, %rdx
	leaq	L_.str(%rip), %rcx
	callq	_v4l2_dbg
	movw	$145, %ax
	cmpq	$8, %r12
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_REG_AWB_PRESET@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_AWB_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movzwl	%ax, %edx
	movq	%r13, %rdi
	callq	_m5mols_write
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$8, %r12
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_AWB_MANUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	2(%r15,%r12,4), %edx
	movq	%r13, %rdi
	callq	_m5mols_write
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_1:
	movl	%ebx, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @m5mols_set_white_balance.wb
_m5mols_set_white_balance.wb:
	.short	129                             ## 0x81
	.short	139                             ## 0x8b
	.short	132                             ## 0x84
	.short	142                             ## 0x8e
	.short	131                             ## 0x83
	.short	141                             ## 0x8d
	.short	130                             ## 0x82
	.short	140                             ## 0x8c
	.short	134                             ## 0x86
	.short	143                             ## 0x8f
	.short	133                             ## 0x85
	.short	138                             ## 0x8a
	.short	135                             ## 0x87
	.short	144                             ## 0x90
	.short	128                             ## 0x80
	.short	137                             ## 0x89
	.short	136                             ## 0x88
	.short	145                             ## 0x91

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_m5mols_debug,4,2               ## @m5mols_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting white balance to: %#x\n"

	.comm	_AWB_MODE,4,2                   ## @AWB_MODE
	.comm	_REG_AWB_PRESET,2,1             ## @REG_AWB_PRESET
	.comm	_AWB_MANUAL,4,2                 ## @AWB_MANUAL
	.no_dead_strip	_m5mols_set_white_balance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m5mols_set_white_balance
_m5mols_set_white_balance:              ; @m5mols_set_white_balance
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
Lloh3:
	adrp	x0, _m5mols_set_white_balance.wb@PAGE
Lloh4:
	add	x0, x0, _m5mols_set_white_balance.wb@PAGEOFF
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x24, #0
Lloh5:
	adrp	x25, _m5mols_set_white_balance.wb@PAGE+2
Lloh6:
	add	x25, x25, _m5mols_set_white_balance.wb@PAGEOFF+2
Lloh7:
	adrp	x27, _AWB_MODE@GOTPAGE
Lloh8:
	ldr	x27, [x27, _AWB_MODE@GOTPAGEOFF]
Lloh9:
	adrp	x28, _REG_AWB_PRESET@GOTPAGE
Lloh10:
	ldr	x28, [x28, _REG_AWB_PRESET@GOTPAGEOFF]
	mov	w26, #145
                                        ; implicit-def: $w21
Lloh11:
	adrp	x22, _m5mols_set_white_balance.wb@PAGE
Lloh12:
	add	x22, x22, _m5mols_set_white_balance.wb@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w23, #0
	csel	w21, w23, w21, lt
	mov	x0, x21
	tbnz	w23, #31, LBB0_9
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	mov	x0, x22
	bl	_ARRAY_SIZE
	add	x25, x25, #4
	cmp	x24, w0, sxtw
	mov	x0, x23
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldurh	w4, [x25, #-2]
	cmp	w4, w19
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh13:
	adrp	x8, _m5mols_debug@GOTPAGE
Lloh14:
	ldr	x8, [x8, _m5mols_debug@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w0, #1
	mov	x2, x20
Lloh16:
	adrp	x3, l_.str@PAGE
Lloh17:
	add	x3, x3, l_.str@PAGEOFF
	bl	_v4l2_dbg
	ldr	w1, [x27]
	ldrh	w8, [x28]
	cmp	x24, #8
	csel	w8, w26, w8, eq
	and	w2, w8, #0xffff
	mov	x0, x20
	bl	_m5mols_write
	mov	x23, x0
	tbnz	w0, #31, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x24, #8
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh18:
	adrp	x8, _AWB_MANUAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AWB_MANUAL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldrh	w2, [x25]
	mov	x0, x20
	bl	_m5mols_write
	mov	x23, x0
	b	LBB0_3
LBB0_8:
	mov	x0, x23
LBB0_9:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	1                               ; @m5mols_set_white_balance.wb
_m5mols_set_white_balance.wb:
	.short	129                             ; 0x81
	.short	139                             ; 0x8b
	.short	132                             ; 0x84
	.short	142                             ; 0x8e
	.short	131                             ; 0x83
	.short	141                             ; 0x8d
	.short	130                             ; 0x82
	.short	140                             ; 0x8c
	.short	134                             ; 0x86
	.short	143                             ; 0x8f
	.short	133                             ; 0x85
	.short	138                             ; 0x8a
	.short	135                             ; 0x87
	.short	144                             ; 0x90
	.short	128                             ; 0x80
	.short	137                             ; 0x89
	.short	136                             ; 0x88
	.short	145                             ; 0x91

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_m5mols_debug,4,2               ; @m5mols_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting white balance to: %#x\n"

	.comm	_AWB_MODE,4,2                   ; @AWB_MODE
	.comm	_REG_AWB_PRESET,2,1             ; @REG_AWB_PRESET
	.comm	_AWB_MANUAL,4,2                 ; @AWB_MANUAL
	.no_dead_strip	_m5mols_set_white_balance
.subsections_via_symbols
