	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_hup                     ## -- Begin function handle_hup
	.p2align	4, 0x90
_handle_hup:                            ## @handle_hup
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movl	$7370088, -37(%rbp)             ## imm = 0x707568
	movl	$1747870821, -40(%rbp)          ## imm = 0x682E6465
	movq	_sigactive@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	$1, %edi
	callq	_quit
LBB0_2:
	decb	%bl
	movl	$-2, %eax
	movl	%ebx, %ecx
	roll	%cl, %eax
	movq	_sigflags@GOTPCREL(%rip), %rcx
	andl	%eax, (%rcx)
	movq	_addr_last@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.3:
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdi
	movl	$1, %edx
	callq	_write_file
	testq	%rax, %rax
	js	LBB0_4
LBB0_10:
	movl	$2, %edi
	callq	_quit
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_strlen
	movq	%rax, %r14
	addq	$8, %rax
	movq	_PATH_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	ja	LBB0_10
## %bb.6:
	leaq	10(%r14), %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_strcpy
	cmpb	$47, -1(%r14,%r15)
	je	LBB0_9
## %bb.8:
	movw	$47, (%r15,%r14)
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcat
	movq	(%r12), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_write_file
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_sigactive,4,2                  ## @sigactive
	.comm	_sigflags,4,2                   ## @sigflags
	.comm	_addr_last,8,3                  ## @addr_last
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

L_.str.1:                               ## @.str.1
	.asciz	"HOME"

	.comm	_PATH_MAX,8,3                   ## @PATH_MAX
L_.str.2:                               ## @.str.2
	.asciz	"ed.hup"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_hup                     ; -- Begin function handle_hup
	.p2align	2
_handle_hup:                            ; @handle_hup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	mov	w8, #30056
	movk	w8, #112, lsl #16
	stur	w8, [sp, #11]
	mov	w8, #25701
	movk	w8, #26670, lsl #16
	str	w8, [sp, #8]
Lloh0:
	adrp	x8, _sigactive@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sigactive@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	w0, #1
	bl	_quit
LBB0_2:
	sub	w8, w19, #1
	mov	w9, #1
	lsl	w8, w9, w8
Lloh3:
	adrp	x9, _sigflags@GOTPAGE
Lloh4:
	ldr	x9, [x9, _sigflags@GOTPAGEOFF]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
Lloh5:
	adrp	x22, _addr_last@GOTPAGE
Lloh6:
	ldr	x22, [x22, _addr_last@GOTPAGEOFF]
	ldr	x3, [x22]
	cbz	x3, LBB0_4
; %bb.3:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w2, #1
	bl	_write_file
	tbnz	x0, #63, LBB0_5
LBB0_4:
	mov	w0, #2
	bl	_quit
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_4
; %bb.6:
	mov	x21, x0
	bl	_strlen
	add	x8, x0, #8
Lloh11:
	adrp	x9, _PATH_MAX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PATH_MAX@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hi	LBB0_4
; %bb.7:
	mov	x19, x0
	add	x0, x0, #10
	bl	_malloc
	cbz	x0, LBB0_4
; %bb.8:
	mov	x20, x0
	mov	x1, x21
	bl	_strcpy
	add	x8, x19, x20
	ldurb	w8, [x8, #-1]
	cmp	w8, #47
	b.eq	LBB0_10
; %bb.9:
	mov	w8, #47
	strh	w8, [x20, x19]
LBB0_10:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_strcat
	ldr	x3, [x22]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	w2, #1
	bl	_write_file
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_sigactive,4,2                  ; @sigactive
	.comm	_sigflags,4,2                   ; @sigflags
	.comm	_addr_last,8,3                  ; @addr_last
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

l_.str.1:                               ; @.str.1
	.asciz	"HOME"

	.comm	_PATH_MAX,8,3                   ; @PATH_MAX
l_.str.2:                               ; @.str.2
	.asciz	"ed.hup"

.subsections_via_symbols
