	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%rsi, %r15
	movl	%edi, %r13d
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	cmpl	$1, %r13d
	jg	LBB0_3
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	cmpl	$2, %r13d
	jne	LBB0_6
## %bb.4:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_getcwd
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_6:
	movq	16(%r15), %rsi
	movq	%r12, %rdi
	callq	_strcpy
LBB0_7:
	movq	8(%r15), %rdi
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_rel2abs
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:
	leaq	L_str(%rip), %rdi
	jmp	LBB0_10
LBB0_8:
	movq	%r14, %rdi
LBB0_10:
	callq	_puts
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usage: rel2abs path [base]\n"

L_.str.1:                               ## @.str.1
	.asciz	"cannot get current directory.\n"

L_str:                                  ## @str
	.asciz	"ERROR"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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
	mov	x20, x1
Lloh0:
	adrp	x22, _MAXPATHLEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAXPATHLEN@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x9, x1
Lloh2:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh3:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x12, x9, #0x1fffffff0
	sub	x19, x8, x12
	mov	sp, x19
	mov	x9, x1
Lloh4:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh5:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x21, x8, x12
	mov	sp, x21
	cmp	w0, #1
	b.gt	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_2:
	cmp	w0, #2
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_getcwd
	cbnz	w0, LBB0_7
; %bb.4:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	bl	_fprintf
	mov	w0, #1
	bl	_exit
LBB0_6:
	ldr	x1, [x20, #16]
	mov	x0, x21
	bl	_strcpy
LBB0_7:
	ldr	x0, [x20, #8]
	ldr	w3, [x22]
	mov	x1, x21
	mov	x2, x19
	bl	_rel2abs
	cbnz	x0, LBB0_9
; %bb.8:
Lloh16:
	adrp	x0, l_str@PAGE
Lloh17:
	add	x0, x0, l_str@PAGEOFF
	b	LBB0_10
LBB0_9:
	mov	x0, x19
LBB0_10:
	bl	_puts
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usage: rel2abs path [base]\n"

l_.str.1:                               ; @.str.1
	.asciz	"cannot get current directory.\n"

l_str:                                  ; @str
	.asciz	"ERROR"

.subsections_via_symbols
