	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dump_itemids                   ## -- Begin function dump_itemids
	.p2align	4, 0x90
_dump_itemids:                          ## @dump_itemids
	.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	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r13
	xorl	%eax, %eax
	callq	_sort_items
	movq	_tot_items@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_4
## %bb.2:
	movq	_Items@GOTPCREL(%rip), %r12
	leaq	L_.str.3(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movq	%r13, %rdi
	callq	_fileno
	movl	%eax, %r14d
	movl	%eax, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	movl	%r14d, %edi
	callq	_fsync
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	%r13, %rdi
	callq	_fclose
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_assert                         ## TAILCALL
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

L_.str.1:                               ## @.str.1
	.asciz	"fopen (\"%s\", \"w\") fail. %m\n"

	.comm	_tot_items,4,2                  ## @tot_items
	.comm	_Items,8,3                      ## @Items
L_.str.3:                               ## @.str.3
	.asciz	"%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dump_itemids                   ; -- Begin function dump_itemids
	.p2align	2
_dump_itemids:                          ; @dump_itemids
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_sort_items
Lloh2:
	adrp	x21, _tot_items@GOTPAGE
Lloh3:
	ldr	x21, [x21, _tot_items@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x22, #0
Lloh4:
	adrp	x23, _Items@GOTPAGE
Lloh5:
	ldr	x23, [x23, _Items@GOTPAGEOFF]
Lloh6:
	adrp	x20, l_.str.3@PAGE
Lloh7:
	add	x20, x20, l_.str.3@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_fprintf
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_3
LBB0_4:
	mov	x0, x19
	bl	_fileno
	mov	x20, x0
	mvn	w8, w0
	lsr	w0, w8, #31
	bl	_assert
	mov	x0, x20
	bl	_fsync
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	bl	_fclose
	cmp	w0, #0
	cset	w0, eq
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_assert
LBB0_5:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_kprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

l_.str.1:                               ; @.str.1
	.asciz	"fopen (\"%s\", \"w\") fail. %m\n"

	.comm	_tot_items,4,2                  ; @tot_items
	.comm	_Items,8,3                      ; @Items
l_.str.3:                               ; @.str.3
	.asciz	"%d\n"

.subsections_via_symbols
