#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*/ Qt_handleString(char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strstr(char *, char *);
void Qt_setPrecisionSource(char *widget, int pen, char *token) {
  char asc[80], aux[80];
  (void)(pen);
  if (!strcmp(widget, "caStripPlot"))
    return;
  if (!strcmp(widget, "caThermo"))
    return;
  if (!strcmp(widget, "caSlider"))
    return;
  if (strstr(widget, "Gauge") != (char *)0)
    return;
  strcpy(aux, token);
  if (aux[0] >= 'a' && aux[0] <= 'z')
    aux[0] = aux[0] - 32;
  if (!strcmp(aux, "Default"))
    strcpy(aux, "User");
  sprintf(asc, "%s::%s", widget, aux);
  Qt_handleString("precisionMode", "enum", asc);
}


x86 assembly (clang, -O0):
<Qt_setPrecisionSource>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe8f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1184 <Qt_setPrecisionSource+0x34>
jmp    1280 <Qt_setPrecisionSource+0x130>
mov    -0x8(%rbp),%rdi
lea    0xe7d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11a2 <Qt_setPrecisionSource+0x52>
jmp    1280 <Qt_setPrecisionSource+0x130>
mov    -0x8(%rbp),%rdi
lea    0xe68(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11c0 <Qt_setPrecisionSource+0x70>
jmp    1280 <Qt_setPrecisionSource+0x130>
mov    -0x8(%rbp),%rdi
lea    0xe53(%rip),%rsi
call   1070 <strstr@plt>
cmp    $0x0,%rax
je     11df <Qt_setPrecisionSource+0x8f>
jmp    1280 <Qt_setPrecisionSource+0x130>
lea    -0xc0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
movsbl -0xc0(%rbp),%eax
cmp    $0x61,%eax
jl     121f <Qt_setPrecisionSource+0xcf>
movsbl -0xc0(%rbp),%eax
cmp    $0x7a,%eax
jg     121f <Qt_setPrecisionSource+0xcf>
movsbl -0xc0(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0xc0(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xdf7(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    124e <Qt_setPrecisionSource+0xfe>
lea    -0xc0(%rbp),%rdi
lea    0xde3(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    -0xc0(%rbp),%rcx
lea    0xdcd(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdx
lea    0xdc4(%rip),%rdi
lea    0xdcb(%rip),%rsi
call   1040 <Qt_handleString@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Qt_setPrecisionSource>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
lea    0xe99(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     121c <Qt_setPrecisionSource+0xcc>
lea    0xe91(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     121c <Qt_setPrecisionSource+0xcc>
lea    0xe83(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     121c <Qt_setPrecisionSource+0xcc>
lea    0xe79(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strstr@plt>
test   %rax,%rax
jne    121c <Qt_setPrecisionSource+0xcc>
mov    %rsp,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    (%rsp),%al
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     11cd <Qt_setPrecisionSource+0x7d>
add    $0xe0,%al
mov    %al,(%rsp)
movabs $0x746c7561666544,%rax
cmp    %rax,(%rsp)
jne    11ec <Qt_setPrecisionSource+0x9c>
lea    0xe40(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
lea    0xe36(%rip),%rsi
lea    0x50(%rsp),%r14
mov    %rsp,%rcx
mov    %r14,%rdi
mov    %rbx,%rdx
call   1060 <sprintf@plt>
lea    0xe23(%rip),%rdi
lea    0xe2a(%rip),%rsi
mov    %r14,%rdx
call   1040 <Qt_handleString@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"caStripPlot\00"
@.str.1 = [9 x i8] c"caThermo\00"
@.str.2 = [9 x i8] c"caSlider\00"
@.str.3 = [6 x i8] c"Gauge\00"
@.str.4 = [8 x i8] c"Default\00"
@.str.5 = [5 x i8] c"User\00"
@.str.6 = [7 x i8] c"%s::%s\00"
@.str.7 = [14 x i8] c"precisionMode\00"
@.str.8 = [5 x i8] c"enum\00"
define void @Qt_setPrecisionSource(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [80 x i8]
%8 = alloca [80 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i32, i32* %5
%10 = load i8*, i8** %4
%11 = call i32 @strcmp(i8* %10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %3
br label %63
14: ; preds = %3
%15 = load i8*, i8** %4
%16 = call i32 @strcmp(i8* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp ne i32 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %14
br label %63
19: ; preds = %14
%20 = load i8*, i8** %4
%21 = call i32 @strcmp(i8* %20, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp ne i32 %21, 0
br i1 %22, label %24, label %23
23: ; preds = %19
br label %63
24: ; preds = %19
%25 = load i8*, i8** %4
%26 = call i8* @strstr(i8* %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp ne i8* %26, null
br i1 %27, label %28, label %29
28: ; preds = %24
br label %63
29: ; preds = %24
%30 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%31 = load i8*, i8** %6
%32 = call i32 @strcpy(i8* %30, i8* %31)
%33 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp sge i32 %35, 97
br i1 %36, label %37, label %49
37: ; preds = %29
%38 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp sle i32 %40, 122
br i1 %41, label %42, label %49
42: ; preds = %37
%43 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = sub nsw i32 %45, 32
%47 = trunc i32 %46 to i8
%48 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
store i8 %47, i8* %48
br label %49
49: ; preds = %42, %37, %29
%50 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%51 = call i32 @strcmp(i8* %50, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%52 = icmp ne i32 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %49
%54 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%55 = call i32 @strcpy(i8* %54, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %56
56: ; preds = %53, %49
%57 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%58 = load i8*, i8** %4
%59 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%60 = call i32 @sprintf(i8* %57, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %58, i8* %59)
%61 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%62 = call i32 @Qt_handleString(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %61)
br label %63
63: ; preds = %56, %28, %23, %18, %13
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"caStripPlot\00"
@.str.1 = [9 x i8] c"caThermo\00"
@.str.2 = [9 x i8] c"caSlider\00"
@.str.3 = [6 x i8] c"Gauge\00"
@.str.5 = [5 x i8] c"User\00"
@.str.6 = [7 x i8] c"%s::%s\00"
@.str.7 = [14 x i8] c"precisionMode\00"
@.str.8 = [5 x i8] c"enum\00"
define void @Qt_setPrecisionSource(i8* %0, i32 %1, i8* %2) {
%4 = alloca [80 x i8]
%5 = alloca [80 x i8]
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %35, label %10
10: ; preds = %3
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %35, label %13
13: ; preds = %10
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %35, label %16
16: ; preds = %13
%17 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %35
19: ; preds = %16
%20 = call i32 @strcpy(i8* %7, i8* %2)
%21 = load i8, i8* %7
%22 = add i8 %21, -97
%23 = icmp ult i8 %22, 26
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = add nsw i8 %21, -32
store i8 %25, i8* %7
br label %26
26: ; preds = %24, %19
%27 = bitcast [80 x i8]* %5 to i64*
%28 = load i64, i64* %27
%29 = icmp eq i64 %28, 32770348699510084
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %26
%33 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %0, i8* %7)
%34 = call i32 @Qt_handleString(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %6)
br label %35
35: ; preds = %16, %13, %10, %3, %32
ret void
}