	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function writeit
_writeit:                               ## @writeit
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_getsel
	movl	%eax, -32(%rbp)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	%rax, -40(%rbp)
	movl	%r15d, -56(%rbp)
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	%rax, -48(%rbp)
	movq	__PATH_DEVPCI@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	movq	_PCIOCWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movl	%ebx, %edi
	callq	_ioctl
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_4:
	movl	%ebx, %edi
	callq	_close
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__PATH_DEVPCI,4,2               ## @_PATH_DEVPCI
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_PCIOCWRITE,4,2                 ## @PCIOCWRITE
L_.str.1:                               ## @.str.1
	.asciz	"ioctl(PCIOCWRITE)"

	.no_dead_strip	_writeit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function writeit
_writeit:                               ; @writeit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	bl	_getsel
	str	w0, [sp, #40]
	mov	x0, x21
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
	str	x0, [sp, #32]
	str	w19, [sp, #16]
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
	str	x0, [sp, #24]
Lloh0:
	adrp	x20, __PATH_DEVPCI@GOTPAGE
Lloh1:
	ldr	x20, [x20, __PATH_DEVPCI@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_open
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
Lloh7:
	adrp	x8, _PCIOCWRITE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PCIOCWRITE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	bl	_ioctl
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	mov	x0, x19
	bl	_close
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	__PATH_DEVPCI,4,2               ; @_PATH_DEVPCI
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_PCIOCWRITE,4,2                 ; @PCIOCWRITE
l_.str.1:                               ; @.str.1
	.asciz	"ioctl(PCIOCWRITE)"

	.no_dead_strip	_writeit
.subsections_via_symbols
