	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function register_daemon
_register_daemon:                       ## @register_daemon
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_auditd_relay_signal@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	$0, -48(%rbp)
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sigemptyset
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_sigaction
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_auditd_log_err
	xorl	%eax, %eax
	callq	_fail_exit
LBB0_2:
	movq	_SIGCHLD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigaction
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_auditd_log_err
	xorl	%eax, %eax
	callq	_fail_exit
LBB0_4:
	movq	_SIGHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigaction
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	_auditd_log_err
	xorl	%eax, %eax
	callq	_fail_exit
LBB0_6:
	movq	_SIGALRM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigaction
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	callq	_auditd_log_err
	xorl	%eax, %eax
	callq	_fail_exit
LBB0_8:
	movq	_AUDITD_PIDFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_fileno
	movl	%eax, %r15d
	movq	_LOCK_EX@GOTPCREL(%rip), %rax
	movq	_LOCK_NB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	%r15d, %edi
	callq	_flock
	testq	%rax, %rax
	js	LBB0_14
## %bb.10:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_getpid
	movl	%eax, %r12d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_ftruncate
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_fprintf
	testq	%rax, %rax
	jns	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	callq	_fail_exit
LBB0_12:
	movq	%rbx, %rdi
	callq	_fflush
	jmp	LBB0_16
LBB0_13:
	leaq	L_.str.5(%rip), %rdi
	callq	_auditd_log_err
	xorl	%eax, %eax
	callq	_audit_warn_tmpfile
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.6(%rip), %rdi
	callq	_auditd_log_err
	xorl	%eax, %eax
	callq	_audit_warn_ebusy
LBB0_15:
	movl	$-1, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_auditd_relay_signal,4,2        ## @auditd_relay_signal
	.comm	_SIGTERM,4,2                    ## @SIGTERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not set signal handler for SIGTERM"

	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
L_.str.1:                               ## @.str.1
	.asciz	"Could not set signal handler for SIGCHLD"

	.comm	_SIGHUP,4,2                     ## @SIGHUP
L_.str.2:                               ## @.str.2
	.asciz	"Could not set signal handler for SIGHUP"

	.comm	_SIGALRM,4,2                    ## @SIGALRM
L_.str.3:                               ## @.str.3
	.asciz	"Could not set signal handler for SIGALRM"

	.comm	_AUDITD_PIDFILE,4,2             ## @AUDITD_PIDFILE
L_.str.4:                               ## @.str.4
	.asciz	"a"

L_.str.5:                               ## @.str.5
	.asciz	"Could not open PID file"

	.comm	_LOCK_EX,4,2                    ## @LOCK_EX
	.comm	_LOCK_NB,4,2                    ## @LOCK_NB
L_.str.6:                               ## @.str.6
	.asciz	"PID file is locked (is another auditd running?)."

L_.str.7:                               ## @.str.7
	.asciz	"%u\n"

	.no_dead_strip	_register_daemon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function register_daemon
_register_daemon:                       ; @register_daemon
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x8, _auditd_relay_signal@GOTPAGE
Lloh1:
	ldr	x8, [x8, _auditd_relay_signal@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	str	xzr, [sp, #16]
	add	x0, sp, #8
	bl	_sigemptyset
Lloh3:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	x2, #0
	bl	_sigaction
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_auditd_log_err
	bl	_fail_exit
LBB0_2:
Lloh8:
	adrp	x8, _SIGCHLD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SIGCHLD@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	x2, #0
	bl	_sigaction
	cbz	x0, LBB0_4
; %bb.3:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_auditd_log_err
	bl	_fail_exit
LBB0_4:
Lloh13:
	adrp	x8, _SIGHUP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SIGHUP@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	x2, #0
	bl	_sigaction
	cbz	x0, LBB0_6
; %bb.5:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_auditd_log_err
	bl	_fail_exit
LBB0_6:
Lloh18:
	adrp	x8, _SIGALRM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SIGALRM@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	x2, #0
	bl	_sigaction
	cbz	x0, LBB0_8
; %bb.7:
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_auditd_log_err
	bl	_fail_exit
LBB0_8:
Lloh23:
	adrp	x8, _AUDITD_PIDFILE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AUDITD_PIDFILE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_13
; %bb.9:
	mov	x19, x0
	bl	_fileno
	mov	x20, x0
Lloh28:
	adrp	x8, _LOCK_EX@GOTPAGE
Lloh29:
	ldr	x8, [x8, _LOCK_EX@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _LOCK_NB@GOTPAGE
Lloh32:
	ldr	x9, [x9, _LOCK_NB@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_flock
	tbnz	x0, #63, LBB0_14
; %bb.10:
	bl	_getpid
	mov	x21, x0
	mov	x0, x20
	mov	w1, #0
	bl	_ftruncate
Lloh34:
	adrp	x1, l_.str.7@PAGE
Lloh35:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_fprintf
	tbz	x0, #63, LBB0_12
; %bb.11:
	bl	_fail_exit
LBB0_12:
	mov	x0, x19
	bl	_fflush
	mov	w0, #0
	b	LBB0_16
LBB0_13:
Lloh36:
	adrp	x0, l_.str.5@PAGE
Lloh37:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_auditd_log_err
	bl	_audit_warn_tmpfile
	b	LBB0_15
LBB0_14:
Lloh38:
	adrp	x0, l_.str.6@PAGE
Lloh39:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_auditd_log_err
	bl	_audit_warn_ebusy
LBB0_15:
	mov	w0, #-1
LBB0_16:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_auditd_relay_signal,4,2        ; @auditd_relay_signal
	.comm	_SIGTERM,4,2                    ; @SIGTERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not set signal handler for SIGTERM"

	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
l_.str.1:                               ; @.str.1
	.asciz	"Could not set signal handler for SIGCHLD"

	.comm	_SIGHUP,4,2                     ; @SIGHUP
l_.str.2:                               ; @.str.2
	.asciz	"Could not set signal handler for SIGHUP"

	.comm	_SIGALRM,4,2                    ; @SIGALRM
l_.str.3:                               ; @.str.3
	.asciz	"Could not set signal handler for SIGALRM"

	.comm	_AUDITD_PIDFILE,4,2             ; @AUDITD_PIDFILE
l_.str.4:                               ; @.str.4
	.asciz	"a"

l_.str.5:                               ; @.str.5
	.asciz	"Could not open PID file"

	.comm	_LOCK_EX,4,2                    ; @LOCK_EX
	.comm	_LOCK_NB,4,2                    ; @LOCK_NB
l_.str.6:                               ; @.str.6
	.asciz	"PID file is locked (is another auditd running?)."

l_.str.7:                               ; @.str.7
	.asciz	"%u\n"

	.no_dead_strip	_register_daemon
.subsections_via_symbols
