#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 */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ _assert_int_equal(int /*<<< orphan*/, int /*<<< orphan*/,
                                     char *, int);
scalar_t__ string_to_status_code(char *);
void string_to_status_code_test(void **state) {
  _assert_int_equal(
      ((uint64_t)((unsigned)(string_to_status_code("Address not found")))),
      ((uint64_t)((unsigned)(0))),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/"
      "examples/assert_macro_test.c",
      31);
  _assert_int_equal(
      ((uint64_t)((unsigned)(string_to_status_code("Connection timed out")))),
      ((uint64_t)((unsigned)(1))),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/"
      "examples/assert_macro_test.c",
      32);
}


x86 assembly (clang, -O0):
<string_to_status_code_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <string_to_status_code@plt>
mov    %eax,%edi
xor    %esi,%esi
lea    0xecf(%rip),%rdx
mov    $0x1f,%ecx
call   1030 <_assert_int_equal@plt>
lea    0xf5e(%rip),%rdi
call   1040 <string_to_status_code@plt>
mov    %eax,%edi
mov    $0x1,%esi
lea    0xeab(%rip),%rdx
mov    $0x20,%ecx
call   1030 <_assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_to_status_code_test>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <string_to_status_code@plt>
lea    0xede(%rip),%rbx
mov    %eax,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    $0x1f,%ecx
call   1030 <_assert_int_equal@plt>
lea    0xf66(%rip),%rdi
call   1040 <string_to_status_code@plt>
mov    %eax,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    $0x20,%ecx
pop    %rbx
jmp    1030 <_assert_int_equal@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Address not found\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/examples/assert_macro_test.c\00"
@.str.2 = [21 x i8] c"Connection timed out\00"
define void @string_to_status_code_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i64 @string_to_status_code(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = trunc i64 %3 to i32
%5 = call i32 @_assert_int_equal(i32 %4, i32 0, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i32 31)
%6 = call i64 @string_to_status_code(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%7 = trunc i64 %6 to i32
%8 = call i32 @_assert_int_equal(i32 %7, i32 1, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i32 32)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Address not found\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/examples/assert_macro_test.c\00"
@.str.2 = [21 x i8] c"Connection timed out\00"
define void @string_to_status_code_test(i8** nocapture readnone %0) {
%2 = tail call i64 @string_to_status_code(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = trunc i64 %2 to i32
%4 = tail call i32 @_assert_int_equal(i32 %3, i32 0, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i32 31)
%5 = tail call i64 @string_to_status_code(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%6 = trunc i64 %5 to i32
%7 = tail call i32 @_assert_int_equal(i32 %6, i32 1, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i32 32)
ret void
}