	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function try_write_vid_and_data
_try_write_vid_and_data:                ## @try_write_vid_and_data
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movl	(%rdi), %ebx
	movq	%r15, %rdi
	callq	_ubi_wl_get_peb
	movl	%eax, %r13d
	testl	%eax, %eax
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	js	LBB0_1
## %bb.2:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movslq	%r12d, %rbx
	movl	(%rax,%rbx,4), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r8d
	movl	%r13d, %r9d
	callq	_dbg_eba
	movq	%r15, %rdi
	movl	%r13d, %esi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	_ubi_io_write_vid_hdr
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_ubi_warn
	jmp	LBB0_8
LBB0_1:
	movl	%r13d, %r12d
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	movl	%ebx, %r14d
	jmp	LBB0_8
LBB0_4:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.5:
	movq	%r15, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_ubi_io_write_data
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r12d
	movl	%r13d, (%rsp)
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_ubi_warn
	jmp	LBB0_8
LBB0_7:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	%r13d, (%rax,%rbx,4)
	xorl	%r12d, %r12d
	movl	-52(%rbp), %r14d                ## 4-byte Reload
LBB0_8:
	movq	%r15, %rdi
	callq	_up_read
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.9:
	testl	%r13d, %r13d
	js	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movl	$1, %r8d
	jmp	LBB0_14
LBB0_11:
	testl	%r12d, %r12d
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	jne	LBB0_15
## %bb.12:
	testl	%ecx, %ecx
	js	LBB0_15
## %bb.13:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	xorl	%r8d, %r8d
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ubi_wl_put_peb                 ## TAILCALL
LBB0_15:
	movl	%r12d, %eax
	addq	$56, %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	"write VID hdr and %d bytes at offset %d of LEB %d:%d, PEB %d"

L_.str.1:                               ## @.str.1
	.asciz	"failed to write VID header to LEB %d:%d, PEB %d"

L_.str.2:                               ## @.str.2
	.asciz	"failed to write %d bytes at offset %d of LEB %d:%d, PEB %d"

	.no_dead_strip	_try_write_vid_and_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function try_write_vid_and_data
_try_write_vid_and_data:                ; @try_write_vid_and_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x26, x5
	mov	x25, x4
	mov	x28, x3
	mov	x24, x2
	mov	x19, x1
	mov	x27, x0
	ldr	x20, [x0, #16]
	ldr	w21, [x0]
	mov	x0, x20
	bl	_ubi_wl_get_peb
	mov	x22, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [x27, #8]
	ldr	x8, [x8]
	ldr	w23, [x8, w19, sxtw #2]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x26
	mov	x2, x25
	mov	x3, x21
	mov	x4, x19
	mov	x5, x22
	bl	_dbg_eba
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	bl	_ubi_io_write_vid_hdr
	cbz	w0, LBB0_4
; %bb.2:
	mov	x24, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x19
	mov	x4, x22
	bl	_ubi_warn
	b	LBB0_8
LBB0_3:
	mov	x24, x22
                                        ; implicit-def: $w23
	b	LBB0_8
LBB0_4:
	cbz	w26, LBB0_7
; %bb.5:
	mov	x0, x20
	mov	x1, x28
	mov	x2, x22
	mov	x3, x25
	mov	x4, x26
	bl	_ubi_io_write_data
	cbz	w0, LBB0_7
; %bb.6:
	mov	x24, x0
	mov	x8, x19
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	stp	x8, x22, [sp]
	mov	x0, x20
	mov	x2, x26
	mov	x3, x25
	mov	x4, x21
	bl	_ubi_warn
	b	LBB0_8
LBB0_7:
	mov	w24, #0
	sxtw	x8, w19
	ldr	x9, [x27, #8]
	ldr	x9, [x9]
	str	w22, [x9, x8, lsl #2]
LBB0_8:
	mov	x0, x20
	bl	_up_read
	cbz	w24, LBB0_11
; %bb.9:
	tbnz	w22, #31, LBB0_11
; %bb.10:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x3, x22
	mov	w4, #1
	b	LBB0_14
LBB0_11:
	cbnz	w24, LBB0_15
; %bb.12:
	tbnz	w23, #31, LBB0_15
; %bb.13:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x3, x23
	mov	w4, #0
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ubi_wl_put_peb
LBB0_15:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write VID hdr and %d bytes at offset %d of LEB %d:%d, PEB %d"

l_.str.1:                               ; @.str.1
	.asciz	"failed to write VID header to LEB %d:%d, PEB %d"

l_.str.2:                               ; @.str.2
	.asciz	"failed to write %d bytes at offset %d of LEB %d:%d, PEB %d"

	.no_dead_strip	_try_write_vid_and_data
.subsections_via_symbols
