	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getfh_main                     ## -- Begin function getfh_main
	.p2align	4, 0x90
_getfh_main:                            ## @getfh_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
	cmpl	$1, %edi
	jle	LBB0_14
## %bb.1:
	movq	%rsi, %r14
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %r15
	movq	_errno@GOTPCREL(%rip), %r12
	movq	_E2BIG@GOTPCREL(%rip), %r13
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_3
	.p2align	4, 0x90
LBB0_2:
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_getfh
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_free
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	jne	LBB0_2
	jmp	LBB0_3
LBB0_8:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_write
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.9:
	movq	%rbx, %rdi
	callq	_free
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_13
LBB0_11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	jmp	LBB0_14
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
LBB0_13:
	callq	_warn
LBB0_14:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory"

	.comm	_errno,8,3                      ## @errno
	.comm	_E2BIG,8,3                      ## @E2BIG
L_.str.1:                               ## @.str.1
	.asciz	"getfh"

	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
L_.str.2:                               ## @.str.2
	.asciz	"write"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getfh_main                     ; -- Begin function getfh_main
	.p2align	2
_getfh_main:                            ; @getfh_main
	.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
	cmp	w0, #1
	b.le	LBB0_14
; %bb.1:
	mov	x20, x1
	mov	x0, #0
	mov	x19, #0
	str	xzr, [sp, #8]
	add	x21, sp, #8
Lloh0:
	adrp	x22, _errno@GOTPAGE
Lloh1:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
Lloh2:
	adrp	x23, _E2BIG@GOTPAGE
Lloh3:
	ldr	x23, [x23, _E2BIG@GOTPAGEOFF]
	cbz	x0, LBB0_3
LBB0_2:
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, #8]
	str	x21, [sp]
	mov	x1, x19
	bl	_getfh
	cbz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x19, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_free
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [sp, #8]
	cbnz	x0, LBB0_2
	b	LBB0_3
LBB0_8:
Lloh4:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	x2, [sp, #8]
	mov	x1, x19
	bl	_write
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.9:
	mov	x0, x19
	bl	_free
	mov	w0, #0
	b	LBB0_15
LBB0_10:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	b	LBB0_14
LBB0_12:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_13:
	bl	_warn
LBB0_14:
Lloh16:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
LBB0_15:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory"

	.comm	_errno,8,3                      ; @errno
	.comm	_E2BIG,8,3                      ; @E2BIG
l_.str.1:                               ; @.str.1
	.asciz	"getfh"

	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
l_.str.2:                               ; @.str.2
	.asciz	"write"

.subsections_via_symbols
