	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onSaveInstanceState
_onSaveInstanceState:                   ## @onSaveInstanceState
	.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	%rsi, %r15
	movq	%rdi, %rsi
	movq	(%rdi), %r13
	leaq	L_.str(%rip), %rdi
	callq	_LOGV
	leaq	8(%r13), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	$0, 32(%r13)
	movq	_APP_CMD_SAVE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_android_app_write_cmd
	cmpq	$0, 32(%r13)
	jne	LBB0_3
## %bb.1:
	leaq	24(%r13), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pthread_cond_wait
	cmpq	$0, 32(%r13)
	je	LBB0_2
LBB0_3:
	movq	16(%r13), %r12
	testq	%r12, %r12
	je	LBB0_4
## %bb.5:
	movq	(%r13), %rax
	movq	%rax, (%r15)
	movq	$0, 16(%r13)
	movq	$0, (%r13)
	jmp	LBB0_6
LBB0_4:
	xorl	%r12d, %r12d
LBB0_6:
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SaveInstanceState: %p\n"

	.comm	_APP_CMD_SAVE_STATE,4,2         ## @APP_CMD_SAVE_STATE
	.no_dead_strip	_onSaveInstanceState
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onSaveInstanceState
_onSaveInstanceState:                   ; @onSaveInstanceState
	.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
	mov	x21, x1
	mov	x1, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LOGV
	add	x19, x20, #8
	mov	x0, x19
	bl	_pthread_mutex_lock
	str	xzr, [x20, #32]
Lloh2:
	adrp	x8, _APP_CMD_SAVE_STATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _APP_CMD_SAVE_STATE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_android_app_write_cmd
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_3
; %bb.1:
	add	x22, x20, #24
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x19
	bl	_pthread_cond_wait
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_2
LBB0_3:
	ldr	x22, [x20, #16]
	cbz	x22, LBB0_5
; %bb.4:
	ldr	x8, [x20]
	str	x8, [x21]
	str	xzr, [x20, #16]
	str	xzr, [x20]
LBB0_5:
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SaveInstanceState: %p\n"

	.comm	_APP_CMD_SAVE_STATE,4,2         ; @APP_CMD_SAVE_STATE
	.no_dead_strip	_onSaveInstanceState
.subsections_via_symbols
