	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setinput                       ## -- Begin function setinput
	.p2align	4, 0x90
_setinput:                              ## @setinput
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_FLUSHTAPEBUF
	movq	_bflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ntrec@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	jmp	LBB0_3
LBB0_2:
	movq	_NTREC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HIGHDENSITYTREC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MAX
	movl	%eax, %edi
LBB0_3:
	callq	_newtapebuf
	movq	_stdin@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_terminal@GOTPCREL(%rip), %r13
	movq	%rax, (%r13)
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	movq	_pipecmdin@GOTPCREL(%rip), %rbx
LBB0_9:
	incl	(%rbx)
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_6
LBB0_10:
	xorl	%eax, %eax
	callq	_getuid
	movl	%eax, %edi
	callq	_setuid
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_done
LBB0_12:
	movq	%r14, %rdi
	callq	_strdup
	movq	_magtape@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_done                           ## TAILCALL
LBB0_6:
	movq	__PATH_TTY@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	movq	%rax, (%r13)
	movq	_pipein@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	(%r15), %r15
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edi
	movq	%r15, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movq	__PATH_DEVNULL@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	movq	%rax, (%r13)
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	(%r15), %r15
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edi
	movq	%r15, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_done
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_bflag,8,3                      ## @bflag
	.comm	_ntrec,4,2                      ## @ntrec
	.comm	_NTREC,4,2                      ## @NTREC
	.comm	_HIGHDENSITYTREC,4,2            ## @HIGHDENSITYTREC
	.comm	_stdin,8,3                      ## @stdin
	.comm	_terminal,8,3                   ## @terminal
	.comm	_pipecmdin,4,2                  ## @pipecmdin
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-"

	.comm	__PATH_TTY,8,3                  ## @_PATH_TTY
L_.str.1:                               ## @.str.1
	.asciz	"r"

	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"cannot open %s: %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	__PATH_DEVNULL,8,3              ## @_PATH_DEVNULL
	.comm	_pipein,4,2                     ## @pipein
L_.str.3:                               ## @.str.3
	.asciz	"setuid failed\n"

	.comm	_magtape,8,3                    ## @magtape
L_.str.4:                               ## @.str.4
	.asciz	"Cannot allocate space for magtape buffer\n"

	.comm	_host,8,3                       ## @host
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setinput                       ; -- Begin function setinput
	.p2align	2
_setinput:                              ; @setinput
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_FLUSHTAPEBUF
Lloh0:
	adrp	x8, _bflag@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bflag@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ntrec@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ntrec@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _NTREC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NTREC@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _HIGHDENSITYTREC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HIGHDENSITYTREC@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_MAX
LBB0_3:
	bl	_newtapebuf
Lloh12:
	adrp	x8, _stdin@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x21, _terminal@GOTPAGE
Lloh16:
	ldr	x21, [x21, _terminal@GOTPAGEOFF]
	str	x8, [x21]
	cbz	w20, LBB0_6
; %bb.4:
Lloh17:
	adrp	x8, _pipecmdin@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pipecmdin@GOTPAGEOFF]
LBB0_5:
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_7
LBB0_6:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	x0, LBB0_12
LBB0_7:
	bl	_getuid
	bl	_setuid
	cbz	x0, LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_done
LBB0_9:
	mov	x0, x19
	bl	_strdup
Lloh26:
	adrp	x8, _magtape@GOTPAGE
Lloh27:
	ldr	x8, [x8, _magtape@GOTPAGEOFF]
Lloh28:
	str	x0, [x8]
	cbz	x0, LBB0_11
; %bb.10:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
Lloh29:
	adrp	x8, _stderr@GOTPAGE
Lloh30:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_done
LBB0_12:
Lloh34:
	adrp	x23, __PATH_TTY@GOTPAGE
Lloh35:
	ldr	x23, [x23, __PATH_TTY@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
	str	x0, [x21]
	cbnz	x0, LBB0_15
; %bb.13:
Lloh38:
	adrp	x22, _stderr@GOTPAGE
Lloh39:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	ldr	w20, [x22]
	ldr	x24, [x23]
Lloh40:
	adrp	x23, _errno@GOTPAGE
Lloh41:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_strerror
	stp	x24, x0, [sp]
Lloh42:
	adrp	x1, l_.str.2@PAGE
Lloh43:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fprintf
Lloh44:
	adrp	x24, __PATH_DEVNULL@GOTPAGE
Lloh45:
	ldr	x24, [x24, __PATH_DEVNULL@GOTPAGEOFF]
	ldr	x0, [x24]
Lloh46:
	adrp	x1, l_.str.1@PAGE
Lloh47:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
	str	x0, [x21]
	cbnz	x0, LBB0_15
; %bb.14:
	ldr	w20, [x22]
	ldr	x21, [x24]
	ldr	w0, [x23]
	bl	_strerror
	stp	x21, x0, [sp]
Lloh48:
	adrp	x1, l_.str.2@PAGE
Lloh49:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	mov	w0, #1
	bl	_done
LBB0_15:
Lloh50:
	adrp	x8, _pipein@GOTPAGE
Lloh51:
	ldr	x8, [x8, _pipein@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_bflag,8,3                      ; @bflag
	.comm	_ntrec,4,2                      ; @ntrec
	.comm	_NTREC,4,2                      ; @NTREC
	.comm	_HIGHDENSITYTREC,4,2            ; @HIGHDENSITYTREC
	.comm	_stdin,8,3                      ; @stdin
	.comm	_terminal,8,3                   ; @terminal
	.comm	_pipecmdin,4,2                  ; @pipecmdin
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-"

	.comm	__PATH_TTY,8,3                  ; @_PATH_TTY
l_.str.1:                               ; @.str.1
	.asciz	"r"

	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"cannot open %s: %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	__PATH_DEVNULL,8,3              ; @_PATH_DEVNULL
	.comm	_pipein,4,2                     ; @pipein
l_.str.3:                               ; @.str.3
	.asciz	"setuid failed\n"

	.comm	_magtape,8,3                    ; @magtape
l_.str.4:                               ; @.str.4
	.asciz	"Cannot allocate space for magtape buffer\n"

	.comm	_host,8,3                       ; @host
.subsections_via_symbols
