	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fgetc                          ## -- Begin function fgetc
	.p2align	4, 0x90
_fgetc:                                 ## @fgetc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	___FILE_CAN_READ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	___FILE_BUFINPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	___set_stream_flags
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%rbx), %eax
LBB0_3:
	movq	___FILE_ERROR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_7:
	leaq	L_str.5(%rip), %rdi
	callq	_puts
	movq	_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	cmpq	$0, 40(%rbx)
	je	LBB0_6
## %bb.5:
	movq	$0, 40(%rbx)
	leaq	L_str.4(%rip), %rdi
	callq	_puts
	movl	4(%rbx), %eax
	jmp	LBB0_16
LBB0_6:
	movq	%rbx, %rdi
	callq	_feof
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:
	movq	8(%rbx), %rcx
	cmpq	16(%rbx), %rcx
	jb	LBB0_15
## %bb.9:
	movl	36(%rbx), %edi
	movq	24(%rbx), %rsi
	movl	32(%rbx), %edx
	callq	_read
	testq	%rax, %rax
	je	LBB0_10
## %bb.12:
	js	LBB0_13
## %bb.14:
	movq	$0, 8(%rbx)
	movq	%rax, 16(%rbx)
	xorl	%ecx, %ecx
LBB0_15:
	movq	24(%rbx), %rax
	movzbl	(%rax,%rcx), %eax
	incq	%rcx
	movq	%rcx, 8(%rbx)
	jmp	LBB0_16
LBB0_10:
	movq	___FILE_EOF@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_13:
	movq	___FILE_ERROR@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	___FILE_CAN_READ,4,2            ## @__FILE_CAN_READ
	.comm	___FILE_BUFINPUT,4,2            ## @__FILE_BUFINPUT
	.comm	___FILE_ERROR,4,2               ## @__FILE_ERROR
	.comm	_EOF,4,2                        ## @EOF
	.comm	___FILE_EOF,4,2                 ## @__FILE_EOF
	.section	__TEXT,__cstring,cstring_literals
L_str.4:                                ## @str.4
	.asciz	"un get ! "

L_str.5:                                ## @str.5
	.asciz	"EOF ! "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fgetc                          ; -- Begin function fgetc
	.p2align	2
_fgetc:                                 ; @fgetc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, ___FILE_CAN_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___FILE_CAN_READ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, ___FILE_BUFINPUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, ___FILE_BUFINPUT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	___set_stream_flags
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w8, [x19]
LBB0_3:
Lloh6:
	adrp	x9, ___FILE_ERROR@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___FILE_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
LBB0_4:
	str	w8, [x19]
LBB0_5:
Lloh9:
	adrp	x0, l_str.5@PAGE
Lloh10:
	add	x0, x0, l_str.5@PAGEOFF
	bl	_puts
Lloh11:
	adrp	x8, _EOF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOF@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_9
; %bb.8:
	str	xzr, [x19, #40]
Lloh14:
	adrp	x0, l_str.4@PAGE
Lloh15:
	add	x0, x0, l_str.4@PAGEOFF
	bl	_puts
	ldr	w0, [x19, #4]
	b	LBB0_6
LBB0_9:
	mov	x0, x19
	bl	_feof
	cbnz	x0, LBB0_5
; %bb.10:
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.lo	LBB0_14
; %bb.11:
	ldr	x1, [x19, #24]
	ldp	w2, w0, [x19, #32]
	bl	_read
	cbz	x0, LBB0_15
; %bb.12:
	tbnz	x0, #63, LBB0_16
; %bb.13:
	mov	x8, #0
	stp	xzr, x0, [x19, #8]
LBB0_14:
	ldr	x9, [x19, #24]
	ldrb	w0, [x9, x8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	b	LBB0_6
LBB0_15:
Lloh16:
	adrp	x8, ___FILE_EOF@GOTPAGE
Lloh17:
	ldr	x8, [x8, ___FILE_EOF@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh18:
	adrp	x8, ___FILE_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, ___FILE_ERROR@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	___FILE_CAN_READ,4,2            ; @__FILE_CAN_READ
	.comm	___FILE_BUFINPUT,4,2            ; @__FILE_BUFINPUT
	.comm	___FILE_ERROR,4,2               ; @__FILE_ERROR
	.comm	_EOF,4,2                        ; @EOF
	.comm	___FILE_EOF,4,2                 ; @__FILE_EOF
	.section	__TEXT,__cstring,cstring_literals
l_str.4:                                ; @str.4
	.asciz	"un get ! "

l_str.5:                                ; @str.5
	.asciz	"EOF ! "

.subsections_via_symbols
