#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*/ abort();
int amqp_hostcheck(char const *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void hostcheck_success(const char *match_pattern, const char *url) {
  int ok;
  ok = amqp_hostcheck(match_pattern, url);
  if (!ok) {
    fprintf(stderr, "Expected hostname check to pass, but didn't: %s (%s)\n",
            url, match_pattern);
    abort();
  }
  fprintf(stdout, "ok: [success] %s, %s\n", url, match_pattern);
}


x86 assembly (clang, -O0):
<hostcheck_success>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <amqp_hostcheck@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    117e <hostcheck_success+0x4e>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xe8e(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xea0(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hostcheck_success>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <amqp_hostcheck@plt>
test   %eax,%eax
je     1165 <hostcheck_success+0x35>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xee3(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
lea    0xe8b(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"Expected hostname check to pass, but didn't: %s (%s)\0A\00"
@stdout = global i32 0
@.str.1 = [22 x i8] c"ok: [success] %s, %s\0A\00"
define void @hostcheck_success(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @amqp_hostcheck(i8* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %4
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %2
%18 = load i32, i32* @stdout
%19 = load i8*, i8** %4
%20 = load i8*, i8** %3
%21 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %19, i8* %20)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"Expected hostname check to pass, but didn't: %s (%s)\0A\00"
@stdout = global i32 0
@.str.1 = [22 x i8] c"ok: [success] %s, %s\0A\00"
define void @hostcheck_success(i8* %0, i8* %1) {
%3 = tail call i32 @amqp_hostcheck(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
%10 = load i32, i32* @stdout
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %0)
ret void
}