#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_equal(unsigned long long, unsigned long long,
                                     char *, int);
int /*<<< orphan*/ _expect_string(char *, char *, char *, int, char const *,
                                  int);
int /*<<< orphan*/ _expect_value(char *, char *, char *, int,
                                 unsigned long long, int);
int /*<<< orphan*/ _will_return(char *, char *, int, unsigned long long, int);
scalar_t__ connect_to_product_database();
void test_connect_to_product_database_bad_url(void **state) {
  _expect_string(
      "connect_to_database", "url",
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/heads/master/deps/"
      "cmockery/src/example/product_database_test.c",
      44, (const char *)("products.abcd.com"), 1);
  _expect_value(
      "connect_to_database", "port",
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/heads/master/deps/"
      "cmockery/src/example/product_database_test.c",
      45, ((unsigned long long)((unsigned)(322))), 1);
  _will_return("connect_to_database",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/"
               "heads/master/deps/cmockery/src/example/product_database_test.c",
               46, ((unsigned long long)((unsigned)(0xDA7ABA53))), 1);
  _assert_int_equal(
      ((unsigned long long)((unsigned)((int)connect_to_product_database()))),
      ((unsigned long long)((unsigned)(0xDA7ABA53))),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/heads/master/deps/"
      "cmockery/src/example/product_database_test.c",
      47);
}


x86 assembly (clang, -O0):
<test_connect_to_product_database_bad_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xe9d(%rip),%rdi
lea    0xeaa(%rip),%rsi
lea    0xea7(%rip),%rdx
mov    $0x2c,%ecx
lea    0xf50(%rip),%r8
mov    $0x1,%r9d
call   1040 <_expect_string@plt>
lea    0xe71(%rip),%rdi
lea    0xf49(%rip),%rsi
lea    0xe7b(%rip),%rdx
mov    $0x2d,%ecx
mov    $0x142,%r8d
mov    $0x1,%r9d
call   1070 <_expect_value@plt>
lea    0xe46(%rip),%rdi
lea    0xe57(%rip),%rsi
mov    $0x2e,%edx
mov    $0xda7aba53,%ecx
mov    $0x1,%r8d
call   1060 <_will_return@plt>
mov    $0x0,%al
call   1030 <connect_to_product_database@plt>
mov    %eax,%eax
mov    %eax,%edi
mov    $0xda7aba53,%esi
lea    0xe2b(%rip),%rdx
mov    $0x2f,%ecx
call   1050 <_assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_connect_to_product_database_bad_url>:
push   %r14
push   %rbx
push   %rax
lea    0xea5(%rip),%rbx
lea    0xeb2(%rip),%rsi
lea    0xeaf(%rip),%r14
lea    0xf5d(%rip),%r8
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0x2c,%ecx
mov    $0x1,%r9d
call   1040 <_expect_string@plt>
lea    0xf52(%rip),%rsi
mov    $0x142,%r8d
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0x2d,%ecx
mov    $0x1,%r9d
call   1070 <_expect_value@plt>
mov    $0xda7aba53,%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x2e,%edx
mov    $0x1,%r8d
call   1060 <_will_return@plt>
xor    %eax,%eax
call   1030 <connect_to_product_database@plt>
mov    %eax,%edi
mov    $0xda7aba53,%esi
mov    %r14,%rdx
mov    $0x2f,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <_assert_int_equal@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"connect_to_database\00"
@.str.1 = [4 x i8] c"url\00"
@.str.2 = [181 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/heads/master/deps/cmockery/src/example/product_database_test.c\00"
@.str.3 = [18 x i8] c"products.abcd.com\00"
@.str.4 = [5 x i8] c"port\00"
define void @test_connect_to_product_database_bad_url(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @_expect_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.2, i64 0, i64 0), i32 44, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 1)
%4 = call i32 @_expect_value(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.2, i64 0, i64 0), i32 45, i64 322, i32 1)
%5 = call i32 @_will_return(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.2, i64 0, i64 0), i32 46, i64 3665476179, i32 1)
%6 = call i64 (...) @connect_to_product_database()
%7 = trunc i64 %6 to i32
%8 = zext i32 %7 to i64
%9 = call i32 @_assert_int_equal(i64 %8, i64 3665476179, i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.2, i64 0, i64 0), i32 47)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"connect_to_database\00"
@.str.1 = [4 x i8] c"url\00"
@.str.2 = [181 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/BellerophonMobile/xmp3/refs/heads/master/deps/cmockery/src/example/product_database_test.c\00"
@.str.3 = [18 x i8] c"products.abcd.com\00"
@.str.4 = [5 x i8] c"port\00"
define void @test_connect_to_product_database_bad_url(i8** nocapture readnone %0) {
%2 = tail call i32 @_expect_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.2, i64 0, i64 0), i32 44, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 1)
%3 = tail call i32 @_expect_value(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.2, i64 0, i64 0), i32 45, i64 322, i32 1)
%4 = tail call i32 @_will_return(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.2, i64 0, i64 0), i32 46, i64 3665476179, i32 1)
%5 = tail call i64 (...) @connect_to_product_database()
%6 = and i64 %5, 4294967295
%7 = tail call i32 @_assert_int_equal(i64 %6, i64 3665476179, i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.2, i64 0, i64 0), i32 47)
ret void
}