	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov51x_led_control
_ov51x_led_control:                     ## @ov51x_led_control
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	testl	%esi, %esi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	callq	_PDEBUG
	movq	(%r14), %rax
	movq	_BRG_OV511PLUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	xorl	%edx, %edx
	testl	%ebx, %ebx
	setne	%dl
	movq	_R511_SYS_LED_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_reg_w                          ## TAILCALL
LBB0_1:
	movq	8(%r14), %rax
	movq	_BCL_OV518@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.4:
	xorl	%edx, %edx
	testl	%ebx, %ebx
	setne	%dl
	movq	_R518_GPIO_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%edx, %edx
	movq	%r14, %rdi
	movl	$2, %ecx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_reg_w_mask                     ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" (%s)"

L_.str.1:                               ## @.str.1
	.asciz	"turn on"

L_.str.2:                               ## @.str.2
	.asciz	"turn off"

	.comm	_BRG_OV511PLUS,8,3              ## @BRG_OV511PLUS
	.comm	_R511_SYS_LED_CTL,4,2           ## @R511_SYS_LED_CTL
	.comm	_BCL_OV518,8,3                  ## @BCL_OV518
	.comm	_R518_GPIO_OUT,4,2              ## @R518_GPIO_OUT
	.no_dead_strip	_ov51x_led_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov51x_led_control
_ov51x_led_control:                     ; @ov51x_led_control
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.2@PAGE
Lloh3:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w1, #0
	csel	x2, x9, x8, eq
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_PDEBUG
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _BRG_OV511PLUS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BRG_OV511PLUS@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	cmp	w20, #0
	cset	w2, ne
Lloh9:
	adrp	x8, _R511_SYS_LED_CTL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _R511_SYS_LED_CTL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_reg_w
LBB0_2:
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _BCL_OV518@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BCL_OV518@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	cmp	w20, #0
	cset	w8, ne
Lloh15:
	adrp	x9, _R518_GPIO_OUT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _R518_GPIO_OUT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
	lsl	w2, w8, #1
	mov	x0, x19
	mov	w3, #2
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_reg_w_mask
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" (%s)"

l_.str.1:                               ; @.str.1
	.asciz	"turn on"

l_.str.2:                               ; @.str.2
	.asciz	"turn off"

	.comm	_BRG_OV511PLUS,8,3              ; @BRG_OV511PLUS
	.comm	_R511_SYS_LED_CTL,4,2           ; @R511_SYS_LED_CTL
	.comm	_BCL_OV518,8,3                  ; @BCL_OV518
	.comm	_R518_GPIO_OUT,4,2              ; @R518_GPIO_OUT
	.no_dead_strip	_ov51x_led_control
.subsections_via_symbols
