	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_smc
_write_smc:                             ## @write_smc
	.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
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rsi, %r15
	callq	_send_command
	leaq	L_.str(%rip), %rbx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	%r15, %rdi
	callq	_send_argument
	testq	%rax, %rax
	jne	LBB0_9
## %bb.2:
	movq	_APPLESMC_DATA_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_send_byte
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rbx
LBB0_9:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_pr_warn
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	testl	%r12d, %r12d
	jle	LBB0_5
## %bb.6:
	movl	%r12d, %r12d
	xorl	%r13d, %r13d
	leaq	L_.str.2(%rip), %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%r13,4), %edi
	movq	_APPLESMC_DATA_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_send_byte
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	xorl	%eax, %eax
	cmpq	%r13, %r12
	jne	LBB0_8
	jmp	LBB0_10
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: write arg fail\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_APPLESMC_DATA_PORT,4,2         ## @APPLESMC_DATA_PORT
L_.str.1:                               ## @.str.1
	.asciz	"%.4s: write len fail\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: write data fail\n"

	.no_dead_strip	_write_smc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_smc
_write_smc:                             ; @write_smc
	.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	x21, x3
	mov	x20, x2
	mov	x19, x1
	bl	_send_command
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_send_argument
	cbz	x0, LBB0_5
LBB0_2:
Lloh0:
	adrp	x21, l_.str@PAGE
Lloh1:
	add	x21, x21, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x21
	mov	x1, x19
	bl	_pr_warn
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
	ret
LBB0_5:
Lloh5:
	adrp	x22, _APPLESMC_DATA_PORT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _APPLESMC_DATA_PORT@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_send_byte
	cbz	x0, LBB0_7
; %bb.6:
Lloh7:
	adrp	x21, l_.str.1@PAGE
Lloh8:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_7:
	cmp	w21, #1
	b.lt	LBB0_11
; %bb.8:
	mov	w23, w21
Lloh9:
	adrp	x21, l_.str.2@PAGE
Lloh10:
	add	x21, x21, l_.str.2@PAGEOFF
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	w1, [x22]
	bl	_send_byte
	cbnz	x0, LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x20, x20, #4
	subs	x23, x23, #1
	b.ne	LBB0_9
	b	LBB0_4
LBB0_11:
	mov	w0, #0
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: write arg fail\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_APPLESMC_DATA_PORT,4,2         ; @APPLESMC_DATA_PORT
l_.str.1:                               ; @.str.1
	.asciz	"%.4s: write len fail\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: write data fail\n"

	.no_dead_strip	_write_smc
.subsections_via_symbols
