	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_log_init                       ## -- Begin function log_init
	.p2align	4, 0x90
_log_init:                              ## @log_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_key_created@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	$1, (%rax)
	movq	_logkey@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	callq	_ub_thread_key_create
	movq	_log_lock@GOTPCREL(%rip), %rdi
	callq	_lock_quick_init
LBB0_2:
	movq	_log_lock@GOTPCREL(%rip), %rdi
	callq	_lock_quick_lock
	movq	_logfile@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_11
## %bb.3:
	movq	_log_lock@GOTPCREL(%rip), %rdi
	callq	_lock_quick_unlock
	movq	_VERB_QUERY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_8
LBB0_5:
	testq	%r15, %r15
	je	LBB0_6
## %bb.7:
	cmpb	$0, (%r15)
	leaq	L_.str.2(%rip), %rdx
	cmovneq	%r15, %rdx
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.2(%rip), %rdx
LBB0_8:
	leaq	L_.str(%rip), %rsi
	callq	_verbose
	movq	_log_lock@GOTPCREL(%rip), %rdi
	callq	_lock_quick_lock
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_11
## %bb.10:
	movq	$0, (%r12)
	callq	_fclose
LBB0_11:
	testq	%r15, %r15
	je	LBB0_13
## %bb.12:
	cmpb	$0, (%r15)
	je	LBB0_13
## %bb.15:
	testq	%r14, %r14
	je	LBB0_19
## %bb.16:
	cmpb	$0, (%r14)
	je	LBB0_19
## %bb.17:
	movq	%r14, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_strlen
	cltq
	addq	%rax, %r15
LBB0_19:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	%rax, %rbx
	movq	__IOLBF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_setvbuf
	movq	%rbx, (%r12)
	jmp	LBB0_14
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
LBB0_14:
	movq	_log_lock@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lock_quick_unlock              ## TAILCALL
LBB0_21:
	movq	_log_lock@GOTPCREL(%rip), %rdi
	callq	_lock_quick_unlock
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.4(%rip), %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_key_created,4,2                ## @key_created
	.comm	_logkey,4,2                     ## @logkey
	.comm	_log_lock,4,2                   ## @log_lock
	.comm	_logfile,8,3                    ## @logfile
	.comm	_VERB_QUERY,4,2                 ## @VERB_QUERY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"switching log to %s"

L_.str.1:                               ## @.str.1
	.asciz	"syslog"

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

	.comm	_stderr,8,3                     ## @stderr
L_.str.3:                               ## @.str.3
	.asciz	"a"

L_.str.4:                               ## @.str.4
	.asciz	"Could not open logfile %s: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	__IOLBF,8,3                     ## @_IOLBF
	.comm	_LOG_DAEMON,4,2                 ## @LOG_DAEMON
	.comm	_LOG_NDELAY,4,2                 ## @LOG_NDELAY
	.comm	_ident,4,2                      ## @ident
	.comm	_logging_to_syslog,4,2          ## @logging_to_syslog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_log_init                       ; -- Begin function log_init
	.p2align	2
_log_init:                              ; @log_init
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _key_created@GOTPAGE
Lloh1:
	ldr	x8, [x8, _key_created@GOTPAGEOFF]
	ldr	w9, [x8]
	cbnz	w9, LBB0_2
; %bb.1:
	mov	w9, #1
	str	w9, [x8]
Lloh2:
	adrp	x0, _logkey@GOTPAGE
Lloh3:
	ldr	x0, [x0, _logkey@GOTPAGEOFF]
	mov	x1, #0
	bl	_ub_thread_key_create
Lloh4:
	adrp	x0, _log_lock@GOTPAGE
Lloh5:
	ldr	x0, [x0, _log_lock@GOTPAGEOFF]
	bl	_lock_quick_init
LBB0_2:
Lloh6:
	adrp	x0, _log_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _log_lock@GOTPAGEOFF]
	bl	_lock_quick_lock
Lloh8:
	adrp	x22, _logfile@GOTPAGE
Lloh9:
	ldr	x22, [x22, _logfile@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh10:
	adrp	x23, _stderr@GOTPAGE
Lloh11:
	ldr	x23, [x23, _stderr@GOTPAGEOFF]
	cbz	x8, LBB0_9
; %bb.3:
Lloh12:
	adrp	x0, _log_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _log_lock@GOTPAGEOFF]
	bl	_lock_quick_unlock
Lloh14:
	adrp	x8, _VERB_QUERY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VERB_QUERY@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	cbz	w21, LBB0_5
; %bb.4:
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	cbz	x19, LBB0_7
; %bb.6:
	ldrb	w8, [x19]
	cmp	w8, #0
	csel	x2, x2, x19, eq
LBB0_7:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_verbose
Lloh23:
	adrp	x0, _log_lock@GOTPAGE
Lloh24:
	ldr	x0, [x0, _log_lock@GOTPAGEOFF]
	bl	_lock_quick_lock
	ldr	x0, [x22]
	ldr	x8, [x23]
	cmp	x0, #0
	ccmp	x0, x8, #4, ne
	b.eq	LBB0_9
; %bb.8:
	str	xzr, [x22]
	bl	_fclose
LBB0_9:
	cbz	x19, LBB0_17
; %bb.10:
	ldrb	w8, [x19]
	cbz	w8, LBB0_17
; %bb.11:
	cbz	x20, LBB0_15
; %bb.12:
	ldrb	w8, [x20]
	cbz	w8, LBB0_15
; %bb.13:
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_strncmp
	cbnz	x0, LBB0_15
; %bb.14:
	mov	x0, x20
	bl	_strlen
	add	x19, x19, w0, sxtw
LBB0_15:
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_19
; %bb.16:
	mov	x20, x0
Lloh27:
	adrp	x8, __IOLBF@GOTPAGE
Lloh28:
	ldr	x8, [x8, __IOLBF@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x1, #0
	mov	w3, #0
	bl	_setvbuf
	str	x20, [x22]
	b	LBB0_18
LBB0_17:
	ldr	x8, [x23]
	str	x8, [x22]
LBB0_18:
Lloh30:
	adrp	x0, _log_lock@GOTPAGE
Lloh31:
	ldr	x0, [x0, _log_lock@GOTPAGEOFF]
	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
	b	_lock_quick_unlock
LBB0_19:
Lloh32:
	adrp	x0, _log_lock@GOTPAGE
Lloh33:
	ldr	x0, [x0, _log_lock@GOTPAGEOFF]
	bl	_lock_quick_unlock
Lloh34:
	adrp	x8, _errno@GOTPAGE
Lloh35:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh37:
	adrp	x0, l_.str.4@PAGE
Lloh38:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	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
	b	_log_err
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_key_created,4,2                ; @key_created
	.comm	_logkey,4,2                     ; @logkey
	.comm	_log_lock,4,2                   ; @log_lock
	.comm	_logfile,8,3                    ; @logfile
	.comm	_VERB_QUERY,4,2                 ; @VERB_QUERY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"switching log to %s"

l_.str.1:                               ; @.str.1
	.asciz	"syslog"

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

	.comm	_stderr,8,3                     ; @stderr
l_.str.3:                               ; @.str.3
	.asciz	"a"

l_.str.4:                               ; @.str.4
	.asciz	"Could not open logfile %s: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	__IOLBF,8,3                     ; @_IOLBF
	.comm	_LOG_DAEMON,4,2                 ; @LOG_DAEMON
	.comm	_LOG_NDELAY,4,2                 ; @LOG_NDELAY
	.comm	_ident,4,2                      ; @ident
	.comm	_logging_to_syslog,4,2          ; @logging_to_syslog
.subsections_via_symbols
