	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SetWALSegSize
_SetWALSegSize:                         ## @SetWALSegSize
	.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
	movq	_WalSegSz@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpl	$-1, (%r15)
	sete	%dil
	callq	_Assert
	movq	_WALFilePath@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_open
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movl	%eax, %r14d
	movq	_errno@GOTPCREL(%rip), %r13
	movq	$0, (%r13)
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movl	%eax, %edi
	callq	_read
	cmpq	(%rbx), %rax
	jne	LBB0_5
## %bb.2:
	callq	_IsValidWalSegSize
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_12
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_progname@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_12
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_progname@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	(%r12), %r12
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_13
LBB0_5:
	movq	(%r13), %rdi
	movq	_debug@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.6:
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	(%r12), %r12
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	movq	%r12, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_12
LBB0_8:
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rdx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_12
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movl	%r14d, %edi
	callq	_close
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WalSegSz,4,2                   ## @WalSegSz
	.comm	_WALFilePath,8,3                ## @WALFilePath
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: could not open WAL file \"%s\": %s\n"

	.comm	_progname,8,3                   ## @progname
	.comm	_errno,8,3                      ## @errno
	.comm	_XLOG_BLCKSZ,8,3                ## @XLOG_BLCKSZ
L_.str.1:                               ## @.str.1
	.asciz	"%s: WAL segment size must be a power of two between 1MB and 1GB, but the WAL file header specifies %d bytes\n"

	.comm	_debug,8,3                      ## @debug
L_.str.2:                               ## @.str.2
	.asciz	"could not read file \"%s\": %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"not enough data in file \"%s\"\n"

	.no_dead_strip	_SetWALSegSize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SetWALSegSize
_SetWALSegSize:                         ; @SetWALSegSize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x20, _WalSegSz@GOTPAGE
Lloh1:
	ldr	x20, [x20, _WalSegSz@GOTPAGEOFF]
	ldr	w8, [x20]
	cmn	w8, #1
	cset	w0, eq
	bl	_Assert
Lloh2:
	adrp	x21, _WALFilePath@GOTPAGE
Lloh3:
	ldr	x21, [x21, _WALFilePath@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh4:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_open
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh7:
	adrp	x23, _errno@GOTPAGE
Lloh8:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	str	xzr, [x23]
Lloh9:
	adrp	x22, _XLOG_BLCKSZ@GOTPAGE
Lloh10:
	ldr	x22, [x22, _XLOG_BLCKSZ@GOTPAGEOFF]
	ldr	x2, [x22]
	bl	_read
	ldr	x8, [x22]
Lloh11:
	adrp	x22, _stderr@GOTPAGE
Lloh12:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
	bl	_IsValidWalSegSize
	cbz	x0, LBB0_8
; %bb.3:
	mov	w20, #1
	b	LBB0_13
LBB0_4:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	adrp	x9, _progname@GOTPAGE
Lloh16:
	ldr	x9, [x9, _progname@GOTPAGEOFF]
Lloh17:
	ldr	w19, [x8]
Lloh18:
	ldr	x20, [x9]
	ldr	x21, [x21]
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	x0, [x8]
	bl	_strerror
	stp	x21, x0, [sp]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_fprintf
	mov	w20, #0
	b	LBB0_14
LBB0_5:
	ldr	x0, [x23]
Lloh24:
	adrp	x8, _debug@GOTPAGE
Lloh25:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cbz	x0, LBB0_9
; %bb.6:
	cbz	x8, LBB0_12
; %bb.7:
	ldr	w20, [x22]
	ldr	x21, [x21]
	bl	_strerror
	str	x0, [sp]
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	b	LBB0_11
LBB0_8:
	ldr	w0, [x22]
Lloh29:
	adrp	x8, _progname@GOTPAGE
Lloh30:
	ldr	x8, [x8, _progname@GOTPAGEOFF]
Lloh31:
	ldr	x2, [x8]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_9:
	cbz	x8, LBB0_12
; %bb.10:
	ldr	w0, [x22]
	ldr	x2, [x21]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_11:
	bl	_fprintf
LBB0_12:
	mov	w20, #0
LBB0_13:
	ldr	w0, [x22]
	bl	_fflush
	mov	x0, x19
	bl	_close
LBB0_14:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_WalSegSz,4,2                   ; @WalSegSz
	.comm	_WALFilePath,8,3                ; @WALFilePath
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: could not open WAL file \"%s\": %s\n"

	.comm	_progname,8,3                   ; @progname
	.comm	_errno,8,3                      ; @errno
	.comm	_XLOG_BLCKSZ,8,3                ; @XLOG_BLCKSZ
l_.str.1:                               ; @.str.1
	.asciz	"%s: WAL segment size must be a power of two between 1MB and 1GB, but the WAL file header specifies %d bytes\n"

	.comm	_debug,8,3                      ; @debug
l_.str.2:                               ; @.str.2
	.asciz	"could not read file \"%s\": %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"not enough data in file \"%s\"\n"

	.no_dead_strip	_SetWALSegSize
.subsections_via_symbols
