	.file	"extr_systemctl.c_halt_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Not writing utmp record, assuming that systemd-update-utmp is used."
	.align 8
.LC1:
	.string	"Failed to write utmp record: %m"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Failed to reboot: %m"
	.text
	.p2align 4
	.type	halt_main, @function
halt_main:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	edi, DWORD PTR arg_action[rip]
	call	logind_check_inhibitors@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	cmp	QWORD PTR arg_when[rip], 0
	jle	.L6
	xor	eax, eax
	call	logind_schedule_shutdown@PLT
	test	rax, rax
	je	.L15
.L6:
	xor	eax, eax
	call	geteuid@PLT
	test	rax, rax
	jne	.L4
.L5:
	mov	rax, QWORD PTR arg_dry_run[rip]
	or	rax, QWORD PTR arg_force[rip]
	mov	DWORD PTR arg_no_block[rip], 1
	je	.L22
	xor	eax, eax
	call	geteuid@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR arg_no_wtmp[rip]
	test	eax, eax
	je	.L23
.L12:
	cmp	QWORD PTR arg_dry_run[rip], 0
	je	.L24
.L15:
	xor	r12d, r12d
.L1:
	mov	eax, r12d
	pop	r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	cmp	QWORD PTR arg_dry_run[rip], 0
	jne	.L9
	cmp	QWORD PTR arg_force[rip], 0
	jle	.L10
.L9:
	xor	eax, eax
	call	must_be_root@PLT
	mov	r12d, DWORD PTR EPERM[rip]
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	edi, DWORD PTR arg_action[rip]
	call	halt_now@PLT
	lea	rsi, .LC2[rip]
	pop	r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	mov	edi, eax
	jmp	log_error_errno@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	ecx, DWORD PTR ACTION_HALT[rip]
	mov	edx, DWORD PTR ACTION_REBOOT[rip]
	xor	eax, eax
	mov	esi, DWORD PTR ACTION_POWEROFF[rip]
	mov	edi, DWORD PTR arg_action[rip]
	call	IN_SET@PLT
	test	rax, rax
	je	.L5
	mov	edi, DWORD PTR arg_action[rip]
	call	logind_reboot@PLT
	mov	r12d, eax
	test	eax, eax
	jns	.L1
	mov	edx, DWORD PTR EINPROGRESS[rip]
	mov	esi, DWORD PTR EOPNOTSUPP[rip]
	mov	edi, eax
	xor	eax, eax
	neg	edx
	neg	esi
	call	IN_SET@PLT
	test	rax, rax
	je	.L5
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	xor	eax, eax
	call	sd_booted@PLT
	test	rax, rax
	jle	.L13
	lea	rdi, .LC0[rip]
	call	log_debug@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L22:
	xor	eax, eax
	pop	r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	start_with_fallback@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	xor	eax, eax
	call	utmp_put_shutdown@PLT
	test	eax, eax
	jns	.L12
	lea	rsi, .LC1[rip]
	mov	edi, eax
	call	log_warning_errno@PLT
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	halt_main, .-halt_main
	.comm	arg_when,8,8
	.comm	arg_no_wtmp,4,4
	.comm	arg_no_block,4,4
	.comm	arg_force,8,8
	.comm	arg_dry_run,8,8
	.comm	arg_action,4,4
	.comm	EPERM,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	EINPROGRESS,4,4
	.comm	ACTION_REBOOT,4,4
	.comm	ACTION_POWEROFF,4,4
	.comm	ACTION_HALT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_systemctl.c_halt_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Not writing utmp record, assuming that systemd-upda"
	.ascii	"te-utmp is used.\000"
	.align	2
.LC1:
	.ascii	"Failed to write utmp record: %m\000"
	.align	2
.LC2:
	.ascii	"Failed to reboot: %m\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	halt_main, %function
halt_main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, .L25
	ldr	r0, [r5]
	bl	logind_check_inhibitors
	subs	r4, r0, #0
	blt	.L1
	ldr	r3, .L25+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L6
	bl	logind_schedule_shutdown
	cmp	r0, #0
	beq	.L15
.L6:
	bl	geteuid
	cmp	r0, #0
	ldr	r6, .L25+8
	bne	.L4
	ldr	r7, .L25+12
.L5:
	mov	r2, #1
	ldr	r1, [r7]
	ldr	r0, [r6]
	ldr	r3, .L25+16
	orrs	r1, r0, r1
	str	r2, [r3]
	beq	.L22
	bl	geteuid
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, .L25+20
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L23
.L12:
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L24
.L15:
	mov	r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r3, [r6]
	cmp	r3, #0
	bne	.L9
	ldr	r7, .L25+12
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L10
.L9:
	bl	must_be_root
	ldr	r3, .L25+24
	ldr	r0, [r3]
	rsb	r4, r0, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L24:
	ldr	r0, [r5]
	bl	halt_now
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r1, .L25+28
	b	log_error_errno
.L10:
	ldr	r3, .L25+32
	ldr	r2, .L25+36
	ldr	r1, .L25+40
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r5]
	bl	IN_SET
	cmp	r0, #0
	beq	.L5
	ldr	r0, [r5]
	bl	logind_reboot
	subs	r4, r0, #0
	bge	.L1
	ldr	r3, .L25+44
	ldr	r2, .L25+48
	ldr	r1, [r3]
	ldr	r2, [r2]
	rsb	r1, r1, #0
	rsb	r2, r2, #0
	bl	IN_SET
	cmp	r0, #0
	beq	.L5
	b	.L1
.L23:
	bl	sd_booted
	cmp	r0, #0
	ble	.L13
	ldr	r0, .L25+52
	bl	log_debug
	b	.L12
.L22:
	pop	{r4, r5, r6, r7, r8, lr}
	b	start_with_fallback
.L13:
	bl	utmp_put_shutdown
	cmp	r0, #0
	bge	.L12
	ldr	r1, .L25+56
	bl	log_warning_errno
	b	.L12
.L26:
	.align	2
.L25:
	.word	arg_action
	.word	arg_when
	.word	arg_dry_run
	.word	arg_force
	.word	arg_no_block
	.word	arg_no_wtmp
	.word	EPERM
	.word	.LC2
	.word	ACTION_HALT
	.word	ACTION_REBOOT
	.word	ACTION_POWEROFF
	.word	EOPNOTSUPP
	.word	EINPROGRESS
	.word	.LC0
	.word	.LC1
	.size	halt_main, .-halt_main
	.comm	arg_when,4,4
	.comm	arg_no_wtmp,4,4
	.comm	arg_no_block,4,4
	.comm	arg_force,4,4
	.comm	arg_dry_run,4,4
	.comm	arg_action,4,4
	.comm	EPERM,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	EINPROGRESS,4,4
	.comm	ACTION_REBOOT,4,4
	.comm	ACTION_POWEROFF,4,4
	.comm	ACTION_HALT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
