	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si4713_powerdown
_si4713_powerdown:                      ## @si4713_powerdown
	.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
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SI4713_PWDN_NRESP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	cmpq	$0, (%r14)
	je	LBB0_1
## %bb.2:
	movq	_SI4713_CMD_POWER_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	_DEFAULT_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	subq	$8, %rsp
	movq	%r14, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	movl	%eax, %r9d
	pushq	%r10
	callq	_si4713_send_command
	addq	$16, %rsp
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.3:
	movq	_debug@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	8(%r14), %r15
	movl	(%rbx), %r8d
	leaq	L_.str(%rip), %rcx
	xorl	%r12d, %r12d
	movl	$1, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_v4l2_dbg
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_v4l2_dbg
	movq	32(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	xorl	%esi, %esi
	callq	_gpiod_set_value
LBB0_5:
	movq	24(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.6:
	callq	_regulator_disable
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_v4l2_err
	movl	%ebx, %r12d
LBB0_8:
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.9:
	callq	_regulator_disable
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_v4l2_err
	jmp	LBB0_12
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_10:
	xorl	%r12d, %r12d
LBB0_12:
	movq	_POWER_OFF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SI4713_PWDN_NRESP,4,2          ## @SI4713_PWDN_NRESP
	.comm	_SI4713_CMD_POWER_DOWN,4,2      ## @SI4713_CMD_POWER_DOWN
	.comm	_DEFAULT_TIMEOUT,4,2            ## @DEFAULT_TIMEOUT
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Power down response: 0x%02x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Device in reset mode\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to disable vdd: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to disable vio: %d\n"

	.comm	_POWER_OFF,8,3                  ## @POWER_OFF
	.no_dead_strip	_si4713_powerdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si4713_powerdown
_si4713_powerdown:                      ; @si4713_powerdown
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _SI4713_PWDN_NRESP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SI4713_PWDN_NRESP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	x8, [x0]
	cbz	x8, LBB0_8
; %bb.1:
Lloh8:
	adrp	x8, _SI4713_CMD_POWER_DOWN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SI4713_CMD_POWER_DOWN@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x5, x0
Lloh11:
	adrp	x8, _DEFAULT_TIMEOUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DEFAULT_TIMEOUT@GOTPAGEOFF]
Lloh13:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	mov	w3, #0
	mov	x4, x22
	bl	_si4713_send_command
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.2:
Lloh14:
	adrp	x21, _debug@GOTPAGE
Lloh15:
	ldr	x21, [x21, _debug@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x20, x19, #8
	ldr	w8, [x22]
	str	x8, [sp, #-16]!
Lloh16:
	adrp	x3, l_.str@PAGE
Lloh17:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_v4l2_dbg
	add	sp, sp, #16
	ldr	w1, [x21]
Lloh18:
	adrp	x3, l_.str.1@PAGE
Lloh19:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_v4l2_dbg
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_4
; %bb.3:
	mov	w1, #0
	bl	_gpiod_set_value
LBB0_4:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_9
; %bb.5:
	bl	_regulator_disable
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.6:
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_v4l2_err
LBB0_7:
	ldr	x0, [x19, #16]
	cbnz	x0, LBB0_10
	b	LBB0_12
LBB0_8:
	mov	w21, #0
	b	LBB0_13
LBB0_9:
	mov	w21, #0
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_12
LBB0_10:
	bl	_regulator_disable
	mov	x21, x0
	cbz	w0, LBB0_12
; %bb.11:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_v4l2_err
LBB0_12:
Lloh24:
	adrp	x8, _POWER_OFF@GOTPAGE
Lloh25:
	ldr	x8, [x8, _POWER_OFF@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_13:
	ldur	x8, [x29, #-40]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x21
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_SI4713_PWDN_NRESP,4,2          ; @SI4713_PWDN_NRESP
	.comm	_SI4713_CMD_POWER_DOWN,4,2      ; @SI4713_CMD_POWER_DOWN
	.comm	_DEFAULT_TIMEOUT,4,2            ; @DEFAULT_TIMEOUT
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Power down response: 0x%02x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Device in reset mode\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to disable vdd: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to disable vio: %d\n"

	.comm	_POWER_OFF,8,3                  ; @POWER_OFF
	.no_dead_strip	_si4713_powerdown
.subsections_via_symbols
