	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_send_power_mode
_ipw_send_power_mode:                   ## @ipw_send_power_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	cmpl	$129, %esi
	je	LBB0_6
## %bb.3:
	cmpl	$128, %esi
	jne	LBB0_7
## %bb.4:
	movq	_IPW_POWER_INDEX_3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_IPW_ERROR
	movl	$-1, %eax
	jmp	LBB0_9
LBB0_6:
	movq	_IPW_POWER_MODE_CAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	jmp	LBB0_8
LBB0_7:
	movl	%esi, %edi
LBB0_8:
	callq	_cpu_to_le32
	movl	%eax, -12(%rbp)
	movq	_IPW_CMD_POWER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_ipw_send_cmd_pdu
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid args\n"

	.comm	_IPW_POWER_INDEX_3,4,2          ## @IPW_POWER_INDEX_3
	.comm	_IPW_POWER_MODE_CAM,4,2         ## @IPW_POWER_MODE_CAM
	.comm	_IPW_CMD_POWER_MODE,4,2         ## @IPW_CMD_POWER_MODE
	.no_dead_strip	_ipw_send_power_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_send_power_mode
_ipw_send_power_mode:                   ; @ipw_send_power_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	cmp	w1, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w1, #128
	b.ne	LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _IPW_POWER_INDEX_3@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPW_POWER_INDEX_3@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_4:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_ERROR
	mov	w0, #-1
	b	LBB0_8
LBB0_5:
Lloh5:
	adrp	x8, _IPW_POWER_MODE_CAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IPW_POWER_MODE_CAM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_6:
	mov	x0, x1
LBB0_7:
	bl	_cpu_to_le32
	str	w0, [sp, #12]
Lloh8:
	adrp	x8, _IPW_CMD_POWER_MODE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IPW_CMD_POWER_MODE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_ipw_send_cmd_pdu
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid args\n"

	.comm	_IPW_POWER_INDEX_3,4,2          ; @IPW_POWER_INDEX_3
	.comm	_IPW_POWER_MODE_CAM,4,2         ; @IPW_POWER_MODE_CAM
	.comm	_IPW_CMD_POWER_MODE,4,2         ; @IPW_CMD_POWER_MODE
	.no_dead_strip	_ipw_send_power_mode
.subsections_via_symbols
