	.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	8(%rsi), %rbx
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.1:
	movq	%rsi, %r13
	addq	$16, %r13
	movq	_O_RDONLY@GOTPCREL(%rip), %r14
	movq	_SESIOC_GETNOBJ@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r15d
	movl	(%r12), %esi
	movl	%eax, %edi
	leaq	-44(%rbp), %rdx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_fprintf
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %edi
	callq	_close
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rbx
	addq	$8, %r13
	testq	%rbx, %rbx
	jne	LBB0_2
	jmp	LBB0_9
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_perror
	jmp	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_perror
	jmp	LBB0_7
LBB0_9:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_SESIOC_GETNOBJ,4,2             ## @SESIOC_GETNOBJ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SESIOC_GETNOBJ"

	.comm	_stdout,4,2                     ## @stdout
L_.str.1:                               ## @.str.1
	.asciz	"%s: %d objects\n"

.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:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x21, [x1, #8]
	cbz	x21, LBB0_8
; %bb.1:
	add	x23, x1, #16
Lloh0:
	adrp	x24, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x24, [x24, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	adrp	x25, _SESIOC_GETNOBJ@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SESIOC_GETNOBJ@GOTPAGEOFF]
Lloh4:
	adrp	x19, l_.str@PAGE
Lloh5:
	add	x19, x19, l_.str@PAGEOFF
Lloh6:
	adrp	x26, _stdout@GOTPAGE
Lloh7:
	ldr	x26, [x26, _stdout@GOTPAGEOFF]
Lloh8:
	adrp	x20, l_.str.1@PAGE
Lloh9:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x21
	bl	_open
	tbnz	w0, #31, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, x0
	ldr	w1, [x25]
	add	x2, sp, #12
	bl	_ioctl
	tbnz	x0, #63, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	ldr	w3, [sp, #12]
	mov	x1, x20
	mov	x2, x21
	bl	_fprintf
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_close
	ldr	x21, [x23], #8
	cbnz	x21, LBB0_2
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_perror
	ldr	x21, [x23], #8
	cbnz	x21, LBB0_2
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_perror
	b	LBB0_5
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_SESIOC_GETNOBJ,4,2             ; @SESIOC_GETNOBJ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SESIOC_GETNOBJ"

	.comm	_stdout,4,2                     ; @stdout
l_.str.1:                               ; @.str.1
	.asciz	"%s: %d objects\n"

.subsections_via_symbols
