	.file	"extr_pg_standby.c_SetWALSegSize.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s: could not open WAL file \"%s\": %s\n"
	.align 8
.LC1:
	.string	"%s: WAL segment size must be a power of two between 1MB and 1GB, but the WAL file header specifies %d bytes\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"could not read file \"%s\": %s\n"
.LC3:
	.string	"not enough data in file \"%s\"\n"
	.text
	.p2align 4
	.type	SetWALSegSize, @function
SetWALSegSize:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	edi, edi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	cmp	DWORD PTR WalSegSz[rip], -1
	sete	dil
	call	Assert@PLT
	mov	esi, DWORD PTR O_RDWR[rip]
	mov	rdi, QWORD PTR WALFilePath[rip]
	xor	edx, edx
	call	open@PLT
	test	eax, eax
	js	.L14
	mov	rdx, QWORD PTR XLOG_BLCKSZ[rip]
	xor	esi, esi
	mov	edi, eax
	mov	ebp, eax
	mov	QWORD PTR errno[rip], 0
	call	read@PLT
	cmp	rax, QWORD PTR XLOG_BLCKSZ[rip]
	je	.L15
	mov	rdi, QWORD PTR errno[rip]
	mov	rax, QWORD PTR debug[rip]
	test	rdi, rdi
	je	.L7
	test	rax, rax
	jne	.L8
.L12:
	mov	edi, DWORD PTR stderr[rip]
	xor	r12d, r12d
.L6:
	call	fflush@PLT
	mov	edi, ebp
	call	close@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edi, DWORD PTR stderr[rip]
	xor	r12d, r12d
	test	rax, rax
	je	.L6
	mov	rdx, QWORD PTR WALFilePath[rip]
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	edi, DWORD PTR stderr[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, QWORD PTR errno[rip]
	xor	r12d, r12d
	call	strerror@PLT
	mov	rcx, QWORD PTR WALFilePath[rip]
	mov	rdx, QWORD PTR progname[rip]
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR stderr[rip]
	mov	r8, rax
	xor	eax, eax
	call	fprintf@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	call	strerror@PLT
	mov	rdx, QWORD PTR WALFilePath[rip]
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rcx, rax
	xor	eax, eax
	call	fprintf@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR ds:0
	mov	DWORD PTR WalSegSz[rip], edi
	call	IsValidWalSegSize@PLT
	test	rax, rax
	je	.L5
	mov	edi, DWORD PTR stderr[rip]
	mov	r12d, 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR stderr[rip]
	mov	ecx, DWORD PTR WalSegSz[rip]
	xor	eax, eax
	xor	r12d, r12d
	mov	rdx, QWORD PTR progname[rip]
	lea	rsi, .LC1[rip]
	call	fprintf@PLT
	mov	edi, DWORD PTR stderr[rip]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	SetWALSegSize, .-SetWALSegSize
	.comm	stderr,4,4
	.comm	progname,8,8
	.comm	errno,8,8
	.comm	debug,8,8
	.comm	XLOG_BLCKSZ,8,8
	.comm	WalSegSz,4,4
	.comm	WALFilePath,8,8
	.comm	O_RDWR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pg_standby.c_SetWALSegSize.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: could not open WAL file \"%s\": %s\012\000"
	.align	2
.LC1:
	.ascii	"%s: WAL segment size must be a power of two between"
	.ascii	" 1MB and 1GB, but the WAL file header specifies %d "
	.ascii	"bytes\012\000"
	.align	2
.LC2:
	.ascii	"could not read file \"%s\": %s\012\000"
	.align	2
.LC3:
	.ascii	"not enough data in file \"%s\"\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	SetWALSegSize, %function
SetWALSegSize:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r7, .L19
	sub	sp, sp, #12
	ldr	r0, [r7]
	ldr	r6, .L19+4
	cmn	r0, #1
	movne	r0, #0
	moveq	r0, #1
	bl	Assert
	ldr	r3, .L19+8
	mov	r2, #0
	ldr	r0, [r6]
	ldr	r1, [r3]
	bl	open
	subs	r5, r0, #0
	blt	.L16
	mov	r9, #0
	ldr	r4, .L19+12
	ldr	r8, .L19+16
	mov	r1, r9
	ldr	r2, [r4]
	str	r9, [r8]
	bl	read
	ldr	r3, [r4]
	cmp	r0, r3
	beq	.L17
	ldr	r0, [r8]
	ldr	r3, .L19+20
	ldr	r8, .L19+24
	cmp	r0, #0
	ldr	r4, [r3]
	ldr	r7, [r8]
	beq	.L7
	cmp	r4, #0
	bne	.L18
.L6:
	mov	r0, r7
	bl	fflush
	mov	r0, r5
	bl	close
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L7:
	cmp	r4, #0
	beq	.L6
	mov	r4, r0
	ldr	r2, [r6]
	mov	r0, r7
	ldr	r1, .L19+28
	bl	fprintf
	ldr	r7, [r8]
	b	.L6
.L16:
	ldr	r1, .L19+16
	ldr	r2, .L19+24
	ldr	r3, .L19+32
	ldr	r0, [r1]
	ldr	r5, [r6]
	ldr	r4, [r2]
	ldr	r6, [r3]
	bl	strerror
	mov	r1, r0
	mov	r0, r4
	mov	r4, #0
	str	r1, [sp]
	mov	r2, r6
	mov	r3, r5
	ldr	r1, .L19+36
	bl	fprintf
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L18:
	ldr	r4, [r6]
	bl	strerror
	mov	r2, r4
	mov	r3, r0
	ldr	r1, .L19+40
	mov	r0, r7
	bl	fprintf
	mov	r4, r9
	ldr	r7, [r8]
	b	.L6
.L17:
	ldr	r0, [r9]
	str	r0, [r7]
	bl	IsValidWalSegSize
	subs	r4, r0, #0
	ldrne	r3, .L19+24
	movne	r4, #1
	ldrne	r7, [r3]
	bne	.L6
.L5:
	ldr	r6, .L19+24
	ldr	r2, .L19+32
	ldr	r3, [r7]
	ldr	r2, [r2]
	ldr	r0, [r6]
	ldr	r1, .L19+44
	bl	fprintf
	ldr	r7, [r6]
	b	.L6
.L20:
	.align	2
.L19:
	.word	WalSegSz
	.word	WALFilePath
	.word	O_RDWR
	.word	XLOG_BLCKSZ
	.word	errno
	.word	debug
	.word	stderr
	.word	.LC3
	.word	progname
	.word	.LC0
	.word	.LC2
	.word	.LC1
	.size	SetWALSegSize, .-SetWALSegSize
	.comm	stderr,4,4
	.comm	progname,4,4
	.comm	errno,4,4
	.comm	debug,4,4
	.comm	XLOG_BLCKSZ,4,4
	.comm	WalSegSz,4,4
	.comm	WALFilePath,4,4
	.comm	O_RDWR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
