xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ defmac(char *);
void initmac() {
  defmac("I8080\t1");
  defmac("RMAC\t1");
  defmac("smallc\t1");
}


x86 assembly (clang, -O0):
<initmac>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <defmac@plt>
lea    0xee1(%rip),%rdi
call   1030 <defmac@plt>
lea    0xedc(%rip),%rdi
call   1030 <defmac@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initmac>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <defmac@plt>
lea    0xee4(%rip),%rdi
call   1030 <defmac@plt>
lea    0xedf(%rip),%rdi
pop    %rax
jmp    1030 <defmac@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"I8080\091\00"
@.str.1 = [7 x i8] c"RMAC\091\00"
@.str.2 = [9 x i8] c"smallc\091\00"
define void @initmac() {
%1 = call i32 @defmac(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @defmac(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @defmac(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"I8080\091\00"
@.str.1 = [7 x i8] c"RMAC\091\00"
@.str.2 = [9 x i8] c"smallc\091\00"
define void @initmac() {
%1 = tail call i32 @defmac(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @defmac(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @defmac(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void gtk_icon_view_item_activated() {}


x86 assembly (clang, -O0):
<gtk_icon_view_item_activated>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_icon_view_item_activated>:
ret

LLVM IR (-O0):
define void @gtk_icon_view_item_activated() {
ret void
}

LLVM IR (-O2):
define void @gtk_icon_view_item_activated() {
ret void
}
void wrmsr(unsigned index, unsigned long long value) {
  asm volatile("wrmsr" : : "c"(index), "A"(value));
}


x86 assembly (clang, -O0):
<wrmsr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
wrmsr
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrmsr>:
mov    %rsi,%rax
mov    %edi,%ecx
wrmsr
ret

LLVM IR (-O0):
define void @wrmsr(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
ret void
}

LLVM IR (-O2):
define void @wrmsr(i32 %0, i64 %1) {
tail call void asm sideeffect "wrmsr", "{cx},A,~{dirflag},~{fpsr},~{flags}"(i32 %0, i64 %1)
ret void
}
OP(fd, c7) { op_c7(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_c7@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
xor    %eax,%eax
jmp    1030 <op_c7@plt>

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @op_c7()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_c7()
ret i32 undef
}
OP(dd, d9) { op_d9(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_d9@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
xor    %eax,%eax
jmp    1030 <op_d9@plt>

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @op_d9()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_d9()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ FlightBatteryStateHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void FlightBatteryStateRequestUpdate() {
  UAVObjRequestUpdate(FlightBatteryStateHandle());
}


x86 assembly (clang, -O0):
<FlightBatteryStateRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <FlightBatteryStateHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlightBatteryStateRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1040 <FlightBatteryStateHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @FlightBatteryStateRequestUpdate() {
%1 = call i32 (...) @FlightBatteryStateHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FlightBatteryStateRequestUpdate() {
%1 = tail call i32 (...) @FlightBatteryStateHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x34() {
  Assert_real((isalpha(52) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              265, ("isalpha should be 0 for 4"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x34>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x109,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x34>:
push   %rax
mov    $0x34,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x109,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 4\00"
define void @t_isalpha_0x34() {
%1 = call i64 @isalpha(i32 52)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 265, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 4\00"
define void @t_isalpha_0x34() {
%1 = tail call i64 @isalpha(i32 52)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 265, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int compare(const void *v1, const void *v2) {
  return (*(char *)v1 - *(char *)v2);
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ INTRIG_COM(short, char *);
void INTRIG(char *S) {
  short I = 0;
  INTRIG_COM(I, S);
}


x86 assembly (clang, -O0):
<INTRIG>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    -0x8(%rbp),%rsi
movswl %ax,%edi
call   1030 <INTRIG_COM@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INTRIG>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <INTRIG_COM@plt>

LLVM IR (-O0):
define void @INTRIG(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
store i16 0, i16* %3
%4 = load i16, i16* %3
%5 = load i8*, i8** %2
%6 = call i32 @INTRIG_COM(i16 signext %4, i8* %5)
ret void
}

LLVM IR (-O2):
define void @INTRIG(i8* %0) {
%2 = tail call i32 @INTRIG_COM(i16 signext 0, i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint_fast32_t;

/* Variables and functions */
void SHAREMIND_MAP_KEY_FREE_uint_fast32_t(uint_fast32_t *const dest) {
  (void)dest;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_FREE_uint_fast32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_FREE_uint_fast32_t>:
ret

LLVM IR (-O0):
define void @SHAREMIND_MAP_KEY_FREE_uint_fast32_t(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
ret void
}

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_uint_fast32_t(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void testB(float a, float b, float c) { printf("testB float\n"); }


x86 assembly (clang, -O0):
<testB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testB>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"testB float\0A\00"
define void @testB(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"testB float\00"
define void @testB(float %0, float %1, float %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
void *Thread(void *a) {
  *(int *)a = 43;
  return 0;
}


x86 assembly (clang, -O0):
<Thread>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2b,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Thread>:
movl   $0x2b,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @Thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
store i32 43, i32* %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @Thread(i8* nocapture writeonly %0) {
%2 = bitcast i8* %0 to i32*
store i32 43, i32* %2
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ rwhocli_shutdown();
void Act_RwhoDeclareDown(void) { rwhocli_shutdown(); }


x86 assembly (clang, -O0):
<Act_RwhoDeclareDown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rwhocli_shutdown@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_RwhoDeclareDown>:
xor    %eax,%eax
jmp    1030 <rwhocli_shutdown@plt>

LLVM IR (-O0):
define void @Act_RwhoDeclareDown() {
%1 = call i32 (...) @rwhocli_shutdown()
ret void
}

LLVM IR (-O2):
define void @Act_RwhoDeclareDown() {
%1 = tail call i32 (...) @rwhocli_shutdown()
ret void
}
/* Type definitions */
struct char_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ char_buffer_append(struct char_buffer *, char *, size_t);
size_t int_to_str(char *, int, int);
void char_buffer_append_int(struct char_buffer *b, int n) {
  char digits[16] = {0};
  size_t count = int_to_str(digits, 16, n);
  char_buffer_append(b, digits, count);
}


x86 assembly (clang, -O0):
<char_buffer_append_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
lea    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x10,%esi
call   1040 <int_to_str@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1050 <char_buffer_append@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_buffer_append_int>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %esi,%edx
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x10,%esi
call   1030 <int_to_str@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <char_buffer_append@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.char_buffer = type { i32 }
define void @char_buffer_append_int(%struct.char_buffer* %0, i32 %1) {
%3 = alloca %struct.char_buffer*
%4 = alloca i32
%5 = alloca [16 x i8]
%6 = alloca i64
store %struct.char_buffer* %0, %struct.char_buffer** %3
store i32 %1, i32* %4
%7 = bitcast [16 x i8]* %5 to i8*
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%9 = load i32, i32* %4
%10 = call i64 @int_to_str(i8* %8, i32 16, i32 %9)
store i64 %10, i64* %6
%11 = load %struct.char_buffer*, %struct.char_buffer** %3
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%13 = load i64, i64* %6
%14 = call i32 @char_buffer_append(%struct.char_buffer* %11, i8* %12, i64 %13)
ret void
}

LLVM IR (-O2):
%struct.char_buffer = type { i32 }
define void @char_buffer_append_int(%struct.char_buffer* %0, i32 %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i64 @int_to_str(i8* %4, i32 16, i32 %1)
%6 = call i32 @char_buffer_append(%struct.char_buffer* %0, i8* %4, i64 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int is_printable_ascii(int /*<<< orphan*/ *, int);
bool need_hexify(uint8_t *in_buf, int len) {
  if (is_printable_ascii(in_buf, len) == false)
    return true;
  return false;
}


x86 assembly (clang, -O0):
<need_hexify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <is_printable_ascii@plt>
cmp    $0x0,%eax
jne    1140 <need_hexify+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1147 <need_hexify+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<need_hexify>:
push   %rax
call   1030 <is_printable_ascii@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @need_hexify(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32*, i32** %4
%7 = load i32, i32* %5
%8 = call i32 @is_printable_ascii(i32* %6, i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %3
br label %12
11: ; preds = %2
store i32 0, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @need_hexify(i32* %0, i32 %1) {
%3 = tail call i32 @is_printable_ascii(i32* %0, i32 %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
long GetScrHeight60();
long getscrheight() { return GetScrHeight60(); }


x86 assembly (clang, -O0):
<getscrheight>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GetScrHeight60@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getscrheight>:
xor    %eax,%eax
jmp    1030 <GetScrHeight60@plt>

LLVM IR (-O0):
define i64 @getscrheight() {
%1 = call i64 (...) @GetScrHeight60()
ret i64 %1
}

LLVM IR (-O2):
define i64 @getscrheight() {
%1 = tail call i64 (...) @GetScrHeight60()
ret i64 %1
}
int g25() {
  static const char *g26 = __func__;
  return *g26;
}


x86 assembly (clang, -O0):
<g25>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f15(%rip),%rax
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g25>:
mov    $0x67,%eax
ret

LLVM IR (-O0):
@g25.g26 = internal global i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0)
@.str = [4 x i8] c"g25\00"
define i32 @g25() {
%1 = load i8*, i8** @g25.g26
%2 = load i8, i8* %1
%3 = sext i8 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @g25() {
ret i32 103
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_RST(int);
void do0xFF() { _I8080_RST(7); }


x86 assembly (clang, -O0):
<do0xFF>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <_I8080_RST@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do0xFF>:
mov    $0x7,%edi
jmp    1030 <_I8080_RST@plt>

LLVM IR (-O0):
define void @do0xFF() {
%1 = call i32 @_I8080_RST(i32 7)
ret void
}

LLVM IR (-O2):
define void @do0xFF() {
%1 = tail call i32 @_I8080_RST(i32 7)
ret void
}
/* Variables and functions */
int arc4random_uniform(int);
int main(void) { return arc4random_uniform(1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <arc4random_uniform@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
jmp    1030 <arc4random_uniform@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @arc4random_uniform(i32 1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @arc4random_uniform(i32 1)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ hello;

/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
int SimpleMain(void) {
  static char const hello[] = "Hello from SimpleMain\n";
  write(1, hello, -1 + sizeof(hello));
  return 0;
}


x86 assembly (clang, -O0):
<SimpleMain>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x16,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SimpleMain>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x16,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SimpleMain.hello = internal constant [23 x i8] c"Hello from SimpleMain\0A\00"
define i32 @SimpleMain() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @SimpleMain.hello, i64 0, i64 0), i32 22)
ret i32 0
}

LLVM IR (-O2):
@SimpleMain.hello = internal constant [23 x i8] c"Hello from SimpleMain\0A\00"
define i32 @SimpleMain() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @SimpleMain.hello, i64 0, i64 0), i32 22)
ret i32 0
}
void shutdownwnd_open(void) {}


x86 assembly (clang, -O0):
<shutdownwnd_open>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shutdownwnd_open>:
ret

LLVM IR (-O0):
define void @shutdownwnd_open() {
ret void
}

LLVM IR (-O2):
define void @shutdownwnd_open() {
ret void
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
uint bits_needed(uint max_val) {
  uint val = max_val;
  uint e_bits = 0;
  while (val) {
    val >>= 1;
    ++e_bits;
  }
  return e_bits;
}


x86 assembly (clang, -O0):
<bits_needed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1135 <bits_needed+0x35>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <bits_needed+0x14>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_needed>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bits_needed+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <bits_needed+0x10>
ret

LLVM IR (-O0):
define i32 @bits_needed(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i32, i32* %3
%11 = ashr i32 %10, 1
store i32 %11, i32* %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
br label %6
14: ; preds = %6
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
define i32 @bits_needed(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_130() {
  Assert_real((isqrt(130) == 11),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              655, ("Integer square root of 130 should be 11"));
}


x86 assembly (clang, -O0):
<t_sqrt_130>:
push   %rbp
mov    %rsp,%rbp
mov    $0x82,%edi
call   1030 <isqrt@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x28f,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_130>:
push   %rax
mov    $0x82,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x28f,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 130 should be 11\00"
define void @t_sqrt_130() {
%1 = call i32 @isqrt(i32 130)
%2 = icmp eq i32 %1, 11
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 655, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 130 should be 11\00"
define void @t_sqrt_130() {
%1 = tail call i32 @isqrt(i32 130)
%2 = icmp eq i32 %1, 11
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 655, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int inl(short port) {
  unsigned int ret = 0;
  __asm__ volatile("inl %1,%0" : "=a"(ret) : "d"(port));
  return ret;
}


x86 assembly (clang, -O0):
<inl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i32 @inl(i16 signext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
store i32 0, i32* %3
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl $1,$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @inl(i16 signext %0) {
%2 = tail call i32 asm sideeffect "inl $1,$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fill();
int /*<<< orphan*/ init();
void start() {
  init();
  fill();
}


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <init@plt>
mov    $0x0,%al
call   1030 <fill@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start>:
push   %rax
xor    %eax,%eax
call   1040 <init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <fill@plt>

LLVM IR (-O0):
define void @start() {
%1 = call i32 (...) @init()
%2 = call i32 (...) @fill()
ret void
}

LLVM IR (-O2):
define void @start() {
%1 = tail call i32 (...) @init()
%2 = tail call i32 (...) @fill()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xd1() {
  Assert_real((ispunct(209) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              1050, ("ispunct should be 0 for 0xd1"));
}


x86 assembly (clang, -O0):
<t_ispunct_0xd1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd1,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x41a,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0xd1>:
push   %rax
mov    $0xd1,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x41a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xd1\00"
define void @t_ispunct_0xd1() {
%1 = call i64 @ispunct(i32 209)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1050, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xd1\00"
define void @t_ispunct_0xd1() {
%1 = tail call i64 @ispunct(i32 209)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1050, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t IntToFixed(int val) { return val << 12; }


x86 assembly (clang, -O0):
<IntToFixed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntToFixed>:
mov    %edi,%eax
shl    $0xc,%eax
ret

LLVM IR (-O0):
define i32 @IntToFixed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 12
ret i32 %4
}

LLVM IR (-O2):
define i32 @IntToFixed(i32 %0) {
%2 = shl i32 %0, 12
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_vface_header(char *);
void fgmvwrite_vface_header_(char *nfaces) { gmvwrite_vface_header(nfaces); }


x86 assembly (clang, -O0):
<fgmvwrite_vface_header_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <gmvwrite_vface_header@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_vface_header_>:
jmp    1030 <gmvwrite_vface_header@plt>

LLVM IR (-O0):
define void @fgmvwrite_vface_header_(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @gmvwrite_vface_header(i8* %3)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_vface_header_(i8* %0) {
%2 = tail call i32 @gmvwrite_vface_header(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tp2(void) { printf("Bonjour\n"); }


x86 assembly (clang, -O0):
<tp2>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tp2>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Bonjour\0A\00"
define void @tp2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"Bonjour\00"
define void @tp2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
__attribute__((no, noclone)) unsigned __int128 t144_2sub(unsigned __int128 y) {
  signed __int128 x = (-1);
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t144_2sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movq   $0xffffffffffffffff,-0x38(%rbp)
ff
movq   $0xffffffffffffffff,-0x40(%rbp)
ff
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    %rcx,%r9
sar    $0x3f,%r9
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rax
sub    %rsi,%rdx
sbb    %rax,%rcx
mov    %r9,%r8
sbb    $0x0,%r8
sbb    $0x0,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    119d <t144_2sub+0x8d>
jmp    11a4 <t144_2sub+0x94>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t144_2sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
not    %rbx
not    %r14
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t144_2sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 -1, i128* %6
%12 = load i128, i128* %6
%13 = load i128, i128* %5
%14 = sext i128 %12 to i129
%15 = zext i128 %13 to i129
%16 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 %14, i129 %15)
%17 = extractvalue { i129, i1 } %16, 1
%18 = extractvalue { i129, i1 } %16, 0
%19 = trunc i129 %18 to i128
%20 = zext i128 %19 to i129
%21 = icmp ne i129 %18, %20
%22 = or i1 %17, %21
store i128 %19, i128* %7
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 (...) @bar()
br label %25
25: ; preds = %23, %2
%26 = load i128, i128* %7
store i128 %26, i128* %3
%27 = bitcast i128* %3 to { i64, i64 }*
%28 = load { i64, i64 }, { i64, i64 }* %27
ret { i64, i64 } %28
}

LLVM IR (-O2):
define { i64, i64 } @t144_2sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = xor i128 %6, -1
%8 = tail call i32 (...) @bar()
%9 = trunc i128 %7 to i64
%10 = lshr i128 %7, 64
%11 = trunc i128 %10 to i64
%12 = insertvalue { i64, i64 } poison, i64 %9, 0
%13 = insertvalue { i64, i64 } %12, i64 %11, 1
ret { i64, i64 } %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Salut tout le monde");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Salut tout le monde\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Salut tout le monde\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void avpriv_toupper4() {}


x86 assembly (clang, -O0):
<avpriv_toupper4>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<avpriv_toupper4>:
ret

LLVM IR (-O0):
define void @avpriv_toupper4() {
ret void
}

LLVM IR (-O2):
define void @avpriv_toupper4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void print_var(char *s, int v) { printf("%s: %d\n", s, v); }


x86 assembly (clang, -O0):
<print_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_var>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s: %d\0A\00"
define void @print_var(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %d\0A\00"
define void @print_var(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, float);
extern void realmessage_(const char *string, float *f) {
  printf("%s %f\r", string, *f);
}


x86 assembly (clang, -O0):
<realmessage_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realmessage_>:
mov    %rdi,%rax
movss  (%rsi),%xmm0
lea    0xee2(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %f\0D\00"
define void @realmessage_(i8* %0, float* %1) {
%3 = alloca i8*
%4 = alloca float*
store i8* %0, i8** %3
store float* %1, float** %4
%5 = load i8*, i8** %3
%6 = load float*, float** %4
%7 = load float, float* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5, float %7)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %f\0D\00"
define void @realmessage_(i8* %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, float %3)
ret void
}
void free_strarray(char **array) {
  char **ptr = array;
  while (*ptr) {
    free(*ptr);
    ++ptr;
  }
  free(array);
}


x86 assembly (clang, -O0):
<free_strarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114f <free_strarray+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <free_strarray+0x14>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_strarray>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <free_strarray+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <free_strarray+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_strarray(i8** %0) {
%2 = alloca i8**
%3 = alloca i8**
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
store i8** %4, i8*** %3
br label %5
5: ; preds = %9, %1
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %3
%13 = getelementptr inbounds i8*, i8** %12, i32 1
store i8** %13, i8*** %3
br label %5
14: ; preds = %5
%15 = load i8**, i8*** %2
%16 = bitcast i8** %15 to i8*
ret void
}

LLVM IR (-O2):
define void @free_strarray(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %8, %4 ], [ %2, %1 ]
%6 = phi i8** [ %7, %4 ], [ %0, %1 ]
tail call void @free(i8* %5)
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = bitcast i8** %0 to i8*
tail call void @free(i8* %11)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int ispunct(int /*<<< orphan*/);
int iswpunct(wint_t c) { return ispunct(c); }


x86 assembly (clang, -O0):
<iswpunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ispunct@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswpunct>:
jmp    1030 <ispunct@plt>

LLVM IR (-O0):
define i32 @iswpunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ispunct(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @iswpunct(i32 %0) {
%2 = tail call i32 @ispunct(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int (*)(int, int), int, int);
void ActionCarrier(int (*action)(int, int), int a, int b) {
  printf("\n%d %p %d = %d", a, action, b, action(a, b));
}


x86 assembly (clang, -O0):
<ActionCarrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   *%rax
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    %eax,%r8d
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ActionCarrier>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %esi,%edi
mov    %edx,%esi
call   *%rbx
lea    0xed7(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    %r14d,%ecx
mov    %eax,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"\0A%d %p %d = %d\00"
define void @ActionCarrier(i32 (i32, i32)* %0, i32 %1, i32 %2) {
%4 = alloca i32 (i32, i32)*
%5 = alloca i32
%6 = alloca i32
store i32 (i32, i32)* %0, i32 (i32, i32)** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32 (i32, i32)*, i32 (i32, i32)** %4
%9 = load i32, i32* %6
%10 = load i32 (i32, i32)*, i32 (i32, i32)** %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 %10(i32 %11, i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7, i32 (i32, i32)* %8, i32 %9, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"\0A%d %p %d = %d\00"
define void @ActionCarrier(i32 (i32, i32)* %0, i32 %1, i32 %2) {
%4 = tail call i32 %0(i32 %1, i32 %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1, i32 (i32, i32)* %0, i32 %2, i32 %4)
ret void
}
void ff_hevc_idct_16x16_8_avx() {}


x86 assembly (clang, -O0):
<ff_hevc_idct_16x16_8_avx>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_hevc_idct_16x16_8_avx>:
ret

LLVM IR (-O0):
define void @ff_hevc_idct_16x16_8_avx() {
ret void
}

LLVM IR (-O2):
define void @ff_hevc_idct_16x16_8_avx() {
ret void
}
void _printf(int level, const char *fmt, ...) {}


x86 assembly (clang, -O0):
<_printf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_printf>:
ret

LLVM IR (-O0):
define void @_printf(i32 %0, i8* %1, ...) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @_printf(i32 %0, i8* nocapture %1, ...) {
ret void
}
void *thr_func(void *arg) {
  int i, sum = 0;
  for (i = 0; i < 5; i++)
    sum += i;
  return ((void *)sum);
}


x86 assembly (clang, -O0):
<thr_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1137 <thr_func+0x37>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <thr_func+0x16>
movslq -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr_func>:
mov    $0xa,%eax
ret

LLVM IR (-O0):
define i8* @thr_func(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %12, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %10, %9
store i32 %11, i32* %4
br label %12
12: ; preds = %8
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %5
15: ; preds = %5
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
ret i8* %18
}

LLVM IR (-O2):
define i8* @thr_func(i8* nocapture readnone %0) {
ret i8* inttoptr (i64 10 to i8*)
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, long);
main() {
  long nc;
  nc = 0;
  while (getchar() != EOF) {
    ++nc;
    printf("%ld\n", nc);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     116f <main+0x4f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    1137 <main+0x17>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb5(%rip),%r15
cmp    (%r15),%rax
je     116b <main+0x4b>
mov    $0x1,%ebx
lea    0xebc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    (%r15),%rax
jne    1150 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %7, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = load i64, i64* %2
%9 = add nsw i64 %8, 1
store i64 %9, i64* %2
%10 = load i64, i64* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %10)
br label %3
12: ; preds = %3
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i64 [ %6, %4 ], [ 0, %0 ]
%6 = add nuw nsw i64 %5, 1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = tail call i64 (...) @getchar()
%9 = load i64, i64* @EOF
%10 = icmp eq i64 %8, %9
br i1 %10, label %11, label %4
11: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ss2sess(float);
void ss2sess_(float *ieyesep) { ss2sess(*ieyesep); }


x86 assembly (clang, -O0):
<ss2sess_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <ss2sess@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss2sess_>:
movss  (%rdi),%xmm0
jmp    1030 <ss2sess@plt>

LLVM IR (-O0):
define void @ss2sess_(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = call i32 @ss2sess(float %4)
ret void
}

LLVM IR (-O2):
define void @ss2sess_(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call i32 @ss2sess(float %2)
ret void
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  unsigned int z;
  z = 0;
  if (s)
    while (*s)
      f(z++, s++);
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <ft_striteri+0x5e>
jmp    1127 <ft_striteri+0x27>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1159 <ft_striteri+0x59>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    %edi,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    %rsi,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
call   *%rax
jmp    1127 <ft_striteri+0x27>
jmp    115e <ft_striteri+0x5e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1135 <ft_striteri+0x35>
mov    %rdi,%r15
cmpb   $0x0,(%rdi)
je     1135 <ft_striteri+0x35>
mov    %rsi,%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rsi
mov    %ebx,%edi
call   *%r14
cmpb   $0x0,0x1(%r15,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ft_striteri(i8* %0, void (i32, i8*)* %1) {
%3 = alloca i8*
%4 = alloca void (i32, i8*)*
%5 = alloca i32
store i8* %0, i8** %3
store void (i32, i8*)* %1, void (i32, i8*)** %4
store i32 0, i32* %5
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %20
8: ; preds = %2
br label %9
9: ; preds = %13, %8
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %9
%14 = load void (i32, i8*)*, void (i32, i8*)** %4
%15 = load i32, i32* %5
%16 = add i32 %15, 1
store i32 %16, i32* %5
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
br label %9
19: ; preds = %9
br label %20
20: ; preds = %19, %2
ret void
}

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* nocapture %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %4, %7
%8 = phi i32 [ %10, %7 ], [ 0, %4 ]
%9 = phi i8* [ %11, %7 ], [ %0, %4 ]
%10 = add i32 %8, 1
%11 = getelementptr inbounds i8, i8* %9, i64 1
tail call void %1(i32 %8, i8* %9)
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %4, %2
ret void
}
int test_imm_71int64_lowword_reg(long long val) {
  return ((val) & (0x71 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_71int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x71,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_71int64_lowword_reg>:
test   $0x71,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_71int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 113
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_71int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 113
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int f(int);
int h(void) { return f(1); }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <f@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
mov    $0x1,%edi
jmp    1030 <f@plt>

LLVM IR (-O0):
define i32 @h() {
%1 = call i32 @f(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @h() {
%1 = tail call i32 @f(i32 1)
ret i32 %1
}