	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function logfile_open
_logfile_open:                          ## @logfile_open
	.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	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_Log_file_mode@GOTPCREL(%rip), %rax
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movq	_S_IRWXG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	orl	(%rax), %edi
	movq	_S_IRWXO@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	andl	%ecx, %edi
	callq	_umask
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_fopen
	movq	%rax, %r12
	movl	%ebx, %edi
	callq	_umask
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	movq	_PG_IOLBF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_setvbuf
	jmp	LBB0_6
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testl	%r15d, %r15d
	jne	LBB0_3
## %bb.4:
	movq	_FATAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_LOG@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r13d, (%rax)
LBB0_6:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Log_file_mode,4,2              ## @Log_file_mode
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_S_IRWXU,4,2                    ## @S_IRWXU
	.comm	_S_IRWXG,4,2                    ## @S_IRWXG
	.comm	_S_IRWXO,4,2                    ## @S_IRWXO
	.comm	_PG_IOLBF,4,2                   ## @PG_IOLBF
	.comm	_errno,4,2                      ## @errno
	.comm	_LOG,4,2                        ## @LOG
	.comm	_FATAL,4,2                      ## @FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not open log file \"%s\": %m"

	.comm	__O_TEXT,4,2                    ## @_O_TEXT
	.no_dead_strip	_logfile_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function logfile_open
_logfile_open:                          ; @logfile_open
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _Log_file_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Log_file_mode@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _S_IRWXU@GOTPAGE
Lloh7:
	ldr	x9, [x9, _S_IRWXU@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _S_IRWXG@GOTPAGE
Lloh10:
	ldr	x10, [x10, _S_IRWXG@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh12:
	adrp	x10, _S_IRWXO@GOTPAGE
Lloh13:
	ldr	x10, [x10, _S_IRWXO@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w0, w9, w8
	bl	_umask
	mov	x22, x0
	mov	x0, x19
	mov	x1, x20
	bl	_fopen
	mov	x20, x0
	mov	x0, x22
	bl	_umask
	cbz	x20, LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _PG_IOLBF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PG_IOLBF@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, #0
	mov	w3, #0
	bl	_setvbuf
	b	LBB0_3
LBB0_2:
Lloh18:
	adrp	x22, _errno@GOTPAGE
Lloh19:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
Lloh20:
	adrp	x8, _LOG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
	ldr	w23, [x22]
Lloh22:
	adrp	x9, _FATAL@GOTPAGE
Lloh23:
	ldr	x9, [x9, _FATAL@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x9, x8, eq
	ldr	w21, [x8]
	bl	_errcode_for_file_access
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
	str	w23, [x22]
LBB0_3:
	mov	x0, x20
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_Log_file_mode,4,2              ; @Log_file_mode
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_S_IRWXU,4,2                    ; @S_IRWXU
	.comm	_S_IRWXG,4,2                    ; @S_IRWXG
	.comm	_S_IRWXO,4,2                    ; @S_IRWXO
	.comm	_PG_IOLBF,4,2                   ; @PG_IOLBF
	.comm	_errno,4,2                      ; @errno
	.comm	_LOG,4,2                        ; @LOG
	.comm	_FATAL,4,2                      ; @FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not open log file \"%s\": %m"

	.comm	__O_TEXT,4,2                    ; @_O_TEXT
	.no_dead_strip	_logfile_open
.subsections_via_symbols
