	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_storage_binlog_pwrite          ## -- Begin function storage_binlog_pwrite
	.p2align	4, 0x90
_storage_binlog_pwrite:                 ## @storage_binlog_pwrite
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	cmpl	$0, (%rdi)
	jle	LBB0_10
## %bb.1:
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	leaq	(%rcx,%rdx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_dirty_binlog_queue_push
	incl	-44(%rbp)                       ## 4-byte Folded Spill
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movslq	(%rbx), %rax
	cmpq	%rax, %r14
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	(%rax,%r14,8), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	js	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	callq	_pwrite
	movq	8(%rbx), %rcx
	movq	(%rcx,%r14,8), %rdi
	cmpq	%r13, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, 8(%rdi)
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rdi)
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rdi), %edi
	movq	%r12, %r13
	movq	%r15, %r12
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_ftruncate
	movq	8(%rbx), %rax
	movq	(%rax,%r14,8), %rax
	movq	%r15, 8(%rax)
	movq	%r12, %r15
	movq	%r13, %r12
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_close
	movq	_wronly_binlogs_closed@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	8(%rbx), %rax
	movq	(%rax,%r14,8), %rax
	movl	$-2, (%rax)
	jmp	LBB0_8
LBB0_9:
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_11
LBB0_10:
	movq	_STORAGE_ERR_PWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wronly_binlogs_closed,4,2      ## @wronly_binlogs_closed
	.comm	_STORAGE_ERR_PWRITE,4,2         ## @STORAGE_ERR_PWRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_storage_binlog_pwrite          ; -- Begin function storage_binlog_pwrite
	.p2align	2
_storage_binlog_pwrite:                 ; @storage_binlog_pwrite
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	x25, #0
	mov	w24, #0
	add	x26, x3, x2
Lloh0:
	adrp	x27, _wronly_binlogs_closed@GOTPAGE
Lloh1:
	ldr	x27, [x27, _wronly_binlogs_closed@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_dirty_binlog_queue_push
	add	w24, w24, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	ldr	x8, [x8, x25, lsl #3]
	ldr	w0, [x8]
	tbnz	w0, #31, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_pwrite
	mov	x8, x0
	ldr	x9, [x23, #8]
	ldr	x0, [x9, x25, lsl #3]
	cmp	x8, x21
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x0, #8]
	cmp	x8, x26
	b.ge	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x26, [x0, #8]
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x0]
	mov	x1, x19
	bl	_ftruncate
	ldr	x8, [x23, #8]
	lsl	x28, x25, #3
	ldr	x8, [x8, x28]
	str	x19, [x8, #8]
	ldr	w0, [x8]
	bl	_close
	ldr	w8, [x27]
	add	w8, w8, #1
	str	w8, [x27]
	ldr	x8, [x23, #8]
	ldr	x8, [x8, x28]
	mov	w9, #-2
	str	w9, [x8]
	b	LBB0_3
LBB0_9:
	cbz	w24, LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh2:
	adrp	x8, _STORAGE_ERR_PWRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STORAGE_ERR_PWRITE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_wronly_binlogs_closed,4,2      ; @wronly_binlogs_closed
	.comm	_STORAGE_ERR_PWRITE,4,2         ; @STORAGE_ERR_PWRITE
.subsections_via_symbols
