	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_logging                   ## -- Begin function init_logging
	.p2align	4, 0x90
_init_logging:                          ## @init_logging
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_errorfilename@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_8
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_get_process_filename
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	callq	_fopen
	movq	_errorfile@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %edi
	callq	_fileno
	movq	_F_SETFD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_fcntl
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_7
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_8
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	(%rbx), %r14
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movq	%r14, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_8:
	movq	_physical_mem_bytes@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_10
## %bb.9:
	movq	_CTL_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_HW_MEMSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	$8, -48(%rbp)
	movq	_physical_mem_bytes@GOTPCREL(%rip), %rdx
	leaq	-40(%rbp), %rdi
	leaq	-48(%rbp), %rcx
	movl	$2, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_sysctl
LBB0_10:
	movq	_shmlog_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_logbuffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rcx, %rcx
	jle	LBB0_13
## %bb.11:
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	xorl	%eax, %eax
	callq	_open_logbuffer
	jmp	LBB0_16
LBB0_13:
	testq	%rcx, %rcx
	jg	LBB0_16
## %bb.14:
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	callq	_close_logbuffer
LBB0_16:
	movq	_purge_zerobyte_logfile@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_atexit
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_errorfilename,8,3              ## @errorfilename
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"errorlog"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Could not initialize errorlog\n"

L_.str.2:                               ## @.str.2
	.asciz	"w"

	.comm	_errorfile,4,2                  ## @errorfile
L_.str.3:                               ## @.str.3
	.asciz	"Could not initialize errorlog on %s: %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
L_.str.4:                               ## @.str.4
	.asciz	"Could not set close-on-exec flag\n"

	.comm	_physical_mem_bytes,8,3         ## @physical_mem_bytes
	.comm	_CTL_HW,4,2                     ## @CTL_HW
	.comm	_HW_MEMSIZE,4,2                 ## @HW_MEMSIZE
	.comm	_shmlog_size,8,3                ## @shmlog_size
	.comm	_logbuffer,8,3                  ## @logbuffer
	.comm	_purge_zerobyte_logfile,4,2     ## @purge_zerobyte_logfile
	.comm	__SC_PAGESIZE,4,2               ## @_SC_PAGESIZE
	.comm	__SC_PHYS_PAGES,4,2             ## @_SC_PHYS_PAGES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_logging                   ; -- Begin function init_logging
	.p2align	2
_init_logging:                          ; @init_logging
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x20, _errorfilename@GOTPAGE
Lloh4:
	ldr	x20, [x20, _errorfilename@GOTPAGEOFF]
	ldr	x8, [x20]
	cbnz	x8, LBB0_8
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_get_process_filename
	str	x0, [x20]
	cbz	x0, LBB0_5
; %bb.2:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fopen
Lloh9:
	adrp	x8, _errorfile@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errorfile@GOTPAGEOFF]
Lloh11:
	str	w0, [x8]
	cbz	w0, LBB0_6
; %bb.3:
	bl	_fileno
Lloh12:
	adrp	x8, _F_SETFD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _F_SETFD@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _FD_CLOEXEC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FD_CLOEXEC@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_fcntl
	cbz	x0, LBB0_8
; %bb.4:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh28:
	adrp	x8, _stderr@GOTPAGE
Lloh29:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh30:
	ldr	w19, [x8]
	ldr	x20, [x20]
Lloh31:
	adrp	x8, _errno@GOTPAGE
Lloh32:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_strerror
	stp	x20, x0, [sp]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
LBB0_7:
	bl	_fprintf
LBB0_8:
Lloh36:
	adrp	x8, _physical_mem_bytes@GOTPAGE
Lloh37:
	ldr	x8, [x8, _physical_mem_bytes@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	cbnz	x8, LBB0_10
; %bb.9:
Lloh39:
	adrp	x8, _CTL_HW@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CTL_HW@GOTPAGEOFF]
Lloh41:
	adrp	x9, _HW_MEMSIZE@GOTPAGE
Lloh42:
	ldr	x9, [x9, _HW_MEMSIZE@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #32]
	mov	w8, #8
	str	x8, [sp, #24]
Lloh45:
	adrp	x2, _physical_mem_bytes@GOTPAGE
Lloh46:
	ldr	x2, [x2, _physical_mem_bytes@GOTPAGEOFF]
	add	x0, sp, #32
	add	x3, sp, #24
	mov	w1, #2
	mov	x4, #0
	mov	w5, #0
	bl	_sysctl
LBB0_10:
Lloh47:
	adrp	x8, _shmlog_size@GOTPAGE
Lloh48:
	ldr	x8, [x8, _shmlog_size@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
Lloh50:
	adrp	x9, _logbuffer@GOTPAGE
Lloh51:
	ldr	x9, [x9, _logbuffer@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x8, #1
	ccmp	x9, #0, #0, ge
	b.eq	LBB0_13
; %bb.11:
	cmp	x8, #0
	ccmp	x9, #0, #4, le
	b.eq	LBB0_14
; %bb.12:
	bl	_close_logbuffer
	b	LBB0_14
LBB0_13:
	bl	_open_logbuffer
LBB0_14:
Lloh53:
	adrp	x8, _purge_zerobyte_logfile@GOTPAGE
Lloh54:
	ldr	x8, [x8, _purge_zerobyte_logfile@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
	bl	_atexit
	ldur	x8, [x29, #-24]
Lloh56:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh57:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh58:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh43
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_errorfilename,8,3              ; @errorfilename
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"errorlog"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Could not initialize errorlog\n"

l_.str.2:                               ; @.str.2
	.asciz	"w"

	.comm	_errorfile,4,2                  ; @errorfile
l_.str.3:                               ; @.str.3
	.asciz	"Could not initialize errorlog on %s: %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
l_.str.4:                               ; @.str.4
	.asciz	"Could not set close-on-exec flag\n"

	.comm	_physical_mem_bytes,8,3         ; @physical_mem_bytes
	.comm	_CTL_HW,4,2                     ; @CTL_HW
	.comm	_HW_MEMSIZE,4,2                 ; @HW_MEMSIZE
	.comm	_shmlog_size,8,3                ; @shmlog_size
	.comm	_logbuffer,8,3                  ; @logbuffer
	.comm	_purge_zerobyte_logfile,4,2     ; @purge_zerobyte_logfile
	.comm	__SC_PAGESIZE,4,2               ; @_SC_PAGESIZE
	.comm	__SC_PHYS_PAGES,4,2             ; @_SC_PHYS_PAGES
.subsections_via_symbols
