	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getdiv                         ## -- Begin function getdiv
	.p2align	4, 0x90
_getdiv:                                ## @getdiv
	.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	_active@GOTPCREL(%rip), %r15
	movq	_outfile@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movslq	%edi, %rbx
	movq	(%rax,%rbx,8), %rdi
	cmpq	%rdi, (%r15)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_m4errx
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
LBB0_2:
	callq	_rewind
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_getc
	movq	_EOF@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	je	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	movl	%eax, %edi
	callq	_putc
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_getc
	cmpl	(%r12), %eax
	jne	LBB0_3
LBB0_5:
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_fclose
	movq	(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_active,8,3                     ## @active
	.comm	_outfile,8,3                    ## @outfile
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"undivert: diversion still active."

	.comm	_EOF,4,2                        ## @EOF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getdiv                         ; -- Begin function getdiv
	.p2align	2
_getdiv:                                ; @getdiv
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x20, _active@GOTPAGE
Lloh1:
	ldr	x20, [x20, _active@GOTPAGEOFF]
Lloh2:
	adrp	x19, _outfile@GOTPAGE
Lloh3:
	ldr	x19, [x19, _outfile@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x19]
	sxtw	x21, w0
	ldr	x0, [x9, w0, sxtw #3]
	cmp	x8, x0
	b.ne	LBB0_2
; %bb.1:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_m4errx
	ldr	x8, [x19]
	ldr	x0, [x8, x21, lsl #3]
LBB0_2:
	bl	_rewind
	ldr	x8, [x19]
	ldr	x0, [x8, x21, lsl #3]
	bl	_getc
Lloh6:
	adrp	x22, _EOF@GOTPAGE
Lloh7:
	ldr	x22, [x22, _EOF@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x20]
	bl	_putc
	ldr	x8, [x19]
	ldr	x0, [x8, x21, lsl #3]
	bl	_getc
	b	LBB0_3
LBB0_5:
	ldr	x8, [x19]
	lsl	x20, x21, #3
	ldr	x0, [x8, x20]
	bl	_fclose
	ldr	x8, [x19]
	str	xzr, [x8, x20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_active,8,3                     ; @active
	.comm	_outfile,8,3                    ; @outfile
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"undivert: diversion still active."

	.comm	_EOF,4,2                        ; @EOF
.subsections_via_symbols
