	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_port_led
_set_port_led:                          ## @set_port_led
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %ebx
	cmpl	$3, %esi
	jl	LBB0_16
## %bb.1:
	movq	%rdx, %r12
	movq	%rdi, %r14
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$24, %esi
	callq	_bzero
	movl	4(%r14), %eax
	movl	%eax, -48(%rbp)
	movl	(%r14), %edi
	movq	_IOETHERSWITCHGETPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_ioctl
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
LBB0_3:
	movq	8(%r12), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtol
	movl	%eax, %r15d
	movl	-64(%rbp), %ecx
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	cmpl	%ecx, %r15d
	jle	LBB0_6
LBB0_5:
	movq	_EX_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rdx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
LBB0_6:
	movq	_ledstyles@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.8:
	decl	%r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r13), %rax
	movq	8(%rax,%rbx,8), %rsi
	incq	%rbx
	testq	%rsi, %rsi
	jne	LBB0_9
	jmp	LBB0_12
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_10:
	movq	-56(%rbp), %rax
	movslq	%r15d, %rcx
	movl	%ebx, (%rax,%rcx,4)
	movq	(%r13), %rax
LBB0_12:
	movl	%ebx, %ecx
	cmpq	$0, (%rax,%rcx,8)
	jne	LBB0_14
## %bb.13:
	movq	_EX_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r12), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
LBB0_14:
	movl	(%r14), %edi
	movq	_IOETHERSWITCHSETPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_ioctl
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_err
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOETHERSWITCHGETPORT,4,2       ## @IOETHERSWITCHGETPORT
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioctl(IOETHERSWITCHGETPORT)"

	.comm	_EX_USAGE,4,2                   ## @EX_USAGE
L_.str.1:                               ## @.str.1
	.asciz	"invalid led number %s; must be between 1 and %d"

	.comm	_ledstyles,8,3                  ## @ledstyles
L_.str.2:                               ## @.str.2
	.asciz	"invalid led style \"%s\""

	.comm	_IOETHERSWITCHSETPORT,4,2       ## @IOETHERSWITCHSETPORT
L_.str.3:                               ## @.str.3
	.asciz	"ioctl(IOETHERSWITCHSETPORT)"

	.no_dead_strip	_set_port_led
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_port_led
_set_port_led:                          ; @set_port_led
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	cmp	w1, #3
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_16
LBB0_2:
	mov	x20, x2
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #24
	bl	_bzero
	ldp	w0, w8, [x19]
	str	w8, [sp, #24]
Lloh0:
	adrp	x8, _IOETHERSWITCHGETPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IOETHERSWITCHGETPORT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
Lloh3:
	adrp	x21, _EX_OSERR@GOTPAGE
Lloh4:
	ldr	x21, [x21, _EX_OSERR@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_4:
	ldr	x0, [x20, #8]
	mov	x1, #0
	mov	w2, #0
	bl	_strtol
	ldr	w8, [sp, #8]
	subs	w22, w0, #1
	ccmp	w0, w8, #0, ge
	b.le	LBB0_6
; %bb.5:
Lloh7:
	adrp	x9, _EX_USAGE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EX_USAGE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x9]
	ldr	x2, [x20, #8]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_errx
LBB0_6:
Lloh12:
	adrp	x24, _ledstyles@GOTPAGE
Lloh13:
	ldr	x24, [x24, _ledstyles@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x1, [x8]
	cbz	x1, LBB0_11
; %bb.7:
	mov	x23, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, #16]
	bl	_strcmp
	cbz	x0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x9, x23, #1
	ldr	x8, [x24]
	add	x10, x8, x23, lsl #3
	ldr	x1, [x10, #8]
	mov	x23, x9
	cbnz	x1, LBB0_8
; %bb.10:
	mov	x23, x9
	ldr	x8, [x8, w23, uxtw #3]
	cbnz	x8, LBB0_14
	b	LBB0_13
LBB0_11:
	mov	x23, #0
	ldr	x8, [x8, w23, uxtw #3]
	cbnz	x8, LBB0_14
	b	LBB0_13
LBB0_12:
	ldr	x8, [sp, #16]
	str	w23, [x8, w22, sxtw #2]
	ldr	x8, [x24]
	ldr	x8, [x8, w23, uxtw #3]
	cbnz	x8, LBB0_14
LBB0_13:
Lloh14:
	adrp	x8, _EX_USAGE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EX_USAGE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x2, [x20, #16]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_errx
LBB0_14:
	ldr	w0, [x19]
Lloh19:
	adrp	x8, _IOETHERSWITCHSETPORT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IOETHERSWITCHSETPORT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cbz	x0, LBB0_16
; %bb.15:
	ldr	w0, [x21]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_err
	mov	w0, #0
LBB0_16:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_IOETHERSWITCHGETPORT,4,2       ; @IOETHERSWITCHGETPORT
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioctl(IOETHERSWITCHGETPORT)"

	.comm	_EX_USAGE,4,2                   ; @EX_USAGE
l_.str.1:                               ; @.str.1
	.asciz	"invalid led number %s; must be between 1 and %d"

	.comm	_ledstyles,8,3                  ; @ledstyles
l_.str.2:                               ; @.str.2
	.asciz	"invalid led style \"%s\""

	.comm	_IOETHERSWITCHSETPORT,4,2       ; @IOETHERSWITCHSETPORT
l_.str.3:                               ; @.str.3
	.asciz	"ioctl(IOETHERSWITCHSETPORT)"

	.no_dead_strip	_set_port_led
.subsections_via_symbols
