#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*/ irc_kick(char *, char *, char *);
int /*<<< orphan*/ mu_fail(char *);
int /*<<< orphan*/ read_mock(char *);
scalar_t__ strcmp(char *, char *);
void test_irc_kick() {
  char msg[(512 + 1)];
  irc_kick("#circus", "circus", "Foo");
  read_mock(msg);
  do {
    if (!((strcmp(msg, "KICK #circus circus :Foo\r\n") == 0))) {
      mu_fail("test_irc_kick: msg should be 'KICK #circus circus :Foo\\r\\n'");
      return;
    }
  } while (0);
}


x86 assembly (clang, -O0):
<test_irc_kick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
lea    0xeae(%rip),%rdi
lea    0xea8(%rip),%rsi
lea    0xea8(%rip),%rdx
call   1030 <irc_kick@plt>
lea    -0x210(%rbp),%rdi
call   1060 <read_mock@plt>
lea    -0x210(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     119f <test_irc_kick+0x5f>
lea    0xe92(%rip),%rdi
call   1050 <mu_fail@plt>
jmp    11a4 <test_irc_kick+0x64>
jmp    11a4 <test_irc_kick+0x64>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_irc_kick>:
push   %rbx
sub    $0x210,%rsp
lea    0xeb1(%rip),%rdi
lea    0xeab(%rip),%rsi
lea    0xeab(%rip),%rdx
call   1030 <irc_kick@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <read_mock@plt>
lea    0xe98(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     118d <test_irc_kick+0x4d>
lea    0xe9f(%rip),%rdi
call   1050 <mu_fail@plt>
add    $0x210,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"#circus\00"
@.str.1 = [7 x i8] c"circus\00"
@.str.2 = [4 x i8] c"Foo\00"
@.str.3 = [27 x i8] c"KICK #circus circus :Foo\0D\0A\00"
@.str.4 = [60 x i8] c"test_irc_kick: msg should be 'KICK #circus circus :Foo\\r\\n'\00"
define void @test_irc_kick() {
%1 = alloca [513 x i8]
%2 = call i32 @irc_kick(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%3 = getelementptr inbounds [513 x i8], [513 x i8]* %1, i64 0, i64 0
%4 = call i32 @read_mock(i8* %3)
br label %5
5: ; preds = %0
%6 = getelementptr inbounds [513 x i8], [513 x i8]* %1, i64 0, i64 0
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = call i32 @mu_fail(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
br label %12
11: ; preds = %5
br label %12
12: ; preds = %9, %11
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"#circus\00"
@.str.1 = [7 x i8] c"circus\00"
@.str.2 = [4 x i8] c"Foo\00"
@.str.3 = [27 x i8] c"KICK #circus circus :Foo\0D\0A\00"
@.str.4 = [60 x i8] c"test_irc_kick: msg should be 'KICK #circus circus :Foo\\r\\n'\00"
define void @test_irc_kick() {
%1 = alloca [513 x i8]
%2 = getelementptr inbounds [513 x i8], [513 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @irc_kick(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @read_mock(i8* %2)
%5 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @mu_fail(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
br label %9
9: ; preds = %0, %7
ret void
}