	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_audit_set_terminal_port        ## -- Begin function audit_set_terminal_port
	.p2align	4, 0x90
_audit_set_terminal_port:               ## @audit_set_terminal_port
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movl	$-1, (%rdi)
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-24(%rbp), %rsi
	callq	_fstat
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movq	_EBADF@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_4
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	leaq	-24(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r14), %rdi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_1:
	movq	_kAUBadParamErr@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movl	-24(%rbp), %eax
	movl	%eax, (%rbx)
	movq	_kAUNoErr@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_strerror
	leaq	L_.str(%rip), %rsi
LBB0_5:
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_syslog
	movq	_kAUStatErr@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kAUBadParamErr,4,2             ## @kAUBadParamErr
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_errno,8,3                      ## @errno
	.comm	_EBADF,8,3                      ## @EBADF
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fstat() failed (%s)"

	.comm	_kAUStatErr,4,2                 ## @kAUStatErr
L_.str.1:                               ## @.str.1
	.asciz	"/dev/console"

L_.str.2:                               ## @.str.2
	.asciz	"stat() failed (%s)"

	.comm	_kAUNoErr,4,2                   ## @kAUNoErr
	.comm	_NODEV,4,2                      ## @NODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_audit_set_terminal_port        ; -- Begin function audit_set_terminal_port
	.p2align	2
_audit_set_terminal_port:               ; @audit_set_terminal_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	w8, #-1
	str	w8, [x0]
Lloh0:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_fstat
	cbz	x0, LBB0_6
; %bb.2:
Lloh3:
	adrp	x20, _errno@GOTPAGE
Lloh4:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	x0, [x20]
Lloh5:
	adrp	x8, _EBADF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x1, sp, #8
	bl	_stat
	cbz	x0, LBB0_6
; %bb.4:
Lloh10:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
	ldr	x0, [x20]
	bl	_strerror
	mov	x2, x0
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_5:
Lloh15:
	adrp	x8, _kAUBadParamErr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _kAUBadParamErr@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	ldr	w8, [sp, #8]
	str	w8, [x19]
Lloh17:
	adrp	x8, _kAUNoErr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _kAUNoErr@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh19:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh21:
	ldr	w19, [x8]
	bl	_strerror
	mov	x2, x0
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_syslog
Lloh24:
	adrp	x8, _kAUStatErr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _kAUStatErr@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_kAUBadParamErr,4,2             ; @kAUBadParamErr
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_errno,8,3                      ; @errno
	.comm	_EBADF,8,3                      ; @EBADF
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fstat() failed (%s)"

	.comm	_kAUStatErr,4,2                 ; @kAUStatErr
l_.str.1:                               ; @.str.1
	.asciz	"/dev/console"

l_.str.2:                               ; @.str.2
	.asciz	"stat() failed (%s)"

	.comm	_kAUNoErr,4,2                   ; @kAUNoErr
	.comm	_NODEV,4,2                      ; @NODEV
.subsections_via_symbols
