#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int parse_line(char const *, unsigned int *, char *, char *);
scalar_t__ strcmp(char *, char const *);
void assert_parse_line(const char *line, const int expected_result,
                       const unsigned int expected_address,
                       const char *expected_instruction,
                       const char *expected_args) {
  int result;
  unsigned int address;
  char instruction_name[8];
  char instruction_args[64];
  result = parse_line(line, &address, instruction_name, instruction_args);
  assert(result == expected_result);
  if (expected_result == 0) {
    assert(address == expected_address);
    assert(strcmp(instruction_name, expected_instruction) == 0);
    assert(strcmp(instruction_args, expected_args) == 0);
  }
}


x86 assembly (clang, -O0):
<assert_parse_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    -0x70(%rbp),%rcx
lea    -0x28(%rbp),%rsi
call   1050 <parse_line@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpl   $0x0,-0xc(%rbp)
jne    11ce <assert_parse_line+0x9e>
mov    -0x28(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0x70(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_parse_line>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %r8,%r14
mov    %rcx,%r15
mov    %edx,%ebp
mov    %esi,%ebx
lea    0x4(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1050 <parse_line@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
call   1040 <assert@plt>
test   %ebx,%ebx
jne    11ae <assert_parse_line+0x7e>
xor    %edi,%edi
cmp    %ebp,0x4(%rsp)
sete   %dil
call   1040 <assert@plt>
lea    0x8(%rsp),%rdi
mov    %r15,%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
lea    0x10(%rsp),%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @assert_parse_line(i8* %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca [8 x i8]
%14 = alloca [64 x i8]
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%15 = load i8*, i8** %6
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %13, i64 0, i64 0
%17 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%18 = call i32 @parse_line(i8* %15, i32* %12, i8* %16, i8* %17)
store i32 %18, i32* %11
%19 = load i32, i32* %11
%20 = load i32, i32* %7
%21 = icmp eq i32 %19, %20
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = load i32, i32* %7
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %44
26: ; preds = %5
%27 = load i32, i32* %12
%28 = load i32, i32* %8
%29 = icmp eq i32 %27, %28
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = getelementptr inbounds [8 x i8], [8 x i8]* %13, i64 0, i64 0
%33 = load i8*, i8** %9
%34 = call i64 @strcmp(i8* %32, i8* %33)
%35 = icmp eq i64 %34, 0
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%39 = load i8*, i8** %10
%40 = call i64 @strcmp(i8* %38, i8* %39)
%41 = icmp eq i64 %40, 0
%42 = zext i1 %41 to i32
%43 = call i32 @assert(i32 %42)
br label %44
44: ; preds = %26, %5
ret void
}

LLVM IR (-O2):
define void @assert_parse_line(i8* %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca [8 x i8]
%8 = alloca [64 x i8]
%9 = bitcast i32* %6 to i8*
%10 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%11 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%12 = call i32 @parse_line(i8* %0, i32* %6, i8* %10, i8* %11)
%13 = icmp eq i32 %12, %1
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = icmp eq i32 %1, 0
br i1 %16, label %17, label %30
17: ; preds = %5
%18 = load i32, i32* %6
%19 = icmp eq i32 %18, %2
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = call i64 @strcmp(i8* %10, i8* %3)
%23 = icmp eq i64 %22, 0
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = call i64 @strcmp(i8* %11, i8* %4)
%27 = icmp eq i64 %26, 0
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
br label %30
30: ; preds = %17, %5
ret void
}