	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwc_set_autogain
_pwc_set_autogain:                      ## @pwc_set_autogain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rcx
	cmpq	$0, 8(%rcx)
	je	LBB0_4
## %bb.1:
	movq	_SET_LUM_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AGC_MODE_FORMATTER@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rcx)
	movl	(%rax), %edx
	movl	$255, %ecx
	cmovnel	%edi, %ecx
	movq	%rbx, %rdi
	callq	_pwc_set_u8_ctrl
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	movq	16(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:
	movl	$0, (%rbx)
	jmp	LBB0_7
LBB0_4:
	xorl	%eax, %eax
	cmpq	$0, (%rcx)
	jne	LBB0_8
LBB0_5:
	movq	8(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.6:
	movq	_SET_LUM_CTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_PRESET_AGC_FORMATTER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_pwc_set_u8_ctrl
	testl	%eax, %eax
	jne	LBB0_8
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SET_LUM_CTL,4,2                ## @SET_LUM_CTL
	.comm	_AGC_MODE_FORMATTER,4,2         ## @AGC_MODE_FORMATTER
	.comm	_PRESET_AGC_FORMATTER,4,2       ## @PRESET_AGC_FORMATTER
	.no_dead_strip	_pwc_set_autogain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwc_set_autogain
_pwc_set_autogain:                      ; @pwc_set_autogain
	.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	x8, [x0, #16]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_4
; %bb.1:
Lloh0:
	adrp	x9, _SET_LUM_CTL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SET_LUM_CTL@GOTPAGEOFF]
Lloh2:
	adrp	x10, _AGC_MODE_FORMATTER@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AGC_MODE_FORMATTER@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x9]
Lloh5:
	ldr	w2, [x10]
	ldr	x8, [x8]
	cmp	x8, #0
	mov	w8, #255
	csel	w3, w8, wzr, eq
	mov	x0, x19
	bl	_pwc_set_u8_ctrl
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_8
LBB0_4:
	ldr	x8, [x8]
	cbnz	x8, LBB0_7
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_7
; %bb.6:
Lloh6:
	adrp	x9, _SET_LUM_CTL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SET_LUM_CTL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
Lloh9:
	adrp	x9, _PRESET_AGC_FORMATTER@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PRESET_AGC_FORMATTER@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x9]
	ldr	w3, [x8]
	mov	x0, x19
	bl	_pwc_set_u8_ctrl
	cbnz	w0, LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SET_LUM_CTL,4,2                ; @SET_LUM_CTL
	.comm	_AGC_MODE_FORMATTER,4,2         ; @AGC_MODE_FORMATTER
	.comm	_PRESET_AGC_FORMATTER,4,2       ; @PRESET_AGC_FORMATTER
	.no_dead_strip	_pwc_set_autogain
.subsections_via_symbols
