	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_fat_sector
_write_fat_sector:                      ## @write_fat_sector
	.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
	movl	%ecx, %r13d
	movl	%esi, %ebx
	movq	_WTV_SECTOR_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	sarl	%cl, %ebx
	movl	%r8d, %r15d
	movl	%edx, %r14d
	movq	%rdi, %r12
	subl	%ecx, %r13d
	movl	(%rdi), %edi
	callq	_avio_tell
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r12), %edi
	movl	%ebx, %esi
	movq	%r14, %rbx
	movl	%ebx, %edx
	movl	%r13d, %ecx
	callq	_write_fat
	cmpl	$2, %r15d
	jne	LBB0_2
## %bb.1:
	movq	_WTV_SECTOR_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	sarl	%cl, %r14d
	movq	_WTV_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	(%rcx,%rbx,4), %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, %r15d
	movl	(%r12), %edi
	callq	_avio_tell
	movl	%eax, %ebx
	movl	(%r12), %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_write_fat
	movl	%ebx, %eax
	jmp	LBB0_3
LBB0_2:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WTV_SECTOR_BITS,4,2            ## @WTV_SECTOR_BITS
	.comm	_WTV_SECTOR_SIZE,4,2            ## @WTV_SECTOR_SIZE
	.no_dead_strip	_write_fat_sector
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_fat_sector
_write_fat_sector:                      ; @write_fat_sector
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x4
	mov	x20, x2
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x25, _WTV_SECTOR_BITS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WTV_SECTOR_BITS@GOTPAGEOFF]
	ldr	w8, [x25]
	asr	w23, w1, w8
	sub	w24, w3, w8
	bl	_avio_tell
	mov	x21, x0
	ldr	w0, [x19]
	mov	x1, x23
	mov	x2, x20
	mov	x3, x24
	bl	_write_fat
	cmp	w22, #2
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x25]
Lloh2:
	adrp	x9, _WTV_SECTOR_SIZE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WTV_SECTOR_SIZE@GOTPAGEOFF]
	asr	w21, w21, w8
Lloh4:
	ldr	w8, [x9]
	add	w9, w8, w20, lsl #2
	sub	w9, w9, #1
	sdiv	w20, w9, w8
	ldr	w0, [x19]
	bl	_avio_tell
	mov	x22, x0
	ldr	w0, [x19]
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_write_fat
	mov	x0, x22
	b	LBB0_3
LBB0_2:
	mov	x0, x21
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_WTV_SECTOR_BITS,4,2            ; @WTV_SECTOR_BITS
	.comm	_WTV_SECTOR_SIZE,4,2            ; @WTV_SECTOR_SIZE
	.no_dead_strip	_write_fat_sector
.subsections_via_symbols
