	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_iv
_update_iv:                             ## @update_iv
	.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
	movq	(%rdi), %rax
	movq	_IV_STATE_FINISHED@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.1:
	movq	_IV_STATE_UNINITIALISED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.2:
	movq	_IV_STATE_BUFFERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	%rdi, %rbx
	movl	16(%rdi), %esi
	movl	8(%rdi), %ecx
	movl	12(%rdi), %edx
	callq	_aes_generic_ocb_setiv
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movq	_IV_STATE_COPIED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_5:
	movl	$1, %r14d
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IV_STATE_FINISHED,8,3          ## @IV_STATE_FINISHED
	.comm	_IV_STATE_UNINITIALISED,8,3     ## @IV_STATE_UNINITIALISED
	.comm	_IV_STATE_BUFFERED,8,3          ## @IV_STATE_BUFFERED
	.comm	_IV_STATE_COPIED,8,3            ## @IV_STATE_COPIED
	.no_dead_strip	_update_iv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_iv
_update_iv:                             ; @update_iv
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _IV_STATE_FINISHED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IV_STATE_FINISHED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _IV_STATE_UNINITIALISED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IV_STATE_UNINITIALISED@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
Lloh6:
	adrp	x9, _IV_STATE_BUFFERED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IV_STATE_BUFFERED@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	mov	x19, x0
	ldp	w2, w1, [x0, #12]
	ldr	w3, [x0, #8]
	bl	_aes_generic_ocb_setiv
	cbz	w0, LBB0_6
; %bb.4:
Lloh9:
	adrp	x8, _IV_STATE_COPIED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IV_STATE_COPIED@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_5:
	mov	w0, #1
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IV_STATE_FINISHED,8,3          ; @IV_STATE_FINISHED
	.comm	_IV_STATE_UNINITIALISED,8,3     ; @IV_STATE_UNINITIALISED
	.comm	_IV_STATE_BUFFERED,8,3          ; @IV_STATE_BUFFERED
	.comm	_IV_STATE_COPIED,8,3            ; @IV_STATE_COPIED
	.no_dead_strip	_update_iv
.subsections_via_symbols
