	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_smtpd_io
_setup_smtpd_io:                        ## @setup_smtpd_io
	.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
	movq	_InChannel@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SM_IO_WHAT_FD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	xorl	%edx, %edx
	callq	_sm_io_getinfo
	movl	%eax, %r14d
	movq	_OutChannel@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	xorl	%edx, %edx
	callq	_sm_io_getinfo
	movl	%eax, %r13d
	movq	_smioout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	xorl	%edx, %edx
	callq	_sm_io_getinfo
	cmpl	%eax, %r13d
	je	LBB0_2
## %bb.1:
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_dup2
LBB0_2:
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_22
## %bb.3:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_22
## %bb.4:
	movl	%r14d, %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_22
## %bb.5:
	movl	%r13d, %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_22
## %bb.6:
	movq	_F_GETFL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.10:
	movl	%eax, %r15d
	movl	(%rbx), %esi
	movl	%r13d, %edi
	xorl	%edx, %edx
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.13:
	movl	%eax, %r12d
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %esi
	callq	_bitset
	testq	%rax, %rax
	movq	_OutChannel@GOTPCREL(%rip), %r15
	jne	LBB0_22
## %bb.14:
	movl	(%rbx), %edi
	movl	%r12d, %esi
	callq	_bitset
	testq	%rax, %rax
	jne	LBB0_22
## %bb.15:
	movq	_F_SETFL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	(%rbx), %edx
	orl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%r14d, %edi
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_22
## %bb.16:
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	xorl	%edx, %edx
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_21
## %bb.17:
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_bitset
	testq	%rax, %rax
	je	LBB0_21
## %bb.18:
	movl	(%r15), %edi
	movq	_InChannel@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sm_io_automode
	movl	$97, %edi
	movl	$4, %esi
	callq	_tTd
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movq	_LogLevel@GOTPCREL(%rip), %rax
	cmpl	$10, (%rax)
	jl	LBB0_21
## %bb.20:
	movq	_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NOQID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_sm_syslog
LBB0_21:
	movl	(%r12), %esi
	movl	%r14d, %edi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fcntl                          ## TAILCALL
LBB0_7:
	movq	_LogLevel@GOTPCREL(%rip), %rax
	cmpl	$12, (%rax)
	jl	LBB0_22
## %bb.8:
	movq	_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_NOQID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sm_errstring
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_9
LBB0_11:
	movq	_LogLevel@GOTPCREL(%rip), %rax
	cmpl	$12, (%rax)
	jl	LBB0_22
## %bb.12:
	movq	_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_NOQID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sm_errstring
	leaq	L_.str.1(%rip), %rdx
LBB0_9:
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sm_syslog                      ## TAILCALL
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InChannel,4,2                  ## @InChannel
	.comm	_SM_IO_WHAT_FD,4,2              ## @SM_IO_WHAT_FD
	.comm	_OutChannel,4,2                 ## @OutChannel
	.comm	_smioout,4,2                    ## @smioout
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_LogLevel,4,2                   ## @LogLevel
	.comm	_LOG_INFO,4,2                   ## @LOG_INFO
	.comm	_NOQID,4,2                      ## @NOQID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fcntl(inchfd, F_GETFL) failed: %s"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"fcntl(outchfd, F_GETFL) failed: %s"

	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_F_SETFL,4,2                    ## @F_SETFL
L_.str.2:                               ## @.str.2
	.asciz	"set automode for I (%d)/O (%d) in SMTP server"

	.no_dead_strip	_setup_smtpd_io
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_smtpd_io
_setup_smtpd_io:                        ; @setup_smtpd_io
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x23, _InChannel@GOTPAGE
Lloh1:
	ldr	x23, [x23, _InChannel@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x21, _SM_IO_WHAT_FD@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SM_IO_WHAT_FD@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x2, #0
	bl	_sm_io_getinfo
	mov	x19, x0
Lloh4:
	adrp	x24, _OutChannel@GOTPAGE
Lloh5:
	ldr	x24, [x24, _OutChannel@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	w1, [x21]
	mov	x2, #0
	bl	_sm_io_getinfo
	mov	x20, x0
Lloh6:
	adrp	x8, _smioout@GOTPAGE
Lloh7:
	ldr	x8, [x8, _smioout@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x21]
	mov	x2, #0
	bl	_sm_io_getinfo
	cmp	w20, w0
	b.eq	LBB0_2
; %bb.1:
	mov	x1, x0
	mov	x0, x20
	bl	_dup2
LBB0_2:
Lloh9:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _STDOUT_FILENO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _STDOUT_FILENO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w19, w8
	ccmp	w20, w9, #0, eq
	b.ne	LBB0_21
; %bb.3:
	mov	x0, x19
	bl	_isatty
	cbz	x0, LBB0_21
; %bb.4:
	mov	x0, x20
	bl	_isatty
	cbz	x0, LBB0_21
; %bb.5:
Lloh15:
	adrp	x25, _F_GETFL@GOTPAGE
Lloh16:
	ldr	x25, [x25, _F_GETFL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	bl	_fcntl
	cmn	w0, #1
	b.eq	LBB0_16
; %bb.6:
	mov	x21, x0
	ldr	w1, [x25]
	mov	x0, x20
	mov	w2, #0
	bl	_fcntl
	cmn	w0, #1
	b.eq	LBB0_18
; %bb.7:
	mov	x22, x0
Lloh17:
	adrp	x26, _O_NONBLOCK@GOTPAGE
Lloh18:
	ldr	x26, [x26, _O_NONBLOCK@GOTPAGEOFF]
	ldr	w0, [x26]
	mov	x1, x21
	bl	_bitset
	cbnz	x0, LBB0_21
; %bb.8:
	ldr	w0, [x26]
	mov	x1, x22
	bl	_bitset
	cbnz	x0, LBB0_21
; %bb.9:
Lloh19:
	adrp	x22, _F_SETFL@GOTPAGE
Lloh20:
	ldr	x22, [x22, _F_SETFL@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w8, [x26]
	orr	w2, w8, w21
	mov	x0, x19
	bl	_fcntl
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.10:
	ldr	w1, [x25]
	mov	x0, x20
	mov	w2, #0
	bl	_fcntl
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.11:
	mov	x1, x0
	ldr	w0, [x26]
	bl	_bitset
	cbz	x0, LBB0_15
; %bb.12:
	ldr	w0, [x24]
	ldr	w1, [x23]
	bl	_sm_io_automode
	mov	w0, #97
	mov	w1, #4
	bl	_tTd
	cbz	x0, LBB0_15
; %bb.13:
Lloh21:
	adrp	x8, _LogLevel@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LogLevel@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, #10
	b.lt	LBB0_15
; %bb.14:
Lloh24:
	adrp	x8, _LOG_INFO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LOG_INFO@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x8, _NOQID@GOTPAGE
Lloh28:
	ldr	x8, [x8, _NOQID@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	str	x20, [sp]
Lloh30:
	adrp	x2, l_.str.2@PAGE
Lloh31:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x3, x19
	bl	_sm_syslog
LBB0_15:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_fcntl
LBB0_16:
Lloh32:
	adrp	x8, _LogLevel@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LogLevel@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	w8, #12
	b.lt	LBB0_21
; %bb.17:
Lloh35:
	adrp	x8, _LOG_INFO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _LOG_INFO@GOTPAGEOFF]
Lloh37:
	ldr	w19, [x8]
Lloh38:
	adrp	x8, _NOQID@GOTPAGE
Lloh39:
	ldr	x8, [x8, _NOQID@GOTPAGEOFF]
Lloh40:
	ldr	w20, [x8]
Lloh41:
	adrp	x8, _errno@GOTPAGE
Lloh42:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	_sm_errstring
	mov	x3, x0
Lloh44:
	adrp	x2, l_.str@PAGE
Lloh45:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_20
LBB0_18:
Lloh46:
	adrp	x8, _LogLevel@GOTPAGE
Lloh47:
	ldr	x8, [x8, _LogLevel@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	cmp	w8, #12
	b.lt	LBB0_21
; %bb.19:
Lloh49:
	adrp	x8, _LOG_INFO@GOTPAGE
Lloh50:
	ldr	x8, [x8, _LOG_INFO@GOTPAGEOFF]
Lloh51:
	ldr	w19, [x8]
Lloh52:
	adrp	x8, _NOQID@GOTPAGE
Lloh53:
	ldr	x8, [x8, _NOQID@GOTPAGEOFF]
Lloh54:
	ldr	w20, [x8]
Lloh55:
	adrp	x8, _errno@GOTPAGE
Lloh56:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh57:
	ldr	w0, [x8]
	bl	_sm_errstring
	mov	x3, x0
Lloh58:
	adrp	x2, l_.str.1@PAGE
Lloh59:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_20:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_sm_syslog
LBB0_21:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_InChannel,4,2                  ; @InChannel
	.comm	_SM_IO_WHAT_FD,4,2              ; @SM_IO_WHAT_FD
	.comm	_OutChannel,4,2                 ; @OutChannel
	.comm	_smioout,4,2                    ; @smioout
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_LogLevel,4,2                   ; @LogLevel
	.comm	_LOG_INFO,4,2                   ; @LOG_INFO
	.comm	_NOQID,4,2                      ; @NOQID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fcntl(inchfd, F_GETFL) failed: %s"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"fcntl(outchfd, F_GETFL) failed: %s"

	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_F_SETFL,4,2                    ; @F_SETFL
l_.str.2:                               ; @.str.2
	.asciz	"set automode for I (%d)/O (%d) in SMTP server"

	.no_dead_strip	_setup_smtpd_io
.subsections_via_symbols
