	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_leb
_write_leb:                             ## @write_leb
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rdi, %r12
	movq	(%rsi), %rax
	movq	_UBI_DYNAMIC_VOLUME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_5
## %bb.1:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	(%r12), %esi
	movl	%r14d, %edi
	callq	_ALIGN
	movl	%eax, %ebx
	movslq	%r14d, %rdi
	addq	%r15, %rdi
	movl	%eax, %edx
	subl	%r14d, %edx
	movl	$255, %esi
	callq	_memset
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_ubi_calc_data_len
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	_UBI_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rsp)
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	movl	%eax, %r9d
	callq	_ubi_eba_write_leb
	jmp	LBB0_3
LBB0_5:
	movslq	%r14d, %rbx
	leaq	(%r15,%rbx), %rdi
	movl	8(%rsi), %edx
	subl	%ebx, %edx
	xorl	%esi, %esi
	movl	%r9d, %r14d
	callq	_memset
	movq	_UBI_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	%r14d, (%rsp)
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movq	%r15, %rcx
	movl	%ebx, %r8d
	callq	_ubi_eba_write_leb_st
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%esi, %esi
	callq	_dbg_gen
	xorl	%eax, %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UBI_DYNAMIC_VOLUME,8,3         ## @UBI_DYNAMIC_VOLUME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"all %d bytes contain 0xFF - skip"

	.comm	_UBI_UNKNOWN,4,2                ## @UBI_UNKNOWN
	.no_dead_strip	_write_leb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_leb
_write_leb:                             ; @write_leb
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x23, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _UBI_DYNAMIC_VOLUME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _UBI_DYNAMIC_VOLUME@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x23
	bl	_ALIGN
	mov	x24, x0
	add	x0, x19, w23, sxtw
	sub	w2, w24, w23
	mov	w1, #255
	bl	_memset
	mov	x0, x22
	mov	x1, x19
	mov	x2, x24
	bl	_ubi_calc_data_len
	cbz	w0, LBB0_4
; %bb.2:
	mov	x5, x0
Lloh3:
	adrp	x8, _UBI_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UBI_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	w4, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ubi_eba_write_leb
LBB0_3:
	mov	x24, x5
	add	x0, x19, w23, sxtw
	ldr	w8, [x21, #8]
	sub	w2, w8, w23
	mov	w1, #0
	bl	_memset
Lloh6:
	adrp	x8, _UBI_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UBI_UNKNOWN@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x23
	mov	x6, x24
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ubi_eba_write_leb_st
LBB0_4:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #0
	bl	_dbg_gen
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_UBI_DYNAMIC_VOLUME,8,3         ; @UBI_DYNAMIC_VOLUME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"all %d bytes contain 0xFF - skip"

	.comm	_UBI_UNKNOWN,4,2                ; @UBI_UNKNOWN
	.no_dead_strip	_write_leb
.subsections_via_symbols
