	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sighandler_backtrace
_sighandler_backtrace:                  ## @sighandler_backtrace
	.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
	subq	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %r15
	cmovneq	%rax, %r15
	xorl	%eax, %eax
	callq	_getpid
	movq	%rax, %r14
	movq	$0, -200(%rbp)
	xorl	%edi, %edi
	callq	_FREE
	leaq	L_.str.2(%rip), %rsi
	leaq	-200(%rbp), %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_sasprintf
	movq	-200(%rbp), %rdi
	callq	_path_exists
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	$1, %ebx
	leaq	L_.str.2(%rip), %r12
	leaq	-200(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-200(%rbp), %rdi
	callq	_FREE
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_sasprintf
	movq	-200(%rbp), %rdi
	callq	_path_exists
	incl	%ebx
	testq	%rax, %rax
	jne	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	callq	_fork
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	je	LBB0_6
## %bb.11:
	movl	$0, -192(%rbp)
	leaq	-192(%rbp), %rsi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_waitpid
	movl	-192(%rbp), %edi
	callq	_WIFEXITED
	leaq	L_.str.17(%rip), %rbx
	testl	%eax, %eax
	je	LBB0_15
## %bb.12:
	movl	-192(%rbp), %edi
	callq	_WEXITSTATUS
	testq	%rax, %rax
	je	LBB0_13
LBB0_15:
	movq	%rbx, %rdi
	jmp	LBB0_16
LBB0_4:
	leaq	L_.str.3(%rip), %rdi
LBB0_16:
	callq	_DLOG
LBB0_17:
	movl	$-1, %eax
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_21
## %bb.19:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	-56(%rbp), %rdi
	callq	_pipe
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.8:
	leaq	-64(%rbp), %rdi
	callq	_pipe
	cmpl	$-1, %eax
	jne	LBB0_20
## %bb.9:
	leaq	L_.str.5(%rip), %rdi
	callq	_ELOG
	jmp	LBB0_17
LBB0_13:
	movq	-200(%rbp), %rdi
	callq	_path_exists
	movq	%rax, %rcx
	movl	$1, %eax
	testq	%rcx, %rcx
	jne	LBB0_18
## %bb.14:
	leaq	L_.str.18(%rip), %rbx
	jmp	LBB0_15
LBB0_7:
	leaq	L_.str.4(%rip), %rdi
	callq	_ELOG
	jmp	LBB0_17
LBB0_21:
	callq	___stack_chk_fail
LBB0_20:
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_close
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_close
	movq	_STDERR_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_close
	movl	-56(%rbp), %edi
	movl	(%rbx), %esi
	callq	_dup2
	movl	-60(%rbp), %edi
	movl	(%r15), %esi
	callq	_dup2
	leaq	L_.str.6(%rip), %rsi
	leaq	-216(%rbp), %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_sasprintf
	movq	-200(%rbp), %rdx
	leaq	L_.str.7(%rip), %rsi
	leaq	-208(%rbp), %rdi
	xorl	%eax, %eax
	callq	_sasprintf
	leaq	L_.str.8(%rip), %rdi
	movq	%rdi, -192(%rbp)
	movq	_start_argv@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	%rax, -184(%rbp)
	leaq	L_.str.9(%rip), %rax
	movq	%rax, -176(%rbp)
	movq	-216(%rbp), %rax
	movq	%rax, -168(%rbp)
	leaq	L_.str.10(%rip), %rax
	movq	%rax, -160(%rbp)
	leaq	L_.str.11(%rip), %rax
	movq	%rax, -152(%rbp)
	leaq	L_.str.12(%rip), %rax
	movq	%rax, -144(%rbp)
	movq	-208(%rbp), %rcx
	movq	%rcx, -136(%rbp)
	movq	%rax, -128(%rbp)
	leaq	L_.str.13(%rip), %rcx
	movq	%rcx, -120(%rbp)
	movq	%rax, -112(%rbp)
	leaq	L_.str.14(%rip), %rcx
	movq	%rcx, -104(%rbp)
	movq	%rax, -96(%rbp)
	leaq	L_.str.15(%rip), %rax
	movq	%rax, -88(%rbp)
	movq	$0, -80(%rbp)
	leaq	-192(%rbp), %rsi
	callq	_execvp
	leaq	L_.str.16(%rip), %rdi
	callq	_DLOG
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TMPDIR"

L_.str.1:                               ## @.str.1
	.asciz	"/tmp"

L_.str.2:                               ## @.str.2
	.asciz	"%s/i3-backtrace.%d.%d.txt"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to fork for GDB\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to init stdin_pipe\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to init stdout_pipe\n"

	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
L_.str.6:                               ## @.str.6
	.asciz	"%d"

L_.str.7:                               ## @.str.7
	.asciz	"set logging file %s"

L_.str.8:                               ## @.str.8
	.asciz	"gdb"

	.comm	_start_argv,8,3                 ## @start_argv
L_.str.9:                               ## @.str.9
	.asciz	"-p"

L_.str.10:                              ## @.str.10
	.asciz	"-batch"

L_.str.11:                              ## @.str.11
	.asciz	"-nx"

L_.str.12:                              ## @.str.12
	.asciz	"-ex"

L_.str.13:                              ## @.str.13
	.asciz	"set logging on"

L_.str.14:                              ## @.str.14
	.asciz	"bt full"

L_.str.15:                              ## @.str.15
	.asciz	"quit"

L_.str.16:                              ## @.str.16
	.asciz	"Failed to exec GDB\n"

L_.str.17:                              ## @.str.17
	.asciz	"GDB did not run properly\n"

L_.str.18:                              ## @.str.18
	.asciz	"GDB executed successfully, but no backtrace was generated\n"

	.no_dead_strip	_sighandler_backtrace
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sighandler_backtrace
_sighandler_backtrace:                  ; @sighandler_backtrace
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x0, #0
	csel	x20, x8, x0, eq
	bl	_getpid
	mov	x19, x0
	str	xzr, [sp, #40]
	mov	x0, #0
	bl	_FREE
	stp	x19, xzr, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #40
	mov	x2, x20
	bl	_sasprintf
	ldr	x0, [sp, #40]
	bl	_path_exists
	cbz	x0, LBB0_3
; %bb.1:
	mov	w22, #1
Lloh9:
	adrp	x21, l_.str.2@PAGE
Lloh10:
	add	x21, x21, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [sp, #40]
	bl	_FREE
	stp	x19, x22, [sp]
	add	x0, sp, #40
	mov	x1, x21
	mov	x2, x20
	bl	_sasprintf
	ldr	x0, [sp, #40]
	bl	_path_exists
	add	w22, w22, #1
	cbnz	x0, LBB0_2
LBB0_3:
	bl	_fork
	tbnz	x0, #63, LBB0_8
; %bb.4:
	cbz	x0, LBB0_10
; %bb.5:
	str	wzr, [sp, #48]
	add	x1, sp, #48
	mov	w2, #0
	bl	_waitpid
	ldr	w0, [sp, #48]
	bl	_WIFEXITED
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w0, [sp, #48]
	bl	_WEXITSTATUS
	cbz	x0, LBB0_13
LBB0_7:
Lloh11:
	adrp	x0, l_.str.17@PAGE
Lloh12:
	add	x0, x0, l_.str.17@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	bl	_DLOG
	b	LBB0_17
LBB0_10:
	sub	x0, x29, #48
	bl	_pipe
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.11:
	sub	x0, x29, #56
	bl	_pipe
	cmn	w0, #1
	b.ne	LBB0_22
; %bb.12:
Lloh15:
	adrp	x0, l_.str.5@PAGE
Lloh16:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_16
LBB0_13:
	ldr	x0, [sp, #40]
	bl	_path_exists
	cbz	x0, LBB0_20
; %bb.14:
	mov	w0, #1
	b	LBB0_18
LBB0_15:
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_16:
	bl	_ELOG
LBB0_17:
	mov	w0, #-1
LBB0_18:
	ldur	x8, [x29, #-40]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.19:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_20:
Lloh22:
	adrp	x0, l_.str.18@PAGE
Lloh23:
	add	x0, x0, l_.str.18@PAGEOFF
	b	LBB0_9
LBB0_21:
	bl	___stack_chk_fail
LBB0_22:
Lloh24:
	adrp	x20, _STDIN_FILENO@GOTPAGE
Lloh25:
	ldr	x20, [x20, _STDIN_FILENO@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_close
Lloh26:
	adrp	x21, _STDOUT_FILENO@GOTPAGE
Lloh27:
	ldr	x21, [x21, _STDOUT_FILENO@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_close
Lloh28:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	bl	_close
	ldur	w0, [x29, #-48]
	ldr	w1, [x20]
	bl	_dup2
	ldur	w0, [x29, #-52]
	ldr	w1, [x21]
	bl	_dup2
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
	add	x0, sp, #32
	mov	x2, x19
	bl	_sasprintf
	ldr	x2, [sp, #40]
Lloh33:
	adrp	x1, l_.str.7@PAGE
Lloh34:
	add	x1, x1, l_.str.7@PAGEOFF
	add	x0, sp, #24
	bl	_sasprintf
Lloh35:
	adrp	x0, l_.str.8@PAGE
Lloh36:
	add	x0, x0, l_.str.8@PAGEOFF
	str	x0, [sp, #48]
Lloh37:
	adrp	x8, _start_argv@GOTPAGE
Lloh38:
	ldr	x8, [x8, _start_argv@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh40:
	adrp	x9, l_.str.9@PAGE
Lloh41:
	add	x9, x9, l_.str.9@PAGEOFF
	stp	x8, x9, [sp, #56]
Lloh42:
	adrp	x8, l_.str.10@PAGE
Lloh43:
	add	x8, x8, l_.str.10@PAGEOFF
	ldr	x9, [sp, #32]
Lloh44:
	adrp	x10, l_.str.11@PAGE
Lloh45:
	add	x10, x10, l_.str.11@PAGEOFF
Lloh46:
	adrp	x11, l_.str.12@PAGE
Lloh47:
	add	x11, x11, l_.str.12@PAGEOFF
	stp	x9, x8, [sp, #72]
	stp	x10, x11, [sp, #88]
	ldr	x8, [sp, #24]
	stp	x8, x11, [sp, #104]
Lloh48:
	adrp	x8, l_.str.13@PAGE
Lloh49:
	add	x8, x8, l_.str.13@PAGEOFF
	stp	x8, x11, [sp, #120]
Lloh50:
	adrp	x8, l_.str.14@PAGE
Lloh51:
	add	x8, x8, l_.str.14@PAGEOFF
	stp	x8, x11, [sp, #136]
Lloh52:
	adrp	x8, l_.str.15@PAGE
Lloh53:
	add	x8, x8, l_.str.15@PAGEOFF
	stp	x8, xzr, [sp, #152]
	add	x1, sp, #48
	bl	_execvp
Lloh54:
	adrp	x0, l_.str.16@PAGE
Lloh55:
	add	x0, x0, l_.str.16@PAGEOFF
	bl	_DLOG
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TMPDIR"

l_.str.1:                               ; @.str.1
	.asciz	"/tmp"

l_.str.2:                               ; @.str.2
	.asciz	"%s/i3-backtrace.%d.%d.txt"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to fork for GDB\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to init stdin_pipe\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to init stdout_pipe\n"

	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
l_.str.6:                               ; @.str.6
	.asciz	"%d"

l_.str.7:                               ; @.str.7
	.asciz	"set logging file %s"

l_.str.8:                               ; @.str.8
	.asciz	"gdb"

	.comm	_start_argv,8,3                 ; @start_argv
l_.str.9:                               ; @.str.9
	.asciz	"-p"

l_.str.10:                              ; @.str.10
	.asciz	"-batch"

l_.str.11:                              ; @.str.11
	.asciz	"-nx"

l_.str.12:                              ; @.str.12
	.asciz	"-ex"

l_.str.13:                              ; @.str.13
	.asciz	"set logging on"

l_.str.14:                              ; @.str.14
	.asciz	"bt full"

l_.str.15:                              ; @.str.15
	.asciz	"quit"

l_.str.16:                              ; @.str.16
	.asciz	"Failed to exec GDB\n"

l_.str.17:                              ; @.str.17
	.asciz	"GDB did not run properly\n"

l_.str.18:                              ; @.str.18
	.asciz	"GDB executed successfully, but no backtrace was generated\n"

	.no_dead_strip	_sighandler_backtrace
.subsections_via_symbols
