	.file	"683228.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: docker-wait CONTAINER\n            Block until a container stops, then returns its exit code."
.LC1:
	.string	"DOCKER_SOCKET_PATH"
.LC2:
	.string	"/var/run/docker.sock"
	.align 8
.LC3:
	.string	"DOCKER_SOCKET_PATH is too long: %s\n"
.LC4:
	.string	"fail to open stream socket"
.LC5:
	.string	"socket"
	.align 8
.LC6:
	.string	"POST /containers/%s/wait HTTP/1.0\r\n\r\n"
.LC7:
	.string	"write"
.LC8:
	.string	"read"
.LC9:
	.string	"\r\n\r\n"
.LC10:
	.string	"docker wait response:\n%s\n"
.LC11:
	.string	"no such id"
.LC12:
	.string	"{\"StatusCode\":"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 832
	mov	DWORD PTR -820[rbp], edi
	mov	QWORD PTR -832[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -656[rbp], 0
	mov	QWORD PTR -648[rbp], 0
	mov	QWORD PTR -640[rbp], 0
	mov	QWORD PTR -632[rbp], 0
	mov	QWORD PTR -624[rbp], 0
	mov	QWORD PTR -616[rbp], 0
	mov	QWORD PTR -608[rbp], 0
	mov	QWORD PTR -600[rbp], 0
	mov	QWORD PTR -592[rbp], 0
	mov	QWORD PTR -584[rbp], 0
	mov	QWORD PTR -576[rbp], 0
	mov	QWORD PTR -568[rbp], 0
	mov	QWORD PTR -560[rbp], 0
	mov	QWORD PTR -552[rbp], 0
	mov	QWORD PTR -544[rbp], 0
	mov	QWORD PTR -536[rbp], 0
	mov	QWORD PTR -528[rbp], 0
	mov	QWORD PTR -520[rbp], 0
	lea	rdx, -512[rbp]
	mov	eax, 0
	mov	ecx, 62
	mov	rdi, rdx
	rep stosq
	cmp	DWORD PTR -820[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rdi, .LC1[rip]
	call	getenv@PLT
	mov	QWORD PTR -800[rbp], rax
	cmp	QWORD PTR -800[rbp], 0
	jne	.L3
	lea	rax, .LC2[rip]
	mov	QWORD PTR -800[rbp], rax
.L3:
	mov	rax, QWORD PTR -800[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 107
	jbe	.L4
	mov	rax, QWORD PTR -800[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 1
	call	socket@PLT
	mov	DWORD PTR -816[rbp], eax
	cmp	DWORD PTR -816[rbp], 0
	jns	.L5
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	WORD PTR -768[rbp], 1
	mov	rax, QWORD PTR -800[rbp]
	lea	rdx, -768[rbp]
	add	rdx, 2
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	lea	rcx, -768[rbp]
	mov	eax, DWORD PTR -816[rbp]
	mov	edx, 110
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -832[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -656[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -656[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -812[rbp], eax
	mov	eax, DWORD PTR -812[rbp]
	movsx	rdx, eax
	lea	rcx, -656[rbp]
	mov	eax, DWORD PTR -816[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -808[rbp], eax
	mov	eax, DWORD PTR -808[rbp]
	cmp	eax, DWORD PTR -812[rbp]
	je	.L7
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -816[rbp]
	mov	edx, 512
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -808[rbp], eax
	cmp	DWORD PTR -808[rbp], 0
	jns	.L8
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -816[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -528[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strstr@PLT
	add	rax, 4
	mov	QWORD PTR -792[rbp], rax
	mov	rax, QWORD PTR -792[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -792[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	je	.L9
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -792[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	strstr@PLT
	mov	QWORD PTR -784[rbp], rax
	cmp	QWORD PTR -784[rbp], 0
	jne	.L10
	mov	edi, 1
	call	exit@PLT
.L10:
	add	QWORD PTR -784[rbp], 14
	mov	rax, QWORD PTR -784[rbp]
	mov	esi, 125
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -776[rbp], rax
	mov	rax, QWORD PTR -776[rbp]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -784[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -804[rbp], eax
	mov	eax, DWORD PTR -804[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"683228.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: docker-wait CONTAINER\012            Block u"
	.ascii	"ntil a container stops, then returns its exit code."
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"DOCKER_SOCKET_PATH\000"
	.align	2
.LC2:
	.ascii	"/var/run/docker.sock\000"
	.align	2
.LC3:
	.ascii	"DOCKER_SOCKET_PATH is too long: %s\012\000"
	.align	2
.LC4:
	.ascii	"fail to open stream socket\000"
	.align	2
.LC5:
	.ascii	"socket\000"
	.align	2
.LC6:
	.ascii	"POST /containers/%s/wait HTTP/1.0\015\012\015\012\000"
	.align	2
.LC7:
	.ascii	"write\000"
	.align	2
.LC8:
	.ascii	"read\000"
	.align	2
.LC9:
	.ascii	"\015\012\015\012\000"
	.align	2
.LC10:
	.ascii	"docker wait response:\012%s\012\000"
	.align	2
.LC11:
	.ascii	"no such id\000"
	.align	2
.LC12:
	.ascii	"{\"StatusCode\":\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 800
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #800
	str	r0, [fp, #-800]
	str	r1, [fp, #-804]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-648]
	sub	r3, fp, #644
	mov	r2, #124
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-520]
	sub	r3, fp, #516
	mov	r2, #508
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-800]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L12+4
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, .L12+8
	bl	getenv
	str	r0, [fp, #-792]
	ldr	r3, [fp, #-792]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L12+12
	str	r3, [fp, #-792]
.L3:
	ldr	r0, [fp, #-792]
	bl	strlen
	mov	r3, r0
	cmp	r3, #107
	bls	.L4
	ldr	r1, [fp, #-792]
	ldr	r0, .L12+16
	bl	printf
	mov	r0, #1
	bl	exit
.L4:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #1
	bl	socket
	str	r0, [fp, #-788]
	ldr	r3, [fp, #-788]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L12+20
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	sub	r3, fp, #4
	sub	r3, r3, #756
	mov	r2, #1
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #760
	add	r3, r3, #2
	ldr	r1, [fp, #-792]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #760
	mov	r2, #110
	mov	r1, r3
	ldr	r0, [fp, #-788]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L12+24
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, [fp, #-804]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #648
	ldr	r1, .L12+28
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #648
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-784]
	ldr	r2, [fp, #-784]
	sub	r3, fp, #648
	mov	r1, r3
	ldr	r0, [fp, #-788]
	bl	write
	str	r0, [fp, #-780]
	ldr	r2, [fp, #-780]
	ldr	r3, [fp, #-784]
	cmp	r2, r3
	beq	.L7
	ldr	r0, .L12+32
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, r3
	ldr	r0, [fp, #-788]
	bl	read
	str	r0, [fp, #-780]
	ldr	r3, [fp, #-780]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L12+36
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	ldr	r0, [fp, #-788]
	bl	close
	sub	r3, fp, #520
	ldr	r1, .L12+40
	mov	r0, r3
	bl	strstr
	mov	r3, r0
	add	r3, r3, #4
	str	r3, [fp, #-776]
	ldr	r1, [fp, #-776]
	ldr	r0, .L12+44
	bl	printf
	ldr	r1, .L12+48
	ldr	r0, [fp, #-776]
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	mov	r0, #1
	bl	exit
.L9:
	ldr	r1, .L12+52
	ldr	r0, [fp, #-776]
	bl	strstr
	str	r0, [fp, #-772]
	ldr	r3, [fp, #-772]
	cmp	r3, #0
	bne	.L10
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-772]
	add	r3, r3, #14
	str	r3, [fp, #-772]
	mov	r1, #125
	ldr	r0, [fp, #-772]
	bl	strchr
	str	r0, [fp, #-768]
	ldr	r3, [fp, #-768]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, [fp, #-772]
	bl	atoi
	str	r0, [fp, #-764]
	ldr	r0, [fp, #-764]
	bl	exit
.L13:
	.align	2
.L12:
	.word	.LC13
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
