#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*/ debug_ol(char *);
int /*<<< orphan*/ ol(char *);
zsub() {
  debug_ol("; zsub");
  ol("pshb");
  ol("psha");
  ol("xgdx");
  ol("tsx");
  ol("subd	0,x");
  ol("pulx");
}


x86 assembly (clang, -O0):
<zsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <debug_ol@plt>
lea    0xecc(%rip),%rdi
call   1030 <ol@plt>
lea    0xec5(%rip),%rdi
call   1030 <ol@plt>
lea    0xebe(%rip),%rdi
call   1030 <ol@plt>
lea    0xeb7(%rip),%rdi
call   1030 <ol@plt>
lea    0xeaf(%rip),%rdi
call   1030 <ol@plt>
lea    0xeac(%rip),%rdi
call   1030 <ol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zsub>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <debug_ol@plt>
lea    0xed3(%rip),%rdi
call   1030 <ol@plt>
lea    0xecc(%rip),%rdi
call   1030 <ol@plt>
lea    0xec5(%rip),%rdi
call   1030 <ol@plt>
lea    0xebe(%rip),%rdi
call   1030 <ol@plt>
lea    0xeb6(%rip),%rdi
call   1030 <ol@plt>
lea    0xeb3(%rip),%rdi
pop    %rax
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"; zsub\00"
@.str.1 = [5 x i8] c"pshb\00"
@.str.2 = [5 x i8] c"psha\00"
@.str.3 = [5 x i8] c"xgdx\00"
@.str.4 = [4 x i8] c"tsx\00"
@.str.5 = [9 x i8] c"subd\090,x\00"
@.str.6 = [5 x i8] c"pulx\00"
define i32 @zsub() {
%1 = alloca i32
%2 = call i32 @debug_ol(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @ol(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @ol(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [7 x i8] c"; zsub\00"
@.str.1 = [5 x i8] c"pshb\00"
@.str.2 = [5 x i8] c"psha\00"
@.str.3 = [5 x i8] c"xgdx\00"
@.str.4 = [4 x i8] c"tsx\00"
@.str.5 = [9 x i8] c"subd\090,x\00"
@.str.6 = [5 x i8] c"pulx\00"
define i32 @zsub() {
%1 = tail call i32 @debug_ol(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @ol(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @ol(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
ret i32 undef
}